event stuff added

This commit is contained in:
Robin Müller 2020-10-29 15:23:14 +01:00
parent 64c341b5f6
commit 9af5855ece
2 changed files with 8 additions and 1 deletions

View File

@ -2,6 +2,7 @@
#define CONFIG_FSFWCONFIG_H_ #define CONFIG_FSFWCONFIG_H_
#include <FSFWVersion.h> #include <FSFWVersion.h>
#include <cstddef>
//! Used to determine whether C++ ostreams are used //! Used to determine whether C++ ostreams are used
//! Those can lead to code bloat. //! Those can lead to code bloat.
@ -37,5 +38,12 @@
//! will not be provided. This define should be set to 1 if this is the case. //! will not be provided. This define should be set to 1 if this is the case.
#define FSFW_NO_C99_IO 1 #define FSFW_NO_C99_IO 1
namespace fsfwconfig {
//! Configure the allocated pool sizes for the event manager.
static constexpr size_t FSFW_EVENTMGMR_MATCHTREE_NODES = 240;
static constexpr size_t FSFW_EVENTMGMT_EVENTIDMATCHERS = 120;
static constexpr size_t FSFW_EVENTMGMR_RANGEMATCHERS = 120;
}
#endif /* CONFIG_FSFWCONFIG_H_ */ #endif /* CONFIG_FSFWCONFIG_H_ */

View File

@ -12,7 +12,6 @@ const uint16_t EventManager::POOL_SIZES[N_POOLS] = {
// objects registering for certain events. // objects registering for certain events.
// Each listener requires 1 or 2 EventIdMatcher and 1 or 2 ReportRangeMatcher. // Each listener requires 1 or 2 EventIdMatcher and 1 or 2 ReportRangeMatcher.
// So a good guess is 75 to a max of 100 pools required for each, which fits well. // So a good guess is 75 to a max of 100 pools required for each, which fits well.
// SHOULDDO: Shouldn't this be in the config folder and passed via ctor?
const uint16_t EventManager::N_ELEMENTS[N_POOLS] = { 240, 120, 120 }; const uint16_t EventManager::N_ELEMENTS[N_POOLS] = { 240, 120, 120 };
EventManager::EventManager(object_id_t setObjectId) : EventManager::EventManager(object_id_t setObjectId) :