uses new define and config file now

This commit is contained in:
Robin Müller 2020-09-15 17:33:21 +02:00
parent 7643af8607
commit 347d591def
3 changed files with 7 additions and 5 deletions

View File

@ -4,7 +4,7 @@
#include <stdint.h> #include <stdint.h>
#include "fwSubsystemIdRanges.h" #include "fwSubsystemIdRanges.h"
//could be move to more suitable location //could be move to more suitable location
#include <config/tmtc/subsystemIdRanges.h> #include <subsystemIdRanges.h>
typedef uint16_t EventId_t; typedef uint16_t EventId_t;
typedef uint8_t EventSeverity_t; typedef uint8_t EventSeverity_t;

View File

@ -109,13 +109,13 @@ ReturnValue_t EventManager::unsubscribeFromEventRange(MessageQueueId_t listener,
return result; return result;
} }
#ifdef DEBUG #if FSFW_DEBUG_OUTPUT == 1
void EventManager::printEvent(EventMessage* message) { void EventManager::printEvent(EventMessage* message) {
const char *string = 0; const char *string = 0;
switch (message->getSeverity()) { switch (message->getSeverity()) {
case SEVERITY::INFO: case SEVERITY::INFO:
#ifdef DEBUG_INFO_EVENT #if DEBUG_INFO_EVENT == 1
string = translateObject(message->getReporter()); string = translateObject(message->getReporter());
sif::info << "EVENT: "; sif::info << "EVENT: ";
if (string != 0) { if (string != 0) {

View File

@ -8,9 +8,11 @@
#include "../tasks/ExecutableObjectIF.h" #include "../tasks/ExecutableObjectIF.h"
#include "../ipc/MessageQueueIF.h" #include "../ipc/MessageQueueIF.h"
#include "../ipc/MutexIF.h" #include "../ipc/MutexIF.h"
#include <FSFWConfig.h>
#include <map> #include <map>
#ifdef DEBUG #if FSFW_DEBUG_OUTPUT == 1
// forward declaration, should be implemented by mission // forward declaration, should be implemented by mission
extern const char* translateObject(object_id_t object); extern const char* translateObject(object_id_t object);
extern const char* translateEvents(Event event); extern const char* translateEvents(Event event);
@ -55,7 +57,7 @@ protected:
void notifyListeners(EventMessage *message); void notifyListeners(EventMessage *message);
#ifdef DEBUG #if FSFW_DEBUG_OUTPUT == 1
void printEvent(EventMessage *message); void printEvent(EventMessage *message);
#endif #endif