Skip to content

Commit

Permalink
CRC and Timestamp SC messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dmknutsen committed Aug 3, 2023
1 parent c7a3864 commit f99e2c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fsw/src/sc_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#include "cfe.h"
#include "cfe_tbl_msg.h"
#include "cfe_msg_custom_api.h"
#include "sc_app.h"
#include "sc_cmds.h"
#include "sc_atsrq.h"
Expand Down Expand Up @@ -101,6 +102,7 @@ void SC_ProcessAtpCmd(void)
** Check the checksum on the command
**
*/
CFE_MSG_SetGatewayCRC(&EntryPtr->Msg);
CFE_MSG_ValidateChecksum(&EntryPtr->Msg, &ChecksumValid);
if (ChecksumValid == true)
{
Expand Down Expand Up @@ -151,6 +153,7 @@ void SC_ProcessAtpCmd(void)
}
else
{
CFE_MSG_SetMsgTime(&EntryPtr->Msg, CFE_TIME_GetTime());
Result = CFE_SB_TransmitMsg(&EntryPtr->Msg, true);

if (Result == CFE_SUCCESS)
Expand Down Expand Up @@ -329,13 +332,14 @@ void SC_ProcessRtpCommand(void)
*/
EntryPtr = (SC_RtsEntry_t *)&SC_OperData.RtsTblAddr[RtsIndex][CmdOffset];

CFE_MSG_SetGatewayCRC(&EntryPtr->Msg);
CFE_MSG_ValidateChecksum(&EntryPtr->Msg, &ChecksumValid);
if (ChecksumValid == true)
{
/*
** Try Sending the command on the Software Bus
*/

CFE_MSG_SetMsgTime(&EntryPtr->Msg, CFE_TIME_GetTime());
Result = CFE_SB_TransmitMsg(&EntryPtr->Msg, true);

if (Result == CFE_SUCCESS)
Expand Down

0 comments on commit f99e2c1

Please sign in to comment.