Skip to content

Commit

Permalink
Fix #62, Removed hwords and replaced CFE_SB_RcvMsg
Browse files Browse the repository at this point in the history
 - Replaced CFE_SB_RcvMsg with CFE_SB_ReceiveBuffer
  • Loading branch information
skliper committed Nov 30, 2020
1 parent 29c21e1 commit 42b969b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions fsw/src/ci_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ typedef union
{
CFE_MSG_Message_t Msg;
uint8 bytes[CI_LAB_MAX_INGEST];
uint16 hwords[2];
} CI_LAB_IngestBuffer_t;

typedef struct
Expand Down Expand Up @@ -112,7 +111,7 @@ void CI_Lab_AppMain(void)
CFE_ES_PerfLogExit(CI_LAB_MAIN_TASK_PERF_ID);

/* Pend on receipt of command packet -- timeout set to 500 millisecs */
status = CFE_SB_RcvMsg(&SBBufPtr, CI_LAB_Global.CommandPipe, 500);
status = CFE_SB_ReceiveBuffer(&SBBufPtr, CI_LAB_Global.CommandPipe, 500);

CFE_ES_PerfLogEntry(CI_LAB_MAIN_TASK_PERF_ID);

Expand Down Expand Up @@ -378,8 +377,9 @@ void CI_LAB_ReadUpLink(void)
/* bad size, report as ingest error */
CI_LAB_Global.HkTlm.Payload.IngestErrors++;
CFE_EVS_SendEvent(CI_LAB_INGEST_ERR_EID, CFE_EVS_EventType_ERROR,
"CI: L%d, cmd %0x %0x dropped, bad length=%d\n", __LINE__,
CI_LAB_Global.IngestBuffer.hwords[0], CI_LAB_Global.IngestBuffer.hwords[1], (int)status);
"CI: L%d, cmd %0x%0x %0x%0x dropped, bad length=%d\n", __LINE__,
CI_LAB_Global.IngestBuffer.bytes[0], CI_LAB_Global.IngestBuffer.bytes[1],
CI_LAB_Global.IngestBuffer.bytes[2], CI_LAB_Global.IngestBuffer.bytes[3], (int)status);
}
else
{
Expand All @@ -396,10 +396,10 @@ void CI_LAB_ReadUpLink(void)
/* CI_LAB_VerifyCmdLength() -- Verify command packet length */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
bool CI_LAB_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Size_t ExpectedLength)
bool CI_LAB_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength)
{
bool result = true;
CFE_MSG_Size_t ActualLength = 0;
size_t ActualLength = 0;
CFE_MSG_FcnCode_t FcnCode = 0;
CFE_SB_MsgId_t MsgId = CFE_SB_INVALID_MSG_ID;

Expand Down
2 changes: 1 addition & 1 deletion fsw/src/ci_lab_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ void CI_LAB_ProcessGroundCommand(CFE_SB_Buffer_t *SBBufPtr);
void CI_LAB_ResetCounters_Internal(void);
void CI_LAB_ReadUpLink(void);

bool CI_LAB_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Size_t ExpectedLength);
bool CI_LAB_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength);

#endif /* _ci_lab_app_h_ */

0 comments on commit 42b969b

Please sign in to comment.