Skip to content

Commit

Permalink
Fix #129, Apply consistent Event ID names to common events
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Oct 21, 2022
1 parent a5e8b4b commit 47cc323
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions fsw/src/ci_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ void CI_LAB_TaskInit(void)
CFE_MSG_Init(CFE_MSG_PTR(CI_LAB_Global.HkTlm.TelemetryHeader), CFE_SB_ValueToMsgId(CI_LAB_HK_TLM_MID),
sizeof(CI_LAB_Global.HkTlm));

CFE_EVS_SendEvent(CI_LAB_STARTUP_INF_EID, CFE_EVS_EventType_INFORMATION, "CI Lab Initialized.%s",
CFE_EVS_SendEvent(CI_LAB_INIT_INF_EID, CFE_EVS_EventType_INFORMATION, "CI Lab Initialized.%s",
CI_LAB_VERSION_STRING);
}

Expand Down Expand Up @@ -210,7 +210,7 @@ void CI_LAB_ProcessCommandPacket(CFE_SB_Buffer_t *SBBufPtr)

default:
CI_LAB_Global.HkTlm.Payload.CommandErrorCounter++;
CFE_EVS_SendEvent(CI_LAB_COMMAND_ERR_EID, CFE_EVS_EventType_ERROR, "CI: invalid command packet,MID = 0x%x",
CFE_EVS_SendEvent(CI_LAB_MID_ERR_EID, CFE_EVS_EventType_ERROR, "CI: invalid command packet,MID = 0x%x",
(unsigned int)CFE_SB_MsgIdToValue(MsgId));
break;
}
Expand Down Expand Up @@ -262,7 +262,7 @@ int32 CI_LAB_Noop(const CI_LAB_NoopCmd_t *data)
/* Does everything the name implies */
CI_LAB_Global.HkTlm.Payload.CommandCounter++;

CFE_EVS_SendEvent(CI_LAB_COMMANDNOP_INF_EID, CFE_EVS_EventType_INFORMATION, "CI: NOOP command");
CFE_EVS_SendEvent(CI_LAB_NOOP_INF_EID, CFE_EVS_EventType_INFORMATION, "CI: NOOP command");

return CFE_SUCCESS;
}
Expand All @@ -275,7 +275,7 @@ int32 CI_LAB_Noop(const CI_LAB_NoopCmd_t *data)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 CI_LAB_ResetCounters(const CI_LAB_ResetCountersCmd_t *data)
{
CFE_EVS_SendEvent(CI_LAB_COMMANDRST_INF_EID, CFE_EVS_EventType_INFORMATION, "CI: RESET command");
CFE_EVS_SendEvent(CI_LAB_RESET_INF_EID, CFE_EVS_EventType_INFORMATION, "CI: RESET command");
CI_LAB_ResetCounters_Internal();
return CFE_SUCCESS;
}
Expand Down Expand Up @@ -398,7 +398,7 @@ bool CI_LAB_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength)
CFE_MSG_GetMsgId(MsgPtr, &MsgId);
CFE_MSG_GetFcnCode(MsgPtr, &FcnCode);

CFE_EVS_SendEvent(CI_LAB_LEN_ERR_EID, CFE_EVS_EventType_ERROR,
CFE_EVS_SendEvent(CI_LAB_CMD_LEN_ERR_EID, CFE_EVS_EventType_ERROR,
"Invalid msg length: ID = 0x%X, CC = %u, Len = %u, Expected = %u",
(unsigned int)CFE_SB_MsgIdToValue(MsgId), (unsigned int)FcnCode, (unsigned int)ActualLength,
(unsigned int)ExpectedLength);
Expand Down
10 changes: 5 additions & 5 deletions fsw/src/ci_lab_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
#define CI_LAB_RESERVED_EID 0
#define CI_LAB_SOCKETCREATE_ERR_EID 1
#define CI_LAB_SOCKETBIND_ERR_EID 2
#define CI_LAB_STARTUP_INF_EID 3
#define CI_LAB_COMMAND_ERR_EID 4
#define CI_LAB_COMMANDNOP_INF_EID 5
#define CI_LAB_COMMANDRST_INF_EID 6
#define CI_LAB_INIT_INF_EID 3
#define CI_LAB_MID_ERR_EID 4
#define CI_LAB_NOOP_INF_EID 5
#define CI_LAB_RESET_INF_EID 6
#define CI_LAB_INGEST_INF_EID 7
#define CI_LAB_INGEST_LEN_ERR_EID 8
#define CI_LAB_INGEST_ALLOC_ERR_EID 9
#define CI_LAB_INGEST_SEND_ERR_EID 10
#define CI_LAB_LEN_ERR_EID 16
#define CI_LAB_CMD_LEN_ERR_EID 16

#endif

0 comments on commit 47cc323

Please sign in to comment.