From 37a5ac9c62e6f98a77593a151c6d43c7b7a8c6d7 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 18 Aug 2020 14:41:08 -0400 Subject: [PATCH] Fix #815, remove all deprecated code In the next major CFE release, this code will be no longer supported at all. It should be removed early in the cycle to avoid needing to maintain this compatibility code. --- cmake/sample_defs/cpu1_msgids.h | 15 - cmake/sample_defs/cpu1_platform_cfg.h | 208 ---- cmake/sample_defs/sample_mission_cfg.h | 91 -- fsw/cfe-core/src/es/cfe_es_shell.c | 432 -------- fsw/cfe-core/src/es/cfe_es_shell.h | 68 -- fsw/cfe-core/src/es/cfe_es_task.c | 66 -- fsw/cfe-core/src/es/cfe_es_task.h | 10 - fsw/cfe-core/src/fs/cfe_fs_api.c | 114 --- fsw/cfe-core/src/fs/cfe_fs_decompress.c | 1230 ----------------------- fsw/cfe-core/src/fs/cfe_fs_decompress.h | 155 --- fsw/cfe-core/src/inc/ccsds.h | 26 - fsw/cfe-core/src/inc/cfe_error.h | 144 --- fsw/cfe-core/src/inc/cfe_es.h | 91 -- fsw/cfe-core/src/inc/cfe_es_msg.h | 113 --- fsw/cfe-core/src/inc/cfe_evs.h | 31 - fsw/cfe-core/src/inc/cfe_evs_msg.h | 17 - fsw/cfe-core/src/inc/cfe_fs.h | 116 --- fsw/cfe-core/src/inc/cfe_sb.h | 51 - fsw/cfe-core/src/inc/cfe_sb_events.h | 46 - fsw/cfe-core/src/inc/cfe_sb_msg.h | 16 - fsw/cfe-core/src/inc/cfe_tbl.h | 16 - fsw/cfe-core/src/inc/cfe_tbl_msg.h | 16 - fsw/cfe-core/src/inc/cfe_time.h | 105 -- fsw/cfe-core/src/inc/cfe_time_msg.h | 16 - fsw/cfe-core/src/sb/cfe_sb_api.c | 79 -- fsw/cfe-core/src/sb/cfe_sb_priv.h | 3 - fsw/cfe-core/src/time/cfe_time_api.c | 60 -- fsw/cfe-core/unit-test/es_UT.h | 1 - fsw/cfe-core/ut-stubs/ut_fs_stubs.c | 88 -- fsw/cfe-core/ut-stubs/ut_sb_stubs.c | 16 - 30 files changed, 3440 deletions(-) delete mode 100644 fsw/cfe-core/src/es/cfe_es_shell.c delete mode 100644 fsw/cfe-core/src/es/cfe_es_shell.h delete mode 100644 fsw/cfe-core/src/fs/cfe_fs_decompress.c delete mode 100644 fsw/cfe-core/src/fs/cfe_fs_decompress.h diff --git a/cmake/sample_defs/cpu1_msgids.h b/cmake/sample_defs/cpu1_msgids.h index be965ca14..e0ba0ac86 100644 --- a/cmake/sample_defs/cpu1_msgids.h +++ b/cmake/sample_defs/cpu1_msgids.h @@ -88,21 +88,6 @@ #define CFE_TBL_REG_TLM_MID CFE_MISSION_TLM_MID_BASE1 + CFE_MISSION_TBL_REG_TLM_MSG /* 0x080C */ #define CFE_SB_ALLSUBS_TLM_MID CFE_MISSION_TLM_MID_BASE1 + CFE_MISSION_SB_ALLSUBS_TLM_MSG /* 0x080D */ #define CFE_SB_ONESUB_TLM_MID CFE_MISSION_TLM_MID_BASE1 + CFE_MISSION_SB_ONESUB_TLM_MSG /* 0x080E */ - -#ifndef CFE_OMIT_DEPRECATED_6_7 - #define CFE_ES_SHELL_TLM_MID CFE_MISSION_TLM_MID_BASE1 + CFE_MISSION_ES_SHELL_TLM_MSG /* 0x080F */ -#endif - #define CFE_ES_MEMSTATS_TLM_MID CFE_MISSION_TLM_MID_BASE1 + CFE_MISSION_ES_MEMSTATS_TLM_MSG /* 0x0810 */ -/* - * MID definitions by these older names are required to make some existing apps compile - * These are deprecated and should be removed after CFE 6.6 - */ -#ifndef CFE_OMIT_DEPRECATED_6_6 - -#define CFE_EVS_EVENT_MSG_MID CFE_EVS_LONG_EVENT_MSG_MID - -#endif - #endif diff --git a/cmake/sample_defs/cpu1_platform_cfg.h b/cmake/sample_defs/cpu1_platform_cfg.h index 5299cd790..ab300e99f 100644 --- a/cmake/sample_defs/cpu1_platform_cfg.h +++ b/cmake/sample_defs/cpu1_platform_cfg.h @@ -1871,213 +1871,5 @@ #define CFE_PLATFORM_ES_STARTUP_SCRIPT_TIMEOUT_MSEC 1000 -/* - * Compatibility layer for CFE release 6.6 - * During development of CFE 6.6 a naming convention was introduced such - * that all platform-specific symbols use a CFE_PLATFORM_ prefix. - * - * The following section provides a mapping from the historical name to - * the new name for compatibility with existing code. The code can then be - * compiled with the CFE_OMIT_DEPRECATED_6_6 macro defined, and an error will - * be triggered if any of the old symbol names are referenced in the code. - * - * It is expected that this compatibility layer will be removed in the next - * release following 6.6, so all code must be fixed to use the new name. - */ -#ifndef CFE_OMIT_DEPRECATED_6_6 - -#define CFE_CPU_ID CFE_PLATFORM_CPU_ID -#define CFE_CPU_NAME CFE_PLATFORM_CPU_NAME -#define CFE_SB_MAX_MSG_IDS CFE_PLATFORM_SB_MAX_MSG_IDS -#define CFE_SB_MAX_PIPES CFE_PLATFORM_SB_MAX_PIPES -#define CFE_SB_MAX_DEST_PER_PKT CFE_PLATFORM_SB_MAX_DEST_PER_PKT -#define CFE_SB_DEFAULT_MSG_LIMIT CFE_PLATFORM_SB_DEFAULT_MSG_LIMIT -#define CFE_SB_BUF_MEMORY_BYTES CFE_PLATFORM_SB_BUF_MEMORY_BYTES -#define CFE_SB_MAX_PIPE_DEPTH CFE_PLATFORM_SB_MAX_PIPE_DEPTH -#define CFE_SB_HIGHEST_VALID_MSGID CFE_PLATFORM_SB_HIGHEST_VALID_MSGID -#define CFE_SB_DEFAULT_ROUTING_FILENAME CFE_PLATFORM_SB_DEFAULT_ROUTING_FILENAME -#define CFE_SB_DEFAULT_PIPE_FILENAME CFE_PLATFORM_SB_DEFAULT_PIPE_FILENAME -#define CFE_SB_DEFAULT_MAP_FILENAME CFE_PLATFORM_SB_DEFAULT_MAP_FILENAME -#define CFE_SB_FILTERED_EVENT1 CFE_PLATFORM_SB_FILTERED_EVENT1 -#define CFE_SB_FILTER_MASK1 CFE_PLATFORM_SB_FILTER_MASK1 -#define CFE_SB_FILTERED_EVENT2 CFE_PLATFORM_SB_FILTERED_EVENT2 -#define CFE_SB_FILTER_MASK2 CFE_PLATFORM_SB_FILTER_MASK2 -#define CFE_SB_FILTERED_EVENT3 CFE_PLATFORM_SB_FILTERED_EVENT3 -#define CFE_SB_FILTER_MASK3 CFE_PLATFORM_SB_FILTER_MASK3 -#define CFE_SB_FILTERED_EVENT4 CFE_PLATFORM_SB_FILTERED_EVENT4 -#define CFE_SB_FILTER_MASK4 CFE_PLATFORM_SB_FILTER_MASK4 -#define CFE_SB_FILTERED_EVENT5 CFE_PLATFORM_SB_FILTERED_EVENT5 -#define CFE_SB_FILTER_MASK5 CFE_PLATFORM_SB_FILTER_MASK5 -#define CFE_SB_FILTERED_EVENT6 CFE_PLATFORM_SB_FILTERED_EVENT6 -#define CFE_SB_FILTER_MASK6 CFE_PLATFORM_SB_FILTER_MASK6 -#define CFE_SB_FILTERED_EVENT7 CFE_PLATFORM_SB_FILTERED_EVENT7 -#define CFE_SB_FILTER_MASK7 CFE_PLATFORM_SB_FILTER_MASK7 -#define CFE_SB_FILTERED_EVENT8 CFE_PLATFORM_SB_FILTERED_EVENT8 -#define CFE_SB_FILTER_MASK8 CFE_PLATFORM_SB_FILTER_MASK8 -#define CFE_SB_MEM_BLOCK_SIZE_01 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_01 -#define CFE_SB_MEM_BLOCK_SIZE_02 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_02 -#define CFE_SB_MEM_BLOCK_SIZE_03 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_03 -#define CFE_SB_MEM_BLOCK_SIZE_04 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_04 -#define CFE_SB_MEM_BLOCK_SIZE_05 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_05 -#define CFE_SB_MEM_BLOCK_SIZE_06 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_06 -#define CFE_SB_MEM_BLOCK_SIZE_07 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_07 -#define CFE_SB_MEM_BLOCK_SIZE_08 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_08 -#define CFE_SB_MEM_BLOCK_SIZE_09 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_09 -#define CFE_SB_MEM_BLOCK_SIZE_10 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_10 -#define CFE_SB_MEM_BLOCK_SIZE_11 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_11 -#define CFE_SB_MEM_BLOCK_SIZE_12 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_12 -#define CFE_SB_MEM_BLOCK_SIZE_13 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_13 -#define CFE_SB_MEM_BLOCK_SIZE_14 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_14 -#define CFE_SB_MEM_BLOCK_SIZE_15 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_15 -#define CFE_SB_MEM_BLOCK_SIZE_16 CFE_PLATFORM_SB_MEM_BLOCK_SIZE_16 -#define CFE_SB_MAX_BLOCK_SIZE CFE_PLATFORM_SB_MAX_BLOCK_SIZE -#define CFE_SB_DEFAULT_REPORT_SENDER CFE_PLATFORM_SB_DEFAULT_REPORT_SENDER -#define CFE_TIME_CFG_SERVER CFE_PLATFORM_TIME_CFG_SERVER -#define CFE_TIME_CFG_CLIENT CFE_PLATFORM_TIME_CFG_CLIENT -#define CFE_TIME_CFG_VIRTUAL CFE_PLATFORM_TIME_CFG_VIRTUAL -#define CFE_TIME_CFG_SIGNAL CFE_PLATFORM_TIME_CFG_SIGNAL -#define CFE_TIME_CFG_SOURCE CFE_PLATFORM_TIME_CFG_SOURCE -#define CFE_TIME_CFG_SRC_MET CFE_PLATFORM_TIME_CFG_SRC_MET -#define CFE_TIME_CFG_SRC_GPS CFE_PLATFORM_TIME_CFG_SRC_GPS -#define CFE_TIME_CFG_SRC_TIME CFE_PLATFORM_TIME_CFG_SRC_TIME -#define CFE_TIME_MAX_DELTA_SECS CFE_PLATFORM_TIME_MAX_DELTA_SECS -#define CFE_TIME_MAX_DELTA_SUBS CFE_PLATFORM_TIME_MAX_DELTA_SUBS -#define CFE_TIME_MAX_LOCAL_SECS CFE_PLATFORM_TIME_MAX_LOCAL_SECS -#define CFE_TIME_MAX_LOCAL_SUBS CFE_PLATFORM_TIME_MAX_LOCAL_SUBS -#define CFE_TIME_CFG_TONE_LIMIT CFE_PLATFORM_TIME_CFG_TONE_LIMIT -#define CFE_TIME_CFG_START_FLY CFE_PLATFORM_TIME_CFG_START_FLY -#define CFE_TIME_CFG_LATCH_FLY CFE_PLATFORM_TIME_CFG_LATCH_FLY -#define CFE_ES_MAX_APPLICATIONS CFE_PLATFORM_ES_MAX_APPLICATIONS -#define CFE_ES_MAX_LIBRARIES CFE_PLATFORM_ES_MAX_LIBRARIES -#define CFE_ES_ER_LOG_ENTRIES CFE_PLATFORM_ES_ER_LOG_ENTRIES -#define CFE_ES_ER_LOG_MAX_CONTEXT_SIZE CFE_PLATFORM_ES_ER_LOG_MAX_CONTEXT_SIZE -#define CFE_ES_SYSTEM_LOG_SIZE CFE_PLATFORM_ES_SYSTEM_LOG_SIZE -#define CFE_ES_OBJECT_TABLE_SIZE CFE_PLATFORM_ES_OBJECT_TABLE_SIZE -#define CFE_ES_MAX_GEN_COUNTERS CFE_PLATFORM_ES_MAX_GEN_COUNTERS -#define CFE_ES_APP_SCAN_RATE CFE_PLATFORM_ES_APP_SCAN_RATE -#define CFE_ES_APP_KILL_TIMEOUT CFE_PLATFORM_ES_APP_KILL_TIMEOUT -#define CFE_ES_RAM_DISK_SECTOR_SIZE CFE_PLATFORM_ES_RAM_DISK_SECTOR_SIZE -#define CFE_ES_RAM_DISK_NUM_SECTORS CFE_PLATFORM_ES_RAM_DISK_NUM_SECTORS -#define CFE_ES_RAM_DISK_PERCENT_RESERVED CFE_PLATFORM_ES_RAM_DISK_PERCENT_RESERVED -#define CFE_ES_RAM_DISK_MOUNT_STRING CFE_PLATFORM_ES_RAM_DISK_MOUNT_STRING -#define CFE_ES_CDS_SIZE CFE_PLATFORM_ES_CDS_SIZE -#define CFE_ES_USER_RESERVED_SIZE CFE_PLATFORM_ES_USER_RESERVED_SIZE -#define CFE_ES_RESET_AREA_SIZE CFE_PLATFORM_ES_RESET_AREA_SIZE -#define CFE_ES_NONVOL_STARTUP_FILE CFE_PLATFORM_ES_NONVOL_STARTUP_FILE -#define CFE_ES_VOLATILE_STARTUP_FILE CFE_PLATFORM_ES_VOLATILE_STARTUP_FILE -#define CFE_ES_DEFAULT_SHELL_FILENAME CFE_PLATFORM_ES_DEFAULT_SHELL_FILENAME -#define CFE_ES_MAX_SHELL_CMD CFE_PLATFORM_ES_MAX_SHELL_CMD -#define CFE_ES_MAX_SHELL_PKT CFE_PLATFORM_ES_MAX_SHELL_PKT -#define CFE_ES_DEFAULT_APP_LOG_FILE CFE_PLATFORM_ES_DEFAULT_APP_LOG_FILE -#define CFE_ES_DEFAULT_TASK_LOG_FILE CFE_PLATFORM_ES_DEFAULT_TASK_LOG_FILE -#define CFE_ES_DEFAULT_SYSLOG_FILE CFE_PLATFORM_ES_DEFAULT_SYSLOG_FILE -#define CFE_ES_DEFAULT_ER_LOG_FILE CFE_PLATFORM_ES_DEFAULT_ER_LOG_FILE -#define CFE_ES_DEFAULT_PERF_DUMP_FILENAME CFE_PLATFORM_ES_DEFAULT_PERF_DUMP_FILENAME -#define CFE_ES_DEFAULT_CDS_REG_DUMP_FILE CFE_PLATFORM_ES_DEFAULT_CDS_REG_DUMP_FILE -#define CFE_ES_DEFAULT_SYSLOG_MODE CFE_PLATFORM_ES_DEFAULT_PR_SYSLOG_MODE -#define CFE_ES_PERF_MAX_IDS CFE_PLATFORM_ES_PERF_MAX_IDS -#define CFE_ES_PERF_DATA_BUFFER_SIZE CFE_PLATFORM_ES_PERF_DATA_BUFFER_SIZE -#define CFE_ES_PERF_FILTMASK_NONE CFE_PLATFORM_ES_PERF_FILTMASK_NONE -#define CFE_ES_PERF_FILTMASK_ALL CFE_PLATFORM_ES_PERF_FILTMASK_ALL -#define CFE_ES_PERF_FILTMASK_INIT CFE_PLATFORM_ES_PERF_FILTMASK_INIT -#define CFE_ES_PERF_TRIGMASK_NONE CFE_PLATFORM_ES_PERF_TRIGMASK_NONE -#define CFE_ES_PERF_TRIGMASK_ALL CFE_PLATFORM_ES_PERF_TRIGMASK_ALL -#define CFE_ES_PERF_TRIGMASK_INIT CFE_PLATFORM_ES_PERF_TRIGMASK_INIT -#define CFE_ES_PERF_CHILD_PRIORITY CFE_PLATFORM_ES_PERF_CHILD_PRIORITY -#define CFE_ES_PERF_CHILD_STACK_SIZE CFE_PLATFORM_ES_PERF_CHILD_STACK_SIZE -#define CFE_ES_PERF_CHILD_MS_DELAY CFE_PLATFORM_ES_PERF_CHILD_MS_DELAY -#define CFE_ES_PERF_ENTRIES_BTWN_DLYS CFE_PLATFORM_ES_PERF_ENTRIES_BTWN_DLYS -#define CFE_ES_DEFAULT_STACK_SIZE CFE_PLATFORM_ES_DEFAULT_STACK_SIZE -#define CFE_ES_EXCEPTION_FUNCTION CFE_PLATFORM_ES_EXCEPTION_FUNCTION -#define CFE_EVS_START_TASK_PRIORITY CFE_PLATFORM_EVS_START_TASK_PRIORITY -#define CFE_EVS_START_TASK_STACK_SIZE CFE_PLATFORM_EVS_START_TASK_STACK_SIZE -#define CFE_SB_START_TASK_PRIORITY CFE_PLATFORM_SB_START_TASK_PRIORITY -#define CFE_SB_START_TASK_STACK_SIZE CFE_PLATFORM_SB_START_TASK_STACK_SIZE -#define CFE_ES_START_TASK_PRIORITY CFE_PLATFORM_ES_START_TASK_PRIORITY -#define CFE_ES_START_TASK_STACK_SIZE CFE_PLATFORM_ES_START_TASK_STACK_SIZE -#define CFE_TIME_START_TASK_PRIORITY CFE_PLATFORM_TIME_START_TASK_PRIORITY -#define CFE_TIME_TONE_TASK_PRIORITY CFE_PLATFORM_TIME_TONE_TASK_PRIORITY -#define CFE_TIME_1HZ_TASK_PRIORITY CFE_PLATFORM_TIME_1HZ_TASK_PRIORITY -#define CFE_TIME_START_TASK_STACK_SIZE CFE_PLATFORM_TIME_START_TASK_STACK_SIZE -#define CFE_TIME_TONE_TASK_STACK_SIZE CFE_PLATFORM_TIME_TONE_TASK_STACK_SIZE -#define CFE_TIME_1HZ_TASK_STACK_SIZE CFE_PLATFORM_TIME_1HZ_TASK_STACK_SIZE -#define CFE_TBL_START_TASK_PRIORITY CFE_PLATFORM_TBL_START_TASK_PRIORITY -#define CFE_TBL_START_TASK_STACK_SIZE CFE_PLATFORM_TBL_START_TASK_STACK_SIZE -#define CFE_ES_CDS_MAX_NUM_ENTRIES CFE_PLATFORM_ES_CDS_MAX_NUM_ENTRIES -#define CFE_ES_MAX_PROCESSOR_RESETS CFE_PLATFORM_ES_MAX_PROCESSOR_RESETS -#define CFE_ES_MEM_BLOCK_SIZE_01 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_01 -#define CFE_ES_MEM_BLOCK_SIZE_02 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_02 -#define CFE_ES_MEM_BLOCK_SIZE_03 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_03 -#define CFE_ES_MEM_BLOCK_SIZE_04 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_04 -#define CFE_ES_MEM_BLOCK_SIZE_05 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_05 -#define CFE_ES_MEM_BLOCK_SIZE_06 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_06 -#define CFE_ES_MEM_BLOCK_SIZE_07 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_07 -#define CFE_ES_MEM_BLOCK_SIZE_08 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_08 -#define CFE_ES_MEM_BLOCK_SIZE_09 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_09 -#define CFE_ES_MEM_BLOCK_SIZE_10 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_10 -#define CFE_ES_MEM_BLOCK_SIZE_11 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_11 -#define CFE_ES_MEM_BLOCK_SIZE_12 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_12 -#define CFE_ES_MEM_BLOCK_SIZE_13 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_13 -#define CFE_ES_MEM_BLOCK_SIZE_14 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_14 -#define CFE_ES_MEM_BLOCK_SIZE_15 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_15 -#define CFE_ES_MEM_BLOCK_SIZE_16 CFE_PLATFORM_ES_MEM_BLOCK_SIZE_16 -#define CFE_ES_MAX_BLOCK_SIZE CFE_PLATFORM_ES_MAX_BLOCK_SIZE -#define CFE_ES_CDS_MEM_BLOCK_SIZE_01 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_01 -#define CFE_ES_CDS_MEM_BLOCK_SIZE_02 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_02 -#define CFE_ES_CDS_MEM_BLOCK_SIZE_03 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_03 -#define CFE_ES_CDS_MEM_BLOCK_SIZE_04 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_04 -#define CFE_ES_CDS_MEM_BLOCK_SIZE_05 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_05 -#define CFE_ES_CDS_MEM_BLOCK_SIZE_06 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_06 -#define CFE_ES_CDS_MEM_BLOCK_SIZE_07 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_07 -#define CFE_ES_CDS_MEM_BLOCK_SIZE_08 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_08 -#define CFE_ES_CDS_MEM_BLOCK_SIZE_09 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_09 -#define CFE_ES_CDS_MEM_BLOCK_SIZE_10 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_10 -#define CFE_ES_CDS_MEM_BLOCK_SIZE_11 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_11 -#define CFE_ES_CDS_MEM_BLOCK_SIZE_12 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_12 -#define CFE_ES_CDS_MEM_BLOCK_SIZE_13 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_13 -#define CFE_ES_CDS_MEM_BLOCK_SIZE_14 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_14 -#define CFE_ES_CDS_MEM_BLOCK_SIZE_15 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_15 -#define CFE_ES_CDS_MEM_BLOCK_SIZE_16 CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_16 -#define CFE_ES_CDS_MAX_BLOCK_SIZE CFE_PLATFORM_ES_CDS_MAX_BLOCK_SIZE -#define CFE_EVS_MAX_EVENT_FILTERS CFE_PLATFORM_EVS_MAX_EVENT_FILTERS -#define CFE_EVS_LOG_ON CFE_PLATFORM_EVS_LOG_ON -#define CFE_EVS_DEFAULT_LOG_FILE CFE_PLATFORM_EVS_DEFAULT_LOG_FILE -#define CFE_EVS_LOG_MAX CFE_PLATFORM_EVS_LOG_MAX -#define CFE_EVS_DEFAULT_APP_DATA_FILE CFE_PLATFORM_EVS_DEFAULT_APP_DATA_FILE -#define CFE_EVS_PORT_DEFAULT CFE_PLATFORM_EVS_PORT_DEFAULT -#define CFE_EVS_DEFAULT_TYPE_FLAG CFE_PLATFORM_EVS_DEFAULT_TYPE_FLAG -#define CFE_EVS_DEFAULT_LOG_MODE CFE_PLATFORM_EVS_DEFAULT_LOG_MODE -#define CFE_EVS_DEFAULT_MSG_FORMAT_MODE CFE_PLATFORM_EVS_DEFAULT_MSG_FORMAT_MODE -#define CFE_TBL_BUF_MEMORY_BYTES CFE_PLATFORM_TBL_BUF_MEMORY_BYTES -#define CFE_TBL_MAX_DBL_TABLE_SIZE CFE_PLATFORM_TBL_MAX_DBL_TABLE_SIZE -#define CFE_TBL_MAX_SNGL_TABLE_SIZE CFE_PLATFORM_TBL_MAX_SNGL_TABLE_SIZE -#define CFE_TBL_MAX_NUM_TABLES CFE_PLATFORM_TBL_MAX_NUM_TABLES -#define CFE_TBL_MAX_CRITICAL_TABLES CFE_PLATFORM_TBL_MAX_CRITICAL_TABLES -#define CFE_TBL_MAX_NUM_HANDLES CFE_PLATFORM_TBL_MAX_NUM_HANDLES -#define CFE_TBL_MAX_SIMULTANEOUS_LOADS CFE_PLATFORM_TBL_MAX_SIMULTANEOUS_LOADS -#define CFE_TBL_MAX_NUM_VALIDATIONS CFE_PLATFORM_TBL_MAX_NUM_VALIDATIONS -#define CFE_TBL_DEFAULT_REG_DUMP_FILE CFE_PLATFORM_TBL_DEFAULT_REG_DUMP_FILE -#define CFE_TBL_VALID_SCID_COUNT CFE_PLATFORM_TBL_VALID_SCID_COUNT -#define CFE_TBL_U32FROM4CHARS CFE_PLATFORM_TBL_U32FROM4CHARS -#define CFE_TBL_VALID_SCID_1 CFE_PLATFORM_TBL_VALID_SCID_1 -#define CFE_TBL_VALID_SCID_2 CFE_PLATFORM_TBL_VALID_SCID_2 -#define CFE_TBL_VALID_PRID_COUNT CFE_PLATFORM_TBL_VALID_PRID_COUNT -#define CFE_TBL_VALID_PRID_1 CFE_PLATFORM_TBL_VALID_PRID_1 -#define CFE_TBL_VALID_PRID_2 CFE_PLATFORM_TBL_VALID_PRID_2 -#define CFE_TBL_VALID_PRID_3 CFE_PLATFORM_TBL_VALID_PRID_3 -#define CFE_TBL_VALID_PRID_4 CFE_PLATFORM_TBL_VALID_PRID_4 -#define CFE_ES_STARTUP_SYNC_POLL_MSEC CFE_PLATFORM_ES_STARTUP_SYNC_POLL_MSEC -#define CFE_CORE_MAX_STARTUP_MSEC CFE_PLATFORM_CORE_MAX_STARTUP_MSEC -#define CFE_ES_STARTUP_SCRIPT_TIMEOUT_MSEC CFE_PLATFORM_ES_STARTUP_SCRIPT_TIMEOUT_MSEC - -/* - * This was previously configurable, now fixed. - * Keeping it here will trigger a "redefined" warning if some mission - * had configured it as "false" for some reason. - */ -#define CFE_TIME_ENA_1HZ_CMD_PKT true - -#endif /* CFE_OMIT_DEPRECATED_6_6 */ - #endif /* _cfe_platform_cfg_ */ diff --git a/cmake/sample_defs/sample_mission_cfg.h b/cmake/sample_defs/sample_mission_cfg.h index e736261ef..f769b7c35 100644 --- a/cmake/sample_defs/sample_mission_cfg.h +++ b/cmake/sample_defs/sample_mission_cfg.h @@ -663,97 +663,6 @@ #define CFE_MISSION_ES_CDS_MAX_NAME_LEN (CFE_MISSION_ES_CDS_MAX_NAME_LENGTH + CFE_MISSION_MAX_API_LEN + 4) -/* - * Compatibility layer for CFE release 6.6 - * During development of CFE 6.6 a naming convention was introduced such - * that all mission-wide / global symbols use a CFE_MISSION_ prefix. - * - * The following section provides a mapping from the historical name to - * the new name for compatibility with existing code. The code can then be - * compiled with the CFE_OMIT_DEPRECATED_6_6 macro defined, and an error will - * be triggered if any of the old symbol names are referenced in the code. - * - * It is expected that this compatibility layer will be removed in the next - * release following 6.6, so all code must be fixed to use the new name. - */ -#ifndef CFE_OMIT_DEPRECATED_6_6 - -#define CFE_SPACECRAFT_ID CFE_MISSION_SPACECRAFT_ID -#define CFE_SB_MAX_SB_MSG_SIZE CFE_MISSION_SB_MAX_SB_MSG_SIZE -#define CFE_TIME_CFG_DEFAULT_TAI CFE_MISSION_TIME_CFG_DEFAULT_TAI -#define CFE_TIME_CFG_DEFAULT_UTC CFE_MISSION_TIME_CFG_DEFAULT_UTC -#define CFE_TIME_CFG_FAKE_TONE CFE_MISSION_TIME_CFG_FAKE_TONE -#define CFE_TIME_AT_TONE_WAS CFE_MISSION_TIME_AT_TONE_WAS -#define CFE_TIME_AT_TONE_WILL_BE CFE_MISSION_TIME_AT_TONE_WILL_BE -#define CFE_TIME_MIN_ELAPSED CFE_MISSION_TIME_MIN_ELAPSED -#define CFE_TIME_MAX_ELAPSED CFE_MISSION_TIME_MAX_ELAPSED -#define CFE_TIME_DEF_MET_SECS CFE_MISSION_TIME_DEF_MET_SECS -#define CFE_TIME_DEF_MET_SUBS CFE_MISSION_TIME_DEF_MET_SUBS -#define CFE_TIME_DEF_STCF_SECS CFE_MISSION_TIME_DEF_STCF_SECS -#define CFE_TIME_DEF_STCF_SUBS CFE_MISSION_TIME_DEF_STCF_SUBS -#define CFE_TIME_DEF_LEAPS CFE_MISSION_TIME_DEF_LEAPS -#define CFE_TIME_DEF_DELAY_SECS CFE_MISSION_TIME_DEF_DELAY_SECS -#define CFE_TIME_DEF_DELAY_SUBS CFE_MISSION_TIME_DEF_DELAY_SUBS -#define CFE_TIME_EPOCH_YEAR CFE_MISSION_TIME_EPOCH_YEAR -#define CFE_TIME_EPOCH_DAY CFE_MISSION_TIME_EPOCH_DAY -#define CFE_TIME_EPOCH_HOUR CFE_MISSION_TIME_EPOCH_HOUR -#define CFE_TIME_EPOCH_MINUTE CFE_MISSION_TIME_EPOCH_MINUTE -#define CFE_TIME_EPOCH_SECOND CFE_MISSION_TIME_EPOCH_SECOND -#define CFE_TIME_FS_FACTOR CFE_MISSION_TIME_FS_FACTOR -#define CFE_ES_CDS_MAX_NAME_LENGTH CFE_MISSION_ES_CDS_MAX_NAME_LENGTH -#define CFE_EVS_MAX_MESSAGE_LENGTH CFE_MISSION_EVS_MAX_MESSAGE_LENGTH -#define CFE_ES_CRC_8 CFE_MISSION_ES_CRC_8 -#define CFE_ES_CRC_16 CFE_MISSION_ES_CRC_16 -#define CFE_ES_CRC_32 CFE_MISSION_ES_CRC_32 -#define CFE_ES_DEFAULT_CRC CFE_MISSION_ES_DEFAULT_CRC -#define CFE_TBL_MAX_NAME_LENGTH CFE_MISSION_TBL_MAX_NAME_LENGTH -#define CFE_CMD_MID_BASE_CPU1 CFE_MISSION_CMD_MID_BASE_CPU1 -#define CFE_TLM_MID_BASE_CPU1 CFE_MISSION_TLM_MID_BASE_CPU1 -#define CFE_CMD_APPID_BASE_CPU1 CFE_MISSION_CMD_APPID_BASE_CPU1 -#define CFE_TLM_APPID_BASE_CPU1 CFE_MISSION_TLM_APPID_BASE_CPU1 -#define CFE_CMD_MID_BASE_CPU2 CFE_MISSION_CMD_MID_BASE_CPU2 -#define CFE_TLM_MID_BASE_CPU2 CFE_MISSION_TLM_MID_BASE_CPU2 -#define CFE_CMD_APPID_BASE_CPU2 CFE_MISSION_CMD_APPID_BASE_CPU2 -#define CFE_TLM_APPID_BASE_CPU2 CFE_MISSION_TLM_APPID_BASE_CPU2 -#define CFE_CMD_MID_BASE_CPU3 CFE_MISSION_CMD_MID_BASE_CPU3 -#define CFE_TLM_MID_BASE_CPU3 CFE_MISSION_TLM_MID_BASE_CPU3 -#define CFE_CMD_APPID_BASE_CPU3 CFE_MISSION_CMD_APPID_BASE_CPU3 -#define CFE_TLM_APPID_BASE_CPU3 CFE_MISSION_TLM_APPID_BASE_CPU3 -#define CFE_CMD_MID_BASE_GLOB CFE_MISSION_CMD_MID_BASE_GLOB -#define CFE_TLM_MID_BASE_GLOB CFE_MISSION_TLM_MID_BASE_GLOB -#define CFE_EVS_CMD_MSG CFE_MISSION_EVS_CMD_MSG -#define CFE_SB_CMD_MSG CFE_MISSION_SB_CMD_MSG -#define CFE_TBL_CMD_MSG CFE_MISSION_TBL_CMD_MSG -#define CFE_TIME_CMD_MSG CFE_MISSION_TIME_CMD_MSG -#define CFE_ES_CMD_MSG CFE_MISSION_ES_CMD_MSG -#define CFE_ES_SEND_HK_MSG CFE_MISSION_ES_SEND_HK_MSG -#define CFE_EVS_SEND_HK_MSG CFE_MISSION_EVS_SEND_HK_MSG -#define CFE_SB_SEND_HK_MSG CFE_MISSION_SB_SEND_HK_MSG -#define CFE_TBL_SEND_HK_MSG CFE_MISSION_TBL_SEND_HK_MSG -#define CFE_TIME_SEND_HK_MSG CFE_MISSION_TIME_SEND_HK_MSG -#define CFE_TIME_TONE_CMD_MSG CFE_MISSION_TIME_TONE_CMD_MSG -#define CFE_TIME_1HZ_CMD_MSG CFE_MISSION_TIME_1HZ_CMD_MSG -#define CFE_TIME_DATA_CMD_MSG CFE_MISSION_TIME_DATA_CMD_MSG -#define CFE_TIME_SEND_CMD_MSG CFE_MISSION_TIME_SEND_CMD_MSG -#define CFE_ES_HK_TLM_MSG CFE_MISSION_ES_HK_TLM_MSG -#define CFE_EVS_HK_TLM_MSG CFE_MISSION_EVS_HK_TLM_MSG -#define CFE_SB_HK_TLM_MSG CFE_MISSION_SB_HK_TLM_MSG -#define CFE_TBL_HK_TLM_MSG CFE_MISSION_TBL_HK_TLM_MSG -#define CFE_TIME_HK_TLM_MSG CFE_MISSION_TIME_HK_TLM_MSG -#define CFE_TIME_DIAG_TLM_MSG CFE_MISSION_TIME_DIAG_TLM_MSG -#define CFE_EVS_EVENT_MSG_MSG CFE_MISSION_EVS_LONG_EVENT_MSG_MSG -#define CFE_SB_STATS_TLM_MSG CFE_MISSION_SB_STATS_TLM_MSG -#define CFE_ES_APP_TLM_MSG CFE_MISSION_ES_APP_TLM_MSG -#define CFE_TBL_REG_TLM_MSG CFE_MISSION_TBL_REG_TLM_MSG -#define CFE_SB_ALLSUBS_TLM_MSG CFE_MISSION_SB_ALLSUBS_TLM_MSG -#define CFE_SB_ONESUB_TLM_MSG CFE_MISSION_SB_ONESUB_TLM_MSG -#define CFE_ES_SHELL_TLM_MSG CFE_MISSION_ES_SHELL_TLM_MSG -#define CFE_ES_MEMSTATS_TLM_MSG CFE_MISSION_ES_MEMSTATS_TLM_MSG - -#endif /* CFE_OMIT_DEPRECATED_6_6 */ - - - #endif /* _cfe_mission_cfg_ */ diff --git a/fsw/cfe-core/src/es/cfe_es_shell.c b/fsw/cfe-core/src/es/cfe_es_shell.c deleted file mode 100644 index 70e56006a..000000000 --- a/fsw/cfe-core/src/es/cfe_es_shell.c +++ /dev/null @@ -1,432 +0,0 @@ -/* -** GSC-18128-1, "Core Flight Executive Version 6.7" -** -** Copyright (c) 2006-2019 United States Government as represented by -** the Administrator of the National Aeronautics and Space Administration. -** All Rights Reserved. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* File: -** cfe_es_shell.c -** -** Purpose: -** cFE Executive Services (ES) Shell Commanding System -** -** References: -** Flight Software Branch C Coding Standard Version 1.0a -** cFE Flight Software Application Developers Guide -** -*/ - -/* - ** Includes - */ -#include "private/cfe_private.h" -#include "cfe_es_global.h" -#include "cfe_es_apps.h" -#include "cfe_es_shell.h" -#include "cfe_es_task.h" -#include "cfe_es_log.h" -#include "cfe_psp.h" - - -#include - -#ifndef CFE_OMIT_DEPRECATED_6_7 /* Remove entire file eventually */ -/* Note - Plan to implement the list functions as real commands, - * shell output no longer part of cFS Framework, recommend implementation in an app if needed - */ - -#define CFE_ES_CHECKSIZE 3 -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* CFE_ES_ShellOutputCommand() -- Pass thru string to O/S shell or to ES */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -int32 CFE_ES_ShellOutputCommand(const char * CmdString, const char *Filename) -{ - int32 Result; - int32 ReturnCode = CFE_SUCCESS; - int32 fd; - int32 FileSize; - int32 CurrFilePtr; - uint32 i; - - /* Use default filename if not provided */ - if (Filename == NULL || Filename[0] == '\0') - { - Filename = CFE_PLATFORM_ES_DEFAULT_SHELL_FILENAME; - } - - /* Remove previous version of output file */ - OS_remove(Filename); - - fd = OS_creat(Filename, OS_READ_WRITE); - - if (fd < OS_SUCCESS) - { - Result = OS_ERROR; - } - - else - { - /* We need to check if this command is directed at ES, or at the - operating system */ - - if (strncmp(CmdString,"ES_",CFE_ES_CHECKSIZE) == 0) - { - /* This list can be expanded to include other ES functionality */ - if ( strcmp(CmdString,CFE_ES_LIST_APPS_CMD) == 0) - { - Result = CFE_ES_ListApplications(fd); - } - else if ( strcmp(CmdString,CFE_ES_LIST_TASKS_CMD) == 0) - { - Result = CFE_ES_ListTasks(fd); - } - else if ( strcmp(CmdString,CFE_ES_LIST_RESOURCES_CMD) == 0) - { - Result = CFE_ES_ListResources(fd); - } - - /* default if there is not an ES command that matches */ - else - { - Result = CFE_ES_ERR_SHELL_CMD; - CFE_ES_WriteToSysLog("There is no ES Shell command that matches %s \n",CmdString); - } - - } - /* if the command is not directed at ES, pass it through to the - * underlying OS */ - else - { - Result = OS_ShellOutputToFile(CmdString,fd); - } - - /* seek to the end of the file to get it's size */ - FileSize = OS_lseek(fd,0,OS_SEEK_END); - - if (FileSize == OS_ERROR) - { - OS_close(fd); - CFE_ES_WriteToSysLog("OS_lseek call failed from CFE_ES_ShellOutputCmd 1\n"); - Result = OS_ERROR; - } - - - - /* We want to add 3 characters at the end of the telemetry,'\n','$','\0'. - * To do this we need to make sure there are at least 3 empty characters at - * the end of the last CFE_MISSION_ES_MAX_SHELL_PKT so we don't over write any data. If - * the current file has only 0,1, or 2 free spaces at the end, we want to - * make the file longer to start a new tlm packet of size CFE_MISSION_ES_MAX_SHELL_PKT. - * This way we will get a 'blank' packet with the correct 3 characters at the end. - */ - - else - { - /* if we are within 2 bytes of the end of the packet*/ - if ( FileSize % CFE_MISSION_ES_MAX_SHELL_PKT > (CFE_MISSION_ES_MAX_SHELL_PKT - 3)) - { - /* add enough bytes to start a new packet */ - for (i = 0; i < CFE_MISSION_ES_MAX_SHELL_PKT - (FileSize % CFE_MISSION_ES_MAX_SHELL_PKT) + 1 ; i++) - { - OS_write(fd," ",1); - } - } - else - { - /* we are exactly at the end */ - if( FileSize % CFE_MISSION_ES_MAX_SHELL_PKT == 0) - { - OS_write(fd," ",1); - } - } - - /* seek to the end of the file again to get it's new size */ - FileSize = OS_lseek(fd,0,OS_SEEK_END); - - if (FileSize == OS_ERROR) - { - OS_close(fd); - CFE_ES_WriteToSysLog("OS_lseek call failed from CFE_ES_ShellOutputCmd 2\n"); - Result = OS_ERROR; - } - - - else - { - /* set the file back to the beginning */ - OS_lseek(fd,0,OS_SEEK_SET); - - - /* start processing the chunks. We want to have one packet left so we are sure this for loop - * won't run over */ - - for (CurrFilePtr=0; (CurrFilePtr + CFE_MISSION_ES_MAX_SHELL_PKT) < FileSize ; CurrFilePtr += CFE_MISSION_ES_MAX_SHELL_PKT) - { - OS_read(fd, CFE_ES_TaskData.ShellPacket.Payload.ShellOutput, CFE_MISSION_ES_MAX_SHELL_PKT); - - /* Send the packet */ - CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &CFE_ES_TaskData.ShellPacket); - CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_ES_TaskData.ShellPacket); - /* delay to not flood the pipe on large messages */ - OS_TaskDelay(CFE_PLATFORM_ES_SHELL_OS_DELAY_MILLISEC); - } - - /* finish off the last portion of the file */ - /* over write the last packet with spaces, then it will get filled - * in with the correct info below. This assures that the last non full - * part of the packet will be spaces */ - for (i =0; i < CFE_MISSION_ES_MAX_SHELL_PKT; i++) - { - CFE_ES_TaskData.ShellPacket.Payload.ShellOutput[i] = ' '; - } - - OS_read(fd, CFE_ES_TaskData.ShellPacket.Payload.ShellOutput, ( FileSize - CurrFilePtr)); - - /* From our check above, we are assured that there are at least 3 free - * characters to write our data into at the end of this last packet - * - * The \n assures we are on a new line, the $ gives us our prompt, and the - * \0 assures we are null terminalted. - */ - - - CFE_ES_TaskData.ShellPacket.Payload.ShellOutput[ CFE_MISSION_ES_MAX_SHELL_PKT - 3] = '\n'; - CFE_ES_TaskData.ShellPacket.Payload.ShellOutput[ CFE_MISSION_ES_MAX_SHELL_PKT - 2] = '$'; - CFE_ES_TaskData.ShellPacket.Payload.ShellOutput[ CFE_MISSION_ES_MAX_SHELL_PKT - 1] = '\0'; - - /* Send the last packet */ - CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &CFE_ES_TaskData.ShellPacket); - CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_ES_TaskData.ShellPacket); - - /* Close the file descriptor */ - OS_close(fd); - } /* if FilseSize == OS_ERROR */ - } /* if FileSeize == OS_ERROR */ - }/* if fd < OS_SUCCESS */ - - - /* cppcheck-suppress duplicateExpression */ - if (Result != OS_SUCCESS && Result != CFE_SUCCESS ) - { - ReturnCode = CFE_ES_ERR_SHELL_CMD; - CFE_ES_WriteToSysLog("OS_ShellOutputToFile call failed from CFE_ES_ShellOutputCommand\n"); - } - else - { - ReturnCode = CFE_SUCCESS; - } - - return ReturnCode; -} - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* CFE_ES_ListApplications() -- List All ES Applications,put in fd */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -int32 CFE_ES_ListApplications(int32 fd) -{ - uint32 i; - char Line [OS_MAX_API_NAME +2]; - int32 Result = CFE_SUCCESS; - - /* Make sure we start at the beginning of the file */ - OS_lseek(fd,0, OS_SEEK_SET); - - for ( i = 0; i < CFE_PLATFORM_ES_MAX_APPLICATIONS; i++ ) - { - if ( CFE_ES_Global.AppTable[i].AppState != CFE_ES_AppState_UNDEFINED && (Result == CFE_SUCCESS) ) - { - /* We found an in use app. Write it to the file */ - strcpy(Line, (char*) CFE_ES_Global.AppTable[i].StartParams.Name); - strcat(Line,"\n"); - Result = OS_write(fd, Line, strlen(Line)); - - if (Result == strlen(Line)) - { - Result = CFE_SUCCESS; - } - /* if not success, returns whatever OS_write failire was */ - - } - } /* end for */ - - return Result; -} /* end ES_ListApplications */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* CFE_ES_ListTasks() -- List All ES Tasks,put in fd */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -int32 CFE_ES_ListTasks(int32 fd) -{ - uint32 i; - /* - * The "Line" buffer is used for temporary storage of each output line - * prior to writing to the file. - * - * 96 bytes are reserved for the constant/fixed length content, plus - * up to 2 instances of Task/Application names which are of a maximum - * length defined by osconfig. - */ - char Line [96 + (OS_MAX_API_NAME * 2)]; - int32 Result; - CFE_ES_TaskInfo_t TaskInfo; - - /* Make sure we start at the beginning of the file */ - Result = OS_lseek(fd, 0, OS_SEEK_SET); - if ( Result == 0 ) - { - snprintf(Line,sizeof(Line),"---- ES Task List ----\n"); - Result = OS_write(fd, Line, strlen(Line)); - if (Result == strlen(Line)) - { - Result = CFE_SUCCESS; - for ( i = 0; i < OS_MAX_TASKS; i++ ) - { - if ((CFE_ES_Global.TaskTable[i].RecordUsed == true) && (Result == CFE_SUCCESS)) - { - /* - ** zero out the local entry - */ - memset(&TaskInfo,0,sizeof(CFE_ES_TaskInfo_t)); - - /* - ** Populate the AppInfo entry - */ - Result = CFE_ES_GetTaskInfo(&TaskInfo,CFE_ES_Global.TaskTable[i].TaskId); - - if ( Result == CFE_SUCCESS ) - { - snprintf(Line,sizeof(Line),"Task ID: %08d, Task Name: %20s, Prnt App ID: %08d, Prnt App Name: %20s\n", - (int) TaskInfo.TaskId, TaskInfo.TaskName, - (int)TaskInfo.AppId, TaskInfo.AppName); - Result = OS_write(fd, Line, strlen(Line)); - - if (Result == strlen(Line)) - { - Result = CFE_SUCCESS; - } - /* if not success, returns whatever OS_write failire was */ - } - } - } /* end for */ - } /* End if OS_write */ - } /* End if OS_lseek */ - return Result; -} /* end ES_ListTasks */ - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* CFE_ES_ShellCountObjectCallback() -- Helper function */ -/* (used by CFE_ES_ListResources() below) */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -static void CFE_ES_ShellCountObjectCallback(uint32 object_id, void *arg) -{ - uint32 *CountState; - uint32 idtype; - - CountState = (uint32 *)arg; - idtype = OS_IdentifyObject(object_id); - if (idtype < OS_OBJECT_TYPE_USER) - { - ++CountState[idtype]; - } -} - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* CFE_ES_ListResources() -- List All OS Resources, put in fd */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -int32 CFE_ES_ListResources(int32 fd) -{ - int32 Result; - int32 NumSemaphores = 0; - int32 NumCountSems =0; - int32 NumMutexes = 0; - int32 NumQueues = 0; - int32 NumTasks = 0; - int32 NumFiles = 0; - char Line[35]; - uint32 CountState[OS_OBJECT_TYPE_USER]; - - memset(&CountState,0,sizeof(CountState)); - OS_ForEachObject (0, CFE_ES_ShellCountObjectCallback, CountState); - - NumSemaphores = CountState[OS_OBJECT_TYPE_OS_BINSEM]; - NumCountSems = CountState[OS_OBJECT_TYPE_OS_COUNTSEM]; - NumMutexes = CountState[OS_OBJECT_TYPE_OS_MUTEX]; - NumQueues = CountState[OS_OBJECT_TYPE_OS_QUEUE]; - NumTasks = CountState[OS_OBJECT_TYPE_OS_TASK]; - NumFiles = CountState[OS_OBJECT_TYPE_OS_STREAM]; - snprintf(Line,sizeof(Line),"OS Resources in Use:\n"); - Result = OS_write(fd, Line, strlen(Line)); - - if( Result == strlen(Line)) - { - snprintf(Line,sizeof(Line),"Number of Tasks: %d\n", (int) NumTasks); - Result = OS_write(fd, Line, strlen(Line)); - - if (Result == strlen(Line)) - { - snprintf(Line,sizeof(Line),"Number of Queues: %d\n", (int) NumQueues); - Result = OS_write(fd, Line, strlen(Line)); - - if (Result == strlen(Line)) - { - snprintf(Line,sizeof(Line),"Number of Binary Semaphores: %d\n",(int) NumSemaphores); - Result = OS_write(fd, Line, strlen(Line)); - if (Result == strlen(Line)) - { - - - snprintf(Line,sizeof(Line),"Number of Counting Semaphores: %d\n",(int) NumCountSems); - Result = OS_write(fd, Line, strlen(Line)); - - if (Result == strlen(Line)) - { - snprintf(Line,sizeof(Line),"Number of Mutexes: %d\n", (int) NumMutexes); - Result = OS_write(fd, Line, strlen(Line)); - if (Result == strlen(Line)) - { - snprintf(Line,sizeof(Line),"Number of Open Files: %d\n",(int) NumFiles); - Result = OS_write(fd, Line, strlen(Line)); - if ( Result == strlen(Line)) - { - Result = CFE_SUCCESS; - } - } - } - } - } - } - } - - /* - ** If any of the writes failed, return the OS_write - ** failure - */ - return Result; -} -#endif /* CFE_OMIT_DEPRECATED_6_7 */ diff --git a/fsw/cfe-core/src/es/cfe_es_shell.h b/fsw/cfe-core/src/es/cfe_es_shell.h deleted file mode 100644 index cda4da944..000000000 --- a/fsw/cfe-core/src/es/cfe_es_shell.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -** GSC-18128-1, "Core Flight Executive Version 6.7" -** -** Copyright (c) 2006-2019 United States Government as represented by -** the Administrator of the National Aeronautics and Space Administration. -** All Rights Reserved. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** File: -** cfe_es_shell.h -** -** Purpose: -** This file contains definitions needed for the internal shell functions. -** -** References: -** Flight Software Branch C Coding Standard Version 1.0a -** cFE Flight Software Application Developers Guide -** -** Notes: -** -*/ - -#ifndef _cfe_es_shell_ -#define _cfe_es_shell_ - -/* -** Include Files -*/ -#include "cfe.h" - -/* -** Macro Definitions -*/ -#define CFE_ES_LIST_APPS_CMD "ES_ListApps" -#define CFE_ES_LIST_RESOURCES_CMD "ES_ListResources" -#define CFE_ES_LIST_TASKS_CMD "ES_ListTasks" - -/* -** Type Definitions -*/ - - -/* -** Function prototypes -*/ -/* -** Operating System Shell function -*/ - -int32 CFE_ES_ShellOutputCommand(const char * CmdString, const char *Filename); - -int32 CFE_ES_ListApplications(int32 fd); -int32 CFE_ES_ListTasks(int32 fd); -int32 CFE_ES_ListResources(int32 fd); -#endif /* cfe_es_shell_ */ diff --git a/fsw/cfe-core/src/es/cfe_es_task.c b/fsw/cfe-core/src/es/cfe_es_task.c index af43be5ac..cfaadc144 100644 --- a/fsw/cfe-core/src/es/cfe_es_task.c +++ b/fsw/cfe-core/src/es/cfe_es_task.c @@ -44,7 +44,6 @@ #include "cfe_es_events.h" #include "cfe_es_verify.h" #include "cfe_es_task.h" -#include "cfe_es_shell.h" #include "cfe_es_log.h" #include "cfe_es_cds.h" #include "cfe_fs.h" @@ -256,15 +255,6 @@ int32 CFE_ES_TaskInit(void) CFE_SB_ValueToMsgId(CFE_ES_HK_TLM_MID), sizeof(CFE_ES_TaskData.HkPacket), true); -#ifndef CFE_OMIT_DEPRECATED_6_7 - /* - ** Initialize shell output packet (clear user data area) - */ - CFE_SB_InitMsg(&CFE_ES_TaskData.ShellPacket, - CFE_SB_ValueToMsgId(CFE_ES_SHELL_TLM_MID), - sizeof(CFE_ES_TaskData.ShellPacket), true); -#endif - /* ** Initialize single application telemetry packet */ @@ -487,15 +477,6 @@ void CFE_ES_TaskPipe(CFE_SB_MsgPtr_t Msg) } break; -#ifndef CFE_OMIT_DEPRECATED_6_7 - case CFE_ES_SHELL_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_Shell_t))) - { - CFE_ES_ShellCmd((CFE_ES_Shell_t*)Msg); - } - break; -#endif - case CFE_ES_START_APP_CC: if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_StartApp_t))) { @@ -865,53 +846,6 @@ int32 CFE_ES_RestartCmd(const CFE_ES_Restart_t *data) return CFE_SUCCESS; } /* End of CFE_ES_RestartCmd() */ -#ifndef CFE_OMIT_DEPRECATED_6_7 -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* CFE_ES_ShellCmd() -- Pass thru string to O/S shell */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -int32 CFE_ES_ShellCmd(const CFE_ES_Shell_t *data) -{ - int32 Result; - const CFE_ES_ShellCmd_Payload_t *cmd = &data->Payload; - char LocalCmd[CFE_PLATFORM_ES_MAX_SHELL_CMD]; - char LocalFile[OS_MAX_PATH_LEN]; - - /* Create local copies of both input strings and ensure null termination */ - CFE_SB_MessageStringGet(LocalCmd, (char *)cmd->CmdString, NULL, - CFE_PLATFORM_ES_MAX_SHELL_CMD, sizeof(cmd->CmdString)); - - CFE_SB_MessageStringGet(LocalFile, (char *)cmd->OutputFilename, NULL, - OS_MAX_PATH_LEN, sizeof(cmd->OutputFilename)); - - /* - ** Call the Shell command API - */ - Result = CFE_ES_ShellOutputCommand(LocalCmd, LocalFile); - /* - ** Send appropriate event message. - */ - if (Result == CFE_SUCCESS) - { - CFE_ES_TaskData.CommandCounter++; - CFE_EVS_SendEvent(CFE_ES_SHELL_INF_EID, CFE_EVS_EventType_INFORMATION, - "Invoked shell command: '%s'", - LocalCmd); - } - else - { - CFE_ES_TaskData.CommandErrorCounter++; - CFE_EVS_SendEvent(CFE_ES_SHELL_ERR_EID, CFE_EVS_EventType_ERROR, - "Failed to invoke shell command: '%s', RC = 0x%08X", - LocalCmd, (unsigned int)Result); - } - - return CFE_SUCCESS; -} /* End of CFE_ES_ShellCmd() */ -#endif /* CFE_OMIT_DEPRECATED_6_7 */ - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* CFE_ES_StartAppCmd() -- Load (and start) single application */ diff --git a/fsw/cfe-core/src/es/cfe_es_task.h b/fsw/cfe-core/src/es/cfe_es_task.h index 3b4da6f16..ab5008e27 100644 --- a/fsw/cfe-core/src/es/cfe_es_task.h +++ b/fsw/cfe-core/src/es/cfe_es_task.h @@ -101,13 +101,6 @@ typedef struct */ CFE_ES_HousekeepingTlm_t HkPacket; -#ifndef CFE_OMIT_DEPRECATED_6_7 - /* - ** ES Shell output telemetry packet - */ - CFE_ES_ShellTlm_t ShellPacket; -#endif - /* ** Single application telemetry packet */ @@ -179,9 +172,6 @@ int32 CFE_ES_HousekeepingCmd(const CFE_SB_CmdHdr_t *data); int32 CFE_ES_NoopCmd(const CFE_ES_Noop_t *Cmd); int32 CFE_ES_ResetCountersCmd(const CFE_ES_ResetCounters_t *data); int32 CFE_ES_RestartCmd(const CFE_ES_Restart_t *data); -#ifndef CFE_OMIT_DEPRECATED_6_7 -int32 CFE_ES_ShellCmd(const CFE_ES_Shell_t *data); -#endif int32 CFE_ES_StartAppCmd(const CFE_ES_StartApp_t *data); int32 CFE_ES_StopAppCmd(const CFE_ES_StopApp_t *data); int32 CFE_ES_RestartAppCmd(const CFE_ES_RestartApp_t *data); diff --git a/fsw/cfe-core/src/fs/cfe_fs_api.c b/fsw/cfe-core/src/fs/cfe_fs_api.c index 1f2a01357..4b7c97beb 100644 --- a/fsw/cfe-core/src/fs/cfe_fs_api.c +++ b/fsw/cfe-core/src/fs/cfe_fs_api.c @@ -326,120 +326,6 @@ int32 CFE_FS_ExtractFilenameFromPath(const char *OriginalPath, char *FileNameOnl return(ReturnCode); } -#ifndef CFE_OMIT_DEPRECATED_6_7 -/* -** Function: CFE_FS_IsGzFile - See API and header file for details -*/ -bool CFE_FS_IsGzFile(const char *FileName) -{ - size_t StringLength; - - if ( FileName == NULL ) - { - return(false); - } - /* - ** Get the string length of the SourceFile name - */ - StringLength = strlen(FileName); - - /* - ** The compressed filename must be named "something.gz" - ** Because of that, the shortest compressed filename is "a.gz" - ** Check for the length before determining if the file is zipped - */ - if ( StringLength < 4 ) - { - return(false); - } - - /* - ** if the last 3 characters are ".gz" - ** Then assume the file is zipped. - */ - if ( (FileName[StringLength - 3] == '.') && - (FileName[StringLength - 2] == 'g') && - (FileName[StringLength - 1] == 'z')) - { - return(true); - } - else - { - return(false); - } - -} - -/* -** CFE_FS_GetUncompressedFile - See API and header file for details -*/ -int32 CFE_FS_GetUncompressedFile(char *OutputNameBuffer, uint32 OutputNameBufferSize, - const char *GzipFileName, const char *TempDir) -{ - char FileNameOnly[OS_MAX_PATH_LEN]; - int32 Status; - int RequiredLen; /* using "int" per snprintf API */ - - /* - ** Extract the filename from the path - */ - Status = CFE_FS_ExtractFilenameFromPath(GzipFileName, FileNameOnly); - if ( Status != CFE_SUCCESS ) - { - CFE_ES_WriteToSysLog("FS_GetUncompressedFile: Unable to extract filename from path: %s.\n",GzipFileName); - } - else - { - /* - ** Build up the destination path in the RAM disk - */ - RequiredLen = snprintf(OutputNameBuffer, OutputNameBufferSize, - "%s/%s", TempDir, FileNameOnly); - - /* - ** Remove the ".gz" prefix from the filename - ** (Any input file name to this function must have a .gz extension, - ** i.e. it passed the CFE_FS_IsGzFile() test, of which .gz is the only possibility) - */ - if (RequiredLen >= 3) - { - RequiredLen -= 3; - } - - /* - * check if LoadNameBuffer got truncated - * (snprintf returns the _required_ length, whether or not it actually fit) - */ - if (RequiredLen < 0 || RequiredLen >= OutputNameBufferSize) - { - /* Can't include the name string since it could be too long for the message */ - CFE_ES_WriteToSysLog("FS_GetUncompressedFile: Temporary path plus file name length (%d) exceeds max allowed (%lu)\n", - RequiredLen, (unsigned long)(OutputNameBufferSize-1)); - Status = CFE_FS_FNAME_TOO_LONG; - } - else - { - /* - * Actually truncate the .gz from the string - * (had to wait until after length verification) - */ - OutputNameBuffer[RequiredLen] = 0; - - /* - ** Decompress the file: - */ - Status = CFE_FS_Decompress( GzipFileName, OutputNameBuffer ); - if ( Status != CFE_SUCCESS ) - { - CFE_ES_WriteToSysLog("FS_GetUncompressedFile: Unable to decompress %s, error=%08lx\n", - GzipFileName, (unsigned long)Status); - } - } - } - - return Status; -} -#endif /* CFE_OMIT_DEPRECATED_6_7 */ /************************/ /* End of File Comment */ diff --git a/fsw/cfe-core/src/fs/cfe_fs_decompress.c b/fsw/cfe-core/src/fs/cfe_fs_decompress.c deleted file mode 100644 index 5e2a4d5ae..000000000 --- a/fsw/cfe-core/src/fs/cfe_fs_decompress.c +++ /dev/null @@ -1,1230 +0,0 @@ -/* -** GSC-18128-1, "Core Flight Executive Version 6.7" -** -** Copyright (c) 2006-2019 United States Government as represented by -** the Administrator of the National Aeronautics and Space Administration. -** All Rights Reserved. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** File: cfe_fs_decompress.c -** -** Author: A. Cudmore, NASA/GSFC Code 582 -** Ported from JWST, which was ported from Swift/BAT, -** which was ported from the GNU zip sources. -** -** Purpose: cFE Port of the gzunzip software ported from Triana->Swift->JWST -** -*/ - -/* Original Credit: - * - * inflate.c -- Not copyrighted 1992 by Mark Adler version c10p1, 10 January - * 1993 - * - * You can do whatever you like with this source file, though I would prefer - * that if you modify it and redistribute it that you include comments to - * that effect with your name and the date. Thank you. [The history has been - * moved to the file ChangeLog.] - */ - -/* -** Includes -*/ -#include "cfe_fs_decompress.h" - -#ifndef CFE_OMIT_DEPRECATED_6_7 /* Entire file will be removed in major release */ - -/* -** Global data -- Note: The following Global Data should be removed. The CFE_FS_Decompress API is not -** re-entrant! In order to make sure that two apps will not corrupt the data -** the API is guarded with a Mutex. This will have serious implications on -** real time performance if an application blocks while another is in the API. -** -*/ -CFE_FS_Decompress_State_t CFE_FS_Decompress_State_NR; - -static uint32 trace[ 3 ]; - -/* -** Code -*/ - -/* - * CFE_FS_Decompress - See API and header file for details - */ -int32 CFE_FS_Decompress( const char * srcFileName, const char * dstFileName ) -{ - - int32 rc; - - /* - ** Lock the API with the FS Mutex - */ - CFE_FS_LockSharedData(__func__); - - rc = CFE_FS_Decompress_Reentrant(&CFE_FS_Decompress_State_NR, srcFileName, dstFileName ); - - /* - ** Unlock FS Shared data mutex - */ - CFE_FS_UnlockSharedData(__func__); - - return rc; -} - - -int32 CFE_FS_Decompress_Reentrant(CFE_FS_Decompress_State_t *State, const char * srcFileName, const char * dstFileName ) -{ - - int32 guzerror; - - State->Error = CFE_SUCCESS; /*Initialize this variable. */ - - /* - ** initialize max number of Huffman tables allocated to zero - */ - State->max_hufts = 0; - - /* - ** Open input file - */ - State->srcFile_fd = OS_open( srcFileName, OS_READ_ONLY, 0 ); - - /* - ** if input file could not be opened, return cFE error code - */ - if ( State->srcFile_fd < 0 ) - { - CFE_ES_WriteToSysLog("CFE_FS_Decompress: Cannot open source file: %s\n", - srcFileName); - return (CFE_FS_GZIP_OPEN_INPUT); - } - - /* - ** open output file - */ - State->dstFile_fd = OS_creat( dstFileName, OS_WRITE_ONLY); - - /* - ** if output file could not be opened, return cFE error code - */ - if ( State->dstFile_fd < 0 ) - { - CFE_ES_WriteToSysLog("CFE_FS_Decompress: Cannot open destination file: %s\n", - dstFileName); - - /* close the source file before bailing out */ - OS_close( State->srcFile_fd ); - - return (CFE_FS_GZIP_OPEN_OUTPUT); - } - - memset( State->hufTable, 0, MAX_HUF_TABLES * sizeof(HufTable) ); - memset( State->window, 0, WSIZE_X2 ); - memset( trace, 0, 3 * sizeof(uint32) ); - - /* - ** uncompress the file - */ - guzerror = FS_gz_unzip_Reentrant(State); - - /* - ** close input and output files - */ - OS_close( State->dstFile_fd ); - OS_close( State->srcFile_fd ); - - /* - ** delete output file after error - */ - if (guzerror != CFE_SUCCESS) - { - OS_remove(dstFileName); - } - - - /* - ** return cFE error code - */ - return(guzerror); -} - - -void FS_gz_clear_bufs_Reentrant( CFE_FS_Decompress_State_t *State ) -{ - State->outcnt = 0; - State->insize = 0; - State->inptr = 0; - - State->bytes_in = 0L; - State->bytes_out = 0L; -} - - -int32 FS_gz_eat_header_Reentrant( CFE_FS_Decompress_State_t *State ) -{ - uint8 flags; /* compression flags */ - int8 magic[2]; /* magic header */ - int8 thisByte; /* temporary holder for current byte in a string read */ - uint32 stamp; /* time stamp */ - bool keep_going; - - /* read input buffer (check for read error) */ - magic[0] = (int8)NEXTBYTE(); - if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; - - magic[1] = (int8)NEXTBYTE(); - if ( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; - - if ( memcmp( magic, GZIP_MAGIC, 2 ) == 0 || memcmp( magic, OLD_GZIP_MAGIC, 2 ) == 0 ) - { - - NEXTBYTE(); - if ( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; - - flags = NEXTBYTE(); - if ( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; - - stamp = (uint32)NEXTBYTE(); - if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; - stamp |= (uint32)NEXTBYTE() << 8; - if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; - stamp |= (uint32)NEXTBYTE() << 16; - if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; - /* cppcheck-suppress unreadVariable */ - stamp |= (uint32)NEXTBYTE() << 24; - if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; - - NEXTBYTE(); /* Ignore extra flags for the moment */ - if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; - NEXTBYTE(); /* Ignore OS type for the moment */ - if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; - - if ( (flags & CONTINUATION) != 0 ) { - NEXTBYTE(); - if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; - NEXTBYTE(); - if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; - } - - if ( (flags & EXTRA_FIELD) != 0 ) { - uint32 len; - len = NEXTBYTE(); - if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; - len |= NEXTBYTE() << 8; - if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; - while (len--) { - NEXTBYTE(); - if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; - } - } - - /* Get original file name if it was truncated */ - if ( (flags & ORIG_NAME) != 0 ) { - keep_going = true; - while ( keep_going ) { - - /* Get the next byte */ - thisByte = NEXTBYTE(); - - /* Header failure when end of file is reached or a read failure occurs */ - if ((thisByte == EOF) || (State->Error != CFE_SUCCESS)) return CFE_FS_GZIP_READ_ERROR_HEADER; - - /* End of string was found */ - if (thisByte == 0) keep_going = false; - } - } - - /* Discard file comment if any */ - if ( (flags & COMMENT) != 0 ) { - keep_going = true; - while ( keep_going ) { - - /* Get the next byte */ - thisByte = NEXTBYTE(); - - /* Header failure when end of file is reached or a read failure occurs */ - if ((thisByte == EOF) || (State->Error != CFE_SUCCESS)) return CFE_FS_GZIP_READ_ERROR_HEADER; - - /* End of string was found */ - if (thisByte == 0) keep_going = false; - } - } - } - else - { - State->Error = CFE_FS_GZIP_NON_ZIP_FILE; - } - - return State->Error; -} - -/* -** Fill the input buffer. This is called only when the buffer is empty. -*/ -int16 FS_gz_fill_inbuf_Reentrant( CFE_FS_Decompress_State_t *State ) -{ - int32 len; - - /* Read as much as possible */ - State->insize = 0; - - do - { - len = OS_read( State->srcFile_fd, (int8*)State->inbuf + State->insize, INBUFSIZ - State->insize ); - - if ( len <= 0 ) break; - - State->insize += len; - - } while ( State->insize < INBUFSIZ ); - - - if ( State->insize == 0 || len < 0) - { - State->Error = CFE_FS_GZIP_READ_ERROR; - return EOF; - } - - State->bytes_in += (uint32)State->insize; - State->inptr = 1; - - return State->inbuf[0]; -} - - -/* Write the output window window[0..State->outcnt-1] and update crc and */ -/* State->bytes_out. (Used for the decompressed data only.) */ -/* merged original State->flush_window & State->write_buf together - glw */ -/* fix for infinite loop when file store is full -dds */ -void FS_gz_flush_window_Reentrant( CFE_FS_Decompress_State_t *State ) -{ - - int32 n; - uint32 cnt; - uint8 *gz_window_position; - - if ( State->outcnt == 0 ) return; - - FS_gz_updcrc( State->window, State->outcnt ); - - cnt = State->outcnt; - gz_window_position = State->window; - - while ( State->Error != CFE_FS_GZIP_WRITE_ERROR && - ( n = OS_write(State->dstFile_fd, (int8 *)gz_window_position, cnt) ) != cnt ) - { - if ( n <= 0 ) State->Error = CFE_FS_GZIP_WRITE_ERROR; - - cnt -= n; - gz_window_position += n; - } - - State->bytes_out += (uint32)State->outcnt; - - State->outcnt = 0; -} - - -/* Given a list of code lengths and a maximum table size, make a set of */ -/* tables to decode that set of codes. Return zero on success, one if the */ -/* given code set is incomplete (the tables are still built in this case), */ -/* two if the input is invalid (all zero length codes or an oversubscribed */ -/* set of lengths), and three if not enough memory. */ - -/* INPUT: */ -/* uint32 *b; */ /* code lengths in bits (all assumed <= BMAX) */ -/* uint32 n; */ /* number of codes (assumed <= N_MAX) */ -/* uint32 s; */ /* number of simple-valued codes (0..s-1) */ -/* uint16 *d; */ /* list of base values for non-simple codes */ -/* uint16 *e; */ /* list of extra bits for non-simple codes */ -/* int32 *m; */ /* maximum lookup bits, returns actual */ - -int32 FS_gz_huft_build_Reentrant( CFE_FS_Decompress_State_t *State, uint32 * b, uint32 n, uint32 s, uint16 * d, uint16 * e, int32 * m ) -{ - - uint32 a; /* counter for codes of length k */ - uint32 c[BMAX + 1]; /* bit length count table */ - uint32 f; /* i repeats in table every f entries */ - int32 g; /* maximum code length */ - int32 h; /* table level */ - register uint32 i; /* counter, current code */ - register uint32 j; /* counter */ - register int32 k; /* number of bits in current code */ - int32 l; /* bits per table (returned in m) */ - uint32 lu; /* l unsigned */ - register uint32 *p; /* pointer into c[], b[], or v[] */ - register HufTable *q; /* points to current table */ - HufTable r; /* table entry for structure assignment */ - HufTable *u[BMAX]; /* table stack */ - uint32 v[N_MAX]; /* values in order of bit length */ - register int32 w; /* bits before this table == (l * h) */ - uint32 x[BMAX + 1]; /* bit offsets, then code stack */ - uint32 *xp; /* pointer into x */ - int32 y; /* number of dummy codes added */ - uint32 z; /* number of entries in current table */ - - uint32 huft_index_q; - uint32 huft_index_t = 0; - bool not_first_table = false; - huft_index_t = 0; - - /* Generate counts for each bit length */ - memset( (c), 0, sizeof(c) ); - r.b=0; - r.e=0; - r.v.n=0; - r.v.t=0; - p = b; - i = n; - do - { - c[*p]++; - p++; - } while (--i); - - if (c[0] == n) - { /* null input--all zero length codes */ - *m = 0; - return CFE_SUCCESS; - } - - - /* Find minimum and maximum length, bound *m by those */ - l = *m; - for ( j = 1; j <= BMAX; j++ ) if ( c[j] ) break; - k = j; - lu = (uint32)l; /* minimum code length */ - if ( lu < j ) { l = j; lu = (uint32)l; } - for ( i = BMAX; i; i-- ) if (c[i]) break; - g = i; /* maximum code length */ - if ( lu > i ) { l = i; lu = (uint32)l; } - *m = l; - - - /* Adjust last length count to fill out codes, if needed */ - for ( y = 1 << j; j < i; j++, y <<= 1 ) - if ( ( y -= c[j] ) < 0 ) return CFE_FS_GZIP_BAD_CODE_BLOCK; /* bad input: more codes than bits */ - if ( (y -= c[i] ) < 0 ) return CFE_FS_GZIP_BAD_CODE_BLOCK; - c[i] += y; - - - /* Generate starting offsets into the value table for each length */ - x[1] = j = 0; - p = c + 1; - xp = x + 2; - while (--i) { /* note that i == g from above */ - j += *p++; - *xp++ = j; - } - - - /* Make a table of values in order of bit lengths */ - p = b; - i = 0; - do { - if ( (j = *p++) != 0 ) v[x[j]++] = i; - } while ( ++i < n ); - - - /* Generate the Huffman codes and for each, make the table entries */ - x[0] = i = 0; /* first Huffman code is zero */ - p = v; /* grab values in bit order */ - h = -1; /* no tables yet--level -1 */ - w = -l; /* bits decoded == (l * h) */ - u[0] = (HufTable *)NULL; /* just to keep compilers happy */ - q = (HufTable *)NULL; /* ditto */ - z = 0; /* ditto */ - - - /* go through the bit lengths (k already is bits in shortest code) */ - for (; k <= g; k++) { - a = c[k]; - while (a--) { - - /* here i is the Huffman code of length k bits for value *p */ - /* make tables up to required level */ - while (k > w + l) { - h++; - w += l; /* previous table always l bits */ - - /* compute minimum size table less than or equal to l bits */ - z = g - w; - z = ( z > lu ? l : z ); /* upper limit on table size */ - j = k - w; - f = 1< a + 1 ) { /* try a k-w bit table */ - - /* too few codes for k-w bit table */ - f -= a + 1; /* deduct codes from patterns left */ - xp = c + k; - while ( ++j < z ) { /* try smaller tables up to z bits */ - f <<= 1; - if ( f <= *++xp ) break; /* enough codes to use up j bits */ - f -= *xp; /* else deduct codes from patterns */ - } - - } - z = 1 << j; /* table entries for j-bit table */ - - /* if space remains in the Huffman table memory array, "allocate" and link in new table */ - if ( State->hufts + (z + 1) > MAX_HUF_TABLES ) return CFE_FS_GZIP_NO_MEMORY; - - q = &State->hufTable[State->hufts]; - huft_index_q = State->hufts; - State->hufts += z + 1; - if ( State->hufts > State->max_hufts ) State->max_hufts = State->hufts; - - if ( not_first_table ) State->hufTable[huft_index_t].v.t = huft_index_q + 1; - else not_first_table = true; - - huft_index_t = huft_index_q; - State->hufTable[huft_index_t].v.t = 0xffff; /* stand-in for NULL */ - - u[h] = ++q; /* table starts after link */ - huft_index_q++; - - /* connect to last table, if there is one */ - if ( h ) { - x[h] = i; /* save pattern for backing up */ - r.b = (uint8)l; /* bits to dump before this table */ - r.e = (uint8)(16 + j); /* bits in this table */ - /* r.t = q; */ /* pointer to this table */ - r.v.t = huft_index_q; /* pointer to this table */ - j = i >> (w - l); /* (get around Turbo C bug) */ - u[h - 1][j] = r; /* connect to last table */ - } - - } - - /* set up table entry in r */ - r.b = (uint8)(k - w); - if (p >= v + n) { - r.e = 99; /* out of values--invalid code */ - } else if ( *p < s ) { - r.e = (uint8)( *p < 256 ? 16 : 15 ); /* 256 is end-of-block code */ - r.v.n = *p; /* simple code is just the value */ - p++; /* one compiler does not like *p++ */ - } else { - r.e = (uint8)( e[*p - s] ); /* non-simple--look up in lists */ - r.v.n = d[*p++ - s]; - } - - /* fill code-like entries with r */ - f = 1 << (k - w); - j = i >> w; - - if( (q == (HufTable *)NULL) && (j < z) ) - { - return CFE_FS_GZIP_BAD_CODE_BLOCK; - } - else - { - for ( j = i >> w; j < z; j += f ) q[j] = r; - } - - /* backwards increment the k-bit code i */ - for ( j = 1 << (k - 1); i & j; j >>= 1 ) i ^= j; - i ^= j; - - /* backup over finished tables */ - while (( h >= 0 ) && ( ( i & ((1 << w) - 1) ) != x[h] )) { - h--; /* don't need to update q */ - w -= l; - } - - } - - } - - /* Return true (1) if we were given an incomplete table */ - if((y != 0 && g != 1)) - { - return CFE_FS_GZIP_BAD_DATA; - } - - return CFE_SUCCESS; - -} - - - -int32 FS_gz_inflate_Reentrant( CFE_FS_Decompress_State_t *State ) -{ - - int32 e; /* last block flag */ - int32 r; /* result code */ - - /* initialize window, bit buffer */ - State->outcnt = 0; - State->bk = 0; - State->bb = 0; - - /* decompress until the last block */ - do { - r = FS_gz_inflate_block_Reentrant( State, &e); - if ( r != CFE_SUCCESS ) return r; - } while (!e); - - /* Undo too much lookahead. The next read will be byte aligned so we can */ - /* discard unused bits in the last meaningful byte. */ - while ( State->bk >= 8 ) { - State->bk -= 8; - State->inptr--; - } - - /* flush out sliding window */ - FS_gz_flush_window_Reentrant(State); - - /* return success */ - return CFE_SUCCESS; - -} - - -/* -** decompress an inflated block -*/ -int32 FS_gz_inflate_block_Reentrant( CFE_FS_Decompress_State_t *State, int32 * e ) -{ - - uint32 t; /* block type */ - uint32 b; /* bit buffer */ - uint32 k; /* number of bits in bit buffer */ - - int32 res; - - /* make local bit buffer */ - b = State->bb; - k = State->bk; - - /* read in last block bit */ - NEEDBITS(1) - *e = (int32)b & 1; - DUMPBITS(1) - - - /* read in block type */ - NEEDBITS(2) - t = (uint32)b & 3; - DUMPBITS(2) - - - /* restore the global bit buffer */ - State->bb = b; - State->bk = k; - - - /* inflate that block type */ - if ( t == 0 ) { res = FS_gz_inflate_stored_Reentrant(State); trace[0]++; } - else if ( t == 1 ) { res = FS_gz_inflate_fixed_Reentrant(State); trace[1]++; } - else if ( t == 2 ) { res = FS_gz_inflate_dynamic_Reentrant(State); trace[2]++; } - - else res = CFE_FS_GZIP_BAD_CODE_BLOCK; - - return res; - -} - -/* Inflate (decompress) the codes in a deflated (compressed) block. */ -/* Return an error code or zero if it all goes ok. */ -int32 FS_gz_inflate_codes_Reentrant( CFE_FS_Decompress_State_t *State, HufTable * tl, HufTable * td, int32 bl, int32 bd ) -{ - - static uint16 mask_bits[] = { - 0x0000, - 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, - 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff - }; - - - uint32 e; /* table entry flag/number of extra bits */ - uint32 n, d; /* length and index for copy */ - uint32 w; /* current window position */ - HufTable *t; /* pointer to table entry */ - uint32 ml, md; /* masks for bl and bd bits */ - uint32 b; /* bit buffer */ - uint32 k; /* number of bits in bit buffer */ - - uint32 index; - - /* make local copies of globals */ - b = State->bb; /* initialize bit buffer */ - k = State->bk; - w = State->outcnt; /* initialize window position */ - - /* inflate the coded data */ - ml = mask_bits[bl]; /* precompute masks for speed */ - md = mask_bits[bd]; - - for (;;) - { /* do until end of block */ - - NEEDBITS((uint32)bl); - t = tl + ((uint32)b & ml); - e = t->e; - if ( e > 16 ) - { - do - { - if (e == 99) return CFE_FS_GZIP_BAD_DATA; - DUMPBITS(t->b); - e -= 16; - NEEDBITS(e); - index = t->v.t + ( (uint32)b & mask_bits[e] ); - if ( index >= 0 && index < State->hufts ) - t = &( State->hufTable[index] ); - else - return CFE_FS_GZIP_INDEX_ERROR; - e = t->e; - } while ( e > 16 ); - } - - DUMPBITS(t->b); - - if ( e == 16 ) - { /* then it's a literal */ - - /* gz_window[w++] = (uint8)(t->n); */ - State->window[w++] = (uint8)(t->v.n); - if ( w == WSIZE ) - { - State->outcnt = w; - FS_gz_flush_window_Reentrant(State); - w = 0; - } - - } - else - { /* it's an EOB or a length */ - - /* exit if end of block */ - if ( e == 15 ) break; - - /* get length of block to copy */ - NEEDBITS(e); - n = t->v.n + ( (uint32)b & mask_bits[e] ); - DUMPBITS(e); - - /* decode distance of block to copy */ - NEEDBITS((uint32)bd); - t = td + ((uint32)b & md); - e = t->e; - if ( e > 16 ) - { - do - { - if (e == 99) return CFE_FS_GZIP_BAD_DATA; - DUMPBITS(t->b); - e -= 16; - NEEDBITS(e); - index = t->v.t + ( (uint32)b & mask_bits[e] ); - if ( index >= 0 && index < State->hufts ) - t = &( State->hufTable[index] ); - else - return CFE_FS_GZIP_INDEX_ERROR; - e = t->e; - } while ( e > 16 ); - } - DUMPBITS(t->b); - - NEEDBITS(e); - d = w - t->v.n - ((uint32)b & mask_bits[e]); - DUMPBITS(e); - - /* do the copy */ - do - { - - d &= WSIZE - 1; - e = WSIZE - ( d > w ? d : w); - e = ( e > n ? n : e ); - n -= e; - - if ( w - d >= e ) - { /* (this test assumes unsigned comparison) */ - - memcpy( State->window + w, State->window + d, e ); - w += e; - d += e; - - } - else - { /* do it slow to avoid memcpy() overlap */ - - do - { - State->window[w++] = State->window[d++]; - } while (--e); - - } - - if ( w == WSIZE ) - { - State->outcnt = w; - FS_gz_flush_window_Reentrant(State); - w = 0; - } - - } while (n); - - } - - } - - /* restore the globals from the locals */ - State->outcnt = w; /* restore global window pointer */ - State->bb = b; /* restore global bit buffer */ - State->bk = k; - - return CFE_SUCCESS; -} - -/* -** removed gz_huft_free, no longer needed - glw -** -- decompress an inflated type 2 (dynamic Huffman codes) block. -*/ -int32 FS_gz_inflate_dynamic_Reentrant( CFE_FS_Decompress_State_t *State ) -{ - - static int32 lbits = 9; /* bits in base literal/length lookup table */ - static int32 dbits = 6; /* bits in base distance lookup table */ - - /* Order of the bit length code lengths */ - static uint32 border[] = { - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 - }; - - /* Copy lengths for literal codes 257..285 */ - static uint16 cplens[] = { - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 - }; - - /* Extra bits for literal codes 257..285 ( 99==invalid ) */ - static uint16 cplext[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, - 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99 - }; - - /* Copy offsets for distance codes 0..29 */ - static uint16 cpdist[] = { - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577 - }; - - /* Extra bits for distance codes */ - static uint16 cpdext[] = { - 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, - 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 - }; - - static uint16 mask_bits[] = { - 0x0000, - 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, - 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff - }; - - - int32 i; /* temporary variables */ - uint32 j; - uint32 l; /* last length */ - uint32 m; /* mask for bit lengths table */ - uint32 n; /* number of lengths to get */ - HufTable *tl; /* literal/length code table */ - HufTable *td; /* distance code table */ - int32 bl; /* lookup bits for tl */ - int32 bd; /* lookup bits for td */ - uint32 nb; /* number of bit length codes */ - uint32 nl; /* number of literal/length codes */ - uint32 nd; /* number of distance codes */ - uint32 ll[286 + 30]; /* literal/length and distance code lengths */ - - uint32 b; /* bit buffer */ - uint32 k; /* number of bits in bit buffer */ - - int32 error_code; - - /* make local bit buffer */ - b = State->bb; - k = State->bk; - - /* read in table lengths */ - NEEDBITS(5); - nl = 257 + ((uint32)b & 0x1f); /* number of literal/length codes */ - DUMPBITS(5); - - NEEDBITS(5); - nd = 1 + ((uint32) b & 0x1f); /* number of distance codes */ - DUMPBITS(5); - - NEEDBITS(4); - nb = 4 + ((uint32) b & 0xf); /* number of bit length codes */ - DUMPBITS(4); - - if (nl > 286 || nd > 30) return CFE_FS_GZIP_BAD_DATA; /* bad lengths */ - - /* read in bit-length-code lengths */ - for (j = 0; j < nb; j++) { - NEEDBITS(3); - ll[border[j]] = (uint32)b & 7; - DUMPBITS(3); - } - for (; j < 19; j++) ll[border[j]] = 0; - - /* build decoding table for trees--single level, 7 bit lookup */ - bl = 7; - State->hufts = 0; /* initialize Huff Table memory */ - tl = &State->hufTable[1]; /* set known position given alloc removed - glw */ - error_code = FS_gz_huft_build_Reentrant(State, ll, 19, 19, (uint16 *)NULL, (uint16 *)NULL, &bl ); - if ( error_code != CFE_SUCCESS ) return error_code; - - /* read in literal and distance code lengths */ - n = nl + nd; - m = mask_bits[bl]; - i = l = 0; - while ( (uint32)i < n ) - { - NEEDBITS((uint32)bl); - td = tl + ((uint32)b & m); - j = td->b; - DUMPBITS(j); - j = td->v.n; - if ( j < 16 ) - { /* length of code in bits (0..15) */ - ll[i++] = l = j; /* save last length in l */ - } - else if ( j == 16 ) - { /* repeat last length 3 to 6 times */ - NEEDBITS(2); - j = 3 + ( (uint32)b & 3 ); - DUMPBITS(2); - if ( (uint32)i + j > n ) return CFE_FS_GZIP_BAD_DATA; - while (j--) ll[i++] = l; - } - else if (j == 17) - { /* 3 to 10 zero length codes */ - NEEDBITS(3); - j = 3 + ( (uint32)b & 7 ); - DUMPBITS(3); - if ( (uint32)i + j > n ) return CFE_FS_GZIP_BAD_DATA; - while (j--) ll[i++] = 0; - l = 0; - } - else - { /* j == 18: 11 to 138 zero length codes */ - NEEDBITS(7); - j = 11 + ( (uint32)b & 0x7f ); - DUMPBITS(7); - if ( (uint32)i + j > n ) return CFE_FS_GZIP_BAD_DATA; - while (j--) ll[i++] = 0; - l = 0; - } - } - - /* restore the global bit buffer */ - State->bb = b; - State->bk = k; - - /* build the decoding tables for literal/length and distance codes */ - bl = lbits; - State->hufts = 0; /* initialize Huff Table memory */ - tl = &State->hufTable[1]; /* set known position given alloc removed - glw */ - error_code = FS_gz_huft_build_Reentrant(State, ll, nl, 257, cplens, cplext, &bl ); - if ( error_code != CFE_SUCCESS ) return error_code; - - bd = dbits; - td = &State->hufTable[State->hufts+1]; /* set known position given alloc removed - glw */ - error_code = FS_gz_huft_build_Reentrant(State, ll + nl, nd, 0, cpdist, cpdext, &bd ); - if ( error_code != CFE_SUCCESS ) return error_code; - - /* decompress until an end-of-block code */ - error_code = FS_gz_inflate_codes_Reentrant(State, tl, td, bl, bd ); - - return error_code; -} - - -/* Decompress an inflated type 1 (fixed Huffman codes) block. */ -/* We should either replace this with a custom decoder, */ -/* or at least precompute the Huffman tables. */ - -/* removed gz_huft_free, no longer needed - glw */ -int32 FS_gz_inflate_fixed_Reentrant( CFE_FS_Decompress_State_t *State ) -{ - /* Copy lengths for literal codes 257..285 */ - static uint16 cplens[] = { - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 - }; - - /* Extra bits for literal codes 257..285 ( 99==invalid ) */ - static uint16 cplext[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, - 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99 - }; - - /* Copy offsets for distance codes 0..29 */ - static uint16 cpdist[] = { - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577 - }; - - /* Extra bits for distance codes */ - static uint16 cpdext[] = { - 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, - 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 - }; - - int32 i; /* temporary variable */ - HufTable *tl; /* literal/length code table */ - HufTable *td; /* distance code table */ - int32 bl; /* lookup bits for tl */ - int32 bd; /* lookup bits for td */ - uint32 l[288]; /* length list for gz_huft_build */ - - int32 error_code; - - /* set up literal table */ - for (i = 0; i < 144; i++) l[i] = 8; - for (; i < 256; i++) l[i] = 9; - for (; i < 280; i++) l[i] = 7; - for (; i < 288; i++) l[i] = 8; /* make a complete, but wrong code set */ - - bl = 7; - State->hufts = 0; /* initialize huff table "allocation" position */ - tl = &State->hufTable[1]; /* set known position given alloc removed - glw */ - error_code = FS_gz_huft_build_Reentrant(State, l, 288, 257, cplens, cplext, &bl ); - - if ( error_code != CFE_SUCCESS ) return error_code; - - /* set up distance table */ - for ( i = 0; i < 30; i++ ) l[i] = 5; /* make an incomplete code set */ - bd = 5; - td = &State->hufTable[State->hufts+1]; /* set known position given alloc removed - glw */ - error_code = FS_gz_huft_build_Reentrant(State, l, 30, 0, cpdist, cpdext, &bd ); - - if ( error_code != CFE_SUCCESS && error_code != CFE_FS_GZIP_BAD_DATA ) return error_code; - /* --- seems odd that BAD DATA is let through, but original did so --- */ - /* decompress until an end-of-block code */ - error_code = FS_gz_inflate_codes_Reentrant(State, tl, td, bl, bd ); - - return error_code; - -} - -/* -** "decompress" an inflated type 0 (stored) block. -*/ -int32 FS_gz_inflate_stored_Reentrant( CFE_FS_Decompress_State_t *State ) -{ - - uint32 n; /* number of bytes in block */ - uint32 w; /* current window position */ - register uint32 b; /* bit buffer */ - register uint16 k; /* number of bits in bit buffer */ - - - /* make local copies of globals */ - b = State->bb; /* initialize bit buffer */ - k = State->bk; - w = State->outcnt; /* initialize window position */ - - - /* go to byte boundary */ - n = k & 7; - DUMPBITS(n); - - /* get the length and its complement */ - NEEDBITS(16); - n = ( (uint32)b & 0xffff ); - DUMPBITS(16); - - NEEDBITS(16); - if ( n != (uint32)( (~b) & 0xffff) ) return CFE_FS_GZIP_BAD_DATA; /* error in compressed data */ - DUMPBITS(16); - - - /* read and output the compressed data */ - while (n--) - { - NEEDBITS(8); - State->window[w++] = (uint8)b; - if ( w == WSIZE ) - { - State->outcnt = w; - FS_gz_flush_window_Reentrant(State); - w = 0; - } - DUMPBITS(8); - } - - /* restore the globals from the locals */ - State->outcnt = w; /* restore global window pointer */ - State->bb = b; /* restore global bit buffer */ - State->bk = k; - - return CFE_SUCCESS; - -} - - -/* > merged original gunzip & unzip into a single routine */ -/* > replaced Read & Write indirection */ - -int32 FS_gz_unzip_Reentrant( CFE_FS_Decompress_State_t *State ) -{ - /* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */ - /* Unzip in to out. This routine works on both gzip files. */ - - /* IN assertions: the buffer State->inbuf contains already the beginning of the */ - /* compressed data, from offsets State->inptr to State->insize-1 included. The magic */ - /* header has already been checked. The output buffer is cleared. */ - - int32 guzerror; - uint32 orig_crc = 0; /* original crc */ - uint32 orig_len = 0; /* original uncompressed length */ - int32 n; - uint8 buf[EXTHDR]; /* extended local header */ - int32 res; - - FS_gz_clear_bufs_Reentrant(State); - - /* Snarf up the header for the zip file, check for read error */ - guzerror = FS_gz_eat_header_Reentrant(State); - - if( guzerror != CFE_SUCCESS ) return guzerror; - - FS_gz_updcrc(NULL, 0); /* initialize crc */ - - res = FS_gz_inflate_Reentrant(State); - - if ( res != CFE_SUCCESS ) return res; - - /* Get the crc and original length */ - /* crc32 (see algorithm.doc) uncompressed input size modulo 2^32 */ - for ( n = 0; n < 8; n++ ) - { - buf[n] = NEXTBYTE(); - if ( State->Error != CFE_SUCCESS ) return State->Error; - } - orig_crc = LG(buf); - orig_len = LG(buf + 4); - - /* Validate decompression */ - if ( orig_crc != FS_gz_updcrc( State->outbuf, 0 ) ) return CFE_FS_GZIP_CRC_ERROR; - if ( orig_len != (uint32)State->bytes_out ) return CFE_FS_GZIP_LENGTH_ERROR; - - return CFE_SUCCESS; - -} - - -/* Run a set of bytes through the crc shift register. If s is a NULL */ -/* pointer, then initialize the crc shift register contents instead. */ -/* Return the current crc in either case. */ - -/* input: */ -/* s pointer to bytes to pump through */ -/* n number of bytes in s[] */ -uint32 FS_gz_updcrc( uint8 * s, uint32 n ) -{ - static uint32 crc_32_tab[] = { - 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, - 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, - 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, - 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, - 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, - 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, - 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, - 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, - 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, - 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, - 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, - 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, - 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, - 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, - 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, - 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, - 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, - 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, - 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, - 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, - 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, - 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, - 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, - 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, - 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, - 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, - 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, - 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, - 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, - 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, - 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, - 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, - 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, - 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, - 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, - 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, - 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, - 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, - 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, - 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, - 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, - 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, - 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, - 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, - 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, - 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, - 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, - 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, - 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, - 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, - 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, - 0x2d02ef8dL - }; - - register uint32 c; /* temporary variable */ - - static uint32 crc = (uint32)0xffffffffL; /* shift register contents */ - - if (s == NULL) - { - c = 0xffffffffL; - } - else - { - - c = crc; - if (n) - { - do - { - c = crc_32_tab[ ( (int16)c ^ (*s++) ) & 0xff ] ^ (c >> 8); - - } while (--n); - } - } - - crc = c; - - return c ^ 0xffffffffL; /* (instead of ~c for 64-bit machines) */ - -} - -#endif /* CFE_OMIT_DEPRECATED_6_7 */ diff --git a/fsw/cfe-core/src/fs/cfe_fs_decompress.h b/fsw/cfe-core/src/fs/cfe_fs_decompress.h deleted file mode 100644 index 752caec1a..000000000 --- a/fsw/cfe-core/src/fs/cfe_fs_decompress.h +++ /dev/null @@ -1,155 +0,0 @@ -/* -** GSC-18128-1, "Core Flight Executive Version 6.7" -** -** Copyright (c) 2006-2019 United States Government as represented by -** the Administrator of the National Aeronautics and Space Administration. -** All Rights Reserved. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** File: cfe_fs_decompress.h -** -** Author: A. Cudmore, NASA/GSFC Code 582 -** Ported from JWST, which was ported from Swift/BAT, -** which was ported from the public domain *zip sources. -** Original Credit: -** -** inflate.c -- Not copyrighted 1992 by Mark Adler version c10p1, 10 January -** 1993 -** -** You can do whatever you like with this source file, though I would prefer -** that if you modify it and redistribute it that you include comments to -** that effect with your name and the date. Thank you. [The history has been -** moved to the file ChangeLog.] -** -*/ - -#ifndef CFE_FS_decompress_H -#define CFE_FS_decompress_H - -#include "cfe.h" -#include "cfe_fs_priv.h" - -#include -#include -#include -#include -#include - -/* -** Defines -*/ -#define SH2(p) ((uint16)(uint8)((p)[0]) | ((uint16)(uint8)((p)[1]) << 8)) -#define LG(p) ((uint32)(SH2(p)) | ((uint32)(SH2((p)+2)) << 16)) -#define NEXTBYTE() (uint8)( State->inptr < State->insize ? State->inbuf[State->inptr++] : FS_gz_fill_inbuf_Reentrant(State) ) -#define DUMPBITS(n) { b>>=(n); k-=(n); } -#define NEEDBITS(n) { \ - while( k < (n) ) { \ - b |= ( (uint32)NEXTBYTE() ) << k; \ - if ( State->Error != CFE_SUCCESS ) return State->Error; \ - k += 8; \ - } \ -} -#define BMAX 16 -#define N_MAX 288 -#define WSIZE 0x8000 -#define WSIZE_X2 0x10000L -#define INBUFSIZ 0x8000 -#define INBUFSIZ_EXTRA 0x8040 -#define OUTBUFSIZ_EXTRA 0x4800 -#define MAX_HUF_TABLES 1000 -#define EXTHDR 16 - -/* -** Gzip header information -*/ -#define GZIP_MAGIC "\037\213" /* Magic header for gzip files, 1F 8B */ -#define OLD_GZIP_MAGIC "\037\236" /* Magic header for gzip 0.5 = freeze 1.x */ - -#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */ -#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ -#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ -#define COMMENT 0x10 /* bit 4 set: file comment present */ -#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */ -#define RESERVED 0xC0 /* bit 6,7: reserved */ - - -/* -** Typedefs -*/ -typedef struct -{ - uint16 n; - uint16 t; - -} HufTableV; - -typedef struct -{ - uint8 e; - uint8 b; - HufTableV v; - -} HufTable; - -typedef struct -{ - int srcFile_fd; - int dstFile_fd; - - uint32 bb; - uint32 bk; - uint32 outcnt; - uint32 insize; - uint32 inptr; - int32 bytes_in; - int32 bytes_out; - - int32 Error; - - uint8 inbuf[ INBUFSIZ_EXTRA ]; - uint8 outbuf[ OUTBUFSIZ_EXTRA ]; - uint8 window[ WSIZE_X2 ]; - uint32 hufts; - uint32 max_hufts; - - HufTable hufTable[ MAX_HUF_TABLES ]; - -} CFE_FS_Decompress_State_t; - - -/* -** Function Prototypes -*/ -uint32 FS_gz_updcrc( uint8 * s, uint32 n ); -/* - * Reentrant versions of all gz functions - */ -int32 CFE_FS_Decompress_Reentrant(CFE_FS_Decompress_State_t *State, const char * srcFileName, const char * dstFileName ); -void FS_gz_clear_bufs_Reentrant( CFE_FS_Decompress_State_t *State ); -int32 FS_gz_eat_header_Reentrant( CFE_FS_Decompress_State_t *State ); -int16 FS_gz_fill_inbuf_Reentrant( CFE_FS_Decompress_State_t *State ); -void FS_gz_flush_window_Reentrant( CFE_FS_Decompress_State_t *State ); -int32 FS_gz_huft_build_Reentrant( CFE_FS_Decompress_State_t *State, uint32 * b, uint32 n, uint32 s, uint16 * d, uint16 * e, int32 * m ); -int32 FS_gz_inflate_Reentrant( CFE_FS_Decompress_State_t *State ); -int32 FS_gz_inflate_block_Reentrant( CFE_FS_Decompress_State_t *State, int32 * e ); -int32 FS_gz_inflate_codes_Reentrant( CFE_FS_Decompress_State_t *State, HufTable * tl, HufTable * td, int32 bl, int32 bd ); -int32 FS_gz_inflate_dynamic_Reentrant( CFE_FS_Decompress_State_t *State ); -int32 FS_gz_inflate_fixed_Reentrant( CFE_FS_Decompress_State_t *State ); -int32 FS_gz_inflate_stored_Reentrant( CFE_FS_Decompress_State_t *State ); -int32 FS_gz_unzip_Reentrant( CFE_FS_Decompress_State_t *State ); - - -#endif /* CFE_FS_decompress_H */ diff --git a/fsw/cfe-core/src/inc/ccsds.h b/fsw/cfe-core/src/inc/ccsds.h index 04575866f..b928062f5 100644 --- a/fsw/cfe-core/src/inc/ccsds.h +++ b/fsw/cfe-core/src/inc/ccsds.h @@ -36,32 +36,6 @@ #include "cfe_mission_cfg.h" #include "cfe_msg_hdr.h" -/* - * COMPATIBILITY TYPEDEFS: - * These typdefs provide compatibility for existing code. These should be - * removed in the next CFE release. - */ -#ifndef CFE_OMIT_DEPRECATED_6_6 - -typedef CFE_MSG_CommandHeader_t CCSDS_CmdPkt_t; -typedef CFE_MSG_TelemetryHeader_t CCSDS_TlmPkt_t; - -#endif /* CFE_OMIT_DEPRECATED_6_6 */ - -#ifndef CFE_OMIT_DEPRECATED_6_8 - -typedef struct{ - CCSDS_PrimaryHeader_t Pri; - CCSDS_ExtendedHeader_t ApidQ; -} CCSDS_APIDQHdr_t; -typedef CCSDS_ExtendedHeader_t CCSDS_APIDqualifiers_t; -typedef CCSDS_PrimaryHeader_t CCSDS_PriHdr_t; -typedef CFE_MSG_CommandSecondaryHeader_t CCSDS_CmdSecHdr_t; -typedef CFE_MSG_TelemetrySecondaryHeader_t CCSDS_TlmSecHdr_t; -typedef CFE_MSG_CommandHeader_t CCSDS_CommandPacket_t; /* Element names changed, direct access will break */ -typedef CFE_MSG_TelemetryHeader_t CCSDS_TelemetryPacket_t; /* Element names changed, direct access will break */ - -#endif /* CFE_OMIT_DEPRECATED_6_8 */ /* Macro to convert 16/32 bit types from platform "endianness" to Big Endian */ #ifdef SOFTWARE_BIG_BIT_ORDER diff --git a/fsw/cfe-core/src/inc/cfe_error.h b/fsw/cfe-core/src/inc/cfe_error.h index 763235f4b..3baccb274 100644 --- a/fsw/cfe-core/src/inc/cfe_error.h +++ b/fsw/cfe-core/src/inc/cfe_error.h @@ -674,118 +674,6 @@ */ #define CFE_FS_FNAME_TOO_LONG ((int32)0xc6000003) -#ifndef CFE_OMIT_DEPRECATED_6_7 -/** - * @brief DEPRECATED: GZIP File Bad Data - * @deprecated - * - * The GZIP file contains invalid data and cannot be read - */ -#define CFE_FS_GZIP_BAD_DATA ((int32)0xc6000004) - -/** - * @brief DEPRECATED: GZIP File Bad Code Block - * @deprecated - * - * The GZIP file codeblock is bad, which means the file is - * most likely corrupted - */ -#define CFE_FS_GZIP_BAD_CODE_BLOCK ((int32)0xc6000005) - -/** - * @brief DEPRECATED: GZIP Memory Buffer Exhausted - * @deprecated - * - * The memory buffer used by the decompression routine is - * exhausted. - */ -#define CFE_FS_GZIP_NO_MEMORY ((int32)0xc6000006) - -/** - * @brief DEPRECATED: GZIP CRC Error - * @deprecated - * - * There is a CRC error in the GZIP file, which means the - * file is most likely corrupted. - */ -#define CFE_FS_GZIP_CRC_ERROR ((int32)0xc6000007) - -/** - * @brief DEPRECATED: GZIP Length Error - * @deprecated - * - * There is a length error in the GZIP internal data - * structures, which means the file is most likely corrupted. - */ -#define CFE_FS_GZIP_LENGTH_ERROR ((int32)0xc6000008) - -/** - * @brief DEPRECATED: GZIP Write Error - * @deprecated - * - * An error occurred trying to write the uncompressed - * file. - */ -#define CFE_FS_GZIP_WRITE_ERROR ((int32)0xc6000009) - -/** - * @brief DEPRECATED: GZIP Read Error - * @deprecated - * - * An error occurred trying to read the GZIP file - */ -#define CFE_FS_GZIP_READ_ERROR ((int32)0xc600000A) - -/** - * @brief DEPRECATED: GZIP Open Output Error - * @deprecated - * - * An error occurred trying to open the DestinationFile - * where the GZIP file will be uncompressed. The - * function must be able to open a new write-only file to - * store the uncompressed file in. - */ -#define CFE_FS_GZIP_OPEN_OUTPUT ((int32)0xc600000B) - -/** - * @brief DEPRECATED: GZIP Open Input Error - * @deprecated - * - * An error occurred trying to open the GZIP file - * to be decompressed. The function must be able to open - * the GZIP file as read-only in order to decompress it - * to a new file ( most likely in a RAM disk ) - */ -#define CFE_FS_GZIP_OPEN_INPUT ((int32)0xc600000C) - -/** - * @brief DEPRECATED: GZIP Read Header Error - * @deprecated - * - * An error occured trying to read the GZIP file header, - * which means the file is most likely corrupted or - * not a valid GZIP file. - */ -#define CFE_FS_GZIP_READ_ERROR_HEADER ((int32)0xc600000D) - -/** - * @brief DEPRECATED: GZIP Index Error - * @deprecated - * - * An error occurred trying to read the GZIP index, - * which means the file is most likely corrupted. - */ -#define CFE_FS_GZIP_INDEX_ERROR ((int32)0xc600000E) - -/** - * @brief DEPRECATED: GZIP Not Zip File - * @deprecated - * - * The file to be decompressed is not a valid GZIP file - */ -#define CFE_FS_GZIP_NON_ZIP_FILE ((int32)0xc600000F) - -#endif /* CFE_OMIT_DEPRECATED_6_7 */ /** * @brief Not Implemented @@ -798,38 +686,6 @@ */ #define CFE_FS_NOT_IMPLEMENTED ((int32)0xc600ffff) -#ifndef CFE_OMIT_DEPRECATED_6_7 -/* -************* OSAPI STATUS CODES ************* -*/ - -#define CFE_OS_ERROR (OS_ERROR) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_INVALID_POINTER (OS_INVALID_POINTER) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_ERROR_ADDRESS_MISALIGNED (OS_ERROR_ADDRESS_MISALIGNED) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_ERROR_TIMEOUT (OS_ERROR_TIMEOUT) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_INVALID_INT_NUM (OS_INVALID_INT_NUM) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_SEM_FAILURE (OS_SEM_FAILURE) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_SEM_TIMEOUT (OS_SEM_TIMEOUT) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_QUEUE_EMPTY (OS_QUEUE_EMPTY) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_QUEUE_FULL (OS_QUEUE_FULL) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_QUEUE_TIMEOUT (OS_QUEUE_TIMEOUT) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_QUEUE_INVALID_SIZE (OS_QUEUE_INVALID_SIZE) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_QUEUE_ID_ERROR (OS_QUEUE_ID_ERROR) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_ERR_NAME_TOO_LONG (OS_ERR_NAME_TOO_LONG) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_ERR_NO_FREE_IDS (OS_ERR_NO_FREE_IDS) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_ERR_NAME_TAKEN (OS_ERR_NAME_TAKEN) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_ERR_INVALID_ID (OS_ERR_INVALID_ID) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_ERR_NAME_NOT_FOUND (OS_ERR_NAME_NOT_FOUND) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_ERR_SEM_NOT_FULL (OS_ERR_SEM_NOT_FULL) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_ERR_INVALID_PRIORITY (OS_ERR_INVALID_PRIORITY) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_FS_ERROR (OS_ERROR) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_FS_ERR_INVALID_POINTER (OS_INVALID_POINTER) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_FS_ERR_PATH_TOO_LONG (OS_FS_ERR_PATH_TOO_LONG) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_FS_ERR_NAME_TOO_LONG (OS_FS_ERR_NAME_TOO_LONG) /**< @brief DEPRECATED @deprecated */ -#define CFE_OS_FS_ERR_DRIVE_NOT_CREATED (OS_FS_ERR_DRIVE_NOT_CREATED) /**< @brief DEPRECATED @deprecated */ -#define CFE_OSAPI_NOT_IMPLEMENTED (OS_ERR_NOT_IMPLEMENTED) /**< @brief DEPRECATED @deprecated */ - -#endif /* CFE_OMIT_DEPRECATED_6_7 */ /* ************* SOFTWARE BUS SERVICES STATUS CODES ************* diff --git a/fsw/cfe-core/src/inc/cfe_es.h b/fsw/cfe-core/src/inc/cfe_es.h index 6df04cfad..1c119a327 100644 --- a/fsw/cfe-core/src/inc/cfe_es.h +++ b/fsw/cfe-core/src/inc/cfe_es.h @@ -93,97 +93,6 @@ #define CFE_ES_NO_MUTEX 0 /**< \brief Indicates that the memory pool selection will not use a semaphore */ #define CFE_ES_USE_MUTEX 1 /**< \brief Indicates that the memory pool selection will use a semaphore */ -/* - * To preserve source-code compatibility with existing code, - * this allows the old enum names to still work. This should - * be turned off after the new names are established. - * (sed -i -e 's///g' should take care of it) - * - * Note about why this is a good idea to do -- - * In the list below there are two values with similar names: - * CFE_ES_EXCEPTION, CFE_ES_SYS_EXCEPTION - * - * But these map to different values for two different purposes, - * one is a app status and the other is a reset subtype. Using the - * new names makes it much clearer as to which is which, will - * greatly reduce the chance of getting them mixed up, and make it - * much more obvious to a code reviewer if the ARE mixed up somewhere. - */ -#ifndef CFE_OMIT_DEPRECATED_6_6 - -#define CFE_ES_PROCESSOR_RESET CFE_PSP_RST_TYPE_PROCESSOR -#define CFE_ES_POWERON_RESET CFE_PSP_RST_TYPE_POWERON - -#define CFE_ES_POWER_CYCLE CFE_PSP_RST_SUBTYPE_POWER_CYCLE -#define CFE_ES_PUSH_BUTTON CFE_PSP_RST_SUBTYPE_PUSH_BUTTON -#define CFE_ES_HW_SPECIAL_COMMAND CFE_PSP_RST_SUBTYPE_HW_SPECIAL_COMMAND -#define CFE_ES_HW_WATCHDOG CFE_PSP_RST_SUBTYPE_HW_WATCHDOG -#define CFE_ES_RESET_COMMAND CFE_PSP_RST_SUBTYPE_RESET_COMMAND -#define CFE_ES_EXCEPTION CFE_PSP_RST_SUBTYPE_EXCEPTION -#define CFE_ES_UNDEFINED_RESET CFE_PSP_RST_SUBTYPE_UNDEFINED_RESET -#define CFE_ES_HWDEBUG_RESET CFE_PSP_RST_SUBTYPE_HWDEBUG_RESET -#define CFE_ES_BANKSWITCH_RESET CFE_PSP_RST_SUBTYPE_BANKSWITCH_RESET - -/* - * Compatibility Macros for the SystemState enumeration - */ -#define CFE_ES_SYSTEM_STATE_UNDEFINED CFE_ES_SystemState_UNDEFINED -#define CFE_ES_SYSTEM_STATE_EARLY_INIT CFE_ES_SystemState_EARLY_INIT -#define CFE_ES_SYSTEM_STATE_CORE_STARTUP CFE_ES_SystemState_CORE_STARTUP -#define CFE_ES_SYSTEM_STATE_CORE_READY CFE_ES_SystemState_CORE_READY -#define CFE_ES_SYSTEM_STATE_APPS_INIT CFE_ES_SystemState_APPS_INIT -#define CFE_ES_SYSTEM_STATE_OPERATIONAL CFE_ES_SystemState_OPERATIONAL -#define CFE_ES_SYSTEM_STATE_SHUTDOWN CFE_ES_SystemState_SHUTDOWN - -/* - * Compatibility Macros for the RunStatus enumeration - */ -#define CFE_ES_APP_RUN CFE_ES_RunStatus_APP_RUN -#define CFE_ES_APP_EXIT CFE_ES_RunStatus_APP_EXIT -#define CFE_ES_APP_ERROR CFE_ES_RunStatus_APP_ERROR -#define CFE_ES_SYS_EXCEPTION CFE_ES_RunStatus_SYS_EXCEPTION -#define CFE_ES_SYS_RESTART CFE_ES_RunStatus_SYS_RESTART -#define CFE_ES_SYS_RELOAD CFE_ES_RunStatus_SYS_RELOAD -#define CFE_ES_SYS_DELETE CFE_ES_RunStatus_SYS_DELETE -#define CFE_ES_CORE_APP_INIT_ERROR CFE_ES_RunStatus_CORE_APP_INIT_ERROR -#define CFE_ES_CORE_APP_RUNTIME_ERROR CFE_ES_RunStatus_CORE_APP_RUNTIME_ERROR - -/* - * Compatibility Macros for the AppState enumeration - */ -#define CFE_ES_APP_STATE_UNDEFINED CFE_ES_AppState_UNDEFINED -#define CFE_ES_APP_STATE_EARLY_INIT CFE_ES_AppState_EARLY_INIT -#define CFE_ES_APP_STATE_LATE_INIT CFE_ES_AppState_LATE_INIT -#define CFE_ES_APP_STATE_RUNNING CFE_ES_AppState_RUNNING -#define CFE_ES_APP_STATE_WAITING CFE_ES_AppState_WAITING -#define CFE_ES_APP_STATE_STOPPED CFE_ES_AppState_STOPPED - -/* - * Compatibility Macros for the AppType enumeration - */ -#define CFE_ES_APP_TYPE_CORE CFE_ES_AppType_CORE -#define CFE_ES_APP_TYPE_EXTERNAL CFE_ES_AppType_EXTERNAL - -/* - * Compatibility Macros for the LogMode enumeration - */ -#define CFE_ES_LOG_DISCARD CFE_ES_LogMode_DISCARD -#define CFE_ES_LOG_OVERWRITE CFE_ES_LogMode_OVERWRITE - -/* - * Compatibility Macros for the ExceptionAction enumeration - */ -#define CFE_ES_APP_EXCEPTION_RESTART_APP CFE_ES_ExceptionAction_RESTART_APP -#define CFE_ES_APP_EXCEPTION_PROC_RESTART CFE_ES_ExceptionAction_PROC_RESTART - -/* - * Compatibility Macros for the LogEntryType enumeration - */ -#define CFE_ES_CORE_LOG_ENTRY CFE_ES_LogEntryType_CORE -#define CFE_ES_APPLICATION_LOG_ENTRY CFE_ES_LogEntryType_APPLICATION - - -#endif /*****************************************************************************/ /* diff --git a/fsw/cfe-core/src/inc/cfe_es_msg.h b/fsw/cfe-core/src/inc/cfe_es_msg.h index 2d702ac00..b93de7f51 100644 --- a/fsw/cfe-core/src/inc/cfe_es_msg.h +++ b/fsw/cfe-core/src/inc/cfe_es_msg.h @@ -170,56 +170,6 @@ */ #define CFE_ES_RESTART_CC 2 -#ifndef CFE_OMIT_DEPRECATED_6_7 -/** \cfeescmd DEPRECATED: Executive Services O/S Shell Command -** \deprecated -** -** \par Description -** This command passes an ASCII string as a command line to the -** underlying realtime operating system shell. Any response to -** the command is both written to the shell command output file -** and sent as a series of shell command output telemetry packets. -** -** If the shell command output filename argument is empty, then -** #CFE_PLATFORM_ES_DEFAULT_SHELL_FILENAME will be used as the filename. -** -** \cfecmdmnemonic \ES_SHELL -** -** \par Command Structure -** #CFE_ES_Shell_t -** -** \par Command Verification -** Successful execution of this command may be verified with -** the following telemetry: -** - \b \c \ES_CMDPC - command execution counter will -** increment -** - The #CFE_ES_SHELL_INF_EID informational event message will be -** generated -** -** \par Error Conditions -** This command may fail for the following reason(s): -** - The command packet length is incorrect -** - Failure to create the shell command output file -** - The shell command started with ES_ but was not one of the -** recognized cFE shell commands -** - There was an error while performing a #OS_lseek on the shell command output file -** - There was an error while redirecting the shell command response to the -** shell command output file -** -** Evidence of failure may be found in the following telemetry: -** - \b \c \ES_CMDEC - command error counter will increment -** - the #CFE_ES_SHELL_ERR_EID error event message will be generated -** - Additional information on the error should be found in the System Log -** -** \par Criticality -** This command should be used with caution. Interfering with the -** operation of the underlying realtime operating system can cause -** significant problems. -** -** \sa -*/ -#define CFE_ES_SHELL_CC 3 -#endif /* CFE_OMIT_DEPRECATED_6_7 */ /** \cfeescmd Load and Start an Application ** @@ -1155,32 +1105,6 @@ typedef struct CFE_ES_RestartCmd_Payload_t Payload; } CFE_ES_Restart_t; -#ifndef CFE_OMIT_DEPRECATED_6_7 -/** -** \brief DEPRECATED: Shell Command -** \deprecated -** -** For command details, see #CFE_ES_SHELL_CC -** -**/ -typedef struct -{ - char CmdString[CFE_MISSION_ES_MAX_SHELL_CMD]; /**< \brief ASCII text string containing shell command - to be executed */ - char OutputFilename[CFE_MISSION_MAX_PATH_LEN]; /**< \brief Filename where shell command output is to - be written */ -} CFE_ES_ShellCmd_Payload_t; - -/** - * \deprecated - */ -typedef struct -{ - uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; /**< \brief cFE Software Bus Command Message Header */ - CFE_ES_ShellCmd_Payload_t Payload; -} CFE_ES_Shell_t; -#endif /* CFE_OMIT_DEPRECATED_6_7 */ - /** ** \brief Payload format for commands which accept a single file name @@ -1585,43 +1509,6 @@ typedef struct } CFE_ES_HousekeepingTlm_t; -#ifndef CFE_OMIT_DEPRECATED_6_7 -/** -** \cfeestlm DEPRECATED: OS Shell Output Packet -** \deprecated -**/ -typedef struct -{ - char ShellOutput[CFE_MISSION_ES_MAX_SHELL_PKT]; /**< \brief ASCII text string containing output from OS Shell - that was received in response to an OS Shell Command */ -} CFE_ES_ShellPacket_Payload_t; - -/** - * \deprecated - */ -typedef struct -{ - CFE_SB_TlmHdr_t TlmHeader; /**< \brief cFE Software Bus Telemetry Message Header */ - CFE_ES_ShellPacket_Payload_t Payload; -}CFE_ES_ShellTlm_t; -#endif /* CFE_OMIT_DEPRECATED_6_7 */ - -/*************************************************************************/ - -/* - * COMPATIBILITY TYPEDEFS: - * In some circumstances applications may subscribe to telemetry from this component, - * and therefore the name changes may break existing code. For these situations a - * typedef is created to continue supporting the previous name. These should be - * removed in the next CFE release. - */ -#ifndef CFE_OMIT_DEPRECATED_6_6 - -typedef CFE_ES_HousekeepingTlm_t CFE_ES_HkPacket_t; -typedef CFE_ES_ShellTlm_t CFE_ES_ShellPacket_t; -typedef CFE_ES_MemStatsTlm_t CFE_ES_PoolStatsTlm_t; - -#endif /* CFE_OMIT_DEPRECATED_6_6 */ #endif /* _cfe_es_msg_ */ diff --git a/fsw/cfe-core/src/inc/cfe_evs.h b/fsw/cfe-core/src/inc/cfe_evs.h index db0c740a9..d13be8b7d 100644 --- a/fsw/cfe-core/src/inc/cfe_evs.h +++ b/fsw/cfe-core/src/inc/cfe_evs.h @@ -74,37 +74,6 @@ #define CFE_EVS_EVERY_FOURTH_ONE 0x0003 /**< \brief Sends every fourth event message. All others are filtered. */ /** \} */ - -/* - * To preserve source-code compatibility with existing code, - * this allows the old enum names to still work. This should - * be turned off after the new names are established. - */ -#ifndef CFE_OMIT_DEPRECATED_6_6 - -/* - * Compatibility Macros for the EventFilter enumeration - */ -#define CFE_EVS_BINARY_FILTER CFE_EVS_EventFilter_BINARY - -/* - * Compatibility Macros for the OutputPort enumeration - */ -#define CFE_EVS_PORT1 CFE_EVS_EventOutput_PORT1 -#define CFE_EVS_PORT2 CFE_EVS_EventOutput_PORT2 -#define CFE_EVS_PORT3 CFE_EVS_EventOutput_PORT3 -#define CFE_EVS_PORT4 CFE_EVS_EventOutput_PORT4 - -/* - * Compatibility Macros for the EventType enumeration - */ -#define CFE_EVS_DEBUG CFE_EVS_EventType_DEBUG -#define CFE_EVS_INFORMATION CFE_EVS_EventType_INFORMATION -#define CFE_EVS_ERROR CFE_EVS_EventType_ERROR -#define CFE_EVS_CRITICAL CFE_EVS_EventType_CRITICAL - -#endif /* CFE_OMIT_DEPRECATED_6_6 */ - /****************** Structure Definitions *********************/ /** \brief Event message filter defintion structure */ diff --git a/fsw/cfe-core/src/inc/cfe_evs_msg.h b/fsw/cfe-core/src/inc/cfe_evs_msg.h index a6fe29872..38334cc5b 100644 --- a/fsw/cfe-core/src/inc/cfe_evs_msg.h +++ b/fsw/cfe-core/src/inc/cfe_evs_msg.h @@ -1235,23 +1235,6 @@ typedef struct { } CFE_EVS_ShortEventTlm_t; -/* - * COMPATIBILITY TYPEDEFS: - * In some circumstances applications may subscribe to telemetry from this component, - * and therefore the name changes may break existing code. For these situations a - * typedef is created to continue supporting the previous name. These should be - * removed in the next CFE release. - */ -#ifndef CFE_OMIT_DEPRECATED_6_6 - -typedef CFE_EVS_LongEventTlm_t CFE_EVS_Packet_t; -typedef CFE_EVS_HousekeepingTlm_t CFE_EVS_TlmPkt_t; - -/* the CFE_EVS_HK_TLM_LNGTH macro is no longer used in EVS, but might be used in apps */ -#define CFE_EVS_HK_TLM_LNGTH sizeof(CFE_EVS_TlmPkt_t) - -#endif /* CFE_OMIT_DEPRECATED_6_6 */ - #endif diff --git a/fsw/cfe-core/src/inc/cfe_fs.h b/fsw/cfe-core/src/inc/cfe_fs.h index 5d81bf660..782eac31b 100644 --- a/fsw/cfe-core/src/inc/cfe_fs.h +++ b/fsw/cfe-core/src/inc/cfe_fs.h @@ -42,35 +42,6 @@ #include "cfe_time.h" - -/* - * To preserve source-code compatibility with existing code, - * this allows the old enum names to still work. This should - * be turned off after the new names are established. - */ -#ifndef CFE_OMIT_DEPRECATED_6_6 - -/* - * Compatibility Macros for the SubType enumeration - */ -#define CFE_FS_ES_ERLOG_SUBTYPE CFE_FS_SubType_ES_ERLOG -#define CFE_FS_ES_SYSLOG_SUBTYPE CFE_FS_SubType_ES_SYSLOG -#define CFE_FS_ES_QUERYALL_SUBTYPE CFE_FS_SubType_ES_QUERYALL -#define CFE_FS_ES_PERFDATA_SUBTYPE CFE_FS_SubType_ES_PERFDATA -#define CFE_FS_ES_SHELL_SUBTYPE CFE_FS_SubType_ES_SHELL -#define CFE_FS_ES_CDS_REG_SUBTYPE CFE_FS_SubType_ES_CDS_REG -#define CFE_FS_TBL_REG_SUBTYPE CFE_FS_SubType_TBL_REG -#define CFE_FS_TBL_IMG_SUBTYPE CFE_FS_SubType_TBL_IMG -#define CFE_FS_EVS_APPDATA_SUBTYPE CFE_FS_SubType_EVS_APPDATA -#define CFE_FS_EVS_EVENTLOG_SUBTYPE CFE_FS_SubType_EVS_EVENTLOG -#define CFE_FS_SB_PIPEDATA_SUBTYPE CFE_FS_SubType_SB_PIPEDATA -#define CFE_FS_SB_ROUTEDATA_SUBTYPE CFE_FS_SubType_SB_ROUTEDATA -#define CFE_FS_SB_MAPDATA_SUBTYPE CFE_FS_SubType_SB_MAPDATA -#define CFE_FS_ES_QUERYALLTASKS_SUBTYPE CFE_FS_SubType_ES_QUERYALLTASKS - - -#endif /* CFE_OMIT_DEPRECATED_6_6 */ - /** @defgroup CFEAPIFSHeader cFE File Header Management APIs * @{ */ @@ -185,93 +156,6 @@ int32 CFE_FS_WriteHeader(int32 FileDes, CFE_FS_Header_t *Hdr); int32 CFE_FS_SetTimestamp(int32 FileDes, CFE_TIME_SysTime_t NewTimestamp); /**@}*/ -#ifndef CFE_OMIT_DEPRECATED_6_7 - -/** @defgroup CFEAPIFSCompress cFE Compressed File Management APIs - * @{ - */ - -/*****************************************************************************/ -/** -** \brief DEPRECATED; Determines if a file is a Gzip/compressed file. -** \deprecated -** -** \par Description -** This API will check the filename and return true if the file is -** a gzip file. The check is currently based on the filename, so the -** zipped files should use the ".gz" extention. -** -** \par Assumptions, External Events, and Notes: -** -# A gzipped file will use the ".gz" filename extention. -** -** \param[in] FileName The name of the file. -** -** \return Boolean for file has ".gz" extension -** \retval true File has ".gz" extension -** \retval false File does not have ".gz" extension -** -******************************************************************************/ -bool CFE_FS_IsGzFile(const char *FileName); - -/*****************************************************************************/ -/** -** \brief DEPRECATED; Decompresses the source file to the destination file. -** \deprecated -** -** \par Description -** This API will decompress the source file to the file specified by -** the destination file. The file must be compressed using the "gzip" -** utility. This utility is available on most unix workstations, Mac OS X, -** Cygwin, and MinGW for Windows. More information can be found at -** http://www.gzip.org/ -** -** Uses a global state buffer but protects the global by a mutex, -** so it may block if more than one thread tries to do this at any given time. -** -** \par Assumptions, External Events, and Notes: -** -# The paths and filenames used here are cfe compliant file names. -** -# The source file is compressed with the "gzip" utility. -** -# The destination file does not exist, or can be overwritten. -** -** \param[in] SourceFile The "gzipped" file to decompress. -** \param[out] DestinationFile The path/filename to write the decompressed or -** "gunzipped" file to. -** -** \return Execution status, see \ref CFEReturnCodes -** -******************************************************************************/ -int32 CFE_FS_Decompress( const char * SourceFile, const char * DestinationFile ); - - -/*****************************************************************************/ -/** -** \brief DEPRECATED; Decompresses the source file to a temporary file created in the temp dir -** \deprecated -** -** \par Description -** This is a wrapper around the #CFE_FS_Decompress function that -** formulates a temporary file name based on the gzip file name, saving -** the caller from needing to do this. The temporary file name is -** created in the given temp directory. -** -** \par Assumptions, External Events, and Notes: -** The name passed in as "GzipFileName" is not checked again, it is assumed to -** have passed the criteria in #CFE_FS_IsGzFile. If this is not true then -** the conversion to a temporary file name may produce incorrect results. -** -** \param[in] OutputNameBuffer A caller-supplied buffer for storing the temp file name -** \param[in] OutputNameBufferSize The size of OutputNameBuffer -** \param[in] GzipFileName The "gzipped" file to decompress. -** \param[in] TempDir The directory in which the temporary file should be created -** -** \return Execution status, see \ref CFEReturnCodes -** -******************************************************************************/ -int32 CFE_FS_GetUncompressedFile(char *OutputNameBuffer, uint32 OutputNameBufferSize, - const char *GzipFileName, const char *TempDir); -/**@}*/ - -#endif /* CFE_OMIT_DEPRECATED_6_7 */ /** @defgroup CFEAPIFSUtil cFE File Utility APIs * @{ diff --git a/fsw/cfe-core/src/inc/cfe_sb.h b/fsw/cfe-core/src/inc/cfe_sb.h index 3eb05ea53..4d19493a0 100644 --- a/fsw/cfe-core/src/inc/cfe_sb.h +++ b/fsw/cfe-core/src/inc/cfe_sb.h @@ -203,21 +203,6 @@ typedef struct { extern CFE_SB_Qos_t CFE_SB_Default_Qos;/**< \brief Defines a default priority and reliabilty for off-board routing */ -#ifndef CFE_OMIT_DEPRECATED_6_8 - -/** \brief DEPRECATED; Message Sender Identification Type Definition -** \deprecated -** -** Parameter used in #CFE_SB_GetLastSenderId API which allows the receiver of a message -** to validate the sender of the message. -**/ -typedef struct { - uint32 ProcessorId;/**< \brief Processor Id from which the message was sent */ - char AppName[OS_MAX_API_NAME];/**< \brief Application that sent the message */ -} CFE_SB_SenderId_t; - -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /****************** Function Prototypes **********************/ /** @defgroup CFEAPISBPipe cFE Pipe Management APIs @@ -1173,42 +1158,6 @@ uint16 CFE_SB_GetCmdCode(CFE_SB_MsgPtr_t MsgPtr); **/ CFE_TIME_SysTime_t CFE_SB_GetMsgTime(CFE_SB_MsgPtr_t MsgPtr); -#ifndef CFE_OMIT_DEPRECATED_6_8 - -/*****************************************************************************/ -/** -** \brief DEPRECATED; Retrieve the application Info of the sender for the last message. -** \deprecated -** -** \par Description -** This routine can be used after a successful #CFE_SB_RcvMsg call -** to find out which application sent the message that was received. -** -** \par Assumptions, External Events, and Notes: -** Note - If an error occurs in this API, the *Ptr value may be NULL or -** random. Therefore, it is recommended that the return code be tested -** for CFE_SUCCESS before reading the sender information. -** -** \param[in] Ptr A pointer to a local variable of type #CFE_SB_SenderId_t. -** Typically a caller declares a ptr of type CFE_SB_SenderId_t -** (i.e. CFE_SB_SenderId_t *Ptr) then gives the address of that -** pointer (&Ptr) for this parameter. After a successful call -** to this API, *Ptr will point to the first byte of the -** CFE_SB_SenderId_t structure containing the sender information -** for the last message received on the given pipe. This should -** be used as a read-only pointer (in systems with an MMU, writes -** to this pointer may cause a memory protection fault). The *Ptr -** is valid only until the next call to CFE_SB_RcvMsg for the -** same pipe. -** -** \param[in] PipeId The pipe ID of the pipe the message was taken from. -** -** \return The last sender's application ID -**/ -uint32 CFE_SB_GetLastSenderId(CFE_SB_SenderId_t **Ptr,CFE_SB_PipeId_t PipeId); - -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /******************************************************************************/ /** ** \brief Copies a string out of a software bus message diff --git a/fsw/cfe-core/src/inc/cfe_sb_events.h b/fsw/cfe-core/src/inc/cfe_sb_events.h index 2f9dbda4b..9144d852e 100644 --- a/fsw/cfe-core/src/inc/cfe_sb_events.h +++ b/fsw/cfe-core/src/inc/cfe_sb_events.h @@ -568,35 +568,6 @@ #define CFE_SB_CMD1_RCVD_EID 29 -#ifndef CFE_OMIT_DEPRECATED_6_8 - -/** \brief 'SB GetLastSender Err:Rcvd Null Ptr,Pipe=%d,App=%s' -** \event 'SB GetLastSender Err:Rcvd Null Ptr,Pipe=%d,App=%s' -** -** \par Type: ERROR -** -** \par Cause: -** -** This error event message is issued when SB receives a Null pointer from the -** caller of CFE_SB_GetLastSenderId. -**/ -#define CFE_SB_LSTSNDER_ERR1_EID 30 - -/** \brief 'SB GetLastSender Err:Rcvd Invalid Pipe=%d,App=%s' -** \event 'SB GetLastSender Err:Rcvd Invalid Pipe=%d,App=%s' -** -** \par Type: ERROR -** -** \par Cause: -** -** This error event message is issued when SB receives an invalid pipe from the -** caller of CFE_SB_GetLastSenderId. -**/ -#define CFE_SB_LSTSNDER_ERR2_EID 31 - -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - - /** \brief 'Software Bus Statistics packet sent' ** \event 'Software Bus Statistics packet sent' ** @@ -715,23 +686,6 @@ **/ #define CFE_SB_SND_RTG_ERR1_EID 40 - -#ifndef CFE_OMIT_DEPRECATED_6_8 - -/** \brief 'SB GetLastSender Err:Caller(\%s) is not the owner of pipe \%d' -** \event 'SB GetLastSender Err:Caller(\%s) is not the owner of pipe \%d' -** -** \par Type: ERROR -** -** \par Cause: -** -** This error event message is issued when the caller of CFE_SB_GetLastSenderId is -** not the owner of the given pipe Id. -**/ -#define CFE_SB_GLS_INV_CALLER_EID 41 - -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - /** \brief 'Invalid Cmd, Unexpected Command Code \%d' ** \event 'Invalid Cmd, Unexpected Command Code \%d' ** diff --git a/fsw/cfe-core/src/inc/cfe_sb_msg.h b/fsw/cfe-core/src/inc/cfe_sb_msg.h index d7a7d0fda..b840c1108 100644 --- a/fsw/cfe-core/src/inc/cfe_sb_msg.h +++ b/fsw/cfe-core/src/inc/cfe_sb_msg.h @@ -752,22 +752,6 @@ typedef struct{ CFE_SB_AllSubscriptionsTlm_Payload_t Payload; } CFE_SB_AllSubscriptionsTlm_t; -/* - * COMPATIBILITY TYPEDEFS: - * In some circumstances applications may subscribe to telemetry from this component, - * and therefore the name changes may break existing code. For these situations a - * typedef is created to continue supporting the previous name. These should be - * removed in the next CFE release. - */ -#ifndef CFE_OMIT_DEPRECATED_6_6 - -typedef CFE_SB_HousekeepingTlm_t CFE_SB_HKMsg_t; -typedef CFE_SB_StatsTlm_t CFE_SB_StatMsg_t; -typedef CFE_SB_AllSubscriptionsTlm_t CFE_SB_PrevSubMsg_t; -typedef CFE_SB_SingleSubscriptionTlm_t CFE_SB_SubRprtMsg_t; - -#endif /* CFE_OMIT_DEPRECATED_6_6 */ - #endif /* _cfe_sb_msg_ */ /*****************************************************************************/ diff --git a/fsw/cfe-core/src/inc/cfe_tbl.h b/fsw/cfe-core/src/inc/cfe_tbl.h index 88fecd553..f13a7a501 100644 --- a/fsw/cfe-core/src/inc/cfe_tbl.h +++ b/fsw/cfe-core/src/inc/cfe_tbl.h @@ -83,22 +83,6 @@ #define CFE_TBL_BAD_TABLE_HANDLE (CFE_TBL_Handle_t) 0xFFFF -/* - * To preserve source-code compatibility with existing code, - * this allows the old enum names to still work. This should - * be turned off after the new names are established. - */ -#ifndef CFE_OMIT_DEPRECATED_6_6 - -/* - * Compatibility Macros for the BufferSelect enumeration - */ -#define CFE_TBL_INACTIVE_BUFFER CFE_TBL_BufferSelect_INACTIVE -#define CFE_TBL_ACTIVE_BUFFER CFE_TBL_BufferSelect_ACTIVE - - -#endif /* CFE_OMIT_DEPRECATED_6_6 */ - /****************** Data Type Definitions *********************/ diff --git a/fsw/cfe-core/src/inc/cfe_tbl_msg.h b/fsw/cfe-core/src/inc/cfe_tbl_msg.h index 3440d067f..71130f99a 100644 --- a/fsw/cfe-core/src/inc/cfe_tbl_msg.h +++ b/fsw/cfe-core/src/inc/cfe_tbl_msg.h @@ -814,22 +814,6 @@ typedef struct CFE_TBL_TblRegPacket_Payload_t Payload; } CFE_TBL_TableRegistryTlm_t; -/*************************************************************************/ - -/* - * COMPATIBILITY TYPEDEFS: - * In some circumstances applications may subscribe to telemetry from this component, - * and therefore the name changes may break existing code. For these situations a - * typedef is created to continue supporting the previous name. These should be - * removed in the next CFE release. - */ -#ifndef CFE_OMIT_DEPRECATED_6_6 - -typedef CFE_TBL_HousekeepingTlm_t CFE_TBL_HkPacket_t; -typedef CFE_TBL_TableRegistryTlm_t CFE_TBL_TblRegPacket_t; - -#endif /* CFE_OMIT_DEPRECATED_6_6 */ - #endif /* _cfe_tbl_msg_ */ diff --git a/fsw/cfe-core/src/inc/cfe_time.h b/fsw/cfe-core/src/inc/cfe_time.h index 9893dd939..504bd767b 100644 --- a/fsw/cfe-core/src/inc/cfe_time.h +++ b/fsw/cfe-core/src/inc/cfe_time.h @@ -49,52 +49,6 @@ #define CFE_TIME_PRINTED_STRING_SIZE 24 /**< \brief Required size of buffer to be passed into #CFE_TIME_Print (includes null terminator) */ -/* - * To preserve source-code compatibility with existing code, - * this allows the old enum names to still work. This should - * be turned off after the new names are established. - */ -#ifndef CFE_OMIT_DEPRECATED_6_6 - -/* - * Compatibility Macros for the SourceSelect enumeration - */ -#define CFE_TIME_USE_INTERN CFE_TIME_SourceSelect_INTERNAL -#define CFE_TIME_USE_EXTERN CFE_TIME_SourceSelect_EXTERNAL - -/* - * Compatibility Macros for the ToneSignalSelect enumeration - */ -#define CFE_TIME_TONE_PRI CFE_TIME_ToneSignalSelect_PRIMARY -#define CFE_TIME_TONE_RED CFE_TIME_ToneSignalSelect_REDUNDANT - -/* - * Compatibility Macros for the AdjustDirection enumeration - */ -#define CFE_TIME_ADD_ADJUST CFE_TIME_AdjustDirection_ADD -#define CFE_TIME_SUB_ADJUST CFE_TIME_AdjustDirection_SUBTRACT - -/* - * Compatibility Macros for the FlywheelState enumeration - */ -#define CFE_TIME_NO_FLY CFE_TIME_FlywheelState_NO_FLY -#define CFE_TIME_IS_FLY CFE_TIME_FlywheelState_IS_FLY - -/* - * Compatibility Macros for the SetState enumeration - */ -#define CFE_TIME_NOT_SET CFE_TIME_SetState_NOT_SET -#define CFE_TIME_WAS_SET CFE_TIME_SetState_WAS_SET - -/* - * Compatibility Macros for the ClockState enumeration - */ -#define CFE_TIME_INVALID CFE_TIME_ClockState_INVALID -#define CFE_TIME_VALID CFE_TIME_ClockState_VALID -#define CFE_TIME_FLYWHEEL CFE_TIME_ClockState_FLYWHEEL - - -#endif /* CFE_OMIT_DEPRECATED_6_6 */ /*****************************************************************************/ /* @@ -582,65 +536,6 @@ uint32 CFE_TIME_Sub2MicroSecs(uint32 SubSeconds); ******************************************************************************/ uint32 CFE_TIME_Micro2SubSecs(uint32 MicroSeconds); -#ifndef CFE_OMIT_DEPRECATED_6_7 -/*****************************************************************************/ -/** -** \brief DEPRECATED: Converts cFE seconds into the File System's seconds -** \deprecated Utilize #CFE_FS_Header_t time fields for the creation -** time in mission format, or syncronize local OS time -** with mission time for use with stat command. -** -** \par Description -** File systems use specific time epochs for their time tagging of files. -** Since spacecraft systems rarely use an epoch that matches a particular -** file system, this function provides a mechanism to translate a given -** spacecraft time (in seconds) to the file system's time. The conversion -** is controlled by the configuration parameter #CFE_MISSION_TIME_FS_FACTOR which -** is set equal to the number of seconds between the spacecraft's epoch and -** the file system's epoch. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param[in] SecondsCFE The spacecraft time, in seconds, to be converted. -** -** \return The equivalent time, in seconds, for the file system. -** -** \sa #CFE_TIME_MET2SCTime, #CFE_TIME_Sub2MicroSecs, #CFE_TIME_Micro2SubSecs, -** #CFE_TIME_FS2CFESeconds -** -******************************************************************************/ -uint32 CFE_TIME_CFE2FSSeconds(uint32 SecondsCFE); - -/*****************************************************************************/ -/** -** \brief DEPRECATED: Converts a file system's seconds into cFE seconds -** \deprecated Utilize #CFE_FS_Header_t time fields for the creation -** time in mission format, or syncronize local OS time -** with mission time for use with stat command. -** -** \par Description -** File systems use specific time epochs for their time tagging of files. -** Since spacecraft systems rarely use an epoch that matches a particular -** file system, this function provides a mechanism to translate a file -** system time (in seconds) into the spacecraft time (in seconds). The -** conversion is controlled by the configuration parameter #CFE_MISSION_TIME_FS_FACTOR -** which is set equal to the number of seconds between the spacecraft's epoch and -** the file system's epoch. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param[in] SecondsFS The file system time, in seconds, to be converted. -** -** \return The equivalent time, in seconds, for the spacecraft. -** -** \sa #CFE_TIME_MET2SCTime, #CFE_TIME_Sub2MicroSecs, #CFE_TIME_Micro2SubSecs, -** #CFE_TIME_CFE2FSSeconds -** -******************************************************************************/ -uint32 CFE_TIME_FS2CFESeconds(uint32 SecondsFS); -#endif /* CFE_OMIT_DEPRECATED_6_7 */ /**@}*/ /** @defgroup CFEAPITIMEExternSource cFE External Time Source APIs diff --git a/fsw/cfe-core/src/inc/cfe_time_msg.h b/fsw/cfe-core/src/inc/cfe_time_msg.h index d492f806b..6dab1047d 100644 --- a/fsw/cfe-core/src/inc/cfe_time_msg.h +++ b/fsw/cfe-core/src/inc/cfe_time_msg.h @@ -1140,22 +1140,6 @@ typedef struct } CFE_TIME_DiagnosticTlm_t; -/*************************************************************************/ - -/* - * COMPATIBILITY TYPEDEFS: - * In some circumstances applications may subscribe to telemetry from this component, - * and therefore the name changes may break existing code. For these situations a - * typedef is created to continue supporting the previous name. These should be - * removed in the next CFE release. - */ -#ifndef CFE_OMIT_DEPRECATED_6_6 - -typedef CFE_TIME_HousekeepingTlm_t CFE_TIME_HkPacket_t; -typedef CFE_TIME_DiagnosticTlm_t CFE_TIME_DiagPacket_t; - -#endif /* CFE_OMIT_DEPRECATED_6_6 */ - #endif /* _cfe_time_msg_ */ diff --git a/fsw/cfe-core/src/sb/cfe_sb_api.c b/fsw/cfe-core/src/sb/cfe_sb_api.c index 3c446f106..b257475e6 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_api.c +++ b/fsw/cfe-core/src/sb/cfe_sb_api.c @@ -1320,15 +1320,6 @@ int32 CFE_SB_SendMsgFull(CFE_SB_Msg_t *MsgPtr, RtgTblPtr->SeqCnt); }/* end if */ - #ifndef CFE_OMIT_DEPRECATED_6_8 - /* store the sender information */ - if(CFE_SB.SenderReporting != 0) - { - BufDscPtr->Sender.ProcessorId = CFE_PSP_GetProcessorId(); - strncpy(&BufDscPtr->Sender.AppName[0],CFE_SB_GetAppTskName(TskId,FullName),OS_MAX_API_NAME); - } - #endif /* CFE_OMIT_DEPRECATED_6_8 */ - /* At this point there must be at least one destination for pkt */ /* Send the packet to all destinations */ @@ -1622,76 +1613,6 @@ int32 CFE_SB_RcvMsg(CFE_SB_MsgPtr_t *BufPtr, }/* end CFE_SB_RcvMsg */ -#ifndef CFE_OMIT_DEPRECATED_6_8 - -/* - * Function: CFE_SB_GetLastSenderId - See API and header file for details - */ -uint32 CFE_SB_GetLastSenderId(CFE_SB_SenderId_t **Ptr,CFE_SB_PipeId_t PipeId) -{ - - CFE_SB_BufferD_t *Ptr2BufDescriptor; - uint32 TskId = 0; - uint32 AppId = 0xFFFFFFFF; - char FullName[(OS_MAX_API_NAME * 2)]; - - TskId = OS_TaskGetId(); - - /* validate ptr - note: must validate ptr before pipe id validation */ - /* because an invalid pipe id sets the callers pointer to NULL */ - if(Ptr == NULL){ - CFE_EVS_SendEventWithAppID(CFE_SB_LSTSNDER_ERR1_EID,CFE_EVS_EventType_ERROR,CFE_SB.AppId, - "SB GetLastSender Err:Rcvd Null Ptr,Pipe=%d,App=%s", - (int)PipeId,CFE_SB_GetAppTskName(TskId,FullName)); - return CFE_SB_BAD_ARGUMENT; - }/* end if */ - - /* validate pipe id */ - if(CFE_SB_ValidatePipeId(PipeId)!=CFE_SUCCESS){ - *Ptr = NULL; - CFE_EVS_SendEventWithAppID(CFE_SB_LSTSNDER_ERR2_EID,CFE_EVS_EventType_ERROR,CFE_SB.AppId, - "SB GetLastSender Err:Rcvd Invalid Pipe=%d,App=%s", - (int)PipeId,CFE_SB_GetAppTskName(TskId,FullName)); - return CFE_SB_BAD_ARGUMENT; - }/* end if */ - - CFE_ES_GetAppID(&AppId); - - CFE_SB_LockSharedData(__func__,__LINE__); - - /* verify requestor is owner of pipe */ - if(CFE_SB.PipeTbl[PipeId].AppId != AppId){ - *Ptr = NULL; - CFE_SB_UnlockSharedData(__func__,__LINE__); - CFE_EVS_SendEventWithAppID(CFE_SB_GLS_INV_CALLER_EID,CFE_EVS_EventType_ERROR,CFE_SB.AppId, - "SB GetLastSender Err:Caller(%s) is not the owner of pipe %d", - CFE_SB_GetAppTskName(TskId,FullName),(int)PipeId); - return CFE_SB_BAD_ARGUMENT; - }/* end if */ - - /* Get ptr to buffer descriptor for the last msg received on the given pipe */ - Ptr2BufDescriptor = CFE_SB.PipeTbl[PipeId].CurrentBuff; - - if ( Ptr2BufDescriptor == NULL ) - { - *Ptr = NULL; - CFE_SB.PipeTbl[PipeId].LastSender = CFE_SB_INVALID_MSG_ID; - CFE_SB_UnlockSharedData(__func__,__LINE__); - return CFE_SB_NO_MSG_RECV; - } - else - { - /* Set the receivers pointer to the adr of 'Sender' struct in buf descriptor */ - *Ptr = (CFE_SB_SenderId_t *) &Ptr2BufDescriptor -> Sender; - CFE_SB_UnlockSharedData(__func__,__LINE__); - return CFE_SUCCESS; - } - -}/* end CFE_SB_GetLastSenderId */ - -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - - /* * Function: CFE_SB_ZeroCopyGetPtr - See API and header file for details */ diff --git a/fsw/cfe-core/src/sb/cfe_sb_priv.h b/fsw/cfe-core/src/sb/cfe_sb_priv.h index 832618532..95c252979 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_priv.h +++ b/fsw/cfe-core/src/sb/cfe_sb_priv.h @@ -172,9 +172,6 @@ typedef struct { uint16 UseCount; uint32 Size; void *Buffer; -#ifndef CFE_OMIT_DEPRECATED_6_8 - CFE_SB_SenderId_t Sender; -#endif /* CFE_OMIT_DEPRECATED_6_8 */ } CFE_SB_BufferD_t; diff --git a/fsw/cfe-core/src/time/cfe_time_api.c b/fsw/cfe-core/src/time/cfe_time_api.c index 4f03f65c7..bfc3ecbcd 100644 --- a/fsw/cfe-core/src/time/cfe_time_api.c +++ b/fsw/cfe-core/src/time/cfe_time_api.c @@ -600,66 +600,6 @@ uint32 CFE_TIME_Micro2SubSecs(uint32 MicroSeconds) } /* End of CFE_TIME_Micro2SubSecs() */ -#ifndef CFE_OMIT_DEPRECATED_6_7 -/* - * Function: CFE_TIME_CFE2FSSeconds - See API and header file for details - */ -uint32 CFE_TIME_CFE2FSSeconds(uint32 SecondsCFE) -{ - /* - ** Using a signed integer allows the factor to be negative... - */ - int32 ConvertFactor = CFE_MISSION_TIME_FS_FACTOR; - - /* - ** File system time = cFE time + conversion factor... - */ - uint32 SecondsFS = SecondsCFE + (uint32) ConvertFactor; - - /* - ** Prevent file system time from going below zero... - */ - if (ConvertFactor < 0) - { - if (-ConvertFactor > SecondsCFE) - { - SecondsFS = 0; - } - } - - return(SecondsFS); - -} /* End of CFE_TIME_CFE2FSSeconds() */ - - -/* - * Function: CFE_TIME_FS2CFESeconds() - See API and header file for details - */ -uint32 CFE_TIME_FS2CFESeconds(uint32 SecondsFS) -{ - /* - ** Using a signed integer allows the factor to be negative... - */ - int32 ConvertFactor = CFE_MISSION_TIME_FS_FACTOR; - - /* - ** cFE time = file system time - conversion factor... - */ - uint32 SecondsCFE = SecondsFS - (uint32) ConvertFactor; - - /* - ** Prevent cFE time from going below zero... - */ - if (ConvertFactor > SecondsFS) - { - SecondsCFE = 0; - } - - return(SecondsCFE); - -} /* End of CFE_TIME_FS2CFESeconds() */ -#endif /* CFE_OMIT_DEPRECATED_6_7 */ - /* * Function: CFE_TIME_Print - See API and header file for details */ diff --git a/fsw/cfe-core/unit-test/es_UT.h b/fsw/cfe-core/unit-test/es_UT.h index 982bb24af..3417e43fd 100644 --- a/fsw/cfe-core/unit-test/es_UT.h +++ b/fsw/cfe-core/unit-test/es_UT.h @@ -59,7 +59,6 @@ #include "cfe_es_global.h" #include "cfe_es_log.h" #include "cfe_es_perf.h" -#include "cfe_es_shell.h" #include "cfe_es_task.h" #include "cfe_es_verify.h" #include "cfe_es_start.h" diff --git a/fsw/cfe-core/ut-stubs/ut_fs_stubs.c b/fsw/cfe-core/ut-stubs/ut_fs_stubs.c index f1e87de4a..720d67729 100644 --- a/fsw/cfe-core/ut-stubs/ut_fs_stubs.c +++ b/fsw/cfe-core/ut-stubs/ut_fs_stubs.c @@ -304,91 +304,3 @@ int32 CFE_FS_ExtractFilenameFromPath(const char *OriginalPath, char *FileNameOnl return status; } -#ifndef CFE_OMIT_DEPRECATED_6_7 - -/*****************************************************************************/ -/** -** \brief CFE_FS_Decompress stub function -** -** \par Description -** This function is used to mimic the response of the cFE FS function -** CFE_FS_Decompress. The user can adjust the response by setting -** the values in the FSDecompressRtn structure prior to this function -** being called. If the value FSDecompressRtn.count is greater than -** zero then the counter is decremented; if it then equals zero the -** return value is set to the user-defined value FSDecompressRtn.value. -** CFE_SUCCESS is returned otherwise. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** Returns either a user-defined status flag or CFE_SUCCESS. -** -******************************************************************************/ -int32 CFE_FS_Decompress(const char * SourceFile, const char * DestinationFile) -{ - int32 status; - - UT_Stub_RegisterContext(UT_KEY(CFE_FS_Decompress), SourceFile); - UT_Stub_RegisterContext(UT_KEY(CFE_FS_Decompress), DestinationFile); - status = UT_DEFAULT_IMPL(CFE_FS_Decompress); - - return status; -} - -/*****************************************************************************/ -/** -** \brief CFE_FS_IsGzFile stub function -** -** \par Description -** This function is used to mimic the response of the cFE FS function -** CFE_FS_IsGzFile. The user can adjust the response by setting -** the values in the FSIsGzFileRtn structure prior to this function -** being called. If the value FSIsGzFileRtn.count is greater than -** zero then the counter is decremented; if it then equals zero the -** return value is set to the user-defined value FSIsGzFileRtn.value. -** false is returned otherwise. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** Returns either a user-defined status flag or false. -** -******************************************************************************/ -bool CFE_FS_IsGzFile(const char *FileName) -{ - int32 status; - - UT_Stub_RegisterContext(UT_KEY(CFE_FS_IsGzFile), FileName); - status = UT_DEFAULT_IMPL(CFE_FS_IsGzFile); - - return (status != 0); -} - -/****************************************************************************** - * - * CFE_FS_GetUncompressedFile stub function - * See full description in prototype - * - ******************************************************************************/ -int32 CFE_FS_GetUncompressedFile(char *OutputNameBuffer, uint32 OutputNameBufferSize, - const char *GzipFileName, const char *TempDir) -{ - int32 status = UT_DEFAULT_IMPL(CFE_FS_GetUncompressedFile); - uint32 copysize; - - /* - * ensure that the output buffer sent back to the caller is reasonable - */ - if (status == CFE_SUCCESS && OutputNameBufferSize > 0) - { - copysize = UT_Stub_CopyToLocal(UT_KEY(CFE_FS_GetUncompressedFile), - (uint8*)OutputNameBuffer, OutputNameBufferSize - 1); - OutputNameBuffer[copysize] = 0; - } - - return status; -} -#endif /* CFE_OMIT_DEPRECATED_6_7 */ diff --git a/fsw/cfe-core/ut-stubs/ut_sb_stubs.c b/fsw/cfe-core/ut-stubs/ut_sb_stubs.c index 5c029a20d..51aabb61d 100644 --- a/fsw/cfe-core/ut-stubs/ut_sb_stubs.c +++ b/fsw/cfe-core/ut-stubs/ut_sb_stubs.c @@ -988,22 +988,6 @@ uint16 CFE_SB_GetChecksum(CFE_SB_MsgPtr_t MsgPtr) return status; } -#ifndef CFE_OMIT_DEPRECATED_6_8 - -uint32 CFE_SB_GetLastSenderId(CFE_SB_SenderId_t **Ptr, CFE_SB_PipeId_t PipeId) -{ - UT_Stub_RegisterContext(UT_KEY(CFE_SB_GetLastSenderId), Ptr); - UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_GetLastSenderId), PipeId); - - int32 status; - - status = UT_DEFAULT_IMPL(CFE_SB_GetLastSenderId); - - return status; -} - -#endif /* CFE_OMIT_DEPRECATED_6_8 */ - int32 CFE_SB_GetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 *OptPtr) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_GetPipeOpts), PipeId);