Skip to content

Commit

Permalink
Fix #1122, ES and EVS use default message limits
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed Jan 27, 2021
1 parent 4374482 commit 68ccd7a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 16 deletions.
6 changes: 2 additions & 4 deletions fsw/cfe-core/src/es/cfe_es_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,7 @@ int32 CFE_ES_TaskInit(void)
/*
** Subscribe to Housekeeping request commands
*/
Status = CFE_SB_SubscribeEx(CFE_SB_ValueToMsgId(CFE_ES_SEND_HK_MID), CFE_ES_TaskData.CmdPipe,
CFE_SB_Default_Qos, CFE_ES_LIMIT_HK);
Status = CFE_SB_Subscribe(CFE_SB_ValueToMsgId(CFE_ES_SEND_HK_MID), CFE_ES_TaskData.CmdPipe);
if ( Status != CFE_SUCCESS )
{
CFE_ES_WriteToSysLog("ES:Cannot Subscribe to HK packet, RC = 0x%08X\n", (unsigned int)Status);
Expand All @@ -283,8 +282,7 @@ int32 CFE_ES_TaskInit(void)
/*
** Subscribe to ES task ground command packets
*/
Status = CFE_SB_SubscribeEx(CFE_SB_ValueToMsgId(CFE_ES_CMD_MID), CFE_ES_TaskData.CmdPipe,
CFE_SB_Default_Qos, CFE_ES_LIMIT_CMD);
Status = CFE_SB_Subscribe(CFE_SB_ValueToMsgId(CFE_ES_CMD_MID), CFE_ES_TaskData.CmdPipe);
if ( Status != CFE_SUCCESS )
{
CFE_ES_WriteToSysLog("ES:Cannot Subscribe to ES ground commands, RC = 0x%08X\n", (unsigned int)Status);
Expand Down
3 changes: 0 additions & 3 deletions fsw/cfe-core/src/es/cfe_es_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ typedef struct
/*
** ES Task initialization data (not reported in housekeeping)
*/
uint8 LimitHK;
uint8 LimitCmd;

CFE_ES_BackgroundLogDumpGlobal_t BackgroundERLogDumpState;

/*
Expand Down
6 changes: 2 additions & 4 deletions fsw/cfe-core/src/evs/cfe_evs_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,16 +316,14 @@ int32 CFE_EVS_TaskInit ( void )
}

/* Subscribe to command and telemetry requests coming in on the command pipe */
Status = CFE_SB_SubscribeEx(CFE_SB_ValueToMsgId(CFE_EVS_CMD_MID), CFE_EVS_GlobalData.EVS_CommandPipe,
CFE_SB_Default_Qos, CFE_EVS_MSG_LIMIT);
Status = CFE_SB_Subscribe(CFE_SB_ValueToMsgId(CFE_EVS_CMD_MID), CFE_EVS_GlobalData.EVS_CommandPipe);
if (Status != CFE_SUCCESS)
{
CFE_ES_WriteToSysLog("EVS:Subscribing to Cmds Failed:RC=0x%08X\n",(unsigned int)Status);
return Status;
}

Status = CFE_SB_SubscribeEx(CFE_SB_ValueToMsgId(CFE_EVS_SEND_HK_MID), CFE_EVS_GlobalData.EVS_CommandPipe,
CFE_SB_Default_Qos, CFE_EVS_MSG_LIMIT);
Status = CFE_SB_Subscribe(CFE_SB_ValueToMsgId(CFE_EVS_SEND_HK_MID), CFE_EVS_GlobalData.EVS_CommandPipe);
if (Status != CFE_SUCCESS)
{
CFE_ES_WriteToSysLog("EVS:Subscribing to HK Request Failed:RC=0x%08X\n",(unsigned int)Status);
Expand Down
1 change: 0 additions & 1 deletion fsw/cfe-core/src/evs/cfe_evs_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
#define CFE_EVS_FREE_SLOT (-1)
#define CFE_EVS_NO_MASK 0
#define CFE_EVS_PIPE_DEPTH 32
#define CFE_EVS_MSG_LIMIT 4
#define CFE_EVS_MAX_EVENT_SEND_COUNT 65535
#define CFE_EVS_MAX_FILTER_COUNT 65535
#define CFE_EVS_PIPE_NAME "EVS_CMD_PIPE"
Expand Down
4 changes: 2 additions & 2 deletions fsw/cfe-core/unit-test/es_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -2726,15 +2726,15 @@ void TestTask(void)

/* Test task main process loop with a HK packet subscribe failure */
ES_ResetUnitTest();
UT_SetDeferredRetcode(UT_KEY(CFE_SB_SubscribeEx), 1, -3);
UT_SetDeferredRetcode(UT_KEY(CFE_SB_Subscribe), 1, -3);
UT_Report(__FILE__, __LINE__,
CFE_ES_TaskInit() == -3,
"CFE_ES_TaskInit",
"HK packet subscribe fail");

/* Test task main process loop with a ground command subscribe failure */
ES_ResetUnitTest();
UT_SetDeferredRetcode(UT_KEY(CFE_SB_SubscribeEx), 2, -4);
UT_SetDeferredRetcode(UT_KEY(CFE_SB_Subscribe), 2, -4);
UT_Report(__FILE__, __LINE__,
CFE_ES_TaskInit() == -4,
"CFE_ES_TaskInit",
Expand Down
4 changes: 2 additions & 2 deletions fsw/cfe-core/unit-test/evs_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ void Test_Init(void)

/* Test task initialization where command subscription fails */
UT_InitData();
UT_SetDeferredRetcode(UT_KEY(CFE_SB_SubscribeEx), 1, -1);
UT_SetDeferredRetcode(UT_KEY(CFE_SB_Subscribe), 1, -1);
CFE_EVS_TaskInit();
UT_Report(__FILE__, __LINE__,
UT_SyslogIsInHistory(EVS_SYSLOG_MSGS[13]),
Expand All @@ -457,7 +457,7 @@ void Test_Init(void)

/* Test task initialization where HK request subscription fails */
UT_InitData();
UT_SetDeferredRetcode(UT_KEY(CFE_SB_SubscribeEx), 2, -1);
UT_SetDeferredRetcode(UT_KEY(CFE_SB_Subscribe), 2, -1);
CFE_EVS_TaskInit();
UT_Report(__FILE__, __LINE__,
UT_SyslogIsInHistory(EVS_SYSLOG_MSGS[14]),
Expand Down

0 comments on commit 68ccd7a

Please sign in to comment.