From 952fc7303a0a55f1a9fb8a39d5b05cf2fb5886eb Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Wed, 17 Jun 2020 21:15:19 +0200 Subject: [PATCH] renamed MESSAGE_TYPE to messagetypes --- action/ActionMessage.h | 2 +- devicehandlers/DeviceHandlerMessage.h | 2 +- health/HealthMessage.h | 2 +- ipc/CommandMessage.cpp | 22 +++++++++++----------- ipc/CommandMessage.h | 2 +- ipc/FwMessageTypes.h | 2 +- memory/MemoryMessage.h | 2 +- modes/ModeMessage.h | 2 +- monitoring/MonitoringMessage.h | 2 +- parameters/ParameterMessage.h | 2 +- subsystem/modes/ModeSequenceMessage.h | 2 +- tmstorage/TmStoreMessage.h | 2 +- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/action/ActionMessage.h b/action/ActionMessage.h index 5d8332cbf..59ad619ef 100644 --- a/action/ActionMessage.h +++ b/action/ActionMessage.h @@ -10,7 +10,7 @@ class ActionMessage { private: ActionMessage(); public: - static const uint8_t MESSAGE_ID = MESSAGE_TYPE::ACTION; + static const uint8_t MESSAGE_ID = messagetypes::ACTION; static const Command_t EXECUTE_ACTION = MAKE_COMMAND_ID(1); static const Command_t STEP_SUCCESS = MAKE_COMMAND_ID(2); static const Command_t STEP_FAILED = MAKE_COMMAND_ID(3); diff --git a/devicehandlers/DeviceHandlerMessage.h b/devicehandlers/DeviceHandlerMessage.h index fad0f1b1c..26f3b4ed9 100644 --- a/devicehandlers/DeviceHandlerMessage.h +++ b/devicehandlers/DeviceHandlerMessage.h @@ -25,7 +25,7 @@ public: /** * These are the commands that can be sent to a DeviceHandlerBase */ - static const uint8_t MESSAGE_ID = MESSAGE_TYPE::DEVICE_HANDLER_COMMAND; + static const uint8_t MESSAGE_ID = messagetypes::DEVICE_HANDLER_COMMAND; static const Command_t CMD_RAW = MAKE_COMMAND_ID( 1 ); //!< Sends a raw command, setParameter is a ::store_id_t containing the raw packet to send // static const Command_t CMD_DIRECT = MAKE_COMMAND_ID( 2 ); //!< Sends a direct command, setParameter is a ::DeviceCommandId_t, setParameter2 is a ::store_id_t containing the data needed for the command static const Command_t CMD_SWITCH_IOBOARD = MAKE_COMMAND_ID( 3 ); //!< Requests a IO-Board switch, setParameter() is the IO-Board identifier diff --git a/health/HealthMessage.h b/health/HealthMessage.h index 7fd009041..13e79b88e 100644 --- a/health/HealthMessage.h +++ b/health/HealthMessage.h @@ -6,7 +6,7 @@ class HealthMessage { public: - static const uint8_t MESSAGE_ID = MESSAGE_TYPE::HEALTH_COMMAND; + static const uint8_t MESSAGE_ID = messagetypes::HEALTH_COMMAND; static const Command_t HEALTH_SET = MAKE_COMMAND_ID(1);//REPLY_COMMAND_OK/REPLY_REJECTED static const Command_t HEALTH_ANNOUNCE = MAKE_COMMAND_ID(3); //NO REPLY! static const Command_t HEALTH_INFO = MAKE_COMMAND_ID(5); diff --git a/ipc/CommandMessage.cpp b/ipc/CommandMessage.cpp index fa41c6531..69a0bfd3d 100644 --- a/ipc/CommandMessage.cpp +++ b/ipc/CommandMessage.cpp @@ -15,7 +15,7 @@ #include #include -namespace MESSAGE_TYPE { +namespace messagetypes { void clearMissionMessage(CommandMessage* message); } @@ -67,35 +67,35 @@ void CommandMessage::setParameter2(uint32_t parameter2) { void CommandMessage::clearCommandMessage() { switch((getCommand()>>8) & 0xff){ - case MESSAGE_TYPE::MODE_COMMAND: + case messagetypes::MODE_COMMAND: ModeMessage::clear(this); break; - case MESSAGE_TYPE::HEALTH_COMMAND: + case messagetypes::HEALTH_COMMAND: HealthMessage::clear(this); break; - case MESSAGE_TYPE::MODE_SEQUENCE: + case messagetypes::MODE_SEQUENCE: ModeSequenceMessage::clear(this); break; - case MESSAGE_TYPE::ACTION: + case messagetypes::ACTION: ActionMessage::clear(this); break; - case MESSAGE_TYPE::DEVICE_HANDLER_COMMAND: + case messagetypes::DEVICE_HANDLER_COMMAND: DeviceHandlerMessage::clear(this); break; - case MESSAGE_TYPE::MEMORY: + case messagetypes::MEMORY: MemoryMessage::clear(this); break; - case MESSAGE_TYPE::MONITORING: + case messagetypes::MONITORING: MonitoringMessage::clear(this); break; - case MESSAGE_TYPE::TM_STORE: + case messagetypes::TM_STORE: TmStoreMessage::clear(this); break; - case MESSAGE_TYPE::PARAMETER: + case messagetypes::PARAMETER: ParameterMessage::clear(this); break; default: - MESSAGE_TYPE::clearMissionMessage(this); + messagetypes::clearMissionMessage(this); break; } } diff --git a/ipc/CommandMessage.h b/ipc/CommandMessage.h index 2d966063a..3d563607b 100644 --- a/ipc/CommandMessage.h +++ b/ipc/CommandMessage.h @@ -23,7 +23,7 @@ public: static const ReturnValue_t UNKNOW_COMMAND = MAKE_RETURN_CODE(0x01); - static const uint8_t MESSAGE_ID = MESSAGE_TYPE::COMMAND; + static const uint8_t MESSAGE_ID = messagetypes::COMMAND; static const Command_t CMD_NONE = MAKE_COMMAND_ID( 0 );//!< Used internally, will be ignored static const Command_t REPLY_COMMAND_OK = MAKE_COMMAND_ID( 3 ); static const Command_t REPLY_REJECTED = MAKE_COMMAND_ID( 0xD1 );//!< Reply indicating that the current command was rejected, par1 should contain the error code diff --git a/ipc/FwMessageTypes.h b/ipc/FwMessageTypes.h index ec1c9aa28..e820b1dfc 100644 --- a/ipc/FwMessageTypes.h +++ b/ipc/FwMessageTypes.h @@ -1,7 +1,7 @@ #ifndef FRAMEWORK_IPC_FWMESSAGETYPES_H_ #define FRAMEWORK_IPC_FWMESSAGETYPES_H_ -namespace MESSAGE_TYPE { +namespace messagetypes { //Remember to add new Message Types to the clearCommandMessage function! enum FW_MESSAGE_TYPE { COMMAND = 0, diff --git a/memory/MemoryMessage.h b/memory/MemoryMessage.h index 124fad081..48badb05f 100644 --- a/memory/MemoryMessage.h +++ b/memory/MemoryMessage.h @@ -9,7 +9,7 @@ class MemoryMessage { private: MemoryMessage(); //A private ctor inhibits instantiation public: - static const uint8_t MESSAGE_ID = MESSAGE_TYPE::MEMORY; + static const uint8_t MESSAGE_ID = messagetypes::MEMORY; static const Command_t CMD_MEMORY_LOAD = MAKE_COMMAND_ID( 0x01 ); static const Command_t CMD_MEMORY_DUMP = MAKE_COMMAND_ID( 0x02 ); static const Command_t CMD_MEMORY_CHECK = MAKE_COMMAND_ID( 0x03 ); diff --git a/modes/ModeMessage.h b/modes/ModeMessage.h index f72fdeec5..675c614b2 100644 --- a/modes/ModeMessage.h +++ b/modes/ModeMessage.h @@ -17,7 +17,7 @@ class ModeMessage { private: ModeMessage(); public: - static const uint8_t MESSAGE_ID = MESSAGE_TYPE::MODE_COMMAND; + static const uint8_t MESSAGE_ID = messagetypes::MODE_COMMAND; static const Command_t CMD_MODE_COMMAND = MAKE_COMMAND_ID(0x01);//!> Command to set the specified Mode, replies are: REPLY_MODE_REPLY, REPLY_WRONG_MODE_REPLY, and REPLY_REJECTED; don't add any replies, as this will break the subsystem mode machine!! static const Command_t CMD_MODE_COMMAND_FORCED = MAKE_COMMAND_ID(0xF1);//!> Command to set the specified Mode, regardless of external control flag, replies are: REPLY_MODE_REPLY, REPLY_WRONG_MODE_REPLY, and REPLY_REJECTED; don't add any replies, as this will break the subsystem mode machine!! static const Command_t REPLY_MODE_REPLY = MAKE_COMMAND_ID(0x02);//!> Reply to a CMD_MODE_COMMAND or CMD_MODE_READ diff --git a/monitoring/MonitoringMessage.h b/monitoring/MonitoringMessage.h index d2ff9b4dd..793e1fbf3 100644 --- a/monitoring/MonitoringMessage.h +++ b/monitoring/MonitoringMessage.h @@ -6,7 +6,7 @@ class MonitoringMessage: public CommandMessage { public: - static const uint8_t MESSAGE_ID = MESSAGE_TYPE::MONITORING; + static const uint8_t MESSAGE_ID = messagetypes::MONITORING; //Object id could be useful, but we better manage that on service level (register potential reporters). static const Command_t LIMIT_VIOLATION_REPORT = MAKE_COMMAND_ID(10); virtual ~MonitoringMessage(); diff --git a/parameters/ParameterMessage.h b/parameters/ParameterMessage.h index 0f2866756..432832941 100644 --- a/parameters/ParameterMessage.h +++ b/parameters/ParameterMessage.h @@ -9,7 +9,7 @@ class ParameterMessage { private: ParameterMessage(); public: - static const uint8_t MESSAGE_ID = MESSAGE_TYPE::PARAMETER; + static const uint8_t MESSAGE_ID = messagetypes::PARAMETER; static const Command_t CMD_PARAMETER_LOAD = MAKE_COMMAND_ID( 0x01 ); static const Command_t CMD_PARAMETER_DUMP = MAKE_COMMAND_ID( 0x02 ); static const Command_t REPLY_PARAMETER_DUMP = MAKE_COMMAND_ID( 0x03 ); diff --git a/subsystem/modes/ModeSequenceMessage.h b/subsystem/modes/ModeSequenceMessage.h index 830cf5329..61d1b6285 100644 --- a/subsystem/modes/ModeSequenceMessage.h +++ b/subsystem/modes/ModeSequenceMessage.h @@ -7,7 +7,7 @@ class ModeSequenceMessage { public: - static const uint8_t MESSAGE_ID = MESSAGE_TYPE::MODE_SEQUENCE; + static const uint8_t MESSAGE_ID = messagetypes::MODE_SEQUENCE; static const Command_t ADD_SEQUENCE = MAKE_COMMAND_ID(0x01); static const Command_t ADD_TABLE = MAKE_COMMAND_ID(0x02); diff --git a/tmstorage/TmStoreMessage.h b/tmstorage/TmStoreMessage.h index 0883063ca..bd6b2def9 100644 --- a/tmstorage/TmStoreMessage.h +++ b/tmstorage/TmStoreMessage.h @@ -41,7 +41,7 @@ public: static store_address_t getStoreId(const CommandMessage* cmd); virtual ~TmStoreMessage(); - static const uint8_t MESSAGE_ID = MESSAGE_TYPE::TM_STORE; + static const uint8_t MESSAGE_ID = messagetypes::TM_STORE; static const Command_t ENABLE_STORING = MAKE_COMMAND_ID(1); static const Command_t DELETE_STORE_CONTENT = MAKE_COMMAND_ID(2); static const Command_t DOWNLINK_STORE_CONTENT = MAKE_COMMAND_ID(3); -- 2.34.1