Skip to content

Commit e322916

Browse files
committed
Fix #85, add CmdCode to sch_lab_table
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.
1 parent dd6e0be commit e322916

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

fsw/platform_inc/sch_lab_table.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@
4646
*/
4747
typedef struct
4848
{
49-
CFE_SB_MsgId_t MessageID; /* Message ID for the table entry */
50-
uint32 PacketRate; /* Rate: Send packet every N seconds */
49+
CFE_SB_MsgId_t MessageID; /* Message ID for the table entry */
50+
uint32 PacketRate; /* Rate: Send packet every N seconds */
51+
CFE_MSG_FcnCode_t CmdCode; /* Command/Function code to set */
5152
} SCH_LAB_ScheduleTableEntry_t;
5253

5354
typedef struct

fsw/src/sch_lab_app.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ int32 SCH_LAB_AppInit(void)
196196
if (ConfigEntry->PacketRate != 0)
197197
{
198198
CFE_MSG_Init(&LocalStateEntry->CmdHeader.Msg, ConfigEntry->MessageID, sizeof(LocalStateEntry->CmdHeader));
199+
CFE_MSG_SetFcnCode(&LocalStateEntry->CmdHeader.Msg, ConfigEntry->CmdCode);
199200
LocalStateEntry->PacketRate = ConfigEntry->PacketRate;
200201
}
201202
++ConfigEntry;

0 commit comments

Comments
 (0)