From 9af5855ece0310e53c33a81ba2409b909ebbee98 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Thu, 29 Oct 2020 15:23:14 +0100 Subject: [PATCH] event stuff added --- defaultcfg/config/FSFWConfig.h | 8 ++++++++ events/EventManager.cpp | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/defaultcfg/config/FSFWConfig.h b/defaultcfg/config/FSFWConfig.h index 945992df..67c04225 100644 --- a/defaultcfg/config/FSFWConfig.h +++ b/defaultcfg/config/FSFWConfig.h @@ -2,6 +2,7 @@ #define CONFIG_FSFWCONFIG_H_ #include +#include //! Used to determine whether C++ ostreams are used //! 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. #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_ */ diff --git a/events/EventManager.cpp b/events/EventManager.cpp index e71951e3..3bce53eb 100644 --- a/events/EventManager.cpp +++ b/events/EventManager.cpp @@ -12,7 +12,6 @@ const uint16_t EventManager::POOL_SIZES[N_POOLS] = { // objects registering for certain events. // 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. -// SHOULDDO: Shouldn't this be in the config folder and passed via ctor? const uint16_t EventManager::N_ELEMENTS[N_POOLS] = { 240, 120, 120 }; EventManager::EventManager(object_id_t setObjectId) :