Skip to content

Commit

Permalink
WIP - nasa#777 SB deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed Oct 30, 2020
1 parent 7d5ef85 commit 55f22a5
Show file tree
Hide file tree
Showing 28 changed files with 459 additions and 482 deletions.
22 changes: 10 additions & 12 deletions docs/cFE Application Developers Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ FILE: xx_app.c
void XX_AppMain(void)
{
uint32 RunStatus = CFE_ES_RunStatus_APP_RUN;
CFE_SB_MsgPtr_t MsgPtr;
CFE_SB_Msg_t *MsgPtr;
int32 Result = CFE_SUCCESS;
/* Register application */
Expand Down Expand Up @@ -1646,10 +1646,9 @@ SAMPLE_AppData_t SAMPLE_AppData; /* Instantiate Task Data */
int32 Status;
...
Status = CFE_SB_InitMsg(&SAMPLE_AppData.HkPacket, /* Address of SB Message Data Buffer */
SAMPLE_HK_TLM_MID, /* SB Message ID associated with Data */
sizeof(SAMPLE_HkPacket_t), /* Size of Buffer */
CFE_SB_CLEAR_DATA); /* Buffer should be cleared by cFE */
Status = CFE_MSG_Init(&SAMPLE_AppData.HkPacket, /* Address of SB Message Data Buffer */
SAMPLE_HK_TLM_MID, /* SB Message ID associated with Data */
sizeof(SAMPLE_HkPacket_t)); /* Size of Buffer */
...
}
```
Expand All @@ -1660,7 +1659,7 @@ the SB Message was to be a command message, it would have been important
for the Developer to have used the CFE_SB_CMD_HDR_SIZE macro
instead.

The CFE_SB_InitMsg API call formats the SB Message Header
The CFE_MSG_Init API call formats the Message Header
appropriately with the given SB Message ID, size and, in this case,
clears the data portion of the SB Message (CFE_SB_CLEAR_DATA).
Another option for the fourth parameter is CFE_SB_NO_CLEAR which
Expand Down Expand Up @@ -1816,8 +1815,8 @@ FILE: sample_app.h
typedef struct
{
...
CFE_SB_MsgPtr_t MsgPtr;
CFE_SB_PipeId_t CmdPipe;
CFE_SB_Msg_t *MsgPtr;
CFE_SB_PipeId_t CmdPipe;
...
} SAMPLE_AppData_t;
```
Expand Down Expand Up @@ -1945,10 +1944,9 @@ SAMPLE_AppData_t SAMPLE_AppData; /* Instantiate Task Data */
** Get a SB Message block of memory and initialize it
*/
SAMPLE_AppData.BigPktPtr = (SAMPLE_BigPkt_t *)CFE_SB_ZeroCopyGetPtr(SAMPLE_BIGPKT_MSGLEN);
CFE_SB_InitMsg((CFE_SB_Msg_t *) SAMPLE_AppData.BigPktPtr,
SAMPLE_BIG_TLM_MID,
SAMPLE_BIGPKT_MSGLEN,
CFE_SB_CLEAR_DATA);
CFE_MSG_Init((CFE_SB_Msg_t *) SAMPLE_AppData.BigPktPtr,
SAMPLE_BIG_TLM_MID,
SAMPLE_BIGPKT_MSGLEN);
/*
** ...Fill Packet with Data...
Expand Down
25 changes: 13 additions & 12 deletions docs/src/cfe_api.dox
Original file line number Diff line number Diff line change
Expand Up @@ -146,30 +146,31 @@
</UL>
<LI> \ref CFEAPISBSetMessage
<UL>
<LI> #CFE_SB_InitMsg - \copybrief CFE_SB_InitMsg
<LI> #CFE_SB_SetMsgId - \copybrief CFE_SB_SetMsgId
<LI> #CFE_MSG_Init - \copybrief CFE_MSG_Init
<LI> #CFE_MSG_SetMsgId - \copybrief CFE_MSG_SetMsgId
<LI> #CFE_SB_SetUserDataLength - \copybrief CFE_SB_SetUserDataLength
<LI> #CFE_SB_SetTotalMsgLength - \copybrief CFE_SB_SetTotalMsgLength
<LI> #CFE_SB_SetMsgTime - \copybrief CFE_SB_SetMsgTime
<LI> #CFE_MSG_SetSize - \copybrief CFE_MSG_SetSize
<LI> #CFE_MSG_SetMsgTime - \copybrief CFE_MSG_SetMsgTime
<LI> #CFE_SB_TimeStampMsg - \copybrief CFE_SB_TimeStampMsg
<LI> #CFE_SB_SetCmdCode - \copybrief CFE_SB_SetCmdCode
<LI> #CFE_MSG_SetFcnCode - \copybrief CFE_MSG_SetFcnCode
<LI> #CFE_MSG_SetSequenceCount - \copybrief CFE_MSG_SetSequenceCount
<LI> #CFE_SB_MessageStringSet - \copybrief CFE_SB_MessageStringSet
</UL>
<LI> \ref CFEAPIGetMessage
<UL>
<LI> #CFE_SB_GetUserData - \copybrief CFE_SB_GetUserData
<LI> #CFE_SB_GetMsgId - \copybrief CFE_SB_GetMsgId
<LI> #CFE_MSG_GetMsgId - \copybrief CFE_MSG_GetMsgId
<LI> #CFE_SB_GetUserDataLength - \copybrief CFE_SB_GetUserDataLength
<LI> #CFE_SB_GetTotalMsgLength - \copybrief CFE_SB_GetTotalMsgLength
<LI> #CFE_SB_GetMsgTime - \copybrief CFE_SB_GetMsgTime
<LI> #CFE_SB_GetCmdCode - \copybrief CFE_SB_GetCmdCode
<LI> #CFE_MSG_GetSize - \copybrief CFE_MSG_GetSize
<LI> #CFE_MSG_GetMsgTime - \copybrief CFE_MSG_GetMsgTime
<LI> #CFE_MSG_GetFcnCode - \copybrief CFE_MSG_GetFcnCode
<LI> #CFE_MSG_GetTypeFromMsgId - \copybrief CFE_MSG_GetTypeFromMsgId
<LI> #CFE_SB_MessageStringGet - \copybrief CFE_SB_MessageStringGet
</UL>
<LI> \ref CFEAPISBChecksum
<UL>
<LI> #CFE_SB_GenerateChecksum - \copybrief CFE_SB_GenerateChecksum
<LI> #CFE_SB_GetChecksum - \copybrief CFE_SB_GetChecksum
<LI> #CFE_SB_ValidateChecksum - \copybrief CFE_SB_ValidateChecksum
<LI> #CFE_MSG_GenerateChecksum - \copybrief CFE_MSG_GenerateChecksum
<LI> #CFE_MSG_ValidateChecksum - \copybrief CFE_MSG_ValidateChecksum
</UL>
<LI> \ref CFEAPISBMessageID
<UL>
Expand Down
Loading

0 comments on commit 55f22a5

Please sign in to comment.