From 06b226f811662c8b1df0a562358a773c8fdf612d Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Mon, 25 Jan 2021 16:11:50 -0500 Subject: [PATCH] Fix #1122, ES and EVS use default message limits --- fsw/cfe-core/src/es/cfe_es_task.c | 9 ++------- fsw/cfe-core/src/es/cfe_es_task.h | 3 --- fsw/cfe-core/src/evs/cfe_evs_task.c | 6 ++---- fsw/cfe-core/src/evs/cfe_evs_task.h | 1 - fsw/cfe-core/unit-test/es_UT.c | 4 ++-- fsw/cfe-core/unit-test/evs_UT.c | 4 ++-- 6 files changed, 8 insertions(+), 19 deletions(-) diff --git a/fsw/cfe-core/src/es/cfe_es_task.c b/fsw/cfe-core/src/es/cfe_es_task.c index c852c7614..efe396fe5 100644 --- a/fsw/cfe-core/src/es/cfe_es_task.c +++ b/fsw/cfe-core/src/es/cfe_es_task.c @@ -222,9 +222,6 @@ int32 CFE_ES_TaskInit(void) strcpy(CFE_ES_TaskData.PipeName, "ES_CMD_PIPE"); CFE_ES_TaskData.PipeDepth = 12; - CFE_ES_TaskData.LimitHK = 2; - CFE_ES_TaskData.LimitCmd = 4; - /* ** Initialize systemlog to default Power On or Processor Reset mode */ @@ -281,8 +278,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_TaskData.LimitHK); + 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); @@ -292,8 +288,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_TaskData.LimitCmd); + 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); diff --git a/fsw/cfe-core/src/es/cfe_es_task.h b/fsw/cfe-core/src/es/cfe_es_task.h index 22270cc50..6f0215ec6 100644 --- a/fsw/cfe-core/src/es/cfe_es_task.h +++ b/fsw/cfe-core/src/es/cfe_es_task.h @@ -126,9 +126,6 @@ typedef struct char PipeName[OS_MAX_API_NAME]; uint16 PipeDepth; - uint8 LimitHK; - uint8 LimitCmd; - CFE_ES_BackgroundLogDumpGlobal_t BackgroundERLogDumpState; /* diff --git a/fsw/cfe-core/src/evs/cfe_evs_task.c b/fsw/cfe-core/src/evs/cfe_evs_task.c index e47e449ae..7d36900a7 100644 --- a/fsw/cfe-core/src/evs/cfe_evs_task.c +++ b/fsw/cfe-core/src/evs/cfe_evs_task.c @@ -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); diff --git a/fsw/cfe-core/src/evs/cfe_evs_task.h b/fsw/cfe-core/src/evs/cfe_evs_task.h index 40a5e3aea..7e9e55487 100644 --- a/fsw/cfe-core/src/evs/cfe_evs_task.h +++ b/fsw/cfe-core/src/evs/cfe_evs_task.h @@ -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" diff --git a/fsw/cfe-core/unit-test/es_UT.c b/fsw/cfe-core/unit-test/es_UT.c index bff84dc8b..3eaa887d6 100644 --- a/fsw/cfe-core/unit-test/es_UT.c +++ b/fsw/cfe-core/unit-test/es_UT.c @@ -2756,7 +2756,7 @@ 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", @@ -2764,7 +2764,7 @@ void TestTask(void) /* 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", diff --git a/fsw/cfe-core/unit-test/evs_UT.c b/fsw/cfe-core/unit-test/evs_UT.c index b68e24efe..8485d8b26 100644 --- a/fsw/cfe-core/unit-test/evs_UT.c +++ b/fsw/cfe-core/unit-test/evs_UT.c @@ -447,7 +447,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]), @@ -456,7 +456,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]),