From ed928b0bf17ec94587886072808d37c6321671e0 Mon Sep 17 00:00:00 2001 From: Avi Date: Fri, 21 Oct 2022 15:55:13 +1000 Subject: [PATCH] Fix #52, Apply consistent Event ID names to common events --- fsw/inc/cs_events.h | 10 +-- fsw/inc/cs_msgdefs.h | 160 ++++++++++++++++++------------------- fsw/src/cs_app.c | 4 +- fsw/src/cs_cmds.c | 4 +- fsw/src/cs_init.c | 2 +- fsw/src/cs_utils.c | 2 +- fsw/src/cs_utils.h | 2 +- unit-test/cs_app_tests.c | 4 +- unit-test/cs_cmds_tests.c | 4 +- unit-test/cs_init_tests.c | 6 +- unit-test/cs_utils_tests.c | 2 +- 11 files changed, 100 insertions(+), 100 deletions(-) diff --git a/fsw/inc/cs_events.h b/fsw/inc/cs_events.h index 517e02b..9cdfc8a 100644 --- a/fsw/inc/cs_events.h +++ b/fsw/inc/cs_events.h @@ -54,13 +54,13 @@ /** * \brief CS Reset Counters Command Event ID * - * \par Type: DEBUG + * \par Type: INFORMATION * * \par Cause: * * This event message is issued when a reset counters command has been received. */ -#define CS_RESET_DBG_EID 3 +#define CS_RESET_INF_EID 3 /** * \brief CS Disable Checksumming Command Event ID @@ -451,7 +451,7 @@ * This event message is issued when a software bus message is received * with an invalid command code. */ -#define CS_CC1_ERR_EID 34 +#define CS_CC_ERR_EID 34 /** * \brief CS App Termination Event ID @@ -475,7 +475,7 @@ * This event message is issued when command message is received with a message * length that doesn't match the expected value. */ -#define CS_LEN_ERR_EID 36 +#define CS_CMD_LEN_ERR_EID 36 /**********************************************************************/ /*EEPROM Commands */ @@ -1466,7 +1466,7 @@ * * This event message is issued when CFE_SB_CreatePipe fails for the command pipe */ -#define CS_INIT_SB_CREATE_ERR_EID 112 +#define CS_CR_PIPE_ERR_EID 112 /** * \brief CS Software Bus Subscribe To Housekeeping Failed Event ID diff --git a/fsw/inc/cs_msgdefs.h b/fsw/inc/cs_msgdefs.h index a67656d..ecd33af 100644 --- a/fsw/inc/cs_msgdefs.h +++ b/fsw/inc/cs_msgdefs.h @@ -53,8 +53,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -75,9 +75,9 @@ * \par Command Verification * Successful execution of this command may be verified with * the following telemetry: - * - #CS_HkPacket_Payload_t.CmdCounter will be cleared - * - #CS_HkPacket_Payload_t.CmdErrCounter will be cleared - * - The #CS_RESET_DBG_EID informational event message will be + * - #CS_HkPacket_t.CmdCounter will be cleared + * - #CS_HkPacket_t.CmdErrCounter will be cleared + * - The #CS_RESET_INF_EID informational event message will be * generated when the command is executed * * \par Error Conditions @@ -85,8 +85,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -127,8 +127,8 @@ * - The child task failed to be created * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_ONESHOT_MEMVALIDATE_ERR_EID * - Error specific event message #CS_ONESHOT_CHDTASK_ERR_EID * - Error specific event message #CS_ONESHOT_CREATE_CHDTASK_ERR_EID @@ -169,8 +169,8 @@ * - The child task could not be deleted * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_ONESHOT_CANCEL_NO_CHDTASK_ERR_EID * - Error specific event message #CS_ONESHOT_CANCEL_DELETE_CHDTASK_ERR_EID * @@ -203,8 +203,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -235,8 +235,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -267,8 +267,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -299,8 +299,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -333,8 +333,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -368,8 +368,8 @@ * - The child task failed to be created by Executive Services (ES) * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_RECOMPUTE_CFECORE_CREATE_CHDTASK_ERR_EID * - Error specific event message #CS_RECOMPUTE_CFECORE_CHDTASK_ERR_EID * @@ -406,9 +406,9 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID - * - #CS_HkPacket_Payload_t.OSCSState set to #CS_STATE_ENABLED + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID + * - #CS_HkPacket_t.OSCSState set to #CS_STATE_ENABLED * * \par Criticality * None @@ -439,8 +439,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -473,8 +473,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -507,8 +507,8 @@ * - The child task failed to be created by Executive Services (ES) * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_RECOMPUTE_OS_CREATE_CHDTASK_ERR_EID * - Error specific event message #CS_RECOMPUTE_OS_CHDTASK_ERR_EID * @@ -545,8 +545,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -577,8 +577,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -612,8 +612,8 @@ * - The command specified Entry ID is invalid * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_BASELINE_INVALID_ENTRY_EEPROM_ERR_EID * * \par Criticality @@ -652,8 +652,8 @@ * - The child task failed to be created by Executive Services (ES) * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_RECOMPUTE_INVALID_ENTRY_EEPROM_ERR_EID * - Error specific event message #CS_RECOMPUTE_EEPROM_CREATE_CHDTASK_ERR_EID * - Error specific event message #CS_RECOMPUTE_EEPROM_CHDTASK_ERR_EID @@ -692,8 +692,8 @@ * - Command specified entry was invalid * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_ENABLE_EEPROM_INVALID_ENTRY_ERR_EID * * \par Criticality @@ -725,8 +725,8 @@ * - Command specified entry was invalid * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_DISABLE_EEPROM_INVALID_ENTRY_ERR_EID * * \par Criticality @@ -759,8 +759,8 @@ * - Command specified address was not found in the table * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_GET_ENTRY_ID_EEPROM_NOT_FOUND_INF_EID * * \par Criticality @@ -790,8 +790,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -822,8 +822,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -857,8 +857,8 @@ * - The command specified Entry ID is invalid * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_BASELINE_INVALID_ENTRY_MEMORY_ERR_EID * * \par Criticality @@ -896,8 +896,8 @@ * - The child task failed to be created by Executive Services (ES) * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_RECOMPUTE_INVALID_ENTRY_MEMORY_ERR_EID * - Error specific event message #CS_RECOMPUTE_MEMORY_CREATE_CHDTASK_ERR_EID * - Error specific event message #CS_RECOMPUTE_MEMORY_CHDTASK_ERR_EID @@ -936,8 +936,8 @@ * - Command specified entry was invalid * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_ENABLE_MEMORY_INVALID_ENTRY_ERR_EID * * \par Criticality @@ -969,8 +969,8 @@ * - Command specified entry was invalid * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_DISABLE_MEMORY_INVALID_ENTRY_ERR_EID * * \par Criticality @@ -1003,8 +1003,8 @@ * - Command specified address was not found in the table * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_GET_ENTRY_ID_MEMORY_NOT_FOUND_INF_EID * * \par Criticality @@ -1035,8 +1035,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -1067,8 +1067,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -1102,8 +1102,8 @@ * - The command specified able name is invalid * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_BASELINE_INVALID_NAME_TABLES_ERR_EID * * \par Criticality @@ -1147,8 +1147,8 @@ * - The child task failed to be created by Executive Services (ES) * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_RECOMPUTE_UNKNOWN_NAME_TABLES_ERR_EID * - Error specific event message #CS_RECOMPUTE_TABLES_CREATE_CHDTASK_ERR_EID * - Error specific event message #CS_RECOMPUTE_TABLES_CHDTASK_ERR_EID @@ -1187,8 +1187,8 @@ * - Command specified table name was invalid * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_ENABLE_TABLES_UNKNOWN_NAME_ERR_EID * * \par Criticality @@ -1253,8 +1253,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -1285,8 +1285,8 @@ * - Command packet length not as expected * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * * \par Criticality * None @@ -1320,8 +1320,8 @@ * - The command specified able name is invalid * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_BASELINE_INVALID_NAME_APP_ERR_EID * * \par Criticality @@ -1359,8 +1359,8 @@ * - The child task failed to be created by Executive Services (ES) * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_RECOMPUTE_UNKNOWN_NAME_APP_ERR_EID * - Error specific event message #CS_RECOMPUTE_APP_CREATE_CHDTASK_ERR_EID * - Error specific event message #CS_RECOMPUTE_APP_CHDTASK_ERR_EID @@ -1399,8 +1399,8 @@ * - Command specified app name was invalid * * \par Evidence of failure may be found in the following telemetry: - * - #CS_HkPacket_Payload_t.CmdErrCounter will increment - * - Error specific event message #CS_LEN_ERR_EID + * - #CS_HkPacket_t.CmdErrCounter will increment + * - Error specific event message #CS_CMD_LEN_ERR_EID * - Error specific event message #CS_ENABLE_APP_UNKNOWN_NAME_ERR_EID * * \par Criticality diff --git a/fsw/src/cs_app.c b/fsw/src/cs_app.c index 2db7b4f..00af2a9 100644 --- a/fsw/src/cs_app.c +++ b/fsw/src/cs_app.c @@ -561,7 +561,7 @@ void CS_ProcessCmd(const CFE_SB_Buffer_t *BufPtr) break; default: - CFE_EVS_SendEvent(CS_CC1_ERR_EID, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CS_CC_ERR_EID, CFE_EVS_EventType_ERROR, "Invalid ground command code: ID = 0x%08lX, CC = %d", (unsigned long)CFE_SB_MsgIdToValue(MessageID), CommandCode); @@ -591,7 +591,7 @@ void CS_HousekeepingCmd(const CS_NoArgsCmd_t *CmdPtr) CFE_MSG_GetMsgId(CFE_MSG_PTR(CmdPtr->CommandHeader), &MessageID); CFE_MSG_GetFcnCode(CFE_MSG_PTR(CmdPtr->CommandHeader), &CommandCode); - CFE_EVS_SendEvent(CS_LEN_ERR_EID, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CS_CMD_LEN_ERR_EID, CFE_EVS_EventType_ERROR, "Invalid msg length: ID = 0x%08lX, CC = %d, Len = %lu, Expected = %lu", (unsigned long)CFE_SB_MsgIdToValue(MessageID), CommandCode, (unsigned long)ActualLength, (unsigned long)ExpectedLength); diff --git a/fsw/src/cs_cmds.c b/fsw/src/cs_cmds.c index bea35e1..146dfae 100644 --- a/fsw/src/cs_cmds.c +++ b/fsw/src/cs_cmds.c @@ -72,7 +72,7 @@ void CS_ResetCmd(const CS_NoArgsCmd_t *CmdPtr) CS_AppData.HkPacket.Payload.OSCSErrCounter = 0; CS_AppData.HkPacket.Payload.PassCounter = 0; - CFE_EVS_SendEvent(CS_RESET_DBG_EID, CFE_EVS_EventType_DEBUG, "Reset Counters command recieved"); + CFE_EVS_SendEvent(CS_RESET_INF_EID, CFE_EVS_EventType_DEBUG, "Reset Counters command recieved"); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -98,7 +98,7 @@ void CS_BackgroundCheckCycle(const CS_NoArgsCmd_t *CmdPtr) CFE_MSG_GetMsgId(CFE_MSG_PTR(CmdPtr->CommandHeader), &MessageID); CFE_MSG_GetFcnCode(CFE_MSG_PTR(CmdPtr->CommandHeader), &CommandCode); - CFE_EVS_SendEvent(CS_LEN_ERR_EID, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CS_CMD_LEN_ERR_EID, CFE_EVS_EventType_ERROR, "Invalid msg length: ID = 0x%08lX, CC = %d, Len = %lu, Expected = %lu", (unsigned long)CFE_SB_MsgIdToValue(MessageID), CommandCode, (unsigned long)ActualLength, (unsigned long)ExpectedLength); diff --git a/fsw/src/cs_init.c b/fsw/src/cs_init.c index 3476461..ce97f6a 100644 --- a/fsw/src/cs_init.c +++ b/fsw/src/cs_init.c @@ -54,7 +54,7 @@ CFE_Status_t CS_SbInit(void) Result = CFE_SB_CreatePipe(&CS_AppData.CmdPipe, CS_AppData.PipeDepth, CS_AppData.PipeName); if (Result != CFE_SUCCESS) { - CFE_EVS_SendEvent(CS_INIT_SB_CREATE_ERR_EID, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CS_CR_PIPE_ERR_EID, CFE_EVS_EventType_ERROR, "Software Bus Create Pipe for command returned: 0x%08X", (unsigned int)Result); } else diff --git a/fsw/src/cs_utils.c b/fsw/src/cs_utils.c index 41f13d4..50a3090 100644 --- a/fsw/src/cs_utils.c +++ b/fsw/src/cs_utils.c @@ -459,7 +459,7 @@ bool CS_VerifyCmdLength(const CFE_MSG_Message_t *msg, size_t ExpectedLength) CFE_MSG_GetMsgId(msg, &MessageID); CFE_MSG_GetFcnCode(msg, &CommandCode); - CFE_EVS_SendEvent(CS_LEN_ERR_EID, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(CS_CMD_LEN_ERR_EID, CFE_EVS_EventType_ERROR, "Invalid msg length: ID = 0x%08lX, CC = %d, Len = %lu, Expected = %lu", (unsigned long)CFE_SB_MsgIdToValue(MessageID), CommandCode, (unsigned long)ActualLength, (unsigned long)ExpectedLength); diff --git a/fsw/src/cs_utils.h b/fsw/src/cs_utils.h index bea8470..f62e34d 100644 --- a/fsw/src/cs_utils.h +++ b/fsw/src/cs_utils.h @@ -355,7 +355,7 @@ bool CS_FindEnabledAppEntry(uint16 *EnabledEntry); * \retval true Message length matches ExpectedLength * \retval false Message length ExpectedLength mismatch * - * \sa #CS_LEN_ERR_EID + * \sa #CS_CMD_LEN_ERR_EID */ bool CS_VerifyCmdLength(const CFE_MSG_Message_t *msg, size_t ExpectedLength); diff --git a/unit-test/cs_app_tests.c b/unit-test/cs_app_tests.c index 9eb3dc3..4faaaab 100644 --- a/unit-test/cs_app_tests.c +++ b/unit-test/cs_app_tests.c @@ -2117,7 +2117,7 @@ void CS_AppPipe_Test_InvalidCCError(void) /* Verify results */ UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, CS_CC1_ERR_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, CS_CC_ERR_EID); UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_ERROR); strCmpResult = strncmp(ExpectedEventString, context_CFE_EVS_SendEvent[0].Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH); @@ -2275,7 +2275,7 @@ void CS_HousekeepingCmd_Test_InvalidMsgLength(void) /* Verify results */ - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, CS_LEN_ERR_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, CS_CMD_LEN_ERR_EID); UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_ERROR); strCmpResult = strncmp(ExpectedEventString, context_CFE_EVS_SendEvent[0].Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH); diff --git a/unit-test/cs_cmds_tests.c b/unit-test/cs_cmds_tests.c index e8cc1b8..63de2cb 100644 --- a/unit-test/cs_cmds_tests.c +++ b/unit-test/cs_cmds_tests.c @@ -113,7 +113,7 @@ void CS_ResetCmd_Test(void) UtAssert_True(CS_AppData.HkPacket.Payload.OSCSErrCounter == 0, "CS_AppData.HkPacket.Payload.OSCSErrCounter == 0"); UtAssert_True(CS_AppData.HkPacket.Payload.PassCounter == 0, "CS_AppData.HkPacket.Payload.PassCounter == 0"); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, CS_RESET_DBG_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, CS_RESET_INF_EID); UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_DEBUG); strCmpResult = strncmp(ExpectedEventString, context_CFE_EVS_SendEvent[0].Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH); @@ -158,7 +158,7 @@ void CS_BackgroundCheckCycle_Test_InvalidMsgLength(void) CS_BackgroundCheckCycle(&CmdPacket); /* Verify results */ - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, CS_LEN_ERR_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, CS_CMD_LEN_ERR_EID); UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_ERROR); strCmpResult = strncmp(ExpectedEventString, context_CFE_EVS_SendEvent[0].Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH); diff --git a/unit-test/cs_init_tests.c b/unit-test/cs_init_tests.c index a107704..c393c2a 100644 --- a/unit-test/cs_init_tests.c +++ b/unit-test/cs_init_tests.c @@ -48,7 +48,7 @@ void CS_Init_Test_SBCreatePipeError(void) snprintf(ExpectedEventString, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH, "Software Bus Create Pipe for command returned: 0x%%08X"); - /* Set to generate error message CS_INIT_SB_CREATE_ERR_EID */ + /* Set to generate error message CS_CR_PIPE_ERR_EID */ UT_SetDeferredRetcode(UT_KEY(CFE_SB_CreatePipe), 1, -1); /* Execute the function being tested */ @@ -58,7 +58,7 @@ void CS_Init_Test_SBCreatePipeError(void) UtAssert_True(Result == -1, "Result == -1"); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, CS_INIT_SB_CREATE_ERR_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, CS_CR_PIPE_ERR_EID); UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_ERROR); strCmpResult = strncmp(ExpectedEventString, context_CFE_EVS_SendEvent[0].Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH); @@ -242,7 +242,7 @@ void CS_Init_Test_TableInitErrorMemory(void) /* Set to prevent unintended error messages */ - /* Set to generate error message CS_INIT_SB_CREATE_ERR_EID. + /* Set to generate error message CS_CR_PIPE_ERR_EID. * Combining a SetReturnCode and a SetFunctionHook in order to return CFE_SUCCESS all runs except the one specified */ diff --git a/unit-test/cs_utils_tests.c b/unit-test/cs_utils_tests.c index b594219..5a8d52c 100644 --- a/unit-test/cs_utils_tests.c +++ b/unit-test/cs_utils_tests.c @@ -327,7 +327,7 @@ void CS_VerifyCmdLength_Test(void) UtAssert_BOOL_FALSE(CS_VerifyCmdLength((CFE_MSG_Message_t *)(&CmdPacket), MsgSize - 1)); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, CS_LEN_ERR_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, CS_CMD_LEN_ERR_EID); } void CS_BackgroundCfeCore_Test(void)