From 4b77750fb637d09939762ba49eb53b0c9dcdbc3c Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Tue, 14 Jun 2022 15:54:35 -0600 Subject: [PATCH] Fix #174, Remove registration of empty event filters --- fsw/src/sample_app.c | 20 +------------------- fsw/src/sample_app.h | 3 +-- fsw/src/sample_app_events.h | 2 -- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/fsw/src/sample_app.c b/fsw/src/sample_app.c index 1dc896b..377a8ec 100644 --- a/fsw/src/sample_app.c +++ b/fsw/src/sample_app.c @@ -128,28 +128,10 @@ int32 SAMPLE_APP_Init(void) strncpy(SAMPLE_APP_Data.PipeName, "SAMPLE_APP_CMD_PIPE", sizeof(SAMPLE_APP_Data.PipeName)); SAMPLE_APP_Data.PipeName[sizeof(SAMPLE_APP_Data.PipeName) - 1] = 0; - /* - ** Initialize event filter table... - */ - SAMPLE_APP_Data.EventFilters[0].EventID = SAMPLE_APP_STARTUP_INF_EID; - SAMPLE_APP_Data.EventFilters[0].Mask = 0x0000; - SAMPLE_APP_Data.EventFilters[1].EventID = SAMPLE_APP_COMMAND_ERR_EID; - SAMPLE_APP_Data.EventFilters[1].Mask = 0x0000; - SAMPLE_APP_Data.EventFilters[2].EventID = SAMPLE_APP_COMMANDNOP_INF_EID; - SAMPLE_APP_Data.EventFilters[2].Mask = 0x0000; - SAMPLE_APP_Data.EventFilters[3].EventID = SAMPLE_APP_COMMANDRST_INF_EID; - SAMPLE_APP_Data.EventFilters[3].Mask = 0x0000; - SAMPLE_APP_Data.EventFilters[4].EventID = SAMPLE_APP_INVALID_MSGID_ERR_EID; - SAMPLE_APP_Data.EventFilters[4].Mask = 0x0000; - SAMPLE_APP_Data.EventFilters[5].EventID = SAMPLE_APP_LEN_ERR_EID; - SAMPLE_APP_Data.EventFilters[5].Mask = 0x0000; - SAMPLE_APP_Data.EventFilters[6].EventID = SAMPLE_APP_PIPE_ERR_EID; - SAMPLE_APP_Data.EventFilters[6].Mask = 0x0000; - /* ** Register the events */ - status = CFE_EVS_Register(SAMPLE_APP_Data.EventFilters, SAMPLE_APP_EVENT_COUNTS, CFE_EVS_EventFilter_BINARY); + status = CFE_EVS_Register(NULL, 0, CFE_EVS_EventFilter_BINARY); if (status != CFE_SUCCESS) { CFE_ES_WriteToSysLog("Sample App: Error Registering Events, RC = 0x%08lX\n", (unsigned long)status); diff --git a/fsw/src/sample_app.h b/fsw/src/sample_app.h index 7f63b0d..3d7dc75 100644 --- a/fsw/src/sample_app.h +++ b/fsw/src/sample_app.h @@ -85,8 +85,7 @@ typedef struct char PipeName[CFE_MISSION_MAX_API_LEN]; uint16 PipeDepth; - CFE_EVS_BinFilter_t EventFilters[SAMPLE_APP_EVENT_COUNTS]; - CFE_TBL_Handle_t TblHandles[SAMPLE_APP_NUMBER_OF_TABLES]; + CFE_TBL_Handle_t TblHandles[SAMPLE_APP_NUMBER_OF_TABLES]; } SAMPLE_APP_Data_t; diff --git a/fsw/src/sample_app_events.h b/fsw/src/sample_app_events.h index 26c9158..46e7aaf 100644 --- a/fsw/src/sample_app_events.h +++ b/fsw/src/sample_app_events.h @@ -34,6 +34,4 @@ #define SAMPLE_APP_LEN_ERR_EID 6 #define SAMPLE_APP_PIPE_ERR_EID 7 -#define SAMPLE_APP_EVENT_COUNTS 7 - #endif /* SAMPLE_APP_EVENTS_H */