nasa / CF

The Core Flight System (cFS) CFDP application.
Apache License 2.0
86 stars 46 forks source link

Use `CFE_MSG_PTR` instead of `&(x).Msg` #199

Closed skliper closed 11 months ago

skliper commented 2 years ago

Checklist (Please check before submitting)

Is your feature request related to a problem? Please describe. &(x).Msg has been abstracted by CFE_MSG_PTR to avoid internal dependencies on CFE_MSG_Message_t

src/cf_app.c:    CFE_MSG_SetMsgTime(&CF_AppData.hk.tlm_header.Msg, CFE_TIME_GetTime());
src/cf_app.c:    /* return value ignored */ CFE_SB_TransmitMsg(&CF_AppData.hk.tlm_header.Msg, true);
src/cf_app.c:    CFE_MSG_Init(&CF_AppData.hk.tlm_header.Msg, CFE_SB_ValueToMsgId(CF_HK_TLM_MID), sizeof(CF_AppData.hk));
src/cf_app.c:    CFE_MSG_Init(&CF_AppData.cfg.tlm_header.Msg, CFE_SB_ValueToMsgId(CF_CONFIG_TLM_MID), sizeof(CF_AppData.cfg));
src/cf_cmd.c:    CFE_MSG_SetMsgTime(&CF_AppData.cfg.tlm_header.Msg, CFE_TIME_GetTime());
src/cf_cmd.c:    /* return value ignored */ CFE_SB_TransmitMsg(&CF_AppData.cfg.tlm_header.Msg, true);

Describe the solution you'd like Use CFE_MSG_PTR

Describe alternatives you've considered None

Additional context None

Requester Info Jacob Hageman - NASA/GSFC

jphickey commented 2 years ago

The only reason I did not do this already is because Caelum (v7.0.0-rc4 tag) doesn't have CFE_MSG_PTR.... only Draco has this macro defined. So in order to be compatible with both versions I held off on changing this.