Skip to content

Commit

Permalink
Fix nasa#2057, Update docs and UT to use CFE_MSG_PTR
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Dec 6, 2023
1 parent ee18742 commit 6a57ec2
Show file tree
Hide file tree
Showing 6 changed files with 237 additions and 191 deletions.
10 changes: 5 additions & 5 deletions docs/cFE Application Developers Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1949,7 +1949,7 @@ SAMPLE_AppData_t SAMPLE_AppData; /* Instantiate Task Data */
int32 Status;

...
Status = CFE_MSG_Init(&SAMPLE_AppData.HkPacket.TlmHeader.Msg, /* Address of SB Message Data Buffer */
Status = CFE_MSG_Init(CFE_MSG_PTR(SAMPLE_AppData.HkPacket.TlmHeader), /* Location of SB Message Data Buffer */
SAMPLE_HK_TLM_MID, /* SB Message ID associated with Data */
sizeof(SAMPLE_AppData.HkPacket)); /* Size of Buffer */
...
Expand Down Expand Up @@ -2107,8 +2107,8 @@ SAMPLE_AppData_t SAMPLE_AppData; /* Instantiate Task Data */
/*
** Send housekeeping telemetry packet...
*/
CFE_SB_TimeStampMsg(&SAMPLE_APP_Data.HkTlm.TlmHeader.Msg);
CFE_SB_TransmitMsg(&SAMPLE_APP_Data.HkTlm.TlmHeader.Msg, true);
CFE_SB_TimeStampMsg(CFE_MSG_PTR(SAMPLE_APP_Data.HkTlm.TlmHeader));
CFE_SB_TransmitMsg(CFE_MSG_PTR(SAMPLE_APP_Data.HkTlm.TlmHeader), true);
...
}
```
Expand Down Expand Up @@ -2256,13 +2256,13 @@ SAMPLE_AppData_t SAMPLE_AppData; /* Instantiate Task Data */
SAMPLE_AppData.BigPktBuf = (SAMPLE_BigPkt_Buffer_t *)CFE_SB_AllocateMessageBuffer(sizeof(SAMPLE_BigPkt_t));

CFE_MSG_Init(SAMPLE_AppData.BigPktBuf->Pkt.TlmHeader.Msg, SAMPLE_BIG_TLM_MID,
sizeof(SAMPLE_AppData.BigPktBuf->Pkt);
sizeof(SAMPLE_AppData.BigPktBuf->Pkt));

/*
** ...Fill Packet with Data...
*/

/*
/*
** Send Message after time tagging it with current time
*/
CFE_SB_TimeStampMsg(&SAMPLE_AppData.BigPktBuf->Pkt.TlmHeader.Msg);
Expand Down
Loading

0 comments on commit 6a57ec2

Please sign in to comment.