-
Notifications
You must be signed in to change notification settings - Fork 236
Description
Is your feature request related to a problem? Please describe.
Hk and Tbl RegPacket are initialized in both CFE_TBL_EarlyInit and CFE_TBL_InitData (called from CFE_TBL_TaskInit). The notify message packet is only initialized in CFE_TBL_SendNotificationMsg, and gets initialized every call.
cFE/fsw/cfe-core/src/tbl/cfe_tbl_internal.c
Lines 142 to 154 in e0d1ce8
| /* | |
| ** Initialize housekeeping packet (clear user data area)... | |
| */ | |
| CFE_SB_InitMsg(&CFE_TBL_TaskData.HkPacket, | |
| CFE_SB_ValueToMsgId(CFE_TBL_HK_TLM_MID), | |
| sizeof(CFE_TBL_TaskData.HkPacket), true); | |
| /* | |
| ** Initialize table registry report packet (clear user data area)... | |
| */ | |
| CFE_SB_InitMsg(&CFE_TBL_TaskData.TblRegPacket, | |
| CFE_SB_ValueToMsgId(CFE_TBL_REG_TLM_MID), | |
| sizeof(CFE_TBL_TaskData.TblRegPacket), true); |
cFE/fsw/cfe-core/src/tbl/cfe_tbl_internal.c
Lines 1511 to 1519 in e0d1ce8
| /* | |
| ** Initialize notification message packet (clear user data area)... | |
| */ | |
| CFE_SB_InitMsg(&CFE_TBL_TaskData.NotifyMsg, | |
| RegRecPtr->NotificationMsgId, | |
| sizeof(CFE_TBL_NotifyCmd_t), true); | |
| /* Set the command code */ | |
| CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t) &CFE_TBL_TaskData.NotifyMsg, RegRecPtr->NotificationCC); |
cFE/fsw/cfe-core/src/tbl/cfe_tbl_task.c
Lines 247 to 256 in e0d1ce8
| /* Initialize Packet Headers */ | |
| CFE_SB_InitMsg(&CFE_TBL_TaskData.HkPacket, | |
| CFE_SB_ValueToMsgId(CFE_TBL_HK_TLM_MID), | |
| sizeof(CFE_TBL_TaskData.HkPacket), | |
| true); | |
| CFE_SB_InitMsg(&CFE_TBL_TaskData.TblRegPacket, | |
| CFE_SB_ValueToMsgId(CFE_TBL_REG_TLM_MID), | |
| sizeof(CFE_TBL_TaskData.TblRegPacket), | |
| true); |
The CFE_TBL_SendNotificationMsg could just be initialized once, then SetMsgId and SetFcnCode each time.
Describe the solution you'd like
These packets only need to be initialized once.
Describe alternatives you've considered
None.
Additional context
Observed when working on #777
Additional observation - the notification command gets timestamped, which fails for implementations where there is no time stamp in commands.
Requester Info
Jacob Hageman - NASA/GSFC