Skip to content

Commit

Permalink
Fix #52, Apply consistent Event ID names to common events
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Nov 1, 2022
1 parent 8653ba6 commit 6ab5451
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 59 deletions.
4 changes: 2 additions & 2 deletions fsw/src/cs_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,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);

Expand Down Expand Up @@ -552,7 +552,7 @@ void CS_HousekeepingCmd(const CS_NoArgsCmd_t *CmdPtr)
CFE_MSG_GetMsgId(&CmdPtr->CmdHeader.Msg, &MessageID);
CFE_MSG_GetFcnCode(&CmdPtr->CmdHeader.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);
Expand Down
4 changes: 2 additions & 2 deletions fsw/src/cs_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void CS_ResetCmd(const CS_NoArgsCmd_t *CmdPtr)
CS_AppData.HkPacket.OSCSErrCounter = 0;
CS_AppData.HkPacket.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");
}
}

Expand All @@ -112,7 +112,7 @@ void CS_BackgroundCheckCycle(const CS_NoArgsCmd_t *CmdPtr)
CFE_MSG_GetMsgId(&CmdPtr->CmdHeader.Msg, &MessageID);
CFE_MSG_GetFcnCode(&CmdPtr->CmdHeader.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);
Expand Down
10 changes: 5 additions & 5 deletions fsw/src/cs_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 */
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/cs_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int32 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
Expand Down
Loading

0 comments on commit 6ab5451

Please sign in to comment.