Skip to content

Commit

Permalink
Merge pull request #122 from thnkslprpt/fix-118-standardize-command-r…
Browse files Browse the repository at this point in the history
…esponses

Fix #118, Standardize command responses
  • Loading branch information
dzbaker authored Oct 24, 2024
2 parents d49bf9e + 433f557 commit ca7faf8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions fsw/inc/fm_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,7 @@
/**
* \brief FM Reset Counters Command Event ID
*
* \par Type: DEBUG
*
* This event is type debug because the command resets housekeeping
* telemetry counters that also signal the completion of the command.
* \par Type: INFORMATION
*
* \par Cause
*
Expand Down
2 changes: 1 addition & 1 deletion fsw/inc/fm_msgdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
*
* \par Command Success Verification
* - Command counters will be set to zero (see description)
* - Debug event #FM_RESET_INF_EID will be sent
* - Informational event #FM_RESET_INF_EID will be sent
*
* \par Command Error Conditions
* - Invalid command packet length
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/fm_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ bool FM_ResetCountersCmd(const CFE_SB_Buffer_t *BufPtr)
FM_GlobalData.ChildCmdWarnCounter = 0;

/* Send command completion event (debug) */
CFE_EVS_SendEvent(FM_RESET_INF_EID, CFE_EVS_EventType_DEBUG, "%s command", CmdText);
CFE_EVS_SendEvent(FM_RESET_INF_EID, CFE_EVS_EventType_INFORMATION, "%s command", CmdText);

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion unit-test/fm_cmds_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void Test_FM_ResetCountersCmd_Success(void)

UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, FM_RESET_INF_EID);

UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_DEBUG);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_INFORMATION);

strCmpResult = strncmp(ExpectedEventString, context_CFE_EVS_SendEvent[0].Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH);

Expand Down

0 comments on commit ca7faf8

Please sign in to comment.