Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #85, add CmdCode to sch_lab_table #86

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions fsw/platform_inc/sch_lab_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@
*/
typedef struct
{
CFE_SB_MsgId_t MessageID; /* Message ID for the table entry */
uint32 PacketRate; /* Rate: Send packet every N seconds */
CFE_SB_MsgId_t MessageID; /* Message ID for the table entry */
uint32 PacketRate; /* Rate: Send packet every N seconds */
CFE_MSG_FcnCode_t FcnCode; /* Command/Function code to set */
} SCH_LAB_ScheduleTableEntry_t;

typedef struct
Expand Down
1 change: 1 addition & 0 deletions fsw/src/sch_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ int32 SCH_LAB_AppInit(void)
if (ConfigEntry->PacketRate != 0)
{
CFE_MSG_Init(&LocalStateEntry->CmdHeader.Msg, ConfigEntry->MessageID, sizeof(LocalStateEntry->CmdHeader));
CFE_MSG_SetFcnCode(&LocalStateEntry->CmdHeader.Msg, ConfigEntry->FcnCode);
LocalStateEntry->PacketRate = ConfigEntry->PacketRate;
}
++ConfigEntry;
Expand Down
28 changes: 14 additions & 14 deletions fsw/tables/sch_lab_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@
*/

SCH_LAB_ScheduleTable_t SCH_TBL_Structure = {.Config = {
{CFE_SB_MSGID_WRAP_VALUE(CFE_ES_SEND_HK_MID), 4},
{CFE_SB_MSGID_WRAP_VALUE(CFE_EVS_SEND_HK_MID), 4},
{CFE_SB_MSGID_WRAP_VALUE(CFE_TIME_SEND_HK_MID), 4},
{CFE_SB_MSGID_WRAP_VALUE(CFE_SB_SEND_HK_MID), 4},
{CFE_SB_MSGID_WRAP_VALUE(CFE_TBL_SEND_HK_MID), 4},
{CFE_SB_MSGID_WRAP_VALUE(CI_LAB_SEND_HK_MID), 4},
{CFE_SB_MSGID_WRAP_VALUE(TO_LAB_SEND_HK_MID), 4},
{CFE_SB_MSGID_WRAP_VALUE(SAMPLE_APP_SEND_HK_MID), 4},
{CFE_SB_MSGID_WRAP_VALUE(CFE_ES_SEND_HK_MID), 4, 0},
{CFE_SB_MSGID_WRAP_VALUE(CFE_EVS_SEND_HK_MID), 4, 0},
{CFE_SB_MSGID_WRAP_VALUE(CFE_TIME_SEND_HK_MID), 4, 0},
{CFE_SB_MSGID_WRAP_VALUE(CFE_SB_SEND_HK_MID), 4, 0},
{CFE_SB_MSGID_WRAP_VALUE(CFE_TBL_SEND_HK_MID), 4, 0},
{CFE_SB_MSGID_WRAP_VALUE(CI_LAB_SEND_HK_MID), 4, 0},
{CFE_SB_MSGID_WRAP_VALUE(TO_LAB_SEND_HK_MID), 4, 0},
{CFE_SB_MSGID_WRAP_VALUE(SAMPLE_APP_SEND_HK_MID), 4, 0},
#if 0
{CFE_SB_MSGID_WRAP_VALUE(SC_SEND_HK_MID), 4},
{CFE_SB_MSGID_WRAP_VALUE(SC_1HZ_WAKEUP_MID), 1}, /* Example of a 1hz packet */
{CFE_SB_MSGID_WRAP_VALUE(HS_SEND_HK_MID), 0}, /* Example of a message that wouldn't be sent */
{CFE_SB_MSGID_WRAP_VALUE(FM_SEND_HK_MID), 4},
{CFE_SB_MSGID_WRAP_VALUE(DS_SEND_HK_MID), 4},
{CFE_SB_MSGID_WRAP_VALUE(LC_SEND_HK_MID), 4},
{CFE_SB_MSGID_WRAP_VALUE(SC_SEND_HK_MID), 4, 0},
{CFE_SB_MSGID_WRAP_VALUE(SC_1HZ_WAKEUP_MID), 1, 0}, /* Example of a 1hz packet */
{CFE_SB_MSGID_WRAP_VALUE(HS_SEND_HK_MID), 0, 0}, /* Example of a message that wouldn't be sent */
{CFE_SB_MSGID_WRAP_VALUE(FM_SEND_HK_MID), 4, 0},
{CFE_SB_MSGID_WRAP_VALUE(DS_SEND_HK_MID), 4, 0},
{CFE_SB_MSGID_WRAP_VALUE(LC_SEND_HK_MID), 4, 0},
#endif
}};

Expand Down