X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fcore%2Foam%2FModule.hpp;h=533eaad700882e393097dbba017ab7fd3fff288d;hp=d3c35420b8d9ad5062e2e9f03329cbc80875a684;hb=7ee10b64f4c116460ffef5784eb9ef87d3f2339c;hpb=1a1b334a0d2b023bd778f0a19665cc9017dbc94a diff --git a/include/anna/core/oam/Module.hpp b/include/anna/core/oam/Module.hpp index d3c3542..533eaad 100644 --- a/include/anna/core/oam/Module.hpp +++ b/include/anna/core/oam/Module.hpp @@ -136,16 +136,11 @@ class Module { Handler a_defaultHandler; // default OAM handler Handler *a_handler; // Handler reference - std::string a_name; // module description + bool a_counters_enabled; // Enable/Disable registered counters over this module (default is 'false') bool a_alarms_enabled; // Enable/Disable registered alarms over this module (default is 'false') - // dynamic modifications over alarm text - bool a_alarms_preffix_enabled; // Show own module alarm preffix - bool a_alarms_suffix_enabled; // Show own module alarm suffix - std::string alarmComponentsToText(const std::vector & components, const std::string & psL, const std::string & psS, const std::string & psR) const throw(); - // GENERIC COUNTERS anna::oam::CounterScope* a_active_counter_scope; // Current scope for counters generation typedef std::map scope_container; @@ -156,9 +151,13 @@ class Module { // GENERIC ALARMS typedef std::map < int /*type*/, alarm_data_t > alarm_container; alarm_container a_alarms; - void alarmEvent(bool activation, const int & type, va_list argList) const throw(); + // dynamic modifications over alarm text + bool a_alarms_preffix_enabled; // Show own module alarm preffix + bool a_alarms_suffix_enabled; // Show own module alarm suffix + std::string alarmComponentsToText(const std::vector & components, const std::string & psL, const std::string & psS, const std::string & psR) const throw(); + // Counters typedef scope_container::iterator scope_iterator; typedef scope_container::const_iterator const_scope_iterator; @@ -210,14 +209,15 @@ public: /** Constructor @param name Logical name for the class (better use fullNaming format including namespace resolution) */ - Module(const std::string &name) : a_name(name), + Module(const std::string &name) : a_handler(&a_defaultHandler), + a_name(name), a_counters_enabled(false), - a_counterRecorder(NULL), - a_counterRecording(false), a_alarms_enabled(false), a_alarms_preffix_enabled(true), - a_alarms_suffix_enabled(true) {;} + a_alarms_suffix_enabled(true), + a_counterRecorder(NULL), + a_counterRecording(false) {;} /** * Destructor