Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #118, Standardize command responses #122

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading