Skip to content

Commit

Permalink
Fix nasa#85, add CmdCode to sch_lab_table
Browse files Browse the repository at this point in the history
Allows the command/function code to be specified in the messages
generated by SCH_LAB.  This allows it to be used for testing apps
that require a specific function code in the internal wakeup message.
  • Loading branch information
jphickey committed Sep 1, 2021
1 parent dd6e0be commit 2a00c3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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

0 comments on commit 2a00c3c

Please sign in to comment.