fsfw/ipc/CommandMessageCleaner.cpp

46 lines
1.3 KiB
C++
Raw Normal View History

2020-06-13 21:01:01 +02:00
#include <framework/ipc/CommandMessageCleaner.h>
#include <framework/devicehandlers/DeviceHandlerMessage.h>
#include <framework/health/HealthMessage.h>
#include <framework/memory/MemoryMessage.h>
#include <framework/modes/ModeMessage.h>
#include <framework/monitoring/MonitoringMessage.h>
#include <framework/subsystem/modes/ModeSequenceMessage.h>
#include <framework/tmstorage/TmStoreMessage.h>
#include <framework/parameters/ParameterMessage.h>
2020-06-24 00:49:13 +02:00
void CommandMessageCleaner::clearCommandMessage(CommandMessage* message) {
2020-06-13 21:01:01 +02:00
switch(message->getMessageType()){
case messagetypes::MODE_COMMAND:
2020-06-24 00:49:13 +02:00
ModeMessage::clear(message);
2020-06-13 21:01:01 +02:00
break;
case messagetypes::HEALTH_COMMAND:
2020-06-24 00:49:13 +02:00
HealthMessage::clear(message);
2020-06-13 21:01:01 +02:00
break;
case messagetypes::MODE_SEQUENCE:
2020-06-24 00:49:13 +02:00
ModeSequenceMessage::clear(message);
2020-06-13 21:01:01 +02:00
break;
case messagetypes::ACTION:
2020-06-24 00:49:13 +02:00
ActionMessage::clear(message);
2020-06-13 21:01:01 +02:00
break;
case messagetypes::DEVICE_HANDLER_COMMAND:
2020-06-24 00:49:13 +02:00
DeviceHandlerMessage::clear(message);
2020-06-13 21:01:01 +02:00
break;
case messagetypes::MEMORY:
2020-06-24 00:49:13 +02:00
MemoryMessage::clear(message);
2020-06-13 21:01:01 +02:00
break;
case messagetypes::MONITORING:
2020-06-24 00:49:13 +02:00
MonitoringMessage::clear(message);
2020-06-13 21:01:01 +02:00
break;
case messagetypes::TM_STORE:
2020-06-24 00:49:13 +02:00
TmStoreMessage::clear(message);
2020-06-13 21:01:01 +02:00
break;
case messagetypes::PARAMETER:
2020-06-24 00:49:13 +02:00
ParameterMessage::clear(message);
2020-06-13 21:01:01 +02:00
break;
default:
messagetypes::clearMissionMessage(message);
break;
}
}