From fb2234cb1390b019f29d49f2c3814c3f1a370f9c Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Fri, 28 Apr 2023 13:32:45 -0400 Subject: [PATCH 01/14] Fix #2310, Update XML files per interoperability testing Verify the JSON files generated from EDS match the expected content and CTF-based tests also pass. This required a few touchups to XML files to adjust sizes and/or padding. --- modules/es/eds/cfe_es.xml | 62 +++++++++++++++-------------------- modules/evs/eds/cfe_evs.xml | 5 +++ modules/sb/eds/cfe_sb.xml | 9 ++--- modules/tbl/eds/cfe_tbl.xml | 1 + modules/time/eds/cfe_time.xml | 8 ++--- 5 files changed, 42 insertions(+), 43 deletions(-) diff --git a/modules/es/eds/cfe_es.xml b/modules/es/eds/cfe_es.xml index 8548c4f3c..c5f7e7a18 100644 --- a/modules/es/eds/cfe_es.xml +++ b/modules/es/eds/cfe_es.xml @@ -30,7 +30,7 @@ - + @@ -38,7 +38,7 @@ - + @@ -46,7 +46,7 @@ - + @@ -165,44 +165,41 @@ - + - For backward compatibility with existing CFE code this should be uint32, + For backward compatibility with existing CFS code this should be uint32, but all telemetry information will be limited to 4GB in size as a result. - On 64-bit platforms this can be a 64-bit value which will allow larger + On 64-bit platforms this can be expanded to 64 bits which will allow larger memory objects, but this will break compatibility with existing control - systems, and may also change the alignment/padding of messages. + systems, and may also change the alignment/padding of some messages. - In either case this must be an unsigned type. + In either case this must be an unsigned type, and should be large enough + to represent the largest memory address/size in use in the CFS system. - - - - + + + + + - + - For backward compatibility with existing CFE code this should be uint32, - but if running on a 64-bit platform, addresses in telemetry will be - truncated to 32 bits and therefore will not be valid. - - On 64-bit platforms this can be a 64-bit address which will allow the - full memory address in commands and telemetry, but this will break - compatibility with existing control systems, and may also change - the alignment/padding of messages. + For backward compatibility with existing CFS code this should be uint32, + but all telemetry information will be limited to 4GB in size as a result. - In either case this must be an unsigned type. + On 64-bit platforms this can be expanded to 64 bits which will allow larger + memory objects, but this will break compatibility with existing control + systems, and may also change the alignment/padding of some messages. - FSW code should access this value via the macros provided, which - converts to the native "cpuaddr" type provided by OSAL. This macro - provides independence between the message representation and local - representation of a memory address. + In either case this must be an unsigned type, and should be large enough + to represent the largest memory address/size in use in the CFS system. - - - - + + + + + @@ -249,11 +246,6 @@ \cfetlmmnemonic \ES_STACKSIZE - - - \cfetlmmnemonic \ES_MODULEID - - \cfetlmmnemonic \ES_ADDRVALID diff --git a/modules/evs/eds/cfe_evs.xml b/modules/evs/eds/cfe_evs.xml index 5a3146555..99297ab1d 100644 --- a/modules/evs/eds/cfe_evs.xml +++ b/modules/evs/eds/cfe_evs.xml @@ -98,6 +98,7 @@ + @@ -107,6 +108,7 @@ + @@ -117,6 +119,7 @@ + @@ -147,6 +150,7 @@ + @@ -250,6 +254,7 @@ \cfetlmmnemonic \EVS_LOGENABLED + \cfetlmmnemonic \EVS_APP diff --git a/modules/sb/eds/cfe_sb.xml b/modules/sb/eds/cfe_sb.xml index 7fff096e8..02284d5ea 100644 --- a/modules/sb/eds/cfe_sb.xml +++ b/modules/sb/eds/cfe_sb.xml @@ -128,6 +128,7 @@ + @@ -266,7 +267,7 @@ \cfetlmmnemonic \SB_SMPMIDIU - + \cfetlmmnemonic \SB_SMMMIDALW @@ -281,7 +282,7 @@ \cfetlmmnemonic \SB_SMPPIU - + \cfetlmmnemonic \SB_SMMPALW @@ -296,7 +297,7 @@ \cfetlmmnemonic \SB_SMPBMIU - + \cfetlmmnemonic \SB_SMMBMALW @@ -328,7 +329,7 @@ \cfetlmmnemonic \SB_SMPSBBIU - + \cfetlmmnemonic \SB_SMMPDALW diff --git a/modules/tbl/eds/cfe_tbl.xml b/modules/tbl/eds/cfe_tbl.xml index 344884e9e..51c86b47d 100644 --- a/modules/tbl/eds/cfe_tbl.xml +++ b/modules/tbl/eds/cfe_tbl.xml @@ -236,6 +236,7 @@ \cfetlmmnemonic \TBL_NUMFREESHRBUF + \cfetlmmnemonic \TBL_MEMPOOLHANDLE diff --git a/modules/time/eds/cfe_time.xml b/modules/time/eds/cfe_time.xml index 0e58d9605..5a3536b87 100644 --- a/modules/time/eds/cfe_time.xml +++ b/modules/time/eds/cfe_time.xml @@ -87,7 +87,7 @@ - + @@ -103,7 +103,7 @@ - + @@ -111,7 +111,7 @@ - + @@ -119,7 +119,7 @@ - + From 4a11c240648144bc313b5eaaa4802bc3b13b65ea Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 2 May 2023 10:19:16 -0400 Subject: [PATCH 02/14] Fix #2315, uniqueness of tbl target names If the passed-in table name does not use a qualifier suffix, then generate one by computing a hash of the context information. This ensures that the generated intermediate target names will be unique. --- cmake/arch_build.cmake | 17 +++++++++++++++++ cmake/global_functions.cmake | 8 ++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/cmake/arch_build.cmake b/cmake/arch_build.cmake index d1fe5a5dc..a120dd8b3 100644 --- a/cmake/arch_build.cmake +++ b/cmake/arch_build.cmake @@ -194,6 +194,23 @@ function(add_cfe_tables TABLE_FQNAME TBL_DEFAULT_SRC_FILES) get_filename_component(APP_NAME ${TABLE_FQNAME} NAME_WE) + # The passed-in name allows for a qualifier (in the form of APP_NAME.QUALIFIER) to get + # uniqueness in the generated target names. If there is no qualifier, then there + # will potentially be a target name conflict. To avoid this, generate a hash of the + # context of this call - the current directory, app/tgt names, and source files. This + # should be unique but also produce the same hash when CMake is re-run. The hash + # can then be used as a qualifier. + if (TABLE_FQNAME STREQUAL APP_NAME) + string(SHA1 CONTEXT_HASH + "${CMAKE_CURRENT_LIST_DIR}+${TGTNAME}+${APP_NAME}+${TBL_DEFAULT_SRC_FILES};${ARGN}" + ) + set(TABLE_FQNAME "${APP_NAME}.tbl${CONTEXT_HASH}") + + if ($ENV{VERBOSE}) + message("No suffix specified, table build using ${TABLE_FQNAME} for ${APP_NAME} table") + endif() + endif() + # If "TGTNAME" is set, then use it directly set(TABLE_TGTLIST ${TGTNAME}) set(TABLE_TEMPLATE "${CFE_SOURCE_DIR}/cmake/tables/table_rule_template.d.in") diff --git a/cmake/global_functions.cmake b/cmake/global_functions.cmake index 46396be1f..7a363f0ea 100644 --- a/cmake/global_functions.cmake +++ b/cmake/global_functions.cmake @@ -65,6 +65,9 @@ function(cfe_locate_implementation_file OUTPUT_VAR FILE_NAME) set(SELECTED_FILE) foreach (CHECK_FILE ${IMPL_SEARCH_PATH}) + if ($ENV{VERBOSE}) + message("Testing for: ${CHECK_FILE}") + endif() if (EXISTS "${CHECK_FILE}") list(APPEND SELECTED_FILE ${CHECK_FILE}) endif() @@ -76,12 +79,13 @@ function(cfe_locate_implementation_file OUTPUT_VAR FILE_NAME) else() set(SELECTED_FILE "${CMAKE_CURRENT_LIST_DIR}/${LOCATEIMPL_ARG_FALLBACK_FILE}") endif() + if (NOT EXISTS "${SELECTED_FILE}" AND NOT LOCATEIMPL_ARG_OPTIONAL) + message(FATAL_ERROR "No implementation for ${FILE_NAME} found") + endif() endif() if (SELECTED_FILE) message(STATUS "Using file: ${SELECTED_FILE} for ${FILE_NAME}") - elseif(NOT LOCATEIMPL_ARG_OPTIONAL) - message(FATAL_ERROR "No implementation for ${FILE_NAME} found") endif() # Export the result to the caller From c9095c0b4efb4a6f887f5be8cadba893602b93a2 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 2 May 2023 16:28:00 -0400 Subject: [PATCH 03/14] Fix #2320, reorganize ES header files Organize ES header file contents according to the convention --- modules/es/CMakeLists.txt | 2 +- modules/es/arch_build.cmake | 32 + .../config/default_cfe_es_extern_typedefs.h} | 18 +- .../default_cfe_es_fcncodes.h} | 536 +---------- .../es/config/default_cfe_es_interface_cfg.h | 151 ++++ .../es/config/default_cfe_es_internal_cfg.h | 839 ++++++++++++++++++ .../es/config/default_cfe_es_mission_cfg.h | 36 + modules/es/config/default_cfe_es_msg.h | 38 + modules/es/config/default_cfe_es_msgdefs.h | 31 + modules/es/config/default_cfe_es_msgids.h | 42 + modules/es/config/default_cfe_es_msgstruct.h | 543 ++++++++++++ .../es/config/default_cfe_es_platform_cfg.h | 41 + modules/es/config/default_cfe_es_topicids.h | 51 ++ .../{cfe_es_events.h => cfe_es_eventids.h} | 0 modules/es/fsw/src/cfe_es_module_all.h | 2 +- modules/es/mission_build.cmake | 37 + 16 files changed, 1858 insertions(+), 541 deletions(-) create mode 100644 modules/es/arch_build.cmake rename modules/{core_api/fsw/inc/cfe_es_extern_typedefs.h => es/config/default_cfe_es_extern_typedefs.h} (97%) rename modules/es/{fsw/inc/cfe_es_msg.h => config/default_cfe_es_fcncodes.h} (65%) create mode 100644 modules/es/config/default_cfe_es_interface_cfg.h create mode 100644 modules/es/config/default_cfe_es_internal_cfg.h create mode 100644 modules/es/config/default_cfe_es_mission_cfg.h create mode 100644 modules/es/config/default_cfe_es_msg.h create mode 100644 modules/es/config/default_cfe_es_msgdefs.h create mode 100644 modules/es/config/default_cfe_es_msgids.h create mode 100644 modules/es/config/default_cfe_es_msgstruct.h create mode 100644 modules/es/config/default_cfe_es_platform_cfg.h create mode 100644 modules/es/config/default_cfe_es_topicids.h rename modules/es/fsw/inc/{cfe_es_events.h => cfe_es_eventids.h} (100%) create mode 100644 modules/es/mission_build.cmake diff --git a/modules/es/CMakeLists.txt b/modules/es/CMakeLists.txt index 772166537..9d7d50824 100644 --- a/modules/es/CMakeLists.txt +++ b/modules/es/CMakeLists.txt @@ -36,5 +36,5 @@ endif (ENABLE_UNIT_TESTS) cfs_app_check_intf(${DEP} cfe_es_msg.h - cfe_es_events.h + cfe_es_eventids.h ) diff --git a/modules/es/arch_build.cmake b/modules/es/arch_build.cmake new file mode 100644 index 000000000..27403bd88 --- /dev/null +++ b/modules/es/arch_build.cmake @@ -0,0 +1,32 @@ +########################################################### +# +# ES Core Module platform build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### + +# The list of header files that control the ES configuration +set(ES_PLATFORM_CONFIG_FILE_LIST + cfe_es_internal_cfg.h + cfe_es_msgids.h + cfe_es_platform_cfg.h +) + +# Create wrappers around the all the config header files +# This makes them individually overridable by the missions, without modifying +# the distribution default copies +foreach(ES_CFGFILE ${ES_PLATFORM_CONFIG_FILE_LIST}) + get_filename_component(CFGKEY "${ES_CFGFILE}" NAME_WE) + if (DEFINED ES_CFGFILE_SRC_${CFGKEY}) + set(DEFAULT_SOURCE "${ES_CFGFILE_SRC_${CFGKEY}}") + else() + set(DEFAULT_SOURCE "${CMAKE_CURRENT_LIST_DIR}/config/default_${ES_CFGFILE}") + endif() + generate_config_includefile( + FILE_NAME "${ES_CFGFILE}" + FALLBACK_FILE ${DEFAULT_SOURCE} + ) +endforeach() diff --git a/modules/core_api/fsw/inc/cfe_es_extern_typedefs.h b/modules/es/config/default_cfe_es_extern_typedefs.h similarity index 97% rename from modules/core_api/fsw/inc/cfe_es_extern_typedefs.h rename to modules/es/config/default_cfe_es_extern_typedefs.h index f30f381e8..58bfd8270 100644 --- a/modules/core_api/fsw/inc/cfe_es_extern_typedefs.h +++ b/modules/es/config/default_cfe_es_extern_typedefs.h @@ -25,16 +25,6 @@ #ifndef CFE_ES_EXTERN_TYPEDEFS_H #define CFE_ES_EXTERN_TYPEDEFS_H -/* This header may be generated from an EDS file, - * tools are available and the feature is enabled */ -#ifdef CFE_EDS_ENABLED_BUILD - -/* Use the EDS generated version of these types */ -#include "cfe_es_eds_typedefs.h" - -#else -/* Use the local definitions of these types */ - #include "common_types.h" #include "cfe_resourceid_typedef.h" #include "cfe_mission_cfg.h" @@ -387,7 +377,7 @@ typedef uint32 CFE_ES_MemOffset_t; * A converter macro to use when initializing a CFE_ES_MemOffset_t * from an integer value of a different type. */ -#define CFE_ES_MEMOFFSET_C(x) ((CFE_ES_MemOffset_t)(x)) +#define CFE_ES_MEMOFFSET_C(x) ((CFE_ES_MemOffset_t)(x)) /** * @brief Memory Offset to integer value (size_t) wrapper @@ -424,7 +414,7 @@ typedef uint32 CFE_ES_MemAddress_t; * A converter macro to use when initializing a CFE_ES_MemAddress_t * from a pointer value of a different type. */ -#define CFE_ES_MEMADDRESS_C(x) ((CFE_ES_MemAddress_t)((cpuaddr)(x)&0xFFFFFFFF)) +#define CFE_ES_MEMADDRESS_C(x) ((CFE_ES_MemAddress_t)((cpuaddr)(x)&0xFFFFFFFF)) /** * @brief Memory Address to pointer wrapper @@ -432,7 +422,7 @@ typedef uint32 CFE_ES_MemAddress_t; * A converter macro to use when interpreting a CFE_ES_MemAddress_t * as a pointer value. */ -#define CFE_ES_MEMADDRESS_TO_PTR(x) ((void *)(cpuaddr)(x)) +#define CFE_ES_MEMADDRESS_TO_PTR(x) ((void *)(cpuaddr)(x)) /* * Data Structures shared between API and Message (CMD/TLM) interfaces @@ -574,6 +564,4 @@ typedef struct CFE_ES_MemPoolStats \brief Contains stats on each block size */ } CFE_ES_MemPoolStats_t; -#endif /* CFE_EDS_ENABLED_BUILD */ - #endif /* CFE_ES_EXTERN_TYPEDEFS_H */ diff --git a/modules/es/fsw/inc/cfe_es_msg.h b/modules/es/config/default_cfe_es_fcncodes.h similarity index 65% rename from modules/es/fsw/inc/cfe_es_msg.h rename to modules/es/config/default_cfe_es_fcncodes.h index b320df61e..e02b4d347 100644 --- a/modules/es/fsw/inc/cfe_es_msg.h +++ b/modules/es/config/default_cfe_es_fcncodes.h @@ -18,33 +18,23 @@ /** * @file + * Specification for the CFE Executive Services (CFE_ES) command function codes * - * Purpose: - * cFE Executive Services (ES) Command and Telemetry packet definition file. - * - * References: - * Flight Software Branch C Coding Standard Version 1.0a - * cFE Flight Software Application Developers Guide - * - * Notes: - * + * @note + * This file should be strictly limited to the command/function code (CC) + * macro definitions. Other definitions such as enums, typedefs, or other + * macros should be placed in the msgdefs.h or msg.h files. */ +#ifndef CFE_ES_FCNCODES_H +#define CFE_ES_FCNCODES_H -#ifndef CFE_ES_MSG_H -#define CFE_ES_MSG_H - -/* -** Includes -*/ -#include "common_types.h" /* Basic data types */ -#include "cfe_msg_hdr.h" /* for header definitions */ -#include "cfe_es_extern_typedefs.h" +/************************************************************************ + * Macro Definitions + ************************************************************************/ -/* -** ES task command packet command codes -*/ /** \name Executive Services Command Codes */ /** \{ */ + /** \cfeescmd Executive Services No-Op ** ** \par Description @@ -1043,506 +1033,4 @@ /** \} */ -/*************************************************************************/ -/********************************/ -/* Command Message Data Formats */ -/********************************/ -/** -** \brief Generic "no arguments" command -** -** This command structure is used for commands that do not have any parameters. -** This includes: -** -# The Housekeeping Request Message -** -# The No-Op Command (For details, see #CFE_ES_NOOP_CC) -** -# The Reset Counters Command (For details, see #CFE_ES_RESET_COUNTERS_CC) -*/ -typedef struct CFE_ES_NoArgsCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ -} CFE_ES_NoArgsCmd_t; - -/* - * The following commands all share the "NoArgs" format - * - * They are each given their own type name matching the command name, which - * allows them to change independently in the future without changing the prototype - * of the handler function. - */ -typedef CFE_ES_NoArgsCmd_t CFE_ES_NoopCmd_t; -typedef CFE_ES_NoArgsCmd_t CFE_ES_ResetCountersCmd_t; -typedef CFE_ES_NoArgsCmd_t CFE_ES_ClearSysLogCmd_t; -typedef CFE_ES_NoArgsCmd_t CFE_ES_ClearERLogCmd_t; -typedef CFE_ES_NoArgsCmd_t CFE_ES_ResetPRCountCmd_t; -typedef CFE_ES_NoArgsCmd_t CFE_ES_SendHkCmd_t; - -/** -** \brief Restart cFE Command Payload -** -** For command details, see #CFE_ES_RESTART_CC -** -**/ -typedef struct CFE_ES_RestartCmd_Payload -{ - uint16 RestartType; /**< \brief #CFE_PSP_RST_TYPE_PROCESSOR=Processor Reset - or #CFE_PSP_RST_TYPE_POWERON=Power-On Reset */ -} CFE_ES_RestartCmd_Payload_t; - -/** - * \brief Restart cFE Command - */ -typedef struct CFE_ES_RestartCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_ES_RestartCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_ES_RestartCmd_t; - -/** -** \brief Generic file name command payload -** -** This format is shared by several executive services commands. -** For command details, see #CFE_ES_QUERY_ALL_CC, #CFE_ES_QUERY_ALL_TASKS_CC, -** #CFE_ES_WRITE_SYSLOG_CC, and #CFE_ES_WRITE_ER_LOG_CC -** -**/ -typedef struct CFE_ES_FileNameCmd_Payload -{ - char FileName[CFE_MISSION_MAX_PATH_LEN]; /**< \brief ASCII text string containing full path and - filename of file in which Application data is to be dumped */ -} CFE_ES_FileNameCmd_Payload_t; - -/** - * \brief Generic file name command - */ -typedef struct CFE_ES_FileNameCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_ES_FileNameCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_ES_FileNameCmd_t; - -/* - * Unique typedefs for each of the commands that utilize the FileNameCmd - * packet format - */ -typedef CFE_ES_FileNameCmd_t CFE_ES_QueryAllCmd_t; -typedef CFE_ES_FileNameCmd_t CFE_ES_QueryAllTasksCmd_t; -typedef CFE_ES_FileNameCmd_t CFE_ES_WriteSysLogCmd_t; -typedef CFE_ES_FileNameCmd_t CFE_ES_WriteERLogCmd_t; - -/** -** \brief Overwrite/Discard System Log Configuration Command Payload -** -** For command details, see #CFE_ES_OVER_WRITE_SYSLOG_CC -** -**/ -typedef struct CFE_ES_OverWriteSysLogCmd_Payload -{ - uint32 Mode; /**< \brief #CFE_ES_LogMode_DISCARD=Throw away most recent messages, - #CFE_ES_LogMode_OVERWRITE=Overwrite oldest with most recent */ -} CFE_ES_OverWriteSysLogCmd_Payload_t; - -/** - * \brief Overwrite/Discard System Log Configuration Command Payload - */ -typedef struct CFE_ES_OverWriteSysLogCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_ES_OverWriteSysLogCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_ES_OverWriteSysLogCmd_t; - -/** -** \brief Start Application Command Payload -** -** For command details, see #CFE_ES_START_APP_CC -** -**/ -typedef struct CFE_ES_StartAppCmd_Payload -{ - char Application[CFE_MISSION_MAX_API_LEN]; /**< \brief Name of Application to be started */ - char AppEntryPoint[CFE_MISSION_MAX_API_LEN]; /**< \brief Symbolic name of Application's entry point */ - char AppFileName[CFE_MISSION_MAX_PATH_LEN]; /**< \brief Full path and filename of Application's - executable image */ - - CFE_ES_MemOffset_t StackSize; /**< \brief Desired stack size for the new application */ - - CFE_ES_ExceptionAction_Enum_t ExceptionAction; /**< \brief #CFE_ES_ExceptionAction_RESTART_APP=On exception, - restart Application, - #CFE_ES_ExceptionAction_PROC_RESTART=On exception, - perform a Processor Reset */ - CFE_ES_TaskPriority_Atom_t Priority; /**< \brief The new Applications runtime priority. */ -} CFE_ES_StartAppCmd_Payload_t; - -/** - * \brief Start Application Command - */ -typedef struct CFE_ES_StartApp -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_ES_StartAppCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_ES_StartAppCmd_t; - -/** -** \brief Generic application name command payload -** -** For command details, see #CFE_ES_STOP_APP_CC, #CFE_ES_RESTART_APP_CC, #CFE_ES_QUERY_ONE_CC -** -**/ -typedef struct CFE_ES_AppNameCmd_Payload -{ - char Application[CFE_MISSION_MAX_API_LEN]; /**< \brief ASCII text string containing Application or Library Name */ -} CFE_ES_AppNameCmd_Payload_t; - -/** - * \brief Generic application name command - */ -typedef struct CFE_ES_AppNameCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_ES_AppNameCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_ES_AppNameCmd_t; - -/* - * Like NoArgsCmd, this message definition is shared by multiple commands. - * Create a separate typedef for each one so they can all evolve independently - * without affecting the prototype. - */ -typedef CFE_ES_AppNameCmd_t CFE_ES_StopAppCmd_t; -typedef CFE_ES_AppNameCmd_t CFE_ES_RestartAppCmd_t; -typedef CFE_ES_AppNameCmd_t CFE_ES_QueryOneCmd_t; - -/** -** \brief Reload Application Command Payload -** -** For command details, see #CFE_ES_RELOAD_APP_CC -** -**/ -typedef struct CFE_ES_AppReloadCmd_Payload -{ - char Application[CFE_MISSION_MAX_API_LEN]; /**< \brief ASCII text string containing Application Name */ - char AppFileName[CFE_MISSION_MAX_PATH_LEN]; /**< \brief Full path and filename of Application's - executable image */ -} CFE_ES_AppReloadCmd_Payload_t; - -/** - * \brief Reload Application Command - */ -typedef struct CFE_ES_ReloadAppCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_ES_AppReloadCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_ES_ReloadAppCmd_t; - -/** -** \brief Set Maximum Processor Reset Count Command Payload -** -** For command details, see #CFE_ES_SET_MAX_PR_COUNT_CC -** -**/ -typedef struct CFE_ES_SetMaxPRCountCmd_Payload -{ - uint16 MaxPRCount; /**< \brief New maximum number of Processor Resets before - an automatic Power-On Reset is performed */ -} CFE_ES_SetMaxPRCountCmd_Payload_t; - -/** - * \brief Set Maximum Processor Reset Count Command - */ -typedef struct CFE_ES_SetMaxPRCountCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_ES_SetMaxPRCountCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_ES_SetMaxPRCountCmd_t; - -/** -** \brief Delete Critical Data Store Command Payload -** -** For command details, see #CFE_ES_DELETE_CDS_CC -** -**/ -typedef struct CFE_ES_DeleteCDSCmd_Payload -{ - char - CdsName[CFE_MISSION_ES_CDS_MAX_FULL_NAME_LEN]; /**< \brief ASCII text string containing name of CDS to delete */ -} CFE_ES_DeleteCDSCmd_Payload_t; - -/** - * \brief Delete Critical Data Store Command - */ -typedef struct CFE_ES_DeleteCDSCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_ES_DeleteCDSCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_ES_DeleteCDSCmd_t; - -/** -** \brief Start Performance Analyzer Command Payload -** -** For command details, see #CFE_ES_START_PERF_DATA_CC -** -**/ -typedef struct CFE_ES_StartPerfCmd_Payload -{ - uint32 TriggerMode; /**< \brief Desired trigger position (Start, Center, End) */ -} CFE_ES_StartPerfCmd_Payload_t; - -/** - * \brief Start Performance Analyzer Command - */ -typedef struct CFE_ES_StartPerfDataCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_ES_StartPerfCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_ES_StartPerfDataCmd_t; - -/** -** \brief Stop Performance Analyzer Command Payload -** -** For command details, see #CFE_ES_STOP_PERF_DATA_CC -** -**/ -typedef struct CFE_ES_StopPerfCmd_Payload -{ - char DataFileName[CFE_MISSION_MAX_PATH_LEN]; /**< \brief ASCII text string of full path and filename - of file Performance Analyzer data is to be written */ -} CFE_ES_StopPerfCmd_Payload_t; - -/** - * \brief Stop Performance Analyzer Command - */ -typedef struct CFE_ES_StopPerfDataCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_ES_StopPerfCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_ES_StopPerfDataCmd_t; - -/** -** \brief Set Performance Analyzer Filter Mask Command Payload -** -** For command details, see #CFE_ES_SET_PERF_FILTER_MASK_CC -** -**/ -typedef struct CFE_ES_SetPerfFilterMaskCmd_Payload -{ - uint32 FilterMaskNum; /**< \brief Index into array of Filter Masks */ - uint32 FilterMask; /**< \brief New Mask for specified entry in array of Filter Masks */ -} CFE_ES_SetPerfFilterMaskCmd_Payload_t; - -/** - * \brief Set Performance Analyzer Filter Mask Command - */ -typedef struct CFE_ES_SetPerfFilterMaskCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_ES_SetPerfFilterMaskCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_ES_SetPerfFilterMaskCmd_t; - -/** -** \brief Set Performance Analyzer Trigger Mask Command Payload -** -** For command details, see #CFE_ES_SET_PERF_TRIGGER_MASK_CC -** -**/ -typedef struct CFE_ES_SetPerfTrigMaskCmd_Payload -{ - uint32 TriggerMaskNum; /**< \brief Index into array of Trigger Masks */ - uint32 TriggerMask; /**< \brief New Mask for specified entry in array of Trigger Masks */ -} CFE_ES_SetPerfTrigMaskCmd_Payload_t; - -/** - * \brief Set Performance Analyzer Trigger Mask Command - */ -typedef struct CFE_ES_SetPerfTriggerMaskCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_ES_SetPerfTrigMaskCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_ES_SetPerfTriggerMaskCmd_t; - -/** -** \brief Send Memory Pool Statistics Command Payload -** -** For command details, see #CFE_ES_SEND_MEM_POOL_STATS_CC -** -**/ -typedef struct CFE_ES_SendMemPoolStatsCmd_Payload -{ - char Application[CFE_MISSION_MAX_API_LEN]; /**< \brief - RESERVED - should be all zeroes */ - CFE_ES_MemHandle_t PoolHandle; /**< \brief Handle of Pool whose statistics are to be telemetered */ -} CFE_ES_SendMemPoolStatsCmd_Payload_t; - -/** - * \brief Send Memory Pool Statistics Command - */ -typedef struct CFE_ES_SendMemPoolStatsCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_ES_SendMemPoolStatsCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_ES_SendMemPoolStatsCmd_t; - -/** -** \brief Dump CDS Registry Command Payload -** -** For command details, see #CFE_ES_DUMP_CDS_REGISTRY_CC -** -**/ -typedef struct CFE_ES_DumpCDSRegistryCmd_Payload -{ - char DumpFilename[CFE_MISSION_MAX_PATH_LEN]; /**< \brief ASCII text string of full path and filename - of file CDS Registry is to be written */ -} CFE_ES_DumpCDSRegistryCmd_Payload_t; - -/** - * \brief Dump CDS Registry Command - */ -typedef struct CFE_ES_DumpCDSRegistryCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_ES_DumpCDSRegistryCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_ES_DumpCDSRegistryCmd_t; - -/*************************************************************************/ - -/************************************/ -/* Telemetry Interface Data Formats */ -/************************************/ - -/**********************************/ -/* Telemetry Message Data Formats */ -/**********************************/ -/** -** \cfeestlm Single Application Information Packet -**/ -typedef struct CFE_ES_OneAppTlm_Payload -{ - CFE_ES_AppInfo_t AppInfo; /**< \brief For more information, see #CFE_ES_AppInfo_t */ -} CFE_ES_OneAppTlm_Payload_t; - -typedef struct CFE_ES_OneAppTlm -{ - CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ - CFE_ES_OneAppTlm_Payload_t Payload; /**< \brief Telemetry payload */ -} CFE_ES_OneAppTlm_t; - -/** -** \cfeestlm Memory Pool Statistics Packet -**/ -typedef struct CFE_ES_PoolStatsTlm_Payload -{ - CFE_ES_MemHandle_t PoolHandle; /**< \cfetlmmnemonic \ES_POOLHANDLE - \brief Handle of memory pool whose stats are being telemetered */ - CFE_ES_MemPoolStats_t PoolStats; /**< \brief For more info, see #CFE_ES_MemPoolStats_t */ -} CFE_ES_PoolStatsTlm_Payload_t; - -typedef struct CFE_ES_MemStatsTlm -{ - CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ - CFE_ES_PoolStatsTlm_Payload_t Payload; /**< \brief Telemetry payload */ -} CFE_ES_MemStatsTlm_t; - -/*************************************************************************/ - -/** -** \cfeestlm Executive Services Housekeeping Packet -**/ -typedef struct CFE_ES_HousekeepingTlm_Payload -{ - uint8 CommandCounter; /**< \cfetlmmnemonic \ES_CMDPC - \brief The ES Application Command Counter */ - uint8 CommandErrorCounter; /**< \cfetlmmnemonic \ES_CMDEC - \brief The ES Application Command Error Counter */ - - uint16 CFECoreChecksum; /**< \cfetlmmnemonic \ES_CKSUM - \brief Checksum of cFE Core Code */ - uint8 CFEMajorVersion; /**< \cfetlmmnemonic \ES_CFEMAJORVER - \brief Major Version Number of cFE */ - uint8 CFEMinorVersion; /**< \cfetlmmnemonic \ES_CFEMINORVER - \brief Minor Version Number of cFE */ - uint8 CFERevision; /**< \cfetlmmnemonic \ES_CFEREVISION - \brief Sub-Minor Version Number of cFE */ - uint8 CFEMissionRevision; /**< \cfetlmmnemonic \ES_CFEMISSIONREV - \brief Mission Version Number of cFE */ - uint8 OSALMajorVersion; /**< \cfetlmmnemonic \ES_OSMAJORVER - \brief OS Abstraction Layer Major Version Number */ - uint8 OSALMinorVersion; /**< \cfetlmmnemonic \ES_OSMINORVER - \brief OS Abstraction Layer Minor Version Number */ - uint8 OSALRevision; /**< \cfetlmmnemonic \ES_OSREVISION - \brief OS Abstraction Layer Revision Number */ - uint8 OSALMissionRevision; /**< \cfetlmmnemonic \ES_OSMISSIONREV - \brief OS Abstraction Layer MissionRevision Number */ - - uint8 PSPMajorVersion; /**< \cfetlmmnemonic \ES_PSPMAJORVER - \brief Platform Support Package Major Version Number */ - uint8 PSPMinorVersion; /**< \cfetlmmnemonic \ES_PSPMINORVER - \brief Platform Support Package Minor Version Number */ - uint8 PSPRevision; /**< \cfetlmmnemonic \ES_PSPREVISION - \brief Platform Support Package Revision Number */ - uint8 PSPMissionRevision; /**< \cfetlmmnemonic \ES_PSPMISSIONREV - \brief Platform Support Package MissionRevision Number */ - - CFE_ES_MemOffset_t SysLogBytesUsed; /**< \cfetlmmnemonic \ES_SYSLOGBYTEUSED - \brief Total number of bytes used in system log */ - CFE_ES_MemOffset_t SysLogSize; /**< \cfetlmmnemonic \ES_SYSLOGSIZE - \brief Total size of the system log */ - uint32 SysLogEntries; /**< \cfetlmmnemonic \ES_SYSLOGENTRIES - \brief Number of entries in the system log */ - uint32 SysLogMode; /**< \cfetlmmnemonic \ES_SYSLOGMODE - \brief Write/Overwrite Mode */ - - uint32 ERLogIndex; /**< \cfetlmmnemonic \ES_ERLOGINDEX - \brief Current index of the ER Log (wraps around) */ - uint32 ERLogEntries; /**< \cfetlmmnemonic \ES_ERLOGENTRIES - \brief Number of entries made in the ER Log since the power on */ - - uint32 RegisteredCoreApps; /**< \cfetlmmnemonic \ES_REGCOREAPPS - \brief Number of Applications registered with ES */ - uint32 RegisteredExternalApps; /**< \cfetlmmnemonic \ES_REGEXTAPPS - \brief Number of Applications registered with ES */ - uint32 RegisteredTasks; /**< \cfetlmmnemonic \ES_REGTASKS - \brief Number of Tasks ( main AND child tasks ) registered with ES */ - uint32 RegisteredLibs; /**< \cfetlmmnemonic \ES_REGLIBS - \brief Number of Libraries registered with ES */ - - uint32 ResetType; /**< \cfetlmmnemonic \ES_RESETTYPE - \brief Reset type ( PROCESSOR or POWERON ) */ - uint32 ResetSubtype; /**< \cfetlmmnemonic \ES_RESETSUBTYPE - \brief Reset Sub Type */ - uint32 ProcessorResets; /**< \cfetlmmnemonic \ES_PROCRESETCNT - \brief Number of processor resets since last power on */ - uint32 MaxProcessorResets; /**< \cfetlmmnemonic \ES_MAXPROCRESETS - \brief Max processor resets before a power on is done */ - uint32 BootSource; /**< \cfetlmmnemonic \ES_BOOTSOURCE - \brief Boot source ( as provided from BSP ) */ - - uint32 PerfState; /**< \cfetlmmnemonic \ES_PERFSTATE - \brief Current state of Performance Analyzer */ - uint32 PerfMode; /**< \cfetlmmnemonic \ES_PERFMODE - \brief Current mode of Performance Analyzer */ - uint32 PerfTriggerCount; /**< \cfetlmmnemonic \ES_PERFTRIGCNT - \brief Number of Times Performance Analyzer has Triggered */ - uint32 PerfFilterMask[CFE_MISSION_ES_PERF_MAX_IDS / 32]; /**< \cfetlmmnemonic \ES_PERFFLTRMASK - \brief Current Setting of Performance Analyzer Filter Masks */ - uint32 - PerfTriggerMask[CFE_MISSION_ES_PERF_MAX_IDS / 32]; /**< \cfetlmmnemonic \ES_PERFTRIGMASK - \brief Current Setting of Performance Analyzer Trigger Masks */ - uint32 PerfDataStart; /**< \cfetlmmnemonic \ES_PERFDATASTART - \brief Identifies First Stored Entry in Performance Analyzer Log */ - uint32 PerfDataEnd; /**< \cfetlmmnemonic \ES_PERFDATAEND - \brief Identifies Last Stored Entry in Performance Analyzer Log */ - uint32 PerfDataCount; /**< \cfetlmmnemonic \ES_PERFDATACNT - \brief Number of Entries Put Into the Performance Analyzer Log */ - uint32 - PerfDataToWrite; /**< \cfetlmmnemonic \ES_PERFDATA2WRITE - \brief Number of Performance Analyzer Log Entries Left to be Written to Log Dump File */ - CFE_ES_MemOffset_t HeapBytesFree; /**< \cfetlmmnemonic \ES_HEAPBYTESFREE - \brief Number of free bytes remaining in the OS heap */ - CFE_ES_MemOffset_t HeapBlocksFree; /**< \cfetlmmnemonic \ES_HEAPBLKSFREE - \brief Number of free blocks remaining in the OS heap */ - CFE_ES_MemOffset_t HeapMaxBlockSize; /**< \cfetlmmnemonic \ES_HEAPMAXBLK - \brief Number of bytes in the largest free block */ -} CFE_ES_HousekeepingTlm_Payload_t; - -typedef struct CFE_ES_HousekeepingTlm -{ - CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ - CFE_ES_HousekeepingTlm_Payload_t Payload; /**< \brief Telemetry payload */ -} CFE_ES_HousekeepingTlm_t; - -#endif /* CFE_ES_MSG_H */ +#endif diff --git a/modules/es/config/default_cfe_es_interface_cfg.h b/modules/es/config/default_cfe_es_interface_cfg.h new file mode 100644 index 000000000..04f833187 --- /dev/null +++ b/modules/es/config/default_cfe_es_interface_cfg.h @@ -0,0 +1,151 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Executive Services (CFE_ES) Application Public Definitions + * + * This provides default values for configurable items that affect + * the interface(s) of this module. This includes the CMD/TLM message + * interface, tables definitions, and any other data products that + * serve to exchange information with other entities. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_ES_INTERFACE_CFG_H +#define CFE_ES_INTERFACE_CFG_H + +/** +** \cfeescfg Mission Max Apps in a message +** +** \par Description: +** Indicates the maximum number of apps in a telemetry housekeeping message +** +** This affects the layout of command/telemetry messages but does not affect run +** time behavior or internal allocation. +** +** \par Limits +** All CPUs within the same SB domain (mission) must share the same definition +** Note this affects the size of messages, so it must not cause any message +** to exceed the max length. +*/ +#define CFE_MISSION_ES_MAX_APPLICATIONS 16 + +/** +** \cfeescfg Define Max Number of Performance IDs for messages +** +** \par Description: +** Defines the maximum number of perf ids allowed in command/telemetry messages +** +** This affects the layout of command/telemetry messages but does not affect run +** time behavior or internal allocation. +** +** \par Limits +** All CPUs within the same SB domain (mission) must share the same definition +** Note this affects the size of messages, so it must not cause any message +** to exceed the max length. +** +*/ +#define CFE_MISSION_ES_PERF_MAX_IDS 128 + +/** \cfeescfg Maximum number of block sizes in pool structures +** +** \par Description: +** The upper limit for the number of block sizes supported in the generic +** pool implementation, which in turn implements the memory pools and CDS. +** This definition is used as the array size with the pool stats structure, +** and therefore should be consistent across all CPUs in a mission, as well +** as with the ground station. +** +** There is also a platform-specific limit which may be fewer than this +** value. +** +** \par Limits: +** Must be at least one. No specific upper limit, but the number is +** anticipated to be reasonably small (i.e. tens, not hundreds). Large +** values have not been tested. +** +** +*/ +#define CFE_MISSION_ES_POOL_MAX_BUCKETS 17 + +/** +** \cfeescfg Maximum Length of CDS Name +** +** \par Description: +** Indicates the maximum length (in characters) of the CDS name ('CDSName') +** portion of a Full CDS Name of the following form: +** "ApplicationName.CDSName" +** +** This length does not need to include an extra character for NULL termination. +** +** \par Limits +** This value should be kept as a multiple of 4, to maintain alignment of +** any possible neighboring fields without implicit padding. +** +*/ +#define CFE_MISSION_ES_CDS_MAX_NAME_LENGTH 16 + +/** +** \cfeescfg Mission Default CRC algorithm +** +** \par Description: +** Indicates the which CRC algorithm should be used as the default +** for verifying the contents of Critical Data Stores and when calculating +** Table Image data integrity values. +** +** \par Limits +** Currently only CFE_ES_CrcType_CRC_16 is supported (see brief in CFE_ES_CrcType_Enum +** definition in cfe_es_api_typedefs.h) +*/ +#define CFE_MISSION_ES_DEFAULT_CRC CFE_ES_CrcType_CRC_16 + +/** +** \cfeescfg Maximum Length of Full CDS Name in messages +** +** \par Description: +** Indicates the maximum length (in characters) of the entire CDS name +** of the following form: "ApplicationName.CDSName" +** +** This affects the layout of command/telemetry messages but does not affect run +** time behavior or internal allocation. +** +** \par Limits +** All CPUs within the same SB domain (mission) must share the same definition +** Note this affects the size of messages, so it must not cause any message +** to exceed the max length. +** +** This value should be kept as a multiple of 4, to maintain alignment of +** any possible neighboring fields without implicit padding. +*/ +#define CFE_MISSION_ES_CDS_MAX_FULL_NAME_LEN (CFE_MISSION_ES_CDS_MAX_NAME_LENGTH + CFE_MISSION_MAX_API_LEN + 4) + +#ifndef CFE_OMIT_DEPRECATED_6_8 +/* These names have been converted to an enum in cfe_es_api_typedefs.h */ + +/** \name Checksum/CRC algorithm identifiers */ + +#define CFE_MISSION_ES_CRC_8 CFE_ES_CrcType_CRC_8 /* 1 */ +#define CFE_MISSION_ES_CRC_16 CFE_ES_CrcType_CRC_16 /* 2 */ +#define CFE_MISSION_ES_CRC_32 CFE_ES_CrcType_CRC_32 /* 3 */ + +#endif + +#endif diff --git a/modules/es/config/default_cfe_es_internal_cfg.h b/modules/es/config/default_cfe_es_internal_cfg.h new file mode 100644 index 000000000..3eaf81527 --- /dev/null +++ b/modules/es/config/default_cfe_es_internal_cfg.h @@ -0,0 +1,839 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Executive Services (CFE_ES) Application Private Config Definitions + * + * This provides default values for configurable items that are internal + * to this module and do NOT affect the interface(s) of this module. Changes + * to items in this file only affect the local module and will be transparent + * to external entities that are using the public interface(s). + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_ES_INTERNAL_CFG_H +#define CFE_ES_INTERNAL_CFG_H + +/** +** \cfeescfg Define ES Task Priority +** +** \par Description: +** Defines the cFE_ES Task priority. +** +** \par Limits +** Not Applicable +*/ +#define CFE_PLATFORM_ES_START_TASK_PRIORITY 68 + +/** +** \cfeescfg Define ES Task Stack Size +** +** \par Description: +** Defines the cFE_ES Task Stack Size +** +** \par Limits +** There is a lower limit of 2048 on this configuration parameter. There +** are no restrictions on the upper limit however, the maximum stack size +** is system dependent and should be verified. Most operating systems provide +** tools for measuring the amount of stack used by a task during operation. It +** is always a good idea to verify that no more than 1/2 of the stack is used. +*/ +#define CFE_PLATFORM_ES_START_TASK_STACK_SIZE CFE_PLATFORM_ES_DEFAULT_STACK_SIZE + +/** +** \cfeescfg Default virtual path for persistent storage +** +** \par Description: +** This configures the default location in the virtual file system +** for persistent/non-volatile storage. Files such as the startup +** script, app/library dynamic modules, and configuration tables are +** expected to be stored in this directory. +** +*/ +#define CFE_PLATFORM_ES_NONVOL_DISK_MOUNT_STRING "/cf" + +/** +** \cfeescfg Default virtual path for volatile storage +** +** \par Description: +** The #CFE_PLATFORM_ES_RAM_DISK_MOUNT_STRING parameter is used to set the cFE mount path +** for the CFE RAM disk. This is a parameter for missions that do not want to +** use the default value of "/ram", or for missions that need to have a different +** value for different CPUs or Spacecraft. +** Note that the vxWorks OSAL cannot currently handle names that have more than one +** path separator in it. The names "/ram", "/ramdisk", "/disk123" will all work, but +** "/disks/ram" will not. +** Multiple separators can be used with the posix or RTEMS ports. +** +*/ +#define CFE_PLATFORM_ES_RAM_DISK_MOUNT_STRING "/ram" + +/** +** \cfeescfg Define Max Number of Applications +** +** \par Description: +** Defines the maximum number of applications that can be loaded into the +** system. This number does not include child tasks. +** +** \par Limits +** There is a lower limit of 6. The lower limit corresponds to the cFE internal +** applications. There are no restrictions on the upper limit however, the +** maximum number of applications is system dependent and should be verified. +** AppIDs that are checked against this configuration are defined by a 32 bit +** data word. +*/ +#define CFE_PLATFORM_ES_MAX_APPLICATIONS 32 + +/** +** \cfeescfg Define Max Number of Shared libraries +** +** \par Description: +** Defines the maximum number of cFE Shared libraries that can be loaded into +** the system. +** +** \par Limits +** There is a lower limit of 1. There are no restrictions on the upper limit +** however, the maximum number of libraries is system dependent and should be +** verified. +*/ +#define CFE_PLATFORM_ES_MAX_LIBRARIES 10 + +/** +** \cfeescfg Define Max Number of ER (Exception and Reset) log entries +** +** \par Description: +** Defines the maximum number of ER (Exception and Reset) log entries +** +** \par Limits +** There is a lower limit of 1. There are no restrictions on the upper limit +** however, the maximum number of log entries is system dependent and should be +** verified. +*/ +#define CFE_PLATFORM_ES_ER_LOG_ENTRIES 20 + +/** \cfeescfg Maximum size of CPU Context in ES Error Log +** +** \par Description: +** This should be large enough to accommodate the CPU context +** information supplied by the PSP on the given platform. +** +** \par Limits: +** Must be greater than zero and a multiple of sizeof(uint32). +** Limited only by the available memory and the number of entries +** in the error log. Any context information beyond this size will +** be truncated. +*/ +#define CFE_PLATFORM_ES_ER_LOG_MAX_CONTEXT_SIZE 256 + +/** +** \cfeescfg Define Size of the cFE System Log. +** +** \par Description: +** Defines the size in bytes of the cFE system log. The system log holds +** variable length strings that are terminated by a linefeed and null +** character. +** +** \par Limits +** There is a lower limit of 512. There are no restrictions on the upper limit +** however, the maximum system log size is system dependent and should be +** verified. +*/ +#define CFE_PLATFORM_ES_SYSTEM_LOG_SIZE 3072 + +/** +** \cfeescfg Define Number of entries in the ES Object table +** +** \par Description: +** Defines the number of entries in the ES Object table. This table controls +** the core cFE startup. +** +** \par Limits +** There is a lower limit of 15. There are no restrictions on the upper limit +** however, the maximum object table size is system dependent and should be +** verified. +*/ +#define CFE_PLATFORM_ES_OBJECT_TABLE_SIZE 30 + +/** +** \cfeescfg Define Max Number of Generic Counters +** +** \par Description: +** Defines the maximum number of Generic Counters that can be registered. +** +** \par Limits +** This parameter has a lower limit of 1 and an upper limit of 65535. +*/ +#define CFE_PLATFORM_ES_MAX_GEN_COUNTERS 8 + +/** +** \cfeescfg Define ES Application Control Scan Rate +** +** \par Description: +** ES Application Control Scan Rate. This parameter controls the speed that ES +** scans the Application Table looking for App Delete/Restart/Reload requests. +** All Applications are deleted, restarted, or reloaded by the ES Application. +** ES will periodically scan for control requests to process. The scan rate is +** controlled by this parameter, which is given in milliseconds. A value of +** 1000 means that ES will scan the Application Table once per second. Be +** careful not to set the value of this too low, because ES will use more CPU +** cycles scanning the table. +** +** \par Limits +** There is a lower limit of 100 and an upper limit of 20000 on this +** configuration parameter. millisecond units. +*/ +#define CFE_PLATFORM_ES_APP_SCAN_RATE 1000 + +/** +** \cfeescfg Define ES Application Kill Timeout +** +** \par Description: +** ES Application Kill Timeout. This parameter controls the number of +** "scan periods" that ES will wait for an application to Exit after getting +** the signal Delete, Reload or Restart. The sequence works as follows: +** -# ES will set the control request for an App to Delete/Restart/Reload and +** set this kill timer to the value in this parameter. +** -# If the App is responding and Calls it's RunLoop function, it will drop out +** of it's main loop and call CFE_ES_ExitApp. Once it calls Exit App, then +** ES can delete, restart, or reload the app the next time it scans the app +** table. +** -# If the App is not responding, the ES App will decrement this Kill Timeout +** value each time it runs. If the timeout value reaches zero, ES will kill +** the app. +** +** The Kill timeout value depends on the #CFE_PLATFORM_ES_APP_SCAN_RATE. If the Scan Rate +** is 1000, or 1 second, and this #CFE_PLATFORM_ES_APP_KILL_TIMEOUT is set to 5, then it +** will take 5 seconds to kill a non-responding App. +** If the Scan Rate is 250, or 1/4 second, and the #CFE_PLATFORM_ES_APP_KILL_TIMEOUT is +** set to 2, then it will take 1/2 second to time out. +** +** \par Limits +** There is a lower limit of 1 and an upper limit of 100 on this configuration +** parameter. Units are number of #CFE_PLATFORM_ES_APP_SCAN_RATE cycles. +*/ +#define CFE_PLATFORM_ES_APP_KILL_TIMEOUT 5 + +/** +** \cfeescfg ES Ram Disk Sector Size +** +** \par Description: +** Defines the ram disk sector size. The ram disk is 1 of 4 memory areas that +** are preserved on a processor reset. +** NOTE: Changing this value changes memory allocation, and may +** require changes to platform specific values (in CFE_PSP) such as +** USER_RESERVED_MEM in VxWorks depending on the memory areas +** being used for preserved data and on OS specific behavior. +** +** \par Limits +** There is a lower limit of 128. There are no restrictions on the upper limit +** however, the maximum RAM disk sector size is system dependent and should be +** verified. +*/ +#define CFE_PLATFORM_ES_RAM_DISK_SECTOR_SIZE 512 + +/** +** \cfeescfg ES Ram Disk Number of Sectors +** +** \par Description: +** Defines the ram disk number of sectors. The ram disk is one of four memory +** areas that are preserved on a processor reset. +** NOTE: Changing this value changes memory allocation, and may +** require changes to platform specific values (in CFE_PSP) such as +** USER_RESERVED_MEM in VxWorks depending on the memory areas +** being used for preserved data and on OS specific behavior. +** +** \par Limits +** There is a lower limit of 128. There are no restrictions on the upper limit +** however, the maximum number of RAM sectors is system dependent and should be +** verified. +*/ +#define CFE_PLATFORM_ES_RAM_DISK_NUM_SECTORS 4096 + +/** +** \cfeescfg Percentage of Ram Disk Reserved for Decompressing Apps +** +** \par Description: +** The #CFE_PLATFORM_ES_RAM_DISK_PERCENT_RESERVED parameter is used to make sure that the +** Volatile ( RAM ) Disk has a defined amount of free space during a processor +** reset. The cFE uses the Volatile disk to decompress cFE applications during +** system startup. If this Volatile disk happens to get filled with logs and +** misc files, then a processor reset may not work, because there will be no +** room to decompress cFE apps. To solve that problem, this parameter sets the +** "Low Water Mark" for disk space on a Processor reset. It should be set to +** allow the largest cFE Application to be decompressed. +** During a Processor reset, if there is not sufficient space left on the disk, +** it will be re-formatted in order to clear up some space. +** +** This feature can be turned OFF by setting the parameter to 0. +** +** \par Limits +** There is a lower limit of 0 and an upper limit of 75 on this configuration +** parameter.Units are percentage. A setting of zero will turn this feature +** off. +*/ +#define CFE_PLATFORM_ES_RAM_DISK_PERCENT_RESERVED 30 + +/** +** \cfeescfg Define Critical Data Store Size +** +** \par Description: +** Defines the Critical Data Store (CDS) area size in bytes size. The CDS is +** one of four memory areas that are preserved during a processor reset. +** NOTE: Changing this value changes memory allocation, and may +** require changes to platform specific values (in CFE_PSP) such as +** USER_RESERVED_MEM in VxWorks depending on the memory areas +** being used for preserved data and on OS specific behavior. +** +** \par Limits +** There is a lower limit of 8192 and an upper limit of UINT_MAX (4 Gigabytes) +** on this configuration parameter. +*/ +#define CFE_PLATFORM_ES_CDS_SIZE (128 * 1024) + +/** +** \cfeescfg Define User Reserved Memory Size +** +** \par Description: +** User Reserved Memory Size. This is the size in bytes of the cFE User +** reserved Memory area. This is a block of memory that is available for cFE +** application use. The address is obtained by calling +** #CFE_PSP_GetUserReservedArea. The User Reserved Memory is one of four memory +** areas that are preserved during a processor reset. +** NOTE: Changing this value changes memory allocation, and may +** require changes to platform specific values (in CFE_PSP) such as +** USER_RESERVED_MEM in VxWorks depending on the memory areas +** being used for preserved data and on OS specific behavior. +** +** \par Limits +** There is a lower limit of 1024 and an upper limit of UINT_MAX (4 Gigabytes) +** on this configuration parameter. +*/ +#define CFE_PLATFORM_ES_USER_RESERVED_SIZE (1024 * 1024) + +/** +** \cfeescfg Define ES Reset Area Size +** +** \par Description: +** The ES Reset Area Size. This is the size in bytes of the cFE Reset variable +** and log area. This is a block of memory used by the cFE to store the system +** log ER Log and critical reset variables. This is 4 of 4 of the memory areas +** that are preserved during a processor reset. +** Note: This area must be sized large enough to hold all of the data +** structures. It should be automatically sized based on the CFE_ES_ResetData_t +** type, but circular dependencies in the headers prevent it from being defined +** this way. +** NOTE: Changing this value changes memory allocation, and may +** require changes to platform specific values (in CFE_PSP) such as +** USER_RESERVED_MEM in VxWorks depending on the memory areas +** being used for preserved data and on OS specific behavior. +** +** \par Limits +** There is a lower limit of 153600 (150KBytes) and an upper limit of UINT_MAX +** (4 Gigabytes) on this configuration parameter. +*/ +#define CFE_PLATFORM_ES_RESET_AREA_SIZE (170 * 1024) + +/** +** \cfeescfg Define Memory Pool Alignment Size +** +** \par Description: +** Ensures that buffers obtained from a memory pool are aligned +** to a certain minimum block size. Note the allocator will always +** align to the minimum required by the CPU architecture. This may +** be set greater than the CPU requirement as desired for optimal +** performance. +** +** For some architectures/applications it may be beneficial to set this +** to the cache line size of the target CPU, or to use special SIMD +** instructions that require a more stringent memory alignment. +** +** \par Limits +** This must always be a power of 2, as it is used as a binary address mask. +*/ +#define CFE_PLATFORM_ES_MEMPOOL_ALIGN_SIZE_MIN 4 + +/** +** \cfeescfg ES Nonvolatile Startup Filename +** +** \par Description: +** The value of this constant defines the path and name of the file that +** contains a list of modules that will be loaded and started by the cFE after +** the cFE finishes its startup sequence. +** +** \par Limits +** The length of each string, including the NULL terminator cannot exceed the +** #OS_MAX_PATH_LEN value. +*/ +#define CFE_PLATFORM_ES_NONVOL_STARTUP_FILE "/cf/cfe_es_startup.scr" + +/** +** \cfeescfg ES Volatile Startup Filename +** +** \par Description: +** The value of this constant defines the path and name of the file that +** contains a list of modules that will be loaded and started by the cFE after +** the cFE finishes its startup sequence. +** +** \par Limits +** The length of each string, including the NULL terminator cannot exceed the +** #OS_MAX_PATH_LEN value. +*/ +#define CFE_PLATFORM_ES_VOLATILE_STARTUP_FILE "/ram/cfe_es_startup.scr" + +/** +** \cfeescfg Default Application Information Filename +** +** \par Description: +** The value of this constant defines the filename used to store information +** pertaining to all of the Applications that are registered with Executive +** Services. This filename is used only when no filename is specified in the +** the command to query all system apps. +** +** \par Limits +** The length of each string, including the NULL terminator cannot exceed the +** #OS_MAX_PATH_LEN value. +*/ +#define CFE_PLATFORM_ES_DEFAULT_APP_LOG_FILE "/ram/cfe_es_app_info.log" + +/** +** \cfeescfg Default Application Information Filename +** +** \par Description: +** The value of this constant defines the filename used to store information +** pertaining to all of the Applications that are registered with Executive +** Services. This filename is used only when no filename is specified in the +** the command to query all system tasks. +** +** \par Limits +** The length of each string, including the NULL terminator cannot exceed the +** #OS_MAX_PATH_LEN value. +*/ +#define CFE_PLATFORM_ES_DEFAULT_TASK_LOG_FILE "/ram/cfe_es_taskinfo.log" + +/** +** \cfeescfg Default System Log Filename +** +** \par Description: +** The value of this constant defines the filename used to store important +** information (as ASCII text strings) that might not be able to be sent in an +** Event Message. This filename is used only when no filename is specified in +** the command to dump the system log. No file specified in the cmd means the +** first character in the cmd filename is a NULL terminator (zero). +** +** \par Limits +** The length of each string, including the NULL terminator cannot exceed the +** #OS_MAX_PATH_LEN value. +*/ +#define CFE_PLATFORM_ES_DEFAULT_SYSLOG_FILE "/ram/cfe_es_syslog.log" + +/** +** \cfeescfg Default Exception and Reset (ER) Log Filename +** +** \par Description: +** The value of this constant defines the filename used to store the +** Exception and Reset (ER) Log. This filename is used only when no filename is +** specified in the command to dump the ER log. No file specified in the cmd +** means the first character in the cmd filename is a NULL terminator (zero). +** +** \par Limits +** The length of each string, including the NULL terminator cannot exceed the +** #OS_MAX_PATH_LEN value. +*/ +#define CFE_PLATFORM_ES_DEFAULT_ER_LOG_FILE "/ram/cfe_erlog.log" + +/** +** \cfeescfg Default Performance Data Filename +** +** \par Description: +** The value of this constant defines the filename used to store the +** Performance Data. This filename is used only when no filename is specified +** in the command to stop performance data collecting. +** +** \par Limits +** The length of each string, including the NULL terminator cannot exceed the +** #OS_MAX_PATH_LEN value. +*/ +#define CFE_PLATFORM_ES_DEFAULT_PERF_DUMP_FILENAME "/ram/cfe_es_perf.dat" + +/** +** \cfeescfg Default Critical Data Store Registry Filename +** +** \par Description: +** The value of this constant defines the filename used to store the +** Critical Data Store Registry. This filename is used only when no filename is +** specified in the command to stop performance data collecting. +** +** \par Limits +** The length of each string, including the NULL terminator cannot exceed the +** #OS_MAX_PATH_LEN value. +*/ +#define CFE_PLATFORM_ES_DEFAULT_CDS_REG_DUMP_FILE "/ram/cfe_cds_reg.log" + +/** +** \cfeescfg Define Default System Log Mode following Power On Reset +** +** \par Description: +** Defines the default mode for the operation of the ES System log following a power +** on reset. The log may operate in either Overwrite mode = 0, where once the +** log becomes full the oldest message in the log will be overwritten, or +** Discard mode = 1, where once the log becomes full the contents of the log are +** preserved and the new event is discarded. This constant may hold a value of +** either 0 or 1 depending on the desired default. +** Overwrite Mode = 0, Discard Mode = 1. +** +** \par Limits +** There is a lower limit of 0 and an upper limit of 1 on this configuration +** parameter. +*/ +#define CFE_PLATFORM_ES_DEFAULT_POR_SYSLOG_MODE 0 + +/** +** \cfeescfg Define Default System Log Mode following Processor Reset +** +** \par Description: +** Defines the default mode for the operation of the ES System log following a +** processor reset. The log may operate in either Overwrite mode = 0, where once +** the log becomes full the oldest message in the log will be overwritten, or +** Discard mode = 1, where once the log becomes full the contents of the log are +** preserved and the new event is discarded. This constant may hold a value of +** either 0 or 1 depending on the desired default. +** Overwrite Mode = 0, Discard Mode = 1. +** +** \par Limits +** There is a lower limit of 0 and an upper limit of 1 on this configuration +** parameter. +*/ +#define CFE_PLATFORM_ES_DEFAULT_PR_SYSLOG_MODE 1 + +/** +** \cfeescfg Define Max Size of Performance Data Buffer +** +** \par Description: +** Defines the maximum size of the performance data buffer. Units are number of +** performance data entries. An entry is defined by a 32 bit data word followed +** by a 64 bit time stamp. +** +** \par Limits +** There is a lower limit of 1025. There are no restrictions on the upper limit +** however, the maximum buffer size is system dependent and should be verified. +** The units are number of entries. An entry is defined by a 32 bit data word followed +** by a 64 bit time stamp. +*/ +#define CFE_PLATFORM_ES_PERF_DATA_BUFFER_SIZE 10000 + +/** +** \cfeescfg Define Filter Mask Setting for Disabling All Performance Entries +** +** \par Description: +** Defines the filter mask for disabling all performance entries. The value is a +** bit mask. For each bit, 0 means the corresponding entry is disabled and +** 1 means it is enabled. +*/ +#define CFE_PLATFORM_ES_PERF_FILTMASK_NONE 0 + +/** +** \cfeescfg Define Filter Mask Setting for Enabling All Performance Entries +** +** \par Description: +** Defines the filter mask for enabling all performance entries. The value is a +** bit mask. For each bit, 0 means the corresponding entry is disabled and +** 1 means it is enabled. +*/ +#define CFE_PLATFORM_ES_PERF_FILTMASK_ALL ~CFE_PLATFORM_ES_PERF_FILTMASK_NONE + +/** +** \cfeescfg Define Default Filter Mask Setting for Performance Data Buffer +** +** \par Description: +** Defines the default filter mask for the performance data buffer. The value is a +** bit mask. For each bit, 0 means the corresponding entry is disabled and 1 +** means it is enabled. +** +*/ +#define CFE_PLATFORM_ES_PERF_FILTMASK_INIT CFE_PLATFORM_ES_PERF_FILTMASK_ALL + +/** +** \cfeescfg Define Default Filter Trigger Setting for Disabling All Performance Entries +** +** \par Description: +** Defines the default trigger mask for disabling all performance data entries. The value +** is a bit mask. For each bit, 0 means the trigger for the corresponding entry is +** disabled and 1 means it is enabled. +** +*/ +#define CFE_PLATFORM_ES_PERF_TRIGMASK_NONE 0 + +/** +** \cfeescfg Define Filter Trigger Setting for Enabling All Performance Entries +** +** \par Description: +** Defines the trigger mask for enabling all performance data entries. The value is +** a bit mask. For each bit, 0 means the trigger for the corresponding entry is +** disabled and 1 means it is enabled. +** +*/ +#define CFE_PLATFORM_ES_PERF_TRIGMASK_ALL ~CFE_PLATFORM_ES_PERF_TRIGMASK_NONE + +/** +** \cfeescfg Define Default Filter Trigger Setting for Performance Data Buffer +** +** \par Description: +** Defines the default trigger mask for the performance data buffer. The value is a +** 32-bit mask. For each bit, 0 means the trigger for the corresponding entry is +** disabled and 1 means it is enabled. +** +*/ +#define CFE_PLATFORM_ES_PERF_TRIGMASK_INIT CFE_PLATFORM_ES_PERF_TRIGMASK_NONE + +/** +** \cfeescfg Define Performance Analyzer Child Task Priority +** +** \par Description: +** This parameter defines the priority of the child task spawned by the +** Executive Services to write performance data to a file. Lower numbers +** are higher priority, with 1 being the highest priority in the case of a +** child task. +** +** \par Limits +** Valid range for a child task is 1 to 255 however, the priority cannot +** be higher (lower number) than the ES parent application priority. +*/ +#define CFE_PLATFORM_ES_PERF_CHILD_PRIORITY 200 + +/** +** \cfeescfg Define Performance Analyzer Child Task Stack Size +** +** \par Description: +** This parameter defines the stack size of the child task spawned by the +** Executive Services to write performance data to a file. +** +** \par Limits +** It is recommended this parameter be greater than or equal to 4KB. This parameter +** is limited by the maximum value allowed by the data type. In this case, the data +** type is an unsigned 32-bit integer, so the valid range is 0 to 0xFFFFFFFF. +*/ +#define CFE_PLATFORM_ES_PERF_CHILD_STACK_SIZE 4096 + +/** +** \cfeescfg Define Performance Analyzer Child Task Delay +** +** \par Description: +** This parameter defines the delay time (in milliseconds) between performance +** data file writes performed by the Executive Services Performance Analyzer +** Child Task. +** +** \par Limits +** It is recommended this parameter be greater than or equal to 20ms. This parameter +** is limited by the maximum value allowed by the data type. In this case, the data +** type is an unsigned 32-bit integer, so the valid range is 0 to 0xFFFFFFFF. +*/ +#define CFE_PLATFORM_ES_PERF_CHILD_MS_DELAY 20 + +/** +** \cfeescfg Define Performance Analyzer Child Task Number of Entries Between Delay +** +** \par Description: +** This parameter defines the number of performance analyzer entries the Performance +** Analyzer Child Task will write to the file between delays. +** +*/ +#define CFE_PLATFORM_ES_PERF_ENTRIES_BTWN_DLYS 50 + +/** +** \cfeescfg Define Default Stack Size for an Application +** +** \par Description: +** This parameter defines a default stack size. This parameter is used by the +** cFE Core Applications. +** +** \par Limits +** There is a lower limit of 2048. There are no restrictions on the upper limit +** however, the maximum stack size is system dependent and should be verified. +** Most operating systems provide tools for measuring the amount of stack used by a +** task during operation. It is always a good idea to verify that no more than 1/2 +** of the stack is used. +*/ +#define CFE_PLATFORM_ES_DEFAULT_STACK_SIZE 8192 + +/** +** \cfeescfg Define Maximum Number of Registered CDS Blocks +** +** \par Description: +** Maximum number of registered CDS Blocks +** +** \par Limits +** There is a lower limit of 8. There are no restrictions on the upper limit +** however, the maximum number of CDS entries is system dependent and +** should be verified. +*/ +#define CFE_PLATFORM_ES_CDS_MAX_NUM_ENTRIES 512 + +/** +** \cfeescfg Define Number of Processor Resets Before a Power On Reset +** +** \par Description: +** Number of Processor Resets before a Power On Reset is called. If set to 2, +** then 2 processor resets will occur, and the 3rd processor reset will be a +** power on reset instead. +** +** \par Limits +** There is a lower limit of 0. There are no restrictions on the upper limit +** however, the maximum number of processor resets may be system dependent and +** should be verified. +*/ +#define CFE_PLATFORM_ES_MAX_PROCESSOR_RESETS 2 + +/** \cfeescfg Maximum number of block sizes in pool structures +** +** \par Description: +** The upper limit for the number of block sizes supported in the generic +** pool implementation, which in turn implements the memory pools and CDS. +** +** \par Limits: +** Must be at least one. No specific upper limit, but the number is +** anticipated to be reasonably small (i.e. tens, not hundreds). Large +** values have not been tested. +** +** The ES and CDS block size lists must correlate with this value +*/ +#define CFE_PLATFORM_ES_POOL_MAX_BUCKETS 17 + +/** \cfeescfg Maximum number of memory pools +** +** \par Description: +** The upper limit for the number of memory pools that can concurrently +** exist within the system. +** +** The CFE_SB and CFE_TBL core subsystems each define a memory pool. +** +** Individual applications may also create memory pools, so this value +** should be set sufficiently high enough to support the applications +** being used on this platform. +** +** \par Limits: +** Must be at least 2 to support CFE core - SB and TBL pools. No +** specific upper limit. +*/ +#define CFE_PLATFORM_ES_MAX_MEMORY_POOLS 10 + +/** +** \cfeescfg Define Default ES Memory Pool Block Sizes +** +** \par Description: +** Default Intermediate ES Memory Pool Block Sizes. If an application +** is using the CFE_ES Memory Pool APIs (#CFE_ES_PoolCreate, #CFE_ES_PoolCreateNoSem, +** #CFE_ES_GetPoolBuf and #CFE_ES_PutPoolBuf) but finds these sizes +** inappropriate for their use, they may wish to use the #CFE_ES_PoolCreateEx +** API to specify their own intermediate block sizes +** +** \par Limits +** These sizes MUST be increasing and MUST be an integral multiple of 4. Also, +** CFE_PLATFORM_ES_MAX_BLOCK_SIZE must be larger than CFE_MISSION_SB_MAX_SB_MSG_SIZE and both +** CFE_PLATFORM_TBL_MAX_SNGL_TABLE_SIZE and CFE_PLATFORM_TBL_MAX_DBL_TABLE_SIZE. Note that if Table +** Services have been removed from the CFE, the table size limits are still +** enforced although the table size definitions may be reduced. +*/ +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_01 8 +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_02 16 +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_03 32 +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_04 48 +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_05 64 +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_06 96 +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_07 128 +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_08 160 +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_09 256 +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_10 512 +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_11 1024 +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_12 2048 +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_13 4096 +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_14 8192 +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_15 16384 +#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_16 32768 +#define CFE_PLATFORM_ES_MAX_BLOCK_SIZE 80000 + +/** +** \cfeescfg Define ES Critical Data Store Memory Pool Block Sizes +** +** \par Description: +** Intermediate ES Critical Data Store Memory Pool Block Sizes +** +** \par Limits +** These sizes MUST be increasing and MUST be an integral multiple of 4. +*/ +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_01 8 +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_02 16 +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_03 32 +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_04 48 +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_05 64 +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_06 96 +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_07 128 +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_08 160 +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_09 256 +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_10 512 +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_11 1024 +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_12 2048 +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_13 4096 +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_14 8192 +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_15 16384 +#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_16 32768 +#define CFE_PLATFORM_ES_CDS_MAX_BLOCK_SIZE 80000 + +/** \cfeescfg Poll timer for startup sync delay +** +** \par Description: +** During startup, some tasks may need to synchronize their own initialization +** with the initialization of other applications in the system. +** +** CFE ES implements an API to accomplish this, that performs a task delay (sleep) +** while polling the overall system state until other tasks are ready. +** +** This value controls the amount of time that the CFE_ES_ApplicationSyncDelay +** will sleep between each check of the system state. This should be large enough +** to allow other tasks to run, but not so large as to noticeably delay the startup +** completion. +** +** Units are in milliseconds +** +** \par Limits: +** Must be defined as an integer value that is greater than +** or equal to zero. +*/ +#define CFE_PLATFORM_ES_STARTUP_SYNC_POLL_MSEC 50 + +/** \cfeescfg Startup script timeout +** +** \par Description: +** The upper limit for the total amount of time that all apps listed in the CFE ES startup +** script may take to all become ready. +** +** Unlike the "core" app timeout, this is a soft limit; if the allotted time is exceeded, +** it probably indicates an issue with one of the apps, but does not cause CFE ES to take +** any additional action other than logging the event to the syslog. +** +** Units are in milliseconds +** +** \par Limits: +** Must be defined as an integer value that is greater than +** or equal to zero. +*/ +#define CFE_PLATFORM_ES_STARTUP_SCRIPT_TIMEOUT_MSEC 1000 + +#endif diff --git a/modules/es/config/default_cfe_es_mission_cfg.h b/modules/es/config/default_cfe_es_mission_cfg.h new file mode 100644 index 000000000..4324f4648 --- /dev/null +++ b/modules/es/config/default_cfe_es_mission_cfg.h @@ -0,0 +1,36 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Executive Services (CFE_ES) Application Mission Configuration Header File + * + * This is a compatibility header for the "mission_cfg.h" file that has + * traditionally provided public config definitions for each CFS app. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_ES_MISSION_CFG_H +#define CFE_ES_MISSION_CFG_H + +#include "cfe_es_interface_cfg.h" + +#endif diff --git a/modules/es/config/default_cfe_es_msg.h b/modules/es/config/default_cfe_es_msg.h new file mode 100644 index 000000000..15487dc6c --- /dev/null +++ b/modules/es/config/default_cfe_es_msg.h @@ -0,0 +1,38 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * Specification for the CFE Executive Services (CFE_ES) command and telemetry + * message data types. + * + * This is a compatibility header for the "cfe_es_msg.h" file that has + * traditionally provided the message definitions for cFS apps. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_ES_MSG_H +#define CFE_ES_MSG_H + +#include "cfe_mission_cfg.h" +#include "cfe_es_msgdefs.h" +#include "cfe_es_msgstruct.h" + +#endif diff --git a/modules/es/config/default_cfe_es_msgdefs.h b/modules/es/config/default_cfe_es_msgdefs.h new file mode 100644 index 000000000..df665719c --- /dev/null +++ b/modules/es/config/default_cfe_es_msgdefs.h @@ -0,0 +1,31 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * Specification for the CFE Executive Services (CFE_ES) command and telemetry + * message constant definitions. + * + * For CFE_ES this is only the function/command code definitions + */ +#ifndef CFE_ES_MSGDEFS_H +#define CFE_ES_MSGDEFS_H + +#include "cfe_es_fcncodes.h" + +#endif diff --git a/modules/es/config/default_cfe_es_msgids.h b/modules/es/config/default_cfe_es_msgids.h new file mode 100644 index 000000000..9ee2bb252 --- /dev/null +++ b/modules/es/config/default_cfe_es_msgids.h @@ -0,0 +1,42 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Executive Services (CFE_ES) Application Message IDs + */ +#ifndef CFE_ES_MSGIDS_H +#define CFE_ES_MSGIDS_H + +#include "cfe_core_api_base_msgids.h" +#include "cfe_es_topicids.h" + +/* +** cFE ES Command Message Id's +*/ +#define CFE_ES_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_ES_CMD_MSG /* 0x1806 */ +#define CFE_ES_SEND_HK_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_ES_SEND_HK_MSG /* 0x1808 */ + +/* +** CFE ES Telemetry Message Id's +*/ +#define CFE_ES_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_ES_HK_TLM_MSG /* 0x0800 */ +#define CFE_ES_APP_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_ES_APP_TLM_MSG /* 0x080B */ +#define CFE_ES_MEMSTATS_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_ES_MEMSTATS_TLM_MSG /* 0x0810 */ + +#endif diff --git a/modules/es/config/default_cfe_es_msgstruct.h b/modules/es/config/default_cfe_es_msgstruct.h new file mode 100644 index 000000000..e173ca496 --- /dev/null +++ b/modules/es/config/default_cfe_es_msgstruct.h @@ -0,0 +1,543 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * + * Purpose: + * cFE Executive Services (ES) Command and Telemetry packet definition file. + * + * References: + * Flight Software Branch C Coding Standard Version 1.0a + * cFE Flight Software Application Developers Guide + * + * Notes: + * + */ +#ifndef CFE_ES_MSGSTRUCT_H +#define CFE_ES_MSGSTRUCT_H + +/************************************************************************ + * Includes + ************************************************************************/ +#include "cfe_es_msgdefs.h" +#include "cfe_msg_hdr.h" +#include "cfe_mission_cfg.h" + +/********************************/ +/* Command Message Data Formats */ +/********************************/ +/** +** \brief Generic "no arguments" command +** +** This command structure is used for commands that do not have any parameters. +** This includes: +** -# The Housekeeping Request Message +** -# The No-Op Command (For details, see #CFE_ES_NOOP_CC) +** -# The Reset Counters Command (For details, see #CFE_ES_RESET_COUNTERS_CC) +*/ +typedef struct CFE_ES_NoArgsCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ +} CFE_ES_NoArgsCmd_t; + +/* + * The following commands all share the "NoArgs" format + * + * They are each given their own type name matching the command name, which + * allows them to change independently in the future without changing the prototype + * of the handler function. + */ +typedef CFE_ES_NoArgsCmd_t CFE_ES_NoopCmd_t; +typedef CFE_ES_NoArgsCmd_t CFE_ES_ResetCountersCmd_t; +typedef CFE_ES_NoArgsCmd_t CFE_ES_ClearSysLogCmd_t; +typedef CFE_ES_NoArgsCmd_t CFE_ES_ClearERLogCmd_t; +typedef CFE_ES_NoArgsCmd_t CFE_ES_ResetPRCountCmd_t; +typedef CFE_ES_NoArgsCmd_t CFE_ES_SendHkCmd_t; + +/** +** \brief Restart cFE Command Payload +** +** For command details, see #CFE_ES_RESTART_CC +** +**/ +typedef struct CFE_ES_RestartCmd_Payload +{ + uint16 RestartType; /**< \brief #CFE_PSP_RST_TYPE_PROCESSOR=Processor Reset + or #CFE_PSP_RST_TYPE_POWERON=Power-On Reset */ +} CFE_ES_RestartCmd_Payload_t; + +/** + * \brief Restart cFE Command + */ +typedef struct CFE_ES_RestartCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_ES_RestartCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_ES_RestartCmd_t; + +/** +** \brief Generic file name command payload +** +** This format is shared by several executive services commands. +** For command details, see #CFE_ES_QUERY_ALL_CC, #CFE_ES_QUERY_ALL_TASKS_CC, +** #CFE_ES_WRITE_SYSLOG_CC, and #CFE_ES_WRITE_ER_LOG_CC +** +**/ +typedef struct CFE_ES_FileNameCmd_Payload +{ + char FileName[CFE_MISSION_MAX_PATH_LEN]; /**< \brief ASCII text string containing full path and + filename of file in which Application data is to be dumped */ +} CFE_ES_FileNameCmd_Payload_t; + +/** + * \brief Generic file name command + */ +typedef struct CFE_ES_FileNameCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_ES_FileNameCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_ES_FileNameCmd_t; + +/* + * Unique typedefs for each of the commands that utilize the FileNameCmd + * packet format + */ +typedef CFE_ES_FileNameCmd_t CFE_ES_QueryAllCmd_t; +typedef CFE_ES_FileNameCmd_t CFE_ES_QueryAllTasksCmd_t; +typedef CFE_ES_FileNameCmd_t CFE_ES_WriteSysLogCmd_t; +typedef CFE_ES_FileNameCmd_t CFE_ES_WriteERLogCmd_t; + +/** +** \brief Overwrite/Discard System Log Configuration Command Payload +** +** For command details, see #CFE_ES_OVER_WRITE_SYSLOG_CC +** +**/ +typedef struct CFE_ES_OverWriteSysLogCmd_Payload +{ + uint32 Mode; /**< \brief #CFE_ES_LogMode_DISCARD=Throw away most recent messages, + #CFE_ES_LogMode_OVERWRITE=Overwrite oldest with most recent */ +} CFE_ES_OverWriteSysLogCmd_Payload_t; + +/** + * \brief Overwrite/Discard System Log Configuration Command Payload + */ +typedef struct CFE_ES_OverWriteSysLogCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_ES_OverWriteSysLogCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_ES_OverWriteSysLogCmd_t; + +/** +** \brief Start Application Command Payload +** +** For command details, see #CFE_ES_START_APP_CC +** +**/ +typedef struct CFE_ES_StartAppCmd_Payload +{ + char Application[CFE_MISSION_MAX_API_LEN]; /**< \brief Name of Application to be started */ + char AppEntryPoint[CFE_MISSION_MAX_API_LEN]; /**< \brief Symbolic name of Application's entry point */ + char AppFileName[CFE_MISSION_MAX_PATH_LEN]; /**< \brief Full path and filename of Application's + executable image */ + + CFE_ES_MemOffset_t StackSize; /**< \brief Desired stack size for the new application */ + + CFE_ES_ExceptionAction_Enum_t ExceptionAction; /**< \brief #CFE_ES_ExceptionAction_RESTART_APP=On exception, + restart Application, + #CFE_ES_ExceptionAction_PROC_RESTART=On exception, + perform a Processor Reset */ + CFE_ES_TaskPriority_Atom_t Priority; /**< \brief The new Applications runtime priority. */ +} CFE_ES_StartAppCmd_Payload_t; + +/** + * \brief Start Application Command + */ +typedef struct CFE_ES_StartApp +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_ES_StartAppCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_ES_StartAppCmd_t; + +/** +** \brief Generic application name command payload +** +** For command details, see #CFE_ES_STOP_APP_CC, #CFE_ES_RESTART_APP_CC, #CFE_ES_QUERY_ONE_CC +** +**/ +typedef struct CFE_ES_AppNameCmd_Payload +{ + char Application[CFE_MISSION_MAX_API_LEN]; /**< \brief ASCII text string containing Application or Library Name */ +} CFE_ES_AppNameCmd_Payload_t; + +/** + * \brief Generic application name command + */ +typedef struct CFE_ES_AppNameCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_ES_AppNameCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_ES_AppNameCmd_t; + +/* + * Like NoArgsCmd, this message definition is shared by multiple commands. + * Create a separate typedef for each one so they can all evolve independently + * without affecting the prototype. + */ +typedef CFE_ES_AppNameCmd_t CFE_ES_StopAppCmd_t; +typedef CFE_ES_AppNameCmd_t CFE_ES_RestartAppCmd_t; +typedef CFE_ES_AppNameCmd_t CFE_ES_QueryOneCmd_t; + +/** +** \brief Reload Application Command Payload +** +** For command details, see #CFE_ES_RELOAD_APP_CC +** +**/ +typedef struct CFE_ES_AppReloadCmd_Payload +{ + char Application[CFE_MISSION_MAX_API_LEN]; /**< \brief ASCII text string containing Application Name */ + char AppFileName[CFE_MISSION_MAX_PATH_LEN]; /**< \brief Full path and filename of Application's + executable image */ +} CFE_ES_AppReloadCmd_Payload_t; + +/** + * \brief Reload Application Command + */ +typedef struct CFE_ES_ReloadAppCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_ES_AppReloadCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_ES_ReloadAppCmd_t; + +/** +** \brief Set Maximum Processor Reset Count Command Payload +** +** For command details, see #CFE_ES_SET_MAX_PR_COUNT_CC +** +**/ +typedef struct CFE_ES_SetMaxPRCountCmd_Payload +{ + uint16 MaxPRCount; /**< \brief New maximum number of Processor Resets before + an automatic Power-On Reset is performed */ +} CFE_ES_SetMaxPRCountCmd_Payload_t; + +/** + * \brief Set Maximum Processor Reset Count Command + */ +typedef struct CFE_ES_SetMaxPRCountCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_ES_SetMaxPRCountCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_ES_SetMaxPRCountCmd_t; + +/** +** \brief Delete Critical Data Store Command Payload +** +** For command details, see #CFE_ES_DELETE_CDS_CC +** +**/ +typedef struct CFE_ES_DeleteCDSCmd_Payload +{ + char + CdsName[CFE_MISSION_ES_CDS_MAX_FULL_NAME_LEN]; /**< \brief ASCII text string containing name of CDS to delete */ +} CFE_ES_DeleteCDSCmd_Payload_t; + +/** + * \brief Delete Critical Data Store Command + */ +typedef struct CFE_ES_DeleteCDSCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_ES_DeleteCDSCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_ES_DeleteCDSCmd_t; + +/** +** \brief Start Performance Analyzer Command Payload +** +** For command details, see #CFE_ES_START_PERF_DATA_CC +** +**/ +typedef struct CFE_ES_StartPerfCmd_Payload +{ + uint32 TriggerMode; /**< \brief Desired trigger position (Start, Center, End) */ +} CFE_ES_StartPerfCmd_Payload_t; + +/** + * \brief Start Performance Analyzer Command + */ +typedef struct CFE_ES_StartPerfDataCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_ES_StartPerfCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_ES_StartPerfDataCmd_t; + +/** +** \brief Stop Performance Analyzer Command Payload +** +** For command details, see #CFE_ES_STOP_PERF_DATA_CC +** +**/ +typedef struct CFE_ES_StopPerfCmd_Payload +{ + char DataFileName[CFE_MISSION_MAX_PATH_LEN]; /**< \brief ASCII text string of full path and filename + of file Performance Analyzer data is to be written */ +} CFE_ES_StopPerfCmd_Payload_t; + +/** + * \brief Stop Performance Analyzer Command + */ +typedef struct CFE_ES_StopPerfDataCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_ES_StopPerfCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_ES_StopPerfDataCmd_t; + +/** +** \brief Set Performance Analyzer Filter Mask Command Payload +** +** For command details, see #CFE_ES_SET_PERF_FILTER_MASK_CC +** +**/ +typedef struct CFE_ES_SetPerfFilterMaskCmd_Payload +{ + uint32 FilterMaskNum; /**< \brief Index into array of Filter Masks */ + uint32 FilterMask; /**< \brief New Mask for specified entry in array of Filter Masks */ +} CFE_ES_SetPerfFilterMaskCmd_Payload_t; + +/** + * \brief Set Performance Analyzer Filter Mask Command + */ +typedef struct CFE_ES_SetPerfFilterMaskCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_ES_SetPerfFilterMaskCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_ES_SetPerfFilterMaskCmd_t; + +/** +** \brief Set Performance Analyzer Trigger Mask Command Payload +** +** For command details, see #CFE_ES_SET_PERF_TRIGGER_MASK_CC +** +**/ +typedef struct CFE_ES_SetPerfTrigMaskCmd_Payload +{ + uint32 TriggerMaskNum; /**< \brief Index into array of Trigger Masks */ + uint32 TriggerMask; /**< \brief New Mask for specified entry in array of Trigger Masks */ +} CFE_ES_SetPerfTrigMaskCmd_Payload_t; + +/** + * \brief Set Performance Analyzer Trigger Mask Command + */ +typedef struct CFE_ES_SetPerfTriggerMaskCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_ES_SetPerfTrigMaskCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_ES_SetPerfTriggerMaskCmd_t; + +/** +** \brief Send Memory Pool Statistics Command Payload +** +** For command details, see #CFE_ES_SEND_MEM_POOL_STATS_CC +** +**/ +typedef struct CFE_ES_SendMemPoolStatsCmd_Payload +{ + char Application[CFE_MISSION_MAX_API_LEN]; /**< \brief - RESERVED - should be all zeroes */ + CFE_ES_MemHandle_t PoolHandle; /**< \brief Handle of Pool whose statistics are to be telemetered */ +} CFE_ES_SendMemPoolStatsCmd_Payload_t; + +/** + * \brief Send Memory Pool Statistics Command + */ +typedef struct CFE_ES_SendMemPoolStatsCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_ES_SendMemPoolStatsCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_ES_SendMemPoolStatsCmd_t; + +/** +** \brief Dump CDS Registry Command Payload +** +** For command details, see #CFE_ES_DUMP_CDS_REGISTRY_CC +** +**/ +typedef struct CFE_ES_DumpCDSRegistryCmd_Payload +{ + char DumpFilename[CFE_MISSION_MAX_PATH_LEN]; /**< \brief ASCII text string of full path and filename + of file CDS Registry is to be written */ +} CFE_ES_DumpCDSRegistryCmd_Payload_t; + +/** + * \brief Dump CDS Registry Command + */ +typedef struct CFE_ES_DumpCDSRegistryCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_ES_DumpCDSRegistryCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_ES_DumpCDSRegistryCmd_t; + +/*************************************************************************/ + +/************************************/ +/* Telemetry Interface Data Formats */ +/************************************/ + +/**********************************/ +/* Telemetry Message Data Formats */ +/**********************************/ +/** +** \cfeestlm Single Application Information Packet +**/ +typedef struct CFE_ES_OneAppTlm_Payload +{ + CFE_ES_AppInfo_t AppInfo; /**< \brief For more information, see #CFE_ES_AppInfo_t */ +} CFE_ES_OneAppTlm_Payload_t; + +typedef struct CFE_ES_OneAppTlm +{ + CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ + CFE_ES_OneAppTlm_Payload_t Payload; /**< \brief Telemetry payload */ +} CFE_ES_OneAppTlm_t; + +/** +** \cfeestlm Memory Pool Statistics Packet +**/ +typedef struct CFE_ES_PoolStatsTlm_Payload +{ + CFE_ES_MemHandle_t PoolHandle; /**< \cfetlmmnemonic \ES_POOLHANDLE + \brief Handle of memory pool whose stats are being telemetered */ + CFE_ES_MemPoolStats_t PoolStats; /**< \brief For more info, see #CFE_ES_MemPoolStats_t */ +} CFE_ES_PoolStatsTlm_Payload_t; + +typedef struct CFE_ES_MemStatsTlm +{ + CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ + CFE_ES_PoolStatsTlm_Payload_t Payload; /**< \brief Telemetry payload */ +} CFE_ES_MemStatsTlm_t; + +/*************************************************************************/ + +/** +** \cfeestlm Executive Services Housekeeping Packet +**/ +typedef struct CFE_ES_HousekeepingTlm_Payload +{ + uint8 CommandCounter; /**< \cfetlmmnemonic \ES_CMDPC + \brief The ES Application Command Counter */ + uint8 CommandErrorCounter; /**< \cfetlmmnemonic \ES_CMDEC + \brief The ES Application Command Error Counter */ + + uint16 CFECoreChecksum; /**< \cfetlmmnemonic \ES_CKSUM + \brief Checksum of cFE Core Code */ + uint8 CFEMajorVersion; /**< \cfetlmmnemonic \ES_CFEMAJORVER + \brief Major Version Number of cFE */ + uint8 CFEMinorVersion; /**< \cfetlmmnemonic \ES_CFEMINORVER + \brief Minor Version Number of cFE */ + uint8 CFERevision; /**< \cfetlmmnemonic \ES_CFEREVISION + \brief Sub-Minor Version Number of cFE */ + uint8 CFEMissionRevision; /**< \cfetlmmnemonic \ES_CFEMISSIONREV + \brief Mission Version Number of cFE */ + uint8 OSALMajorVersion; /**< \cfetlmmnemonic \ES_OSMAJORVER + \brief OS Abstraction Layer Major Version Number */ + uint8 OSALMinorVersion; /**< \cfetlmmnemonic \ES_OSMINORVER + \brief OS Abstraction Layer Minor Version Number */ + uint8 OSALRevision; /**< \cfetlmmnemonic \ES_OSREVISION + \brief OS Abstraction Layer Revision Number */ + uint8 OSALMissionRevision; /**< \cfetlmmnemonic \ES_OSMISSIONREV + \brief OS Abstraction Layer MissionRevision Number */ + + uint8 PSPMajorVersion; /**< \cfetlmmnemonic \ES_PSPMAJORVER + \brief Platform Support Package Major Version Number */ + uint8 PSPMinorVersion; /**< \cfetlmmnemonic \ES_PSPMINORVER + \brief Platform Support Package Minor Version Number */ + uint8 PSPRevision; /**< \cfetlmmnemonic \ES_PSPREVISION + \brief Platform Support Package Revision Number */ + uint8 PSPMissionRevision; /**< \cfetlmmnemonic \ES_PSPMISSIONREV + \brief Platform Support Package MissionRevision Number */ + + CFE_ES_MemOffset_t SysLogBytesUsed; /**< \cfetlmmnemonic \ES_SYSLOGBYTEUSED + \brief Total number of bytes used in system log */ + CFE_ES_MemOffset_t SysLogSize; /**< \cfetlmmnemonic \ES_SYSLOGSIZE + \brief Total size of the system log */ + uint32 SysLogEntries; /**< \cfetlmmnemonic \ES_SYSLOGENTRIES + \brief Number of entries in the system log */ + uint32 SysLogMode; /**< \cfetlmmnemonic \ES_SYSLOGMODE + \brief Write/Overwrite Mode */ + + uint32 ERLogIndex; /**< \cfetlmmnemonic \ES_ERLOGINDEX + \brief Current index of the ER Log (wraps around) */ + uint32 ERLogEntries; /**< \cfetlmmnemonic \ES_ERLOGENTRIES + \brief Number of entries made in the ER Log since the power on */ + + uint32 RegisteredCoreApps; /**< \cfetlmmnemonic \ES_REGCOREAPPS + \brief Number of Applications registered with ES */ + uint32 RegisteredExternalApps; /**< \cfetlmmnemonic \ES_REGEXTAPPS + \brief Number of Applications registered with ES */ + uint32 RegisteredTasks; /**< \cfetlmmnemonic \ES_REGTASKS + \brief Number of Tasks ( main AND child tasks ) registered with ES */ + uint32 RegisteredLibs; /**< \cfetlmmnemonic \ES_REGLIBS + \brief Number of Libraries registered with ES */ + + uint32 ResetType; /**< \cfetlmmnemonic \ES_RESETTYPE + \brief Reset type ( PROCESSOR or POWERON ) */ + uint32 ResetSubtype; /**< \cfetlmmnemonic \ES_RESETSUBTYPE + \brief Reset Sub Type */ + uint32 ProcessorResets; /**< \cfetlmmnemonic \ES_PROCRESETCNT + \brief Number of processor resets since last power on */ + uint32 MaxProcessorResets; /**< \cfetlmmnemonic \ES_MAXPROCRESETS + \brief Max processor resets before a power on is done */ + uint32 BootSource; /**< \cfetlmmnemonic \ES_BOOTSOURCE + \brief Boot source ( as provided from BSP ) */ + + uint32 PerfState; /**< \cfetlmmnemonic \ES_PERFSTATE + \brief Current state of Performance Analyzer */ + uint32 PerfMode; /**< \cfetlmmnemonic \ES_PERFMODE + \brief Current mode of Performance Analyzer */ + uint32 PerfTriggerCount; /**< \cfetlmmnemonic \ES_PERFTRIGCNT + \brief Number of Times Performance Analyzer has Triggered */ + uint32 PerfFilterMask[CFE_MISSION_ES_PERF_MAX_IDS / 32]; /**< \cfetlmmnemonic \ES_PERFFLTRMASK + \brief Current Setting of Performance Analyzer Filter Masks */ + uint32 + PerfTriggerMask[CFE_MISSION_ES_PERF_MAX_IDS / 32]; /**< \cfetlmmnemonic \ES_PERFTRIGMASK + \brief Current Setting of Performance Analyzer Trigger Masks */ + uint32 PerfDataStart; /**< \cfetlmmnemonic \ES_PERFDATASTART + \brief Identifies First Stored Entry in Performance Analyzer Log */ + uint32 PerfDataEnd; /**< \cfetlmmnemonic \ES_PERFDATAEND + \brief Identifies Last Stored Entry in Performance Analyzer Log */ + uint32 PerfDataCount; /**< \cfetlmmnemonic \ES_PERFDATACNT + \brief Number of Entries Put Into the Performance Analyzer Log */ + uint32 + PerfDataToWrite; /**< \cfetlmmnemonic \ES_PERFDATA2WRITE + \brief Number of Performance Analyzer Log Entries Left to be Written to Log Dump File */ + CFE_ES_MemOffset_t HeapBytesFree; /**< \cfetlmmnemonic \ES_HEAPBYTESFREE + \brief Number of free bytes remaining in the OS heap */ + CFE_ES_MemOffset_t HeapBlocksFree; /**< \cfetlmmnemonic \ES_HEAPBLKSFREE + \brief Number of free blocks remaining in the OS heap */ + CFE_ES_MemOffset_t HeapMaxBlockSize; /**< \cfetlmmnemonic \ES_HEAPMAXBLK + \brief Number of bytes in the largest free block */ +} CFE_ES_HousekeepingTlm_Payload_t; + +typedef struct CFE_ES_HousekeepingTlm +{ + CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ + CFE_ES_HousekeepingTlm_Payload_t Payload; /**< \brief Telemetry payload */ +} CFE_ES_HousekeepingTlm_t; + +#endif diff --git a/modules/es/config/default_cfe_es_platform_cfg.h b/modules/es/config/default_cfe_es_platform_cfg.h new file mode 100644 index 000000000..2b3176a9b --- /dev/null +++ b/modules/es/config/default_cfe_es_platform_cfg.h @@ -0,0 +1,41 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Executive Services (CFE_ES) Application Platform Configuration Header File + * + * This is a compatibility header for the "platform_cfg.h" file that has + * traditionally provided both public and private config definitions + * for each CFS app. + * + * These definitions are now provided in two separate files, one for + * the public/mission scope and one for internal scope. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_ES_PLATFORM_CFG_H +#define CFE_ES_PLATFORM_CFG_H + +#include "cfe_es_mission_cfg.h" +#include "cfe_es_internal_cfg.h" + +#endif diff --git a/modules/es/config/default_cfe_es_topicids.h b/modules/es/config/default_cfe_es_topicids.h new file mode 100644 index 000000000..b45705c21 --- /dev/null +++ b/modules/es/config/default_cfe_es_topicids.h @@ -0,0 +1,51 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Executive Services (CFE_ES) Application Topic IDs + */ +#ifndef CFE_ES_TOPICIDS_H +#define CFE_ES_TOPICIDS_H + +/** +** \cfemissioncfg cFE Portable Message Numbers for Commands +** +** \par Description: +** Portable message numbers for the cFE ES command messages +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_ES_CMD_MSG 6 +#define CFE_MISSION_ES_SEND_HK_MSG 8 + +/** +** \cfemissioncfg cFE Portable Message Numbers for Telemetry +** +** \par Description: +** Portable message numbers for the cFE ES telemetry messages +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_ES_HK_TLM_MSG 0 +#define CFE_MISSION_ES_APP_TLM_MSG 11 +#define CFE_MISSION_ES_MEMSTATS_TLM_MSG 16 + +#endif diff --git a/modules/es/fsw/inc/cfe_es_events.h b/modules/es/fsw/inc/cfe_es_eventids.h similarity index 100% rename from modules/es/fsw/inc/cfe_es_events.h rename to modules/es/fsw/inc/cfe_es_eventids.h diff --git a/modules/es/fsw/src/cfe_es_module_all.h b/modules/es/fsw/src/cfe_es_module_all.h index e21006b26..9bc4d997d 100644 --- a/modules/es/fsw/src/cfe_es_module_all.h +++ b/modules/es/fsw/src/cfe_es_module_all.h @@ -46,7 +46,7 @@ #include "cfe_es_mempool.h" #include "cfe_es_global.h" #include "cfe_es_cds_mempool.h" -#include "cfe_es_events.h" +#include "cfe_es_eventids.h" #include "cfe_es_start.h" #include "cfe_es_task.h" #include "cfe_es_dispatch.h" diff --git a/modules/es/mission_build.cmake b/modules/es/mission_build.cmake new file mode 100644 index 000000000..0f071c324 --- /dev/null +++ b/modules/es/mission_build.cmake @@ -0,0 +1,37 @@ +########################################################### +# +# ES Core Module mission build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### + +# The list of header files that control the ES configuration +set(ES_MISSION_CONFIG_FILE_LIST + cfe_es_mission_cfg.h + cfe_es_interface_cfg.h + cfe_es_extern_typedefs.h + cfe_es_fcncodes.h + cfe_es_msgdefs.h + cfe_es_msg.h + cfe_es_msgstruct.h + cfe_es_topicids.h +) + +# Create wrappers around the all the config header files +# This makes them individually overridable by the missions, without modifying +# the distribution default copies +foreach(ES_CFGFILE ${ES_MISSION_CONFIG_FILE_LIST}) + get_filename_component(CFGKEY "${ES_CFGFILE}" NAME_WE) + if (DEFINED ES_CFGFILE_SRC_${CFGKEY}) + set(DEFAULT_SOURCE GENERATED_FILE "${ES_CFGFILE_SRC_${CFGKEY}}") + else() + set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${ES_CFGFILE}") + endif() + generate_config_includefile( + FILE_NAME "${ES_CFGFILE}" + ${DEFAULT_SOURCE} + ) +endforeach() From 941468d5696a2156e8d2c718930db1e72d1a7cd4 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 2 May 2023 16:28:00 -0400 Subject: [PATCH 04/14] Fix #2320, reorganize SB header files Organize SB header file contents according to the convention --- modules/sb/CMakeLists.txt | 2 +- modules/sb/arch_build.cmake | 32 ++ .../config/default_cfe_sb_extern_typedefs.h} | 12 - .../default_cfe_sb_fcncodes.h} | 349 +---------------- .../sb/config/default_cfe_sb_interface_cfg.h | 69 ++++ .../sb/config/default_cfe_sb_internal_cfg.h | 290 ++++++++++++++ .../sb/config/default_cfe_sb_mission_cfg.h | 36 ++ modules/sb/config/default_cfe_sb_msg.h | 38 ++ modules/sb/config/default_cfe_sb_msgdefs.h | 31 ++ modules/sb/config/default_cfe_sb_msgids.h | 44 +++ modules/sb/config/default_cfe_sb_msgstruct.h | 362 ++++++++++++++++++ .../sb/config/default_cfe_sb_platform_cfg.h | 41 ++ modules/sb/config/default_cfe_sb_topicids.h | 53 +++ .../{cfe_sb_events.h => cfe_sb_eventids.h} | 0 modules/sb/fsw/src/cfe_sb_module_all.h | 2 +- modules/sb/mission_build.cmake | 37 ++ 16 files changed, 1044 insertions(+), 354 deletions(-) create mode 100644 modules/sb/arch_build.cmake rename modules/{core_api/fsw/inc/cfe_sb_extern_typedefs.h => sb/config/default_cfe_sb_extern_typedefs.h} (92%) rename modules/sb/{fsw/inc/cfe_sb_msg.h => config/default_cfe_sb_fcncodes.h} (54%) create mode 100644 modules/sb/config/default_cfe_sb_interface_cfg.h create mode 100644 modules/sb/config/default_cfe_sb_internal_cfg.h create mode 100644 modules/sb/config/default_cfe_sb_mission_cfg.h create mode 100644 modules/sb/config/default_cfe_sb_msg.h create mode 100644 modules/sb/config/default_cfe_sb_msgdefs.h create mode 100644 modules/sb/config/default_cfe_sb_msgids.h create mode 100644 modules/sb/config/default_cfe_sb_msgstruct.h create mode 100644 modules/sb/config/default_cfe_sb_platform_cfg.h create mode 100644 modules/sb/config/default_cfe_sb_topicids.h rename modules/sb/fsw/inc/{cfe_sb_events.h => cfe_sb_eventids.h} (100%) create mode 100644 modules/sb/mission_build.cmake diff --git a/modules/sb/CMakeLists.txt b/modules/sb/CMakeLists.txt index d7b9ecac7..6584053e7 100644 --- a/modules/sb/CMakeLists.txt +++ b/modules/sb/CMakeLists.txt @@ -29,5 +29,5 @@ endif(ENABLE_UNIT_TESTS) cfs_app_check_intf(${DEP} cfe_sb_msg.h - cfe_sb_events.h + cfe_sb_eventids.h ) diff --git a/modules/sb/arch_build.cmake b/modules/sb/arch_build.cmake new file mode 100644 index 000000000..10f7372f0 --- /dev/null +++ b/modules/sb/arch_build.cmake @@ -0,0 +1,32 @@ +########################################################### +# +# SB Core Module platform build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### + +# The list of header files that control the SB configuration +set(SB_PLATFORM_CONFIG_FILE_LIST + cfe_sb_internal_cfg.h + cfe_sb_msgids.h + cfe_sb_platform_cfg.h +) + +# Create wrappers around the all the config header files +# This makes them individually overridable by the missions, without modifying +# the distribution default copies +foreach(SB_CFGFILE ${SB_PLATFORM_CONFIG_FILE_LIST}) + get_filename_component(CFGKEY "${SB_CFGFILE}" NAME_WE) + if (DEFINED SB_CFGFILE_SRC_${CFGKEY}) + set(DEFAULT_SOURCE "${SB_CFGFILE_SRC_${CFGKEY}}") + else() + set(DEFAULT_SOURCE "${CMAKE_CURRENT_LIST_DIR}/config/default_${SB_CFGFILE}") + endif() + generate_config_includefile( + FILE_NAME "${SB_CFGFILE}" + FALLBACK_FILE ${DEFAULT_SOURCE} + ) +endforeach() diff --git a/modules/core_api/fsw/inc/cfe_sb_extern_typedefs.h b/modules/sb/config/default_cfe_sb_extern_typedefs.h similarity index 92% rename from modules/core_api/fsw/inc/cfe_sb_extern_typedefs.h rename to modules/sb/config/default_cfe_sb_extern_typedefs.h index 21c37fd0a..8c283ca9a 100644 --- a/modules/core_api/fsw/inc/cfe_sb_extern_typedefs.h +++ b/modules/sb/config/default_cfe_sb_extern_typedefs.h @@ -25,16 +25,6 @@ #ifndef CFE_SB_EXTERN_TYPEDEFS_H #define CFE_SB_EXTERN_TYPEDEFS_H -/* This header may be generated from an EDS file, - * tools are available and the feature is enabled */ -#ifdef CFE_EDS_ENABLED_BUILD - -/* Use the EDS generated version of these types */ -#include "cfe_sb_eds_typedefs.h" - -#else -/* Use the local definitions of these types */ - #include "common_types.h" #include "cfe_mission_cfg.h" #include "cfe_resourceid_typedef.h" @@ -135,6 +125,4 @@ typedef struct currently unused */ } CFE_SB_Qos_t; -#endif /* CFE_EDS_ENABLED_BUILD */ - #endif /* CFE_SB_EXTERN_TYPEDEFS_H */ diff --git a/modules/sb/fsw/inc/cfe_sb_msg.h b/modules/sb/config/default_cfe_sb_fcncodes.h similarity index 54% rename from modules/sb/fsw/inc/cfe_sb_msg.h rename to modules/sb/config/default_cfe_sb_fcncodes.h index 87a7c1dc6..87c17fd65 100644 --- a/modules/sb/fsw/inc/cfe_sb_msg.h +++ b/modules/sb/config/default_cfe_sb_fcncodes.h @@ -11,32 +11,22 @@ * * 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. + * WITHOUT WARRANTISB OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ************************************************************************/ /** * @file + * Specification for the CFE Event Services (CFE_SB) command function codes * - * Purpose: - * This header file contains structure definitions for all SB command and - * telemetry packets - * - * Author: R.McGraw/SSI - * + * @note + * This file should be strictly limited to the command/function code (CC) + * macro definitions. Other definitions such as enums, typedefs, or other + * macros should be placed in the msgdefs.h or msg.h files. */ - -#ifndef CFE_SB_MSG_H -#define CFE_SB_MSG_H - -/* -** Includes -*/ -#include "common_types.h" /* Basic data types */ -#include "cfe_msg_hdr.h" /* for header definitions */ -#include "cfe_sb_extern_typedefs.h" -#include "cfe_es_extern_typedefs.h" +#ifndef CFE_SB_FCNCODES_H +#define CFE_SB_FCNCODES_H /**************************************** ** SB task command packet command codes @@ -469,325 +459,4 @@ */ #define CFE_SB_SEND_PREV_SUBS_CC 11 -/**************************** -** SB Command Formats ** -*****************************/ - -/* - * SB Messages which have no payload are each - * given unique typedefs to follow the command handler convention - * - * For the SB application these are mapped to the CFE_MSG_CommandHeader_t type, - * as they contain only a primary + command header. - */ -typedef CFE_MSG_CommandHeader_t CFE_SB_NoopCmd_t; -typedef CFE_MSG_CommandHeader_t CFE_SB_ResetCountersCmd_t; -typedef CFE_MSG_CommandHeader_t CFE_SB_EnableSubReportingCmd_t; -typedef CFE_MSG_CommandHeader_t CFE_SB_DisableSubReportingCmd_t; -typedef CFE_MSG_CommandHeader_t CFE_SB_SendSbStatsCmd_t; -typedef CFE_MSG_CommandHeader_t CFE_SB_SendPrevSubsCmd_t; -typedef CFE_MSG_CommandHeader_t CFE_SB_SendHkCmd_t; - -/** -** \brief Write File Info Command Payload -** -** This structure contains a generic definition used by SB commands that write to a file -*/ -typedef struct CFE_SB_WriteFileInfoCmd_Payload -{ - char Filename[CFE_MISSION_MAX_PATH_LEN]; /**< \brief Path and Filename of data to be loaded */ -} CFE_SB_WriteFileInfoCmd_Payload_t; - -/** - * \brief Write File Info Command - */ -typedef struct CFE_SB_WriteFileInfoCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_SB_WriteFileInfoCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_SB_WriteFileInfoCmd_t; - -/* - * Create a unique typedef for each of the commands that share this format. - */ -typedef CFE_SB_WriteFileInfoCmd_t CFE_SB_WriteRoutingInfoCmd_t; -typedef CFE_SB_WriteFileInfoCmd_t CFE_SB_WritePipeInfoCmd_t; -typedef CFE_SB_WriteFileInfoCmd_t CFE_SB_WriteMapInfoCmd_t; - -/** -** \brief Enable/Disable Route Command Payload -** -** This structure contains a definition used by two SB commands, -** 'Enable Route' #CFE_SB_ENABLE_ROUTE_CC and 'Disable Route' #CFE_SB_DISABLE_ROUTE_CC. -** A route is the destination pipe for a particular message and is therefore defined -** as a MsgId and PipeId combination. -*/ -typedef struct CFE_SB_RouteCmd_Payload -{ - CFE_SB_MsgId_t MsgId; /**< \brief Message ID of route to be enabled or disabled #CFE_SB_MsgId_t */ - CFE_SB_PipeId_t Pipe; /**< \brief Pipe ID of route to be enabled or disabled #CFE_SB_PipeId_t */ - uint8 Spare; /**<\brief Spare byte to make command even number of bytes */ -} CFE_SB_RouteCmd_Payload_t; - -/** - * \brief Enable/Disable Route Command - */ -typedef struct CFE_SB_RouteCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_SB_RouteCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_SB_RouteCmd_t; - -/* - * Create a unique typedef for each of the commands that share this format. - */ -typedef CFE_SB_RouteCmd_t CFE_SB_EnableRouteCmd_t; -typedef CFE_SB_RouteCmd_t CFE_SB_DisableRouteCmd_t; - -/**************************** -** SB Telemetry Formats ** -*****************************/ - -/** -** \cfesbtlm Software Bus task housekeeping Packet -*/ -typedef struct CFE_SB_HousekeepingTlm_Payload -{ - uint8 CommandCounter; /**< \cfetlmmnemonic \SB_CMDPC - \brief Count of valid commands received */ - uint8 CommandErrorCounter; /**< \cfetlmmnemonic \SB_CMDEC - \brief Count of invalid commands received */ - uint8 NoSubscribersCounter; /**< \cfetlmmnemonic \SB_NOSUBEC - \brief Count pkts sent with no subscribers */ - uint8 MsgSendErrorCounter; /**< \cfetlmmnemonic \SB_MSGSNDEC - \brief Count of message send errors */ - - uint8 MsgReceiveErrorCounter; /**< \cfetlmmnemonic \SB_MSGRECEC - \brief Count of message receive errors */ - uint8 InternalErrorCounter; /**< \cfetlmmnemonic \SB_INTERNALEC - \brief Count of queue read or write errors */ - uint8 CreatePipeErrorCounter; /**< \cfetlmmnemonic \SB_NEWPIPEEC - \brief Count of errors in create pipe API */ - uint8 SubscribeErrorCounter; /**< \cfetlmmnemonic \SB_SUBSCREC - \brief Count of errors in subscribe API */ - uint8 PipeOptsErrorCounter; /**< \cfetlmmnemonic \SB_PIPEOPTSEC - \brief Count of errors in set/get pipe options API */ - uint8 DuplicateSubscriptionsCounter; /**< \cfetlmmnemonic \SB_DUPSUBCNT - \brief Count of duplicate subscriptions */ - uint8 GetPipeIdByNameErrorCounter; /**< \cfetlmmnemonic \SB_GETPIPEIDBYNAMEEC - \brief Count of errors in get pipe id by name API */ - uint8 Spare2Align[1]; /**< \cfetlmmnemonic \SB_SPARE2ALIGN - \brief Spare bytes to ensure alignment */ - - uint16 PipeOverflowErrorCounter; /**< \cfetlmmnemonic \SB_PIPEOVREC - \brief Count of pipe overflow errors */ - uint16 MsgLimitErrorCounter; /**< \cfetlmmnemonic \SB_MSGLIMEC - \brief Count of msg id to pipe errors */ - - CFE_ES_MemHandle_t MemPoolHandle; /**< \cfetlmmnemonic \SB_MEMPOOLHANDLE - \brief Handle to SB's Memory Pool */ - - uint32 MemInUse; /**< \cfetlmmnemonic \SB_MEMINUSE - \brief Memory in use */ - - uint32 UnmarkedMem; /**< \cfetlmmnemonic \SB_UNMARKEDMEM - \brief cfg param CFE_PLATFORM_SB_BUF_MEMORY_BYTES minus Peak Memory in use */ -} CFE_SB_HousekeepingTlm_Payload_t; - -typedef struct CFE_SB_HousekeepingTlm -{ - CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ - CFE_SB_HousekeepingTlm_Payload_t Payload; /**< \brief Telemetry payload */ -} CFE_SB_HousekeepingTlm_t; - -/** -** \brief SB Pipe Depth Statistics -** -** Used in SB Statistics Telemetry Packet #CFE_SB_StatsTlm_t -*/ -typedef struct CFE_SB_PipeDepthStats -{ - CFE_SB_PipeId_t PipeId; /**< \cfetlmmnemonic \SB_PDPIPEID - \brief Pipe Id associated with the stats below */ - uint16 MaxQueueDepth; /**< \cfetlmmnemonic \SB_PDDEPTH - \brief Number of messages the pipe can hold */ - uint16 CurrentQueueDepth; /**< \cfetlmmnemonic \SB_PDINUSE - \brief Number of messages currently on the pipe */ - uint16 PeakQueueDepth; /**< \cfetlmmnemonic \SB_PDPKINUSE - \brief Peak number of messages that have been on the pipe */ - uint16 Spare; /**< \cfetlmmnemonic \SB_PDSPARE - \brief Spare word to ensure alignment */ -} CFE_SB_PipeDepthStats_t; - -/** -** \brief SB Pipe Information File Entry -** -** This statistics structure is output as part of the CFE SB -** "Send Pipe Info" command (CFE_SB_SEND_PIPE_INFO_CC). -** -** Previous versions of CFE simply wrote the internal CFE_SB_PipeD_t object -** to the file, but this also contains information such as pointers which are -** not relevant outside the running CFE process. -** -** By defining the pipe info structure separately, it also provides some -** independence, such that the internal CFE_SB_PipeD_t definition -** can evolve without changing the binary format of the information -** file. -*/ -typedef struct CFE_SB_PipeInfoEntry -{ - CFE_SB_PipeId_t PipeId; /**< The runtime ID of the pipe */ - CFE_ES_AppId_t AppId; /**< The runtime ID of the application that owns the pipe */ - char PipeName[CFE_MISSION_MAX_API_LEN]; /**< The Name of the pipe */ - char AppName[CFE_MISSION_MAX_API_LEN]; /**< The Name of the application that owns the pipe */ - uint16 MaxQueueDepth; /**< The allocated depth of the pipe (max capacity) */ - uint16 CurrentQueueDepth; /**< The current depth of the pipe */ - uint16 PeakQueueDepth; /**< The peak depth of the pipe (high watermark) */ - uint16 SendErrors; /**< Number of errors when writing to this pipe */ - uint8 Opts; /**< Pipe options set (bitmask) */ - uint8 Spare[3]; /**< Padding to make this structure a multiple of 4 bytes */ -} CFE_SB_PipeInfoEntry_t; - -/** -** \cfesbtlm SB Statistics Telemetry Packet -** -** SB Statistics packet sent in response to #CFE_SB_SEND_SB_STATS_CC -*/ -typedef struct CFE_SB_StatsTlm_Payload -{ - uint32 MsgIdsInUse; /**< \cfetlmmnemonic \SB_SMMIDIU - \brief Current number of MsgIds with a destination */ - uint32 PeakMsgIdsInUse; /**< \cfetlmmnemonic \SB_SMPMIDIU - \brief Peak number of MsgIds with a destination */ - uint32 MaxMsgIdsAllowed; /**< \cfetlmmnemonic \SB_SMMMIDALW - \brief cFE Cfg Param \link #CFE_PLATFORM_SB_MAX_MSG_IDS \endlink */ - - uint32 PipesInUse; /**< \cfetlmmnemonic \SB_SMPIU - \brief Number of pipes currently in use */ - uint32 PeakPipesInUse; /**< \cfetlmmnemonic \SB_SMPPIU - \brief Peak number of pipes since last reboot */ - uint32 MaxPipesAllowed; /**< \cfetlmmnemonic \SB_SMMPALW - \brief cFE Cfg Param \link #CFE_PLATFORM_SB_MAX_PIPES \endlink */ - - uint32 MemInUse; /**< \cfetlmmnemonic \SB_SMBMIU - \brief Memory bytes currently in use for SB msg transfers */ - uint32 PeakMemInUse; /**< \cfetlmmnemonic \SB_SMPBMIU - \brief Peak memory bytes in use for SB msg transfers */ - uint32 MaxMemAllowed; /**< \cfetlmmnemonic \SB_SMMBMALW - \brief cFE Cfg Param \link #CFE_PLATFORM_SB_BUF_MEMORY_BYTES \endlink */ - - uint32 SubscriptionsInUse; /**< \cfetlmmnemonic \SB_SMSIU - \brief Number of current subscriptions */ - uint32 PeakSubscriptionsInUse; /**< \cfetlmmnemonic \SB_SMPSIU - \brief Peak number of subscriptions */ - uint32 MaxSubscriptionsAllowed; /**< \cfetlmmnemonic \SB_SMMSALW - \brief product of \link #CFE_PLATFORM_SB_MAX_MSG_IDS \endlink - and \link #CFE_PLATFORM_SB_MAX_DEST_PER_PKT \endlink */ - - uint32 SBBuffersInUse; /**< \cfetlmmnemonic \SB_SMSBBIU - \brief Number of SB message buffers currently in use */ - uint32 PeakSBBuffersInUse; /**< \cfetlmmnemonic \SB_SMPSBBIU - \brief Max number of SB message buffers in use */ - - uint32 MaxPipeDepthAllowed; /**< \cfetlmmnemonic \SB_SMMPDALW - \brief Maximum allowed pipe depth */ - CFE_SB_PipeDepthStats_t - PipeDepthStats[CFE_MISSION_SB_MAX_PIPES]; /**< \cfetlmmnemonic \SB_SMPDS - \brief Pipe Depth Statistics #CFE_SB_PipeDepthStats_t*/ -} CFE_SB_StatsTlm_Payload_t; - -typedef struct CFE_SB_StatsTlm -{ - CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ - CFE_SB_StatsTlm_Payload_t Payload; /**< \brief Telemetry payload */ -} CFE_SB_StatsTlm_t; - -/** -** \brief SB Routing File Entry -** -** Structure of one element of the routing information in response to #CFE_SB_WRITE_ROUTING_INFO_CC -*/ -typedef struct CFE_SB_RoutingFileEntry -{ - CFE_SB_MsgId_t MsgId; /**< \brief Message Id portion of the route */ - CFE_SB_PipeId_t PipeId; /**< \brief Pipe Id portion of the route */ - uint8 State; /**< \brief Route Enabled or Disabled */ - uint16 MsgCnt; /**< \brief Number of msgs with this MsgId sent to this PipeId */ - char AppName[CFE_MISSION_MAX_API_LEN]; /**< \brief Pipe Depth Statistics */ - char PipeName[CFE_MISSION_MAX_API_LEN]; /**< \brief Pipe Depth Statistics */ -} CFE_SB_RoutingFileEntry_t; - -/** -** \brief SB Map File Entry -** -** Structure of one element of the map information in response to #CFE_SB_WRITE_MAP_INFO_CC -*/ -typedef struct CFE_SB_MsgMapFileEntry -{ - CFE_SB_MsgId_t MsgId; /**< \brief Message Id which has been subscribed to */ - CFE_SB_RouteId_Atom_t Index; /**< \brief Routing raw index value (0 based, not Route ID) */ -} CFE_SB_MsgMapFileEntry_t; - -/** -** \cfesbtlm SB Subscription Report Packet -** -** This structure defines the pkt sent by SB when a subscription or -** a request to unsubscribe is received while subscription reporting is enabled. -** By default subscription reporting is disabled. This feature is intended to be -** used primarily by Software Bus Networking Application (SBN) -** -** \sa #CFE_SB_ENABLE_SUB_REPORTING_CC, #CFE_SB_DISABLE_SUB_REPORTING_CC -*/ -typedef struct CFE_SB_SingleSubscriptionTlm_Payload -{ - uint8 SubType; /**< \brief Subscription or Unsubscription */ - CFE_SB_MsgId_t MsgId; /**< \brief MsgId subscribed or unsubscribe to */ - CFE_SB_Qos_t Qos; /**< \brief Quality of Service, used only for interprocessor communication */ - CFE_SB_PipeId_t Pipe; /**< \brief Destination pipe id to send above msg id */ -} CFE_SB_SingleSubscriptionTlm_Payload_t; - -typedef struct CFE_SB_SingleSubscriptionTlm -{ - CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ - CFE_SB_SingleSubscriptionTlm_Payload_t Payload; /**< \brief Telemetry payload */ -} CFE_SB_SingleSubscriptionTlm_t; - -/** -** \brief SB Previous Subscriptions Entry -** -** This structure defines an entry used in the CFE_SB_PrevSubsPkt_t -** Intended to be used primarily by Software Bus Networking Application (SBN) -** -** Used in structure definition #CFE_SB_AllSubscriptionsTlm_t -*/ -typedef struct CFE_SB_SubEntries -{ - CFE_SB_MsgId_t MsgId; /**< \brief MsgId portion of the subscription */ - CFE_SB_Qos_t Qos; /**< \brief Qos portion of the subscription */ - CFE_SB_PipeId_t Pipe; /**< \brief PipeId portion of the subscription */ -} CFE_SB_SubEntries_t; - -/** -** \cfesbtlm SB Previous Subscriptions Packet -** -** This structure defines the pkt(s) sent by SB that contains a list of all current -** subscriptions. This pkt is generated on cmd and intended to be used primarily by -** the Software Bus Networking Application (SBN). Typically, when the cmd is received -** there are more subscriptions than can fit in one pkt. The complete list of -** subscriptions is sent via a series of segmented pkts. -*/ -typedef struct CFE_SB_AllSubscriptionsTlm_Payload -{ - uint32 PktSegment; /**< \brief Pkt number(starts at 1) in the series */ - uint32 TotalSegments; /**< \brief Total number of pkts needed to complete the request */ - uint32 Entries; /**< \brief Number of entries in the pkt */ - CFE_SB_SubEntries_t Entry[CFE_SB_SUB_ENTRIES_PER_PKT]; /**< \brief Array of #CFE_SB_SubEntries_t entries */ -} CFE_SB_AllSubscriptionsTlm_Payload_t; - -typedef struct CFE_SB_AllSubscriptionsTlm -{ - CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ - CFE_SB_AllSubscriptionsTlm_Payload_t Payload; /**< \brief Telemetry payload */ -} CFE_SB_AllSubscriptionsTlm_t; - -#endif /* CFE_SB_MSG_H */ +#endif diff --git a/modules/sb/config/default_cfe_sb_interface_cfg.h b/modules/sb/config/default_cfe_sb_interface_cfg.h new file mode 100644 index 000000000..359f5f415 --- /dev/null +++ b/modules/sb/config/default_cfe_sb_interface_cfg.h @@ -0,0 +1,69 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 WARRANTISB 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 Software Bus (CFE_SB) Application Public Definitions + * + * This provides default values for configurable items that affect + * the interface(s) of this module. This includes the CMD/TLM message + * interface, tables definitions, and any other data products that + * serve to exchange information with other entities. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_SB_INTERFACE_CFG_H +#define CFE_SB_INTERFACE_CFG_H + +/** +** \cfesbcfg Maximum SB Message Size +** +** \par Description: +** The following definition dictates the maximum message size allowed on +** the software bus. SB checks the pkt length field in the header of all +** messages sent. If the pkt length field indicates the message is larger +** than this define, SB sends an event and rejects the send. +** +** \par Limits +** This parameter has a lower limit of 6 (CCSDS primary header size). There +** are no restrictions on the upper limit however, the maximum message size is +** system dependent and should be verified. Total message size values that are +** checked against this configuration are defined by a 16 bit data word. +*/ +#define CFE_MISSION_SB_MAX_SB_MSG_SIZE 32768 + +/** +** \cfesbcfg Maximum Number of pipes that SB command/telemetry messages may hold +** +** \par Description: +** Dictates the maximum number of unique Pipes the SB message definitions will hold. +** +** This affects the layout of command/telemetry messages but does not affect run +** time behavior or internal allocation. +** +** \par Limits +** All CPUs within the same SB domain (mission) must share the same definition +** Note this affects the size of messages, so it must not cause any message +** to exceed the max length. +** +*/ +#define CFE_MISSION_SB_MAX_PIPES 64 + +#endif diff --git a/modules/sb/config/default_cfe_sb_internal_cfg.h b/modules/sb/config/default_cfe_sb_internal_cfg.h new file mode 100644 index 000000000..ef34dd381 --- /dev/null +++ b/modules/sb/config/default_cfe_sb_internal_cfg.h @@ -0,0 +1,290 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 WARRANTISB 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 Software Bus (CFE_SB) Application Private Config Definitions + * + * This provides default values for configurable items that are internal + * to this module and do NOT affect the interface(s) of this module. Changes + * to items in this file only affect the local module and will be transparent + * to external entities that are using the public interface(s). + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_SB_INTERNAL_CFG_H +#define CFE_SB_INTERNAL_CFG_H + +/** +** \cfesbcfg Maximum Number of Unique Message IDs SB Routing Table can hold +** +** \par Description: +** Dictates the maximum number of unique MsgIds the SB routing table will hold. +** This constant has a direct effect on the size of SB's tables and arrays. +** Keeping this count as low as possible will save memory. +** To see the run-time, high-water mark and the current utilization figures +** regarding this parameter, send an SB command to 'Send Statistics Pkt'. +** +** \par Limits +** This must be a power of two if software bus message routing hash implementation +** is being used. Lower than 64 will cause unit test failures, and +** telemetry reporting is impacted below 32. There is no hard +** upper limit, but impacts memory footprint. For software bus message routing +** search implementation the number of msg ids subscribed to impacts performance. +** +*/ +#define CFE_PLATFORM_SB_MAX_MSG_IDS 256 + +/** +** \cfesbcfg Maximum Number of Unique Pipes SB Routing Table can hold +** +** \par Description: +** Dictates the maximum number of unique Pipes the SB routing table will hold. +** This constant has a direct effect on the size of SB's tables and arrays. +** Keeping this count as low as possible will save memory. +** To see the run-time, high-water mark and the current utilization figures +** regarding this parameter, send an SB command to 'Send Statistics Pkt'. +** +** \par Limits +** This parameter has a lower limit of 1. This parameter must also be less than +** or equal to OS_MAX_QUEUES. +** +*/ +#define CFE_PLATFORM_SB_MAX_PIPES 64 + +/** +** \cfesbcfg Maximum Number of unique local destinations a single MsgId can have +** +** \par Description: +** Dictates the maximum number of unique local destinations a single MsgId can +** have. +** +** \par Limits +** This parameter has a lower limit of 1. There are no restrictions on the upper +** limit however, the maximum number of destinations per packet is system dependent +** and should be verified. Destination number values that are checked against this +** configuration are defined by a 16 bit data word. +** +*/ +#define CFE_PLATFORM_SB_MAX_DEST_PER_PKT 16 + +/** +** \cfesbcfg Default Subscription Message Limit +** +** \par Description: +** Dictates the default Message Limit when using the #CFE_SB_Subscribe API. This will +** limit the number of messages with a specific message ID that can be received through +** a subscription. This only changes the default; other message limits can be set on a per +** subscription basis using #CFE_SB_SubscribeEx . +** +** \par Limits +** This parameter has a lower limit of 4 and an upper limit of 65535. +** +*/ +#define CFE_PLATFORM_SB_DEFAULT_MSG_LIMIT 4 + +/** +** \cfesbcfg Size of the SB buffer memory pool +** +** \par Description: +** Dictates the size of the SB memory pool. For each message the SB +** sends, the SB dynamically allocates from this memory pool, the memory needed +** to process the message. The memory needed to process each message is msg +** size + msg descriptor(CFE_SB_BufferD_t). This memory pool is also used +** to allocate destination descriptors (CFE_SB_DestinationD_t) during the +** subscription process. +** To see the run-time, high-water mark and the current utilization figures +** regarding this parameter, send an SB command to 'Send Statistics Pkt'. +** Some memory statistics have been added to the SB housekeeping packet. +** NOTE: It is important to monitor these statistics to ensure the desired +** memory margin is met. +** +** \par Limits +** This parameter has a lower limit of 512 and an upper limit of UINT_MAX (4 Gigabytes). +** +*/ +#define CFE_PLATFORM_SB_BUF_MEMORY_BYTES 524288 + +/** +** \cfesbcfg Highest Valid Message Id +** +** \par Description: +** The value of this constant dictates the range of valid message ID's, from 0 +** to CFE_PLATFORM_SB_HIGHEST_VALID_MSGID (inclusive). +** +** Although this can be defined differently across platforms, each platform can +** only publish/subscribe to message ids within their allowable range. Typically +** this value is set the same across all mission platforms to avoid this complexity. +** +** \par Limits +** CFE_SB_INVALID_MSG is set to the maximum representable number of type CFE_SB_MsgId_t. +** CFE_PLATFORM_SB_HIGHEST_VALID_MSGID lower limit is 1, up to CFE_SB_INVALID_MSG_ID - 1. +** +** When using the direct message map implementation for software bus routing, this +** value is used to size the map where a value of 0x1FFF results in a 16 KBytes map +** and 0xFFFF is 128 KBytes. +** +** When using the hash implementation for software bus routing, a multiple of the +** CFE_PLATFORM_SB_MAX_MSG_IDS is used to size the message map. In that case +** the range selected here does not impact message map memory use, so it's +** reasonable to use up to the full range supported by the message ID implementation. +*/ +#define CFE_PLATFORM_SB_HIGHEST_VALID_MSGID 0x1FFF + +/** +** \cfesbcfg Default Routing Information Filename +** +** \par Description: +** The value of this constant defines the filename used to store the software +** bus routing information. This filename is used only when no filename is +** specified in the command. +** +** \par Limits +** The length of each string, including the NULL terminator cannot exceed the +** #OS_MAX_PATH_LEN value. +*/ +#define CFE_PLATFORM_SB_DEFAULT_ROUTING_FILENAME "/ram/cfe_sb_route.dat" + +/** +** \cfesbcfg Default Pipe Information Filename +** +** \par Description: +** The value of this constant defines the filename used to store the software +** bus pipe information. This filename is used only when no filename is +** specified in the command. +** +** \par Limits +** The length of each string, including the NULL terminator cannot exceed the +** #OS_MAX_PATH_LEN value. +*/ +#define CFE_PLATFORM_SB_DEFAULT_PIPE_FILENAME "/ram/cfe_sb_pipe.dat" + +/** +** \cfesbcfg Default Message Map Filename +** +** \par Description: +** The value of this constant defines the filename used to store the software +** bus message map information. This filename is used only when no filename is +** specified in the command. The message map is a lookup table (array of 16bit +** words) that has an element for each possible MsgId value and holds the +** routing table index for that MsgId. The Msg Map provides fast access to the +** destinations of a message. +** +** \par Limits +** The length of each string, including the NULL terminator cannot exceed the +** #OS_MAX_PATH_LEN value. +*/ +#define CFE_PLATFORM_SB_DEFAULT_MAP_FILENAME "/ram/cfe_sb_msgmap.dat" + +/** +** \cfesbcfg SB Event Filtering +** +** \par Description: +** This group of configuration parameters dictates what SB events will be +** filtered through SB. The filtering will begin after the SB task initializes +** and stay in effect until a cmd to SB changes it. +** This allows the operator to set limits on the number of event messages that +** are sent during system initialization. +** NOTE: Set all unused event values and mask values to zero +** +** \par Limits +** This filtering applies only to SB events. +** These parameters have a lower limit of 0 and an upper limit of 65535. +*/ +#define CFE_PLATFORM_SB_FILTERED_EVENT1 CFE_SB_SEND_NO_SUBS_EID +#define CFE_PLATFORM_SB_FILTER_MASK1 CFE_EVS_FIRST_4_STOP + +#define CFE_PLATFORM_SB_FILTERED_EVENT2 CFE_SB_DUP_SUBSCRIP_EID +#define CFE_PLATFORM_SB_FILTER_MASK2 CFE_EVS_FIRST_4_STOP + +#define CFE_PLATFORM_SB_FILTERED_EVENT3 CFE_SB_MSGID_LIM_ERR_EID +#define CFE_PLATFORM_SB_FILTER_MASK3 CFE_EVS_FIRST_16_STOP + +#define CFE_PLATFORM_SB_FILTERED_EVENT4 CFE_SB_Q_FULL_ERR_EID +#define CFE_PLATFORM_SB_FILTER_MASK4 CFE_EVS_FIRST_16_STOP + +#define CFE_PLATFORM_SB_FILTERED_EVENT5 0 +#define CFE_PLATFORM_SB_FILTER_MASK5 CFE_EVS_NO_FILTER + +#define CFE_PLATFORM_SB_FILTERED_EVENT6 0 +#define CFE_PLATFORM_SB_FILTER_MASK6 CFE_EVS_NO_FILTER + +#define CFE_PLATFORM_SB_FILTERED_EVENT7 0 +#define CFE_PLATFORM_SB_FILTER_MASK7 CFE_EVS_NO_FILTER + +#define CFE_PLATFORM_SB_FILTERED_EVENT8 0 +#define CFE_PLATFORM_SB_FILTER_MASK8 CFE_EVS_NO_FILTER + +/** +** \cfeescfg Define SB Memory Pool Block Sizes +** +** \par Description: +** Software Bus Memory Pool Block Sizes +** +** \par Limits +** These sizes MUST be increasing and MUST be an integral multiple of 4. +** The number of block sizes defined cannot exceed +** #CFE_PLATFORM_ES_POOL_MAX_BUCKETS +*/ +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_01 8 +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_02 16 +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_03 20 +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_04 36 +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_05 64 +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_06 96 +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_07 128 +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_08 160 +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_09 256 +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_10 512 +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_11 1024 +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_12 2048 +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_13 4096 +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_14 8192 +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_15 16384 +#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_16 32768 +#define CFE_PLATFORM_SB_MAX_BLOCK_SIZE (CFE_MISSION_SB_MAX_SB_MSG_SIZE + 128) + +/** +** \cfeescfg Define SB Task Priority +** +** \par Description: +** Defines the cFE_SB Task priority. +** +** \par Limits +** Not Applicable +*/ +#define CFE_PLATFORM_SB_START_TASK_PRIORITY 64 + +/** +** \cfeescfg Define SB Task Stack Size +** +** \par Description: +** Defines the cFE_SB Task Stack Size +** +** \par Limits +** There is a lower limit of 2048 on this configuration parameter. There +** are no restrictions on the upper limit however, the maximum stack size +** is system dependent and should be verified. Most operating systems provide +** tools for measuring the amount of stack used by a task during operation. It +** is always a good idea to verify that no more than 1/2 of the stack is used. +*/ +#define CFE_PLATFORM_SB_START_TASK_STACK_SIZE CFE_PLATFORM_ES_DEFAULT_STACK_SIZE + +#endif diff --git a/modules/sb/config/default_cfe_sb_mission_cfg.h b/modules/sb/config/default_cfe_sb_mission_cfg.h new file mode 100644 index 000000000..cbe188ae7 --- /dev/null +++ b/modules/sb/config/default_cfe_sb_mission_cfg.h @@ -0,0 +1,36 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 WARRANTISB 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 Event Services (CFE_SB) Application Mission Configuration Header File + * + * This is a compatibility header for the "mission_cfg.h" file that has + * traditionally provided public config definitions for each CFS app. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_SB_MISSION_CFG_H +#define CFE_SB_MISSION_CFG_H + +#include "cfe_sb_interface_cfg.h" + +#endif diff --git a/modules/sb/config/default_cfe_sb_msg.h b/modules/sb/config/default_cfe_sb_msg.h new file mode 100644 index 000000000..09c101ff4 --- /dev/null +++ b/modules/sb/config/default_cfe_sb_msg.h @@ -0,0 +1,38 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 WARRANTISB OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ************************************************************************/ + +/** + * @file + * Specification for the CFE Event Services (CFE_SB) command and telemetry + * message data types. + * + * This is a compatibility header for the "cfe_sb_msg.h" file that has + * traditionally provided the message definitions for cFS apps. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_SB_MSG_H +#define CFE_SB_MSG_H + +#include "cfe_mission_cfg.h" +#include "cfe_sb_msgdefs.h" +#include "cfe_sb_msgstruct.h" + +#endif diff --git a/modules/sb/config/default_cfe_sb_msgdefs.h b/modules/sb/config/default_cfe_sb_msgdefs.h new file mode 100644 index 000000000..e147861a5 --- /dev/null +++ b/modules/sb/config/default_cfe_sb_msgdefs.h @@ -0,0 +1,31 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 WARRANTISB OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ************************************************************************/ + +/** + * @file + * Specification for the CFE Event Services (CFE_SB) command and telemetry + * message constant definitions. + * + * For CFE_SB this is only the function/command code definitions + */ +#ifndef CFE_SB_MSGDEFS_H +#define CFE_SB_MSGDEFS_H + +#include "cfe_sb_fcncodes.h" + +#endif diff --git a/modules/sb/config/default_cfe_sb_msgids.h b/modules/sb/config/default_cfe_sb_msgids.h new file mode 100644 index 000000000..21fce9c10 --- /dev/null +++ b/modules/sb/config/default_cfe_sb_msgids.h @@ -0,0 +1,44 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 WARRANTISB 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 Event Services (CFE_SB) Application Message IDs + */ +#ifndef CFE_SB_MSGIDS_H +#define CFE_SB_MSGIDS_H + +#include "cfe_core_api_base_msgids.h" +#include "cfe_sb_topicids.h" + +/* +** cFE Command Message Id's +*/ +#define CFE_SB_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_SB_CMD_MSG /* 0x1803 */ +#define CFE_SB_SEND_HK_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_SB_SEND_HK_MSG /* 0x180B */ +#define CFE_SB_SUB_RPT_CTRL_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_SB_SUB_RPT_CTRL_MSG /* 0x180E */ + +/* +** CFE Telemetry Message Id's +*/ +#define CFE_SB_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_SB_HK_TLM_MSG /* 0x0803 */ +#define CFE_SB_STATS_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_SB_STATS_TLM_MSG /* 0x080A */ +#define CFE_SB_ALLSUBS_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_SB_ALLSUBS_TLM_MSG /* 0x080D */ +#define CFE_SB_ONESUB_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_SB_ONESUB_TLM_MSG /* 0x080E */ + +#endif diff --git a/modules/sb/config/default_cfe_sb_msgstruct.h b/modules/sb/config/default_cfe_sb_msgstruct.h new file mode 100644 index 000000000..cf83d161c --- /dev/null +++ b/modules/sb/config/default_cfe_sb_msgstruct.h @@ -0,0 +1,362 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 WARRANTISB OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ************************************************************************/ + +/** + * @file + * + * Purpose: + * cFE Executive Services (SB) Command and Telemetry packet definition file. + * + * References: + * Flight Software Branch C Coding Standard Version 1.0a + * cFE Flight Software Application Developers Guide + * + * Notes: + * + */ +#ifndef CFE_SB_MSGSTRUCT_H +#define CFE_SB_MSGSTRUCT_H + +/************************************************************************ + * Includes + ************************************************************************/ +#include "cfe_sb_interface_cfg.h" +#include "cfe_msg_hdr.h" + +/**************************** +** SB Command Formats ** +*****************************/ + +/* + * SB Messages which have no payload are each + * given unique typedefs to follow the command handler convention + * + * For the SB application these are mapped to the CFE_MSG_CommandHeader_t type, + * as they contain only a primary + command header. + */ +typedef CFE_MSG_CommandHeader_t CFE_SB_NoopCmd_t; +typedef CFE_MSG_CommandHeader_t CFE_SB_ResetCountersCmd_t; +typedef CFE_MSG_CommandHeader_t CFE_SB_EnableSubReportingCmd_t; +typedef CFE_MSG_CommandHeader_t CFE_SB_DisableSubReportingCmd_t; +typedef CFE_MSG_CommandHeader_t CFE_SB_SendSbStatsCmd_t; +typedef CFE_MSG_CommandHeader_t CFE_SB_SendPrevSubsCmd_t; +typedef CFE_MSG_CommandHeader_t CFE_SB_SendHkCmd_t; + +/** +** \brief Write File Info Command Payload +** +** This structure contains a generic definition used by SB commands that write to a file +*/ +typedef struct CFE_SB_WriteFileInfoCmd_Payload +{ + char Filename[CFE_MISSION_MAX_PATH_LEN]; /**< \brief Path and Filename of data to be loaded */ +} CFE_SB_WriteFileInfoCmd_Payload_t; + +/** + * \brief Write File Info Command + */ +typedef struct CFE_SB_WriteFileInfoCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_SB_WriteFileInfoCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_SB_WriteFileInfoCmd_t; + +/* + * Create a unique typedef for each of the commands that share this format. + */ +typedef CFE_SB_WriteFileInfoCmd_t CFE_SB_WriteRoutingInfoCmd_t; +typedef CFE_SB_WriteFileInfoCmd_t CFE_SB_WritePipeInfoCmd_t; +typedef CFE_SB_WriteFileInfoCmd_t CFE_SB_WriteMapInfoCmd_t; + +/** +** \brief Enable/Disable Route Command Payload +** +** This structure contains a definition used by two SB commands, +** 'Enable Route' #CFE_SB_ENABLE_ROUTE_CC and 'Disable Route' #CFE_SB_DISABLE_ROUTE_CC. +** A route is the destination pipe for a particular message and is therefore defined +** as a MsgId and PipeId combination. +*/ +typedef struct CFE_SB_RouteCmd_Payload +{ + CFE_SB_MsgId_t MsgId; /**< \brief Message ID of route to be enabled or disabled #CFE_SB_MsgId_t */ + CFE_SB_PipeId_t Pipe; /**< \brief Pipe ID of route to be enabled or disabled #CFE_SB_PipeId_t */ + uint8 Spare; /**<\brief Spare byte to make command even number of bytes */ +} CFE_SB_RouteCmd_Payload_t; + +/** + * \brief Enable/Disable Route Command + */ +typedef struct CFE_SB_RouteCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_SB_RouteCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_SB_RouteCmd_t; + +/* + * Create a unique typedef for each of the commands that share this format. + */ +typedef CFE_SB_RouteCmd_t CFE_SB_EnableRouteCmd_t; +typedef CFE_SB_RouteCmd_t CFE_SB_DisableRouteCmd_t; + +/**************************** +** SB Telemetry Formats ** +*****************************/ + +/** +** \cfesbtlm Software Bus task housekeeping Packet +*/ +typedef struct CFE_SB_HousekeepingTlm_Payload +{ + uint8 CommandCounter; /**< \cfetlmmnemonic \SB_CMDPC + \brief Count of valid commands received */ + uint8 CommandErrorCounter; /**< \cfetlmmnemonic \SB_CMDEC + \brief Count of invalid commands received */ + uint8 NoSubscribersCounter; /**< \cfetlmmnemonic \SB_NOSUBEC + \brief Count pkts sent with no subscribers */ + uint8 MsgSendErrorCounter; /**< \cfetlmmnemonic \SB_MSGSNDEC + \brief Count of message send errors */ + + uint8 MsgReceiveErrorCounter; /**< \cfetlmmnemonic \SB_MSGRECEC + \brief Count of message receive errors */ + uint8 InternalErrorCounter; /**< \cfetlmmnemonic \SB_INTERNALEC + \brief Count of queue read or write errors */ + uint8 CreatePipeErrorCounter; /**< \cfetlmmnemonic \SB_NEWPIPEEC + \brief Count of errors in create pipe API */ + uint8 SubscribeErrorCounter; /**< \cfetlmmnemonic \SB_SUBSCREC + \brief Count of errors in subscribe API */ + uint8 PipeOptsErrorCounter; /**< \cfetlmmnemonic \SB_PIPEOPTSEC + \brief Count of errors in set/get pipe options API */ + uint8 DuplicateSubscriptionsCounter; /**< \cfetlmmnemonic \SB_DUPSUBCNT + \brief Count of duplicate subscriptions */ + uint8 GetPipeIdByNameErrorCounter; /**< \cfetlmmnemonic \SB_GETPIPEIDBYNAMEEC + \brief Count of errors in get pipe id by name API */ + uint8 Spare2Align[1]; /**< \cfetlmmnemonic \SB_SPARE2ALIGN + \brief Spare bytes to ensure alignment */ + + uint16 PipeOverflowErrorCounter; /**< \cfetlmmnemonic \SB_PIPEOVREC + \brief Count of pipe overflow errors */ + uint16 MsgLimitErrorCounter; /**< \cfetlmmnemonic \SB_MSGLIMEC + \brief Count of msg id to pipe errors */ + + CFE_ES_MemHandle_t MemPoolHandle; /**< \cfetlmmnemonic \SB_MEMPOOLHANDLE + \brief Handle to SB's Memory Pool */ + + uint32 MemInUse; /**< \cfetlmmnemonic \SB_MEMINUSE + \brief Memory in use */ + + uint32 UnmarkedMem; /**< \cfetlmmnemonic \SB_UNMARKEDMEM + \brief cfg param CFE_PLATFORM_SB_BUF_MEMORY_BYTES minus Peak Memory in use */ +} CFE_SB_HousekeepingTlm_Payload_t; + +typedef struct CFE_SB_HousekeepingTlm +{ + CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ + CFE_SB_HousekeepingTlm_Payload_t Payload; /**< \brief Telemetry payload */ +} CFE_SB_HousekeepingTlm_t; + +/** +** \brief SB Pipe Depth Statistics +** +** Used in SB Statistics Telemetry Packet #CFE_SB_StatsTlm_t +*/ +typedef struct CFE_SB_PipeDepthStats +{ + CFE_SB_PipeId_t PipeId; /**< \cfetlmmnemonic \SB_PDPIPEID + \brief Pipe Id associated with the stats below */ + uint16 MaxQueueDepth; /**< \cfetlmmnemonic \SB_PDDEPTH + \brief Number of messages the pipe can hold */ + uint16 CurrentQueueDepth; /**< \cfetlmmnemonic \SB_PDINUSE + \brief Number of messages currently on the pipe */ + uint16 PeakQueueDepth; /**< \cfetlmmnemonic \SB_PDPKINUSE + \brief Peak number of messages that have been on the pipe */ + uint16 Spare; /**< \cfetlmmnemonic \SB_PDSPARE + \brief Spare word to ensure alignment */ +} CFE_SB_PipeDepthStats_t; + +/** +** \brief SB Pipe Information File Entry +** +** This statistics structure is output as part of the CFE SB +** "Send Pipe Info" command (CFE_SB_SEND_PIPE_INFO_CC). +** +** Previous versions of CFE simply wrote the internal CFE_SB_PipeD_t object +** to the file, but this also contains information such as pointers which are +** not relevant outside the running CFE process. +** +** By defining the pipe info structure separately, it also provides some +** independence, such that the internal CFE_SB_PipeD_t definition +** can evolve without changing the binary format of the information +** file. +*/ +typedef struct CFE_SB_PipeInfoEntry +{ + CFE_SB_PipeId_t PipeId; /**< The runtime ID of the pipe */ + CFE_ES_AppId_t AppId; /**< The runtime ID of the application that owns the pipe */ + char PipeName[CFE_MISSION_MAX_API_LEN]; /**< The Name of the pipe */ + char AppName[CFE_MISSION_MAX_API_LEN]; /**< The Name of the application that owns the pipe */ + uint16 MaxQueueDepth; /**< The allocated depth of the pipe (max capacity) */ + uint16 CurrentQueueDepth; /**< The current depth of the pipe */ + uint16 PeakQueueDepth; /**< The peak depth of the pipe (high watermark) */ + uint16 SendErrors; /**< Number of errors when writing to this pipe */ + uint8 Opts; /**< Pipe options set (bitmask) */ + uint8 Spare[3]; /**< Padding to make this structure a multiple of 4 bytes */ +} CFE_SB_PipeInfoEntry_t; + +/** +** \cfesbtlm SB Statistics Telemetry Packet +** +** SB Statistics packet sent in response to #CFE_SB_SEND_SB_STATS_CC +*/ +typedef struct CFE_SB_StatsTlm_Payload +{ + uint32 MsgIdsInUse; /**< \cfetlmmnemonic \SB_SMMIDIU + \brief Current number of MsgIds with a destination */ + uint32 PeakMsgIdsInUse; /**< \cfetlmmnemonic \SB_SMPMIDIU + \brief Peak number of MsgIds with a destination */ + uint32 MaxMsgIdsAllowed; /**< \cfetlmmnemonic \SB_SMMMIDALW + \brief cFE Cfg Param \link #CFE_PLATFORM_SB_MAX_MSG_IDS \endlink */ + + uint32 PipesInUse; /**< \cfetlmmnemonic \SB_SMPIU + \brief Number of pipes currently in use */ + uint32 PeakPipesInUse; /**< \cfetlmmnemonic \SB_SMPPIU + \brief Peak number of pipes since last reboot */ + uint32 MaxPipesAllowed; /**< \cfetlmmnemonic \SB_SMMPALW + \brief cFE Cfg Param \link #CFE_PLATFORM_SB_MAX_PIPES \endlink */ + + uint32 MemInUse; /**< \cfetlmmnemonic \SB_SMBMIU + \brief Memory bytes currently in use for SB msg transfers */ + uint32 PeakMemInUse; /**< \cfetlmmnemonic \SB_SMPBMIU + \brief Peak memory bytes in use for SB msg transfers */ + uint32 MaxMemAllowed; /**< \cfetlmmnemonic \SB_SMMBMALW + \brief cFE Cfg Param \link #CFE_PLATFORM_SB_BUF_MEMORY_BYTES \endlink */ + + uint32 SubscriptionsInUse; /**< \cfetlmmnemonic \SB_SMSIU + \brief Number of current subscriptions */ + uint32 PeakSubscriptionsInUse; /**< \cfetlmmnemonic \SB_SMPSIU + \brief Peak number of subscriptions */ + uint32 MaxSubscriptionsAllowed; /**< \cfetlmmnemonic \SB_SMMSALW + \brief product of \link #CFE_PLATFORM_SB_MAX_MSG_IDS \endlink + and \link #CFE_PLATFORM_SB_MAX_DEST_PER_PKT \endlink */ + + uint32 SBBuffersInUse; /**< \cfetlmmnemonic \SB_SMSBBIU + \brief Number of SB message buffers currently in use */ + uint32 PeakSBBuffersInUse; /**< \cfetlmmnemonic \SB_SMPSBBIU + \brief Max number of SB message buffers in use */ + + uint32 MaxPipeDepthAllowed; /**< \cfetlmmnemonic \SB_SMMPDALW + \brief Maximum allowed pipe depth */ + CFE_SB_PipeDepthStats_t + PipeDepthStats[CFE_MISSION_SB_MAX_PIPES]; /**< \cfetlmmnemonic \SB_SMPDS + \brief Pipe Depth Statistics #CFE_SB_PipeDepthStats_t*/ +} CFE_SB_StatsTlm_Payload_t; + +typedef struct CFE_SB_StatsTlm +{ + CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ + CFE_SB_StatsTlm_Payload_t Payload; /**< \brief Telemetry payload */ +} CFE_SB_StatsTlm_t; + +/** +** \brief SB Routing File Entry +** +** Structure of one element of the routing information in response to #CFE_SB_WRITE_ROUTING_INFO_CC +*/ +typedef struct CFE_SB_RoutingFileEntry +{ + CFE_SB_MsgId_t MsgId; /**< \brief Message Id portion of the route */ + CFE_SB_PipeId_t PipeId; /**< \brief Pipe Id portion of the route */ + uint8 State; /**< \brief Route Enabled or Disabled */ + uint16 MsgCnt; /**< \brief Number of msgs with this MsgId sent to this PipeId */ + char AppName[CFE_MISSION_MAX_API_LEN]; /**< \brief Pipe Depth Statistics */ + char PipeName[CFE_MISSION_MAX_API_LEN]; /**< \brief Pipe Depth Statistics */ +} CFE_SB_RoutingFileEntry_t; + +/** +** \brief SB Map File Entry +** +** Structure of one element of the map information in response to #CFE_SB_WRITE_MAP_INFO_CC +*/ +typedef struct CFE_SB_MsgMapFileEntry +{ + CFE_SB_MsgId_t MsgId; /**< \brief Message Id which has been subscribed to */ + CFE_SB_RouteId_Atom_t Index; /**< \brief Routing raw index value (0 based, not Route ID) */ +} CFE_SB_MsgMapFileEntry_t; + +/** +** \cfesbtlm SB Subscription Report Packet +** +** This structure defines the pkt sent by SB when a subscription or +** a request to unsubscribe is received while subscription reporting is enabled. +** By default subscription reporting is disabled. This feature is intended to be +** used primarily by Software Bus Networking Application (SBN) +** +** \sa #CFE_SB_ENABLE_SUB_REPORTING_CC, #CFE_SB_DISABLE_SUB_REPORTING_CC +*/ +typedef struct CFE_SB_SingleSubscriptionTlm_Payload +{ + uint8 SubType; /**< \brief Subscription or Unsubscription */ + CFE_SB_MsgId_t MsgId; /**< \brief MsgId subscribed or unsubscribe to */ + CFE_SB_Qos_t Qos; /**< \brief Quality of Service, used only for interprocessor communication */ + CFE_SB_PipeId_t Pipe; /**< \brief Destination pipe id to send above msg id */ +} CFE_SB_SingleSubscriptionTlm_Payload_t; + +typedef struct CFE_SB_SingleSubscriptionTlm +{ + CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ + CFE_SB_SingleSubscriptionTlm_Payload_t Payload; /**< \brief Telemetry payload */ +} CFE_SB_SingleSubscriptionTlm_t; + +/** +** \brief SB Previous Subscriptions Entry +** +** This structure defines an entry used in the CFE_SB_PrevSubsPkt_t +** Intended to be used primarily by Software Bus Networking Application (SBN) +** +** Used in structure definition #CFE_SB_AllSubscriptionsTlm_t +*/ +typedef struct CFE_SB_SubEntries +{ + CFE_SB_MsgId_t MsgId; /**< \brief MsgId portion of the subscription */ + CFE_SB_Qos_t Qos; /**< \brief Qos portion of the subscription */ + CFE_SB_PipeId_t Pipe; /**< \brief PipeId portion of the subscription */ +} CFE_SB_SubEntries_t; + +/** +** \cfesbtlm SB Previous Subscriptions Packet +** +** This structure defines the pkt(s) sent by SB that contains a list of all current +** subscriptions. This pkt is generated on cmd and intended to be used primarily by +** the Software Bus Networking Application (SBN). Typically, when the cmd is received +** there are more subscriptions than can fit in one pkt. The complete list of +** subscriptions is sent via a series of segmented pkts. +*/ +typedef struct CFE_SB_AllSubscriptionsTlm_Payload +{ + uint32 PktSegment; /**< \brief Pkt number(starts at 1) in the series */ + uint32 TotalSegments; /**< \brief Total number of pkts needed to complete the request */ + uint32 Entries; /**< \brief Number of entries in the pkt */ + CFE_SB_SubEntries_t Entry[CFE_SB_SUB_ENTRIES_PER_PKT]; /**< \brief Array of #CFE_SB_SubEntries_t entries */ +} CFE_SB_AllSubscriptionsTlm_Payload_t; + +typedef struct CFE_SB_AllSubscriptionsTlm +{ + CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ + CFE_SB_AllSubscriptionsTlm_Payload_t Payload; /**< \brief Telemetry payload */ +} CFE_SB_AllSubscriptionsTlm_t; + +#endif diff --git a/modules/sb/config/default_cfe_sb_platform_cfg.h b/modules/sb/config/default_cfe_sb_platform_cfg.h new file mode 100644 index 000000000..50cbbe905 --- /dev/null +++ b/modules/sb/config/default_cfe_sb_platform_cfg.h @@ -0,0 +1,41 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 WARRANTISB 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 Software Bus (CFE_SB) Application Platform Configuration Header File + * + * This is a compatibility header for the "platform_cfg.h" file that has + * traditionally provided both public and private config definitions + * for each CFS app. + * + * These definitions are now provided in two separate files, one for + * the public/mission scope and one for internal scope. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_SB_PLATFORM_CFG_H +#define CFE_SB_PLATFORM_CFG_H + +#include "cfe_sb_mission_cfg.h" +#include "cfe_sb_internal_cfg.h" + +#endif diff --git a/modules/sb/config/default_cfe_sb_topicids.h b/modules/sb/config/default_cfe_sb_topicids.h new file mode 100644 index 000000000..3c3e7be37 --- /dev/null +++ b/modules/sb/config/default_cfe_sb_topicids.h @@ -0,0 +1,53 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 WARRANTISB 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 Software Bus (CFE_SB) Application Topic IDs + */ +#ifndef CFE_SB_TOPICIDS_H +#define CFE_SB_TOPICIDS_H + +/** +** \cfemissioncfg cFE Portable Message Numbers for Commands +** +** \par Description: +** Portable message numbers for the cFE command messages +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_SB_CMD_MSG 3 +#define CFE_MISSION_SB_SEND_HK_MSG 11 +#define CFE_MISSION_SB_SUB_RPT_CTRL_MSG 14 + +/** +** \cfemissioncfg cFE Portable Message Numbers for Telemetry +** +** \par Description: +** Portable message numbers for the cFE telemetry messages +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_SB_HK_TLM_MSG 3 +#define CFE_MISSION_SB_STATS_TLM_MSG 10 +#define CFE_MISSION_SB_ALLSUBS_TLM_MSG 13 +#define CFE_MISSION_SB_ONESUB_TLM_MSG 14 + +#endif diff --git a/modules/sb/fsw/inc/cfe_sb_events.h b/modules/sb/fsw/inc/cfe_sb_eventids.h similarity index 100% rename from modules/sb/fsw/inc/cfe_sb_events.h rename to modules/sb/fsw/inc/cfe_sb_eventids.h diff --git a/modules/sb/fsw/src/cfe_sb_module_all.h b/modules/sb/fsw/src/cfe_sb_module_all.h index fe3070205..d26a2b83f 100644 --- a/modules/sb/fsw/src/cfe_sb_module_all.h +++ b/modules/sb/fsw/src/cfe_sb_module_all.h @@ -40,7 +40,7 @@ #include "cfe_sb_core_internal.h" #include "cfe_sb_priv.h" -#include "cfe_sb_events.h" +#include "cfe_sb_eventids.h" #include "cfe_sb_destination_typedef.h" #include "cfe_sb_msg.h" #include "cfe_sb_dispatch.h" diff --git a/modules/sb/mission_build.cmake b/modules/sb/mission_build.cmake new file mode 100644 index 000000000..1eb5c2c71 --- /dev/null +++ b/modules/sb/mission_build.cmake @@ -0,0 +1,37 @@ +########################################################### +# +# SB Core Module mission build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### + +# The list of header files that control the SB configuration +set(SB_MISSION_CONFIG_FILE_LIST + cfe_sb_mission_cfg.h + cfe_sb_interface_cfg.h + cfe_sb_extern_typedefs.h + cfe_sb_fcncodes.h + cfe_sb_msgdefs.h + cfe_sb_msg.h + cfe_sb_msgstruct.h + cfe_sb_topicids.h +) + +# Create wrappers around the all the config header files +# This makes them individually overridable by the missions, without modifying +# the distribution default copies +foreach(SB_CFGFILE ${SB_MISSION_CONFIG_FILE_LIST}) + get_filename_component(CFGKEY "${SB_CFGFILE}" NAME_WE) + if (DEFINED SB_CFGFILE_SRC_${CFGKEY}) + set(DEFAULT_SOURCE GENERATED_FILE "${SB_CFGFILE_SRC_${CFGKEY}}") + else() + set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${SB_CFGFILE}") + endif() + generate_config_includefile( + FILE_NAME "${SB_CFGFILE}" + ${DEFAULT_SOURCE} + ) +endforeach() From 4c79b5fef579517c030d08a1f38b57691f94f33c Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 2 May 2023 16:28:00 -0400 Subject: [PATCH 05/14] Fix #2320, reorganize TBL header files Organize TBL header file contents according to the convention --- modules/tbl/CMakeLists.txt | 2 +- modules/tbl/arch_build.cmake | 32 ++ .../config/default_cfe_tbl_extern_typedefs.h} | 12 - modules/tbl/config/default_cfe_tbl_fcncodes.h | 464 +++++++++++++++++ .../config/default_cfe_tbl_interface_cfg.h | 71 +++ .../tbl/config/default_cfe_tbl_internal_cfg.h | 265 ++++++++++ .../tbl/config/default_cfe_tbl_mission_cfg.h | 36 ++ modules/tbl/config/default_cfe_tbl_msg.h | 38 ++ modules/tbl/config/default_cfe_tbl_msgdefs.h | 31 ++ modules/tbl/config/default_cfe_tbl_msgids.h | 41 ++ .../default_cfe_tbl_msgstruct.h} | 466 +----------------- .../tbl/config/default_cfe_tbl_platform_cfg.h | 41 ++ modules/tbl/config/default_cfe_tbl_topicids.h | 50 ++ .../{cfe_tbl_events.h => cfe_tbl_eventids.h} | 0 modules/tbl/fsw/src/cfe_tbl_internal.h | 2 +- modules/tbl/fsw/src/cfe_tbl_module_all.h | 2 +- modules/tbl/mission_build.cmake | 37 ++ 17 files changed, 1124 insertions(+), 466 deletions(-) create mode 100644 modules/tbl/arch_build.cmake rename modules/{core_api/fsw/inc/cfe_tbl_extern_typedefs.h => tbl/config/default_cfe_tbl_extern_typedefs.h} (89%) create mode 100644 modules/tbl/config/default_cfe_tbl_fcncodes.h create mode 100644 modules/tbl/config/default_cfe_tbl_interface_cfg.h create mode 100644 modules/tbl/config/default_cfe_tbl_internal_cfg.h create mode 100644 modules/tbl/config/default_cfe_tbl_mission_cfg.h create mode 100644 modules/tbl/config/default_cfe_tbl_msg.h create mode 100644 modules/tbl/config/default_cfe_tbl_msgdefs.h create mode 100644 modules/tbl/config/default_cfe_tbl_msgids.h rename modules/tbl/{fsw/inc/cfe_tbl_msg.h => config/default_cfe_tbl_msgstruct.h} (51%) create mode 100644 modules/tbl/config/default_cfe_tbl_platform_cfg.h create mode 100644 modules/tbl/config/default_cfe_tbl_topicids.h rename modules/tbl/fsw/inc/{cfe_tbl_events.h => cfe_tbl_eventids.h} (100%) create mode 100644 modules/tbl/mission_build.cmake diff --git a/modules/tbl/CMakeLists.txt b/modules/tbl/CMakeLists.txt index 30d333245..0052b41fa 100644 --- a/modules/tbl/CMakeLists.txt +++ b/modules/tbl/CMakeLists.txt @@ -26,5 +26,5 @@ endif(ENABLE_UNIT_TESTS) cfs_app_check_intf(${DEP} cfe_tbl_msg.h - cfe_tbl_events.h + cfe_tbl_eventids.h ) diff --git a/modules/tbl/arch_build.cmake b/modules/tbl/arch_build.cmake new file mode 100644 index 000000000..25495554c --- /dev/null +++ b/modules/tbl/arch_build.cmake @@ -0,0 +1,32 @@ +########################################################### +# +# TBL Core Module platform build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### + +# The list of header files that control the TBL configuration +set(TBL_PLATFORM_CONFIG_FILE_LIST + cfe_tbl_internal_cfg.h + cfe_tbl_msgids.h + cfe_tbl_platform_cfg.h +) + +# Create wrappers around the all the config header files +# This makes them individually overridable by the missions, without modifying +# the distribution default copies +foreach(TBL_CFGFILE ${TBL_PLATFORM_CONFIG_FILE_LIST}) + get_filename_component(CFGKEY "${TBL_CFGFILE}" NAME_WE) + if (DEFINED TBL_CFGFILE_SRC_${CFGKEY}) + set(DEFAULT_SOURCE "${TBL_CFGFILE_SRC_${CFGKEY}}") + else() + set(DEFAULT_SOURCE "${CMAKE_CURRENT_LIST_DIR}/config/default_${TBL_CFGFILE}") + endif() + generate_config_includefile( + FILE_NAME "${TBL_CFGFILE}" + FALLBACK_FILE ${DEFAULT_SOURCE} + ) +endforeach() diff --git a/modules/core_api/fsw/inc/cfe_tbl_extern_typedefs.h b/modules/tbl/config/default_cfe_tbl_extern_typedefs.h similarity index 89% rename from modules/core_api/fsw/inc/cfe_tbl_extern_typedefs.h rename to modules/tbl/config/default_cfe_tbl_extern_typedefs.h index f8fcbcfc5..38540850c 100644 --- a/modules/core_api/fsw/inc/cfe_tbl_extern_typedefs.h +++ b/modules/tbl/config/default_cfe_tbl_extern_typedefs.h @@ -25,16 +25,6 @@ #ifndef CFE_TBL_EXTERN_TYPEDEFS_H #define CFE_TBL_EXTERN_TYPEDEFS_H -/* This header may be generated from an EDS file, - * tools are available and the feature is enabled */ -#ifdef CFE_EDS_ENABLED_BUILD - -/* Use the EDS generated version of these types */ -#include "cfe_tbl_eds_typedefs.h" - -#else -/* Use the local definitions of these types */ - #include "common_types.h" #include "cfe_es_extern_typedefs.h" #include "cfe_mission_cfg.h" /* for CFE_MISSION_TBL_MAX_FULL_NAME_LEN */ @@ -79,6 +69,4 @@ typedef struct CFE_TBL_File_Hdr char TableName[CFE_MISSION_TBL_MAX_FULL_NAME_LEN]; /**< Fully qualified name of table to load */ } CFE_TBL_File_Hdr_t; -#endif /* CFE_EDS_ENABLED_BUILD */ - #endif /* CFE_TBL_EXTERN_TYPEDEFS_H */ diff --git a/modules/tbl/config/default_cfe_tbl_fcncodes.h b/modules/tbl/config/default_cfe_tbl_fcncodes.h new file mode 100644 index 000000000..e5da0e13c --- /dev/null +++ b/modules/tbl/config/default_cfe_tbl_fcncodes.h @@ -0,0 +1,464 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * Specification for the CFE Event Services (CFE_TBL) command function codes + * + * @note + * This file should be strictly limited to the command/function code (CC) + * macro definitions. Other definitions such as enums, typedefs, or other + * macros should be placed in the msgdefs.h or msg.h files. + */ +#ifndef CFE_TBL_FCNCODES_H +#define CFE_TBL_FCNCODES_H + +/* +** Table task command packet command codes +*/ +/** \name Table Services Command Codes */ +/** \{ */ + +/** \cfetblcmd Table No-Op +** +** \par Description +** This command performs no other function than to increment the +** command execution counter. The command may be used to verify +** general aliveness of the Table Services task. +** +** \cfecmdmnemonic \TBL_NOOP +** +** \par Command Structure +** #CFE_TBL_NoopCmd_t +** +** \par Command Verification +** Successful execution of this command may be verified with the +** following telemetry: +** - \b \c \TBL_CMDPC - command execution counter will +** increment +** - The #CFE_TBL_NOOP_INF_EID informational event message will +** be generated +** +** \par Error Conditions +** There are no error conditions for this command. If the Table +** Services receives the command, the event is sent (although it +** may be filtered by EVS) and the counter is incremented +** unconditionally. +** +** \par Criticality +** None +** +** \sa +*/ +#define CFE_TBL_NOOP_CC 0 + +/** \cfetblcmd Table Reset Counters +** +** \par Description +** This command resets the following counters within the Table +** Services housekeeping telemetry: +** - Command Execution Counter (\TBL_CMDPC) +** - Command Error Counter (\TBL_CMDEC) +** - Successful Table Validations Counter (\TBL_VALSUCCESSCTR) +** - Failed Table Validations Counter (\TBL_VALFAILEDCTR) +** - Number of Table Validations Requested (\TBL_VALREQCTR) +** - Number of completed table validations (\TBL_VALCOMPLTDCTR) +** +** \cfecmdmnemonic \TBL_RESETCTRS +** +** \par Command Structure +** #CFE_TBL_ResetCountersCmd_t +** +** \par Command Verification +** Successful execution of this command may be verified with +** the following telemetry: +** - \b \c \TBL_CMDPC - command execution counter will +** be reset to 0 +** - The #CFE_TBL_RESET_INF_EID debug event message will be +** generated +** +** \par Error Conditions +** There are no error conditions for this command. If the Table +** Services receives the command, the event is sent (although it +** may be filtered by EVS) and the counter is incremented +** unconditionally. +** +** \par Criticality +** This command is not inherently dangerous. However, it is +** possible for ground systems and on-board safing procedures +** to be designed such that they react to changes in the counter +** values that are reset by this command. +** +** \sa +*/ +#define CFE_TBL_RESET_COUNTERS_CC 1 + +/** \cfetblcmd Load Table +** +** \par Description +** This command loads the contents of the specified file into +** an inactive buffer for the table specified within the file. +** +** \cfecmdmnemonic \TBL_LOAD +** +** \par Command Structure +** #CFE_TBL_LoadCmd_t +** +** \par Command Verification +** Successful execution of this command may be verified with +** the following telemetry: +** - \b \c \TBL_CMDPC - command execution counter will +** increment +** - The #CFE_TBL_FILE_LOADED_INF_EID informational event message +** will be generated +** +** \par Error Conditions +** This command can fail for the following reasons: +** - Table name found in table image file's table header is not found +** in table registry (ie - The table associated with the table image +** in the file has not been registered by an application). +** - The table image file has an invalid or incorrect size. The size of +** the image file must match the size field within in the header, and +** must also match the expected size of the table indicated in the registry. +** - No working buffers are available for the load. This would indicate +** that too many single-buffered table loads are in progress at the same +** time. +** - An attempt is being made to load an uninitialized table with a file +** containing only a partial table image. +** - The table image file was unable to be opened. Either the file does +** not exist at the specified location, the filename is in error, or +** the file system has been corrupted. +** +** Evidence of failure may be found in the following telemetry: +** - \b \c \TBL_CMDEC - command error counter will increment +** - Command specific error event messages are issued for all error cases +** +** \par Criticality +** This command is not inherently dangerous. It is performing the first +** step of loading a table and can be aborted (using the Abort Table Load +** command described below) without affecting the contents of the active +** table image. +** +** \sa #CFE_TBL_DUMP_CC, #CFE_TBL_VALIDATE_CC, #CFE_TBL_ACTIVATE_CC, #CFE_TBL_ABORT_LOAD_CC +*/ +#define CFE_TBL_LOAD_CC 2 + +/** \cfetblcmd Dump Table +** +** \par Description +** This command will cause the Table Services to put the contents +** of the specified table buffer into the command specified file. +** +** \cfecmdmnemonic \TBL_DUMP +** +** \par Command Structure +** #CFE_TBL_DumpCmd_t +** +** \par Command Verification +** Successful execution of this command may be verified with the +** following telemetry: +** - \b \c \TBL_CMDPC - command execution counter will +** increment +** - Either the #CFE_TBL_OVERWRITE_DUMP_INF_EID OR the +** #CFE_TBL_WRITE_DUMP_INF_EID informational event message will +** be generated +** +** \par Error Conditions +** This command may fail for the following reason(s): +** - A single buffered table's inactive buffer was requested to be +** dumped and no such buffer is currently allocated. +** - Error occurred during write operation to file. Possible causes +** might be insufficient space in the file system or the filename +** or file path is improperly specified. +** - The specified table name was not found in the table registry. +** +** Evidence of failure may be found in the following telemetry: +** - \b \c \TBL_CMDEC - command error counter will increment +** - A command specific error event message is issued for all error +** cases +** +** \par Criticality +** This command is not inherently dangerous. It will create a new +** file in the file system and could, if performed repeatedly without +** sufficient file management by the operator, fill the file system. +** +** \sa #CFE_TBL_LOAD_CC, #CFE_TBL_VALIDATE_CC, #CFE_TBL_ACTIVATE_CC, #CFE_TBL_ABORT_LOAD_CC +*/ +#define CFE_TBL_DUMP_CC 3 + +/** \cfetblcmd Validate Table +** +** \par Description +** This command will cause Table Services to calculate the Data Integrity +** Value for the specified table and to notify the owning application that +** the table's validation function should be executed. The results of both +** the Data Integrity Value computation and the validation function are +** reported in Table Services Housekeeping Telemetry. +** +** \cfecmdmnemonic \TBL_VALIDATE +** +** \par Command Structure +** #CFE_TBL_ValidateCmd_t +** +** \par Command Verification +** Successful execution of this command may be verified with the following +** telemetry: +** - \b \c \TBL_CMDPC - command execution counter will increment +** - \b \c \TBL_VALREQCTR - table validation request counter will increment +** - \b \c \TBL_LASTVALCRC - calculated data integrity value will be updated +** - The #CFE_TBL_VAL_REQ_MADE_INF_EID debug event message (indicating the +** application is being notified of a validation request) +** +** If the specified table has an associated validation function, then the +** following telemetry will also change: +** - Either \b \c \TBL_VALSUCCESSCTR OR \b \c \TBL_VALFAILEDCTR will +** increment +** - \b \c \TBL_VALCOMPLTDCTR - table validations performed counter will +** increment +** - \b \c \TBL_LASTVALS - table validation function return status will +** update +** - The #CFE_TBL_VALIDATION_INF_EID informational event message (indicating the +** validation function return status) will be generated +** +** \par Error Conditions +** This command may fail for the following reason(s): +** - A single buffered table's inactive buffer was requested to be validated +** and no such buffer is currently allocated. +** - Too many validations have been requested simultaneously. The operator +** must wait for one or more applications to perform their table validation +** functions before trying again. +** - The specified table name was not found in the table registry. +** +** Evidence of failure may be found in the following telemetry: +** - \b \c \TBL_CMDEC - command error counter will increment +** - Command specific error event message are issued for all error cases +** +** \par Criticality +** The success or failure of a table validation does not have any immediate +** impact on table contents. The results are sent to the operator in telemetry +** and the operator must determine whether the results are acceptable and send a +** command to activate the validated table image. +** +** \sa #CFE_TBL_LOAD_CC, #CFE_TBL_DUMP_CC, #CFE_TBL_ACTIVATE_CC, #CFE_TBL_ABORT_LOAD_CC +*/ +#define CFE_TBL_VALIDATE_CC 4 + +/** \cfetblcmd Activate Table +** +** \par Description +** This command will cause Table Services to notify a table's owner +** that an update is pending. The owning application will then update +** the contents of the active table buffer with the contents of the +** associated inactive table buffer at a time of their convenience. +** +** \cfecmdmnemonic \TBL_ACTIVATE +** +** \par Command Structure +** #CFE_TBL_ActivateCmd_t +** +** \par Command Verification +** Successful execution of this command may be verified with the +** following telemetry: +** - \b \c \TBL_CMDPC - command execution counter will +** increment +** - The #CFE_TBL_UPDATE_SUCCESS_INF_EID informational event message +** will be generated +** +** \par Error Conditions +** This command may fail for the following reason(s): +** - The specified table name was not found in the table registry. +** - The table was registered as a "dump only" type and thus cannot be activated +** - The table buffer has not been validated. +** +** Evidence of failure may be found in the following telemetry: +** - \b \c \TBL_CMDEC - command error counter will increment +** - Command specific error event message are issued for all +** error cases +** +** \par Criticality +** This command will cause the contents of the specified table to be +** updated with the contents in the inactive table buffer. +** +** \sa #CFE_TBL_LOAD_CC, #CFE_TBL_DUMP_CC, #CFE_TBL_VALIDATE_CC, #CFE_TBL_ABORT_LOAD_CC +*/ +#define CFE_TBL_ACTIVATE_CC 5 + +/** \cfetblcmd Dump Table Registry +** +** \par Description +** This command will cause Table Services to write some of the +** contents of the Table Registry to the command specified file. +** This allows the operator to see the current state and configuration +** of all tables that have been registered with the cFE. +** +** \cfecmdmnemonic \TBL_WRITEREG2FILE +** +** \par Command Structure +** #CFE_TBL_DumpRegistryCmd_t +** +** \par Command Verification +** Successful execution of this command may be verified with the +** following telemetry: +** - \b \c \TBL_CMDPC - command execution counter will +** increment +** - The generation of either #CFE_TBL_OVERWRITE_REG_DUMP_INF_EID +** or #CFE_TBL_WRITE_REG_DUMP_INF_EID debug event messages +** - The specified file should appear (or be updated) at the +** specified location in the file system +** +** \par Error Conditions +** This command may fail for the following reason(s): +** - A table registry dump is already in progress, not yet completed +** - The specified DumpFilename could not be parsed +** - Error occurred during write operation to file. Possible +** causes might be insufficient space in the file system +** or the filename or file path is improperly specified. +** +** Evidence of failure may be found in the following telemetry: +** - \b \c \TBL_CMDEC - command error counter will increment +** - An Error specific event message +** +** \par Criticality +** This command is not inherently dangerous. It will create a new +** file in the file system and could, if performed repeatedly without +** sufficient file management by the operator, fill the file system. +** +** \sa #CFE_TBL_SEND_REGISTRY_CC +*/ +#define CFE_TBL_DUMP_REGISTRY_CC 6 + +/** \cfetblcmd Telemeter One Table Registry Entry +** +** \par Description +** This command will cause Table Services to telemeter the contents +** of the Table Registry for the command specified table. +** +** \cfecmdmnemonic \TBL_TLMREG +** +** \par Command Structure +** #CFE_TBL_SendRegistryCmd_t +** +** \par Command Verification +** Successful execution of this command may be verified with the +** following telemetry: +** - \b \c \TBL_CMDPC - command execution counter will increment +** - Receipt of a Table Registry Info Packet (see #CFE_TBL_TableRegistryTlm_t) +** - The #CFE_TBL_TLM_REG_CMD_INF_EID debug event message will +** be generated +** +** \par Error Conditions +** This command may fail for the following reason(s): +** - The specified table name was not found in the table registry. +** +** Evidence of failure may be found in the following telemetry: +** - \b \c \TBL_CMDEC - command error counter will increment +** - Error specific event message +** +** \par Criticality +** This command is not inherently dangerous. It will generate +** additional telemetry. +** +** \sa #CFE_TBL_DUMP_REGISTRY_CC +*/ +#define CFE_TBL_SEND_REGISTRY_CC 7 + +/** \cfetblcmd Delete Critical Table from Critical Data Store +** +** \par Description +** This command will delete the Critical Data Store (CDS) associated +** with the specified Critical Table. Note that any table still +** present in the Table Registry is unable to be deleted from +** the Critical Data Store. All Applications that are accessing +** the critical table must release and unregister their access +** before the CDS can be deleted. +** +** \cfecmdmnemonic \TBL_DELETECDS +** +** \par Command Structure +** #CFE_TBL_DeleteCDSCmd_t +** +** \par Command Verification +** Successful execution of this command may be verified with the +** following telemetry: +** - \b \c \TBL_CMDPC - command execution counter will +** increment +** - The #CFE_TBL_CDS_DELETED_INFO_EID informational event message +** will be generated +** +** \par Error Conditions +** This command may fail for the following reason(s): +** - The specified table name was not found in the critical data +** store registry +** - The specified table name WAS found in the table registry (all +** registrations/sharing of the table must be unregistered before +** the table's CDS can be deleted) +** - The table's owning application is still active +** +** Evidence of failure may be found in the following telemetry: +** - \b \c \TBL_CMDEC - command error counter will increment +** - Error specific event message +** +** \par Criticality +** This command will cause the loss of the specified table's contents +** before the owning Application was terminated. +** +** \sa #CFE_ES_DUMP_CDS_REGISTRY_CC, #CFE_ES_DELETE_CDS_CC +*/ +#define CFE_TBL_DELETE_CDS_CC 8 + +/** \cfetblcmd Abort Table Load +** +** \par Description +** This command will cause Table Services to discard the contents of +** a table buffer that was previously loaded with the data in a file +** as specified by a Table Load command. For single buffered tables, +** the allocated shared working buffer is freed and becomes available +** for other Table Load commands. +** +** \cfecmdmnemonic \TBL_LOADABORT +** +** \par Command Structure +** #CFE_TBL_AbortLoadCmd_t +** +** \par Command Verification +** Successful execution of this command may be verified with the +** following telemetry: +** - \b \c \TBL_CMDPC - command execution counter will increment +** - The #CFE_TBL_LOAD_ABORT_INF_EID informational event message +** is generated +** - If the load was aborted for a single buffered table, the +** \b \c \TBL_NUMFREESHRBUF telemetry point should increment +** +** \par Error Conditions +** This command may fail for the following reason(s): +** - The specified table name was not found in the table registry. +** - The specified table did not have a load in progress to be aborted. +** +** Evidence of failure may be found in the following telemetry: +** - \b \c \TBL_CMDEC - command error counter will increment +** - Error specific event message +** +** \par Criticality +** This command will cause the loss of data put into an inactive table buffer. +** +** \sa #CFE_TBL_LOAD_CC, #CFE_TBL_DUMP_CC, #CFE_TBL_VALIDATE_CC, #CFE_TBL_ACTIVATE_CC +*/ +#define CFE_TBL_ABORT_LOAD_CC 9 +/** \} */ + +#endif diff --git a/modules/tbl/config/default_cfe_tbl_interface_cfg.h b/modules/tbl/config/default_cfe_tbl_interface_cfg.h new file mode 100644 index 000000000..214e65418 --- /dev/null +++ b/modules/tbl/config/default_cfe_tbl_interface_cfg.h @@ -0,0 +1,71 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Table Services (CFE_TBL) Application Public Definitions + * + * This provides default values for configurable items that affect + * the interface(s) of this module. This includes the CMD/TLM message + * interface, tables definitions, and any other data products that + * serve to exchange information with other entities. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_TBL_INTERFACE_CFG_H +#define CFE_TBL_INTERFACE_CFG_H + +/** +** \cfetblcfg Maximum Table Name Length +** +** \par Description: +** Indicates the maximum length (in characters) of the table name +** ('TblName') portion of a Full Table Name of the following +** form: "ApplicationName.TblName" +** +** This length does not need to include an extra character for NULL termination. +** +** \par Limits +** This value should be kept as a multiple of 4, to maintain alignment of +** any possible neighboring fields without implicit padding. +*/ +#define CFE_MISSION_TBL_MAX_NAME_LENGTH 16 + +/** +** \cfetblcfg Maximum Length of Full Table Name in messages +** +** \par Description: +** Indicates the maximum length (in characters) of the entire table name +** within software bus messages, in "AppName.TableName" notation. +** +** This affects the layout of command/telemetry messages but does not affect run +** time behavior or internal allocation. +** +** \par Limits +** All CPUs within the same SB domain (mission) must share the same definition +** Note this affects the size of messages, so it must not cause any message +** to exceed the max length. +** +** This value should be kept as a multiple of 4, to maintain alignment of +** any possible neighboring fields without implicit padding. +*/ +#define CFE_MISSION_TBL_MAX_FULL_NAME_LEN (CFE_MISSION_TBL_MAX_NAME_LENGTH + CFE_MISSION_MAX_API_LEN + 4) + +#endif diff --git a/modules/tbl/config/default_cfe_tbl_internal_cfg.h b/modules/tbl/config/default_cfe_tbl_internal_cfg.h new file mode 100644 index 000000000..412553139 --- /dev/null +++ b/modules/tbl/config/default_cfe_tbl_internal_cfg.h @@ -0,0 +1,265 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Table Services (CFE_TBL) Application Private Config Definitions + * + * This provides default values for configurable items that are internal + * to this module and do NOT affect the interface(s) of this module. Changes + * to items in this file only affect the local module and will be transparent + * to external entities that are using the public interface(s). + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_TBL_INTERNAL_CFG_H +#define CFE_TBL_INTERNAL_CFG_H + +/** +** \cfeescfg Define TBL Task Priority +** +** \par Description: +** Defines the cFE_TBL Task priority. +** +** \par Limits +** Not Applicable +*/ +#define CFE_PLATFORM_TBL_START_TASK_PRIORITY 70 + +/** +** \cfeescfg Define TBL Task Stack Size +** +** \par Description: +** Defines the cFE_TBL Task Stack Size +** +** \par Limits +** There is a lower limit of 2048 on this configuration parameter. There +** are no restrictions on the upper limit however, the maximum stack size +** is system dependent and should be verified. Most operating systems provide +** tools for measuring the amount of stack used by a task during operation. It +** is always a good idea to verify that no more than 1/2 of the stack is used. +*/ +#define CFE_PLATFORM_TBL_START_TASK_STACK_SIZE CFE_PLATFORM_ES_DEFAULT_STACK_SIZE + +/* Platform Configuration Parameters for Table Service (TBL) */ + +/** +** \cfetblcfg Size of Table Services Table Memory Pool +** +** \par Description: +** Defines the TOTAL size of the memory pool that cFE Table Services allocates +** from the system. The size must be large enough to provide memory for each +** registered table, the inactive buffers for double buffered tables and for +** the shared inactive buffers for single buffered tables. +** +** \par Limits +** The cFE does not place a limit on the size of this parameter. +*/ +#define CFE_PLATFORM_TBL_BUF_MEMORY_BYTES 524288 + +/** +** \cfetblcfg Maximum Size Allowed for a Double Buffered Table +** +** \par Description: +** Defines the maximum allowed size (in bytes) of a double buffered table. +** +** \par Limits +** The cFE does not place a limit on the size of this parameter but it must be +** less than half of #CFE_PLATFORM_TBL_BUF_MEMORY_BYTES. +*/ +#define CFE_PLATFORM_TBL_MAX_DBL_TABLE_SIZE 16384 + +/** +** \cfetblcfg Maximum Size Allowed for a Single Buffered Table +** +** \par Description: +** Defines the maximum allowed size (in bytes) of a single buffered table. +** \b NOTE: This size determines the size of all shared table buffers. +** Therefore, this size will be multiplied by #CFE_PLATFORM_TBL_MAX_SIMULTANEOUS_LOADS +** below when allocating memory for shared tables. +** +** \par Limits +** The cFE does not place a limit on the size of this parameter but it must be +** small enough to allow for #CFE_PLATFORM_TBL_MAX_SIMULTANEOUS_LOADS number of tables +** to fit into #CFE_PLATFORM_TBL_BUF_MEMORY_BYTES. +*/ +#define CFE_PLATFORM_TBL_MAX_SNGL_TABLE_SIZE 16384 + +/** +** \cfetblcfg Maximum Number of Tables Allowed to be Registered +** +** \par Description: +** Defines the maximum number of tables supported by this processor's Table Services. +** +** \par Limits +** This number must be less than 32767. It should be recognized that this parameter +** determines the size of the Table Registry. An excessively high number will waste +** memory. +*/ +#define CFE_PLATFORM_TBL_MAX_NUM_TABLES 128 + +/** +** \cfetblcfg Maximum Number of Critical Tables that can be Registered +** +** \par Description: +** Defines the maximum number of critical tables supported by this processor's Table Services. +** +** \par Limits +** This number must be less than 32767. It should be recognized that this parameter +** determines the size of the Critical Table Registry which is maintained in the Critical +** Data Store. An excessively high number will waste Critical Data Store memory. Therefore, +** this number must not exceed the value defined in CFE_ES_CDS_MAX_CRITICAL_TABLES. +*/ +#define CFE_PLATFORM_TBL_MAX_CRITICAL_TABLES 32 + +/** +** \cfetblcfg Maximum Number of Table Handles +** +** \par Description: +** Defines the maximum number of Table Handles. +** +** \par Limits +** This number must be less than 32767. This number must be at least as big as +** the number of tables (#CFE_PLATFORM_TBL_MAX_NUM_TABLES) and should be set higher if tables +** are shared between applications. +*/ +#define CFE_PLATFORM_TBL_MAX_NUM_HANDLES 256 + +/** +** \cfetblcfg Maximum Number of Simultaneous Loads to Support +** +** \par Description: +** Defines the maximum number of single buffered tables that can be +** loaded simultaneously. This number is used to determine the number +** of shared buffers to allocate. +** +** \par Limits +** This number must be less than 32767. An excessively high number will +** degrade system performance and waste memory. A number less than 5 is +** suggested but not required. +*/ +#define CFE_PLATFORM_TBL_MAX_SIMULTANEOUS_LOADS 4 + +/** +** \cfetblcfg Maximum Number of Simultaneous Table Validations +** +** \par Description: +** Defines the maximum number of pending validations that +** the Table Services can handle at any one time. When a +** table has a validation function, a validation request is +** made of the application to perform that validation. This +** number determines how many of those requests can be +** outstanding at any one time. +** +** \par Limits +** This number must be less than 32767. An excessively high number will +** degrade system performance and waste memory. A number less than 20 is +** suggested but not required. +*/ +#define CFE_PLATFORM_TBL_MAX_NUM_VALIDATIONS 10 + +/** +** \cfetblcfg Default Filename for a Table Registry Dump +** +** \par Description: +** Defines the file name used to store the table registry when +** no filename is specified in the dump registry command. +** +** \par Limits +** The length of each string, including the NULL terminator cannot exceed the +** #OS_MAX_PATH_LEN value. +*/ +#define CFE_PLATFORM_TBL_DEFAULT_REG_DUMP_FILE "/ram/cfe_tbl_reg.log" + +/** +** \cfetblcfg Number of Spacecraft ID's specified for validation +** +** \par Description: +** Defines the number of specified spacecraft ID values that +** are verified during table loads. If the number is zero +** then no validation of the spacecraft ID field in the table +** file header is performed when tables are loaded. Non-zero +** values indicate how many values from the list of spacecraft +** ID's defined below are compared to the spacecraft ID field +** in the table file header. The ELF2CFETBL tool may be used +** to create table files with specified spacecraft ID values. +** +** \par Limits +** This number must be greater than or equal to zero and +** less than or equal to 2. +*/ +#define CFE_PLATFORM_TBL_VALID_SCID_COUNT 0 + +/* macro to construct 32 bit value from 4 chars */ +#define CFE_PLATFORM_TBL_U32FROM4CHARS(_C1, _C2, _C3, _C4) \ + ((uint32)(_C1) << 24 | (uint32)(_C2) << 16 | (uint32)(_C3) << 8 | (uint32)(_C4)) + +/** +** \cfetblcfg Spacecraft ID values used for table load validation +** +** \par Description: +** Defines the spacecraft ID values used for validating the +** spacecraft ID field in the table file header. To be valid, +** the spacecraft ID specified in the table file header must +** match one of the values defined here. +** +** \par Limits +** This value can be any 32 bit unsigned integer. +*/ +#define CFE_PLATFORM_TBL_VALID_SCID_1 (0x42) +#define CFE_PLATFORM_TBL_VALID_SCID_2 (CFE_PLATFORM_TBL_U32FROM4CHARS('a', 'b', 'c', 'd')) + +/** +** \cfetblcfg Number of Processor ID's specified for validation +** +** \par Description: +** Defines the number of specified processor ID values that +** are verified during table loads. If the number is zero +** then no validation of the processor ID field in the table +** file header is performed when tables are loaded. Non-zero +** values indicate how many values from the list of processor +** ID's defined below are compared to the processor ID field +** in the table file header. The ELF2CFETBL tool may be used +** to create table files with specified processor ID values. +** +** \par Limits +** This number must be greater than or equal to zero and +** less than or equal to 4. +*/ +#define CFE_PLATFORM_TBL_VALID_PRID_COUNT 0 + +/** +** \cfetblcfg Processor ID values used for table load validation +** +** \par Description: +** Defines the processor ID values used for validating the +** processor ID field in the table file header. To be valid, +** the spacecraft ID specified in the table file header must +** match one of the values defined here. +** +** \par Limits +** This value can be any 32 bit unsigned integer. +*/ +#define CFE_PLATFORM_TBL_VALID_PRID_1 (1) +#define CFE_PLATFORM_TBL_VALID_PRID_2 (CFE_PLATFORM_TBL_U32FROM4CHARS('a', 'b', 'c', 'd')) +#define CFE_PLATFORM_TBL_VALID_PRID_3 0 +#define CFE_PLATFORM_TBL_VALID_PRID_4 0 + +#endif diff --git a/modules/tbl/config/default_cfe_tbl_mission_cfg.h b/modules/tbl/config/default_cfe_tbl_mission_cfg.h new file mode 100644 index 000000000..9e3c57d21 --- /dev/null +++ b/modules/tbl/config/default_cfe_tbl_mission_cfg.h @@ -0,0 +1,36 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Event Services (CFE_TBL) Application Mission Configuration Header File + * + * This is a compatibility header for the "mission_cfg.h" file that has + * traditionally provided public config definitions for each CFS app. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_TBL_MISSION_CFG_H +#define CFE_TBL_MISSION_CFG_H + +#include "cfe_tbl_interface_cfg.h" + +#endif diff --git a/modules/tbl/config/default_cfe_tbl_msg.h b/modules/tbl/config/default_cfe_tbl_msg.h new file mode 100644 index 000000000..b6893bdca --- /dev/null +++ b/modules/tbl/config/default_cfe_tbl_msg.h @@ -0,0 +1,38 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * Specification for the CFE Event Services (CFE_TBL) command and telemetry + * message data types. + * + * This is a compatibility header for the "cfe_tbl_msg.h" file that has + * traditionally provided the message definitions for cFS apps. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_TBL_MSG_H +#define CFE_TBL_MSG_H + +#include "cfe_mission_cfg.h" +#include "cfe_tbl_msgdefs.h" +#include "cfe_tbl_msgstruct.h" + +#endif diff --git a/modules/tbl/config/default_cfe_tbl_msgdefs.h b/modules/tbl/config/default_cfe_tbl_msgdefs.h new file mode 100644 index 000000000..ef6899b83 --- /dev/null +++ b/modules/tbl/config/default_cfe_tbl_msgdefs.h @@ -0,0 +1,31 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * Specification for the CFE Event Services (CFE_TBL) command and telemetry + * message constant definitions. + * + * For CFE_TBL this is only the function/command code definitions + */ +#ifndef CFE_TBL_MSGDEFS_H +#define CFE_TBL_MSGDEFS_H + +#include "cfe_tbl_fcncodes.h" + +#endif diff --git a/modules/tbl/config/default_cfe_tbl_msgids.h b/modules/tbl/config/default_cfe_tbl_msgids.h new file mode 100644 index 000000000..58d492c9f --- /dev/null +++ b/modules/tbl/config/default_cfe_tbl_msgids.h @@ -0,0 +1,41 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Event Services (CFE_TBL) Application Message IDs + */ +#ifndef CFE_TBL_MSGIDS_H +#define CFE_TBL_MSGIDS_H + +#include "cfe_core_api_base_msgids.h" +#include "cfe_tbl_topicids.h" + +/* +** cFE Command Message Id's +*/ +#define CFE_TBL_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TBL_CMD_MSG /* 0x1804 */ +#define CFE_TBL_SEND_HK_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TBL_SEND_HK_MSG /* 0x180C */ + +/* +** CFE Telemetry Message Id's +*/ +#define CFE_TBL_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TBL_HK_TLM_MSG /* 0x0804 */ +#define CFE_TBL_REG_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TBL_REG_TLM_MSG /* 0x080C */ + +#endif diff --git a/modules/tbl/fsw/inc/cfe_tbl_msg.h b/modules/tbl/config/default_cfe_tbl_msgstruct.h similarity index 51% rename from modules/tbl/fsw/inc/cfe_tbl_msg.h rename to modules/tbl/config/default_cfe_tbl_msgstruct.h index f48494194..04f76dbad 100644 --- a/modules/tbl/fsw/inc/cfe_tbl_msg.h +++ b/modules/tbl/config/default_cfe_tbl_msgstruct.h @@ -19,461 +19,25 @@ /** * @file * - * Purpose: cFE Table Services (TBL) SB message definitions header file + * Purpose: + * cFE Executive Services (TBL) Command and Telemetry packet definition file. * - * Author: D.Kobe/Hammers + * References: + * Flight Software Branch C Coding Standard Version 1.0a + * cFE Flight Software Application Developers Guide * - * Notes: + * Notes: * */ +#ifndef CFE_TBL_MSGSTRUCT_H +#define CFE_TBL_MSGSTRUCT_H -#ifndef CFE_TBL_MSG_H -#define CFE_TBL_MSG_H - -/* -** Required header files... -*/ -#include "common_types.h" /* Basic data types */ -#include "cfe_msg_hdr.h" /* for header definitions */ -#include "cfe_tbl_extern_typedefs.h" -#include "cfe_time_extern_typedefs.h" - -/*************************************************************************/ - -/* -** Table task command packet command codes -*/ -/** \name Table Services Command Codes */ -/** \{ */ - -/** \cfetblcmd Table No-Op -** -** \par Description -** This command performs no other function than to increment the -** command execution counter. The command may be used to verify -** general aliveness of the Table Services task. -** -** \cfecmdmnemonic \TBL_NOOP -** -** \par Command Structure -** #CFE_TBL_NoopCmd_t -** -** \par Command Verification -** Successful execution of this command may be verified with the -** following telemetry: -** - \b \c \TBL_CMDPC - command execution counter will -** increment -** - The #CFE_TBL_NOOP_INF_EID informational event message will -** be generated -** -** \par Error Conditions -** There are no error conditions for this command. If the Table -** Services receives the command, the event is sent (although it -** may be filtered by EVS) and the counter is incremented -** unconditionally. -** -** \par Criticality -** None -** -** \sa -*/ -#define CFE_TBL_NOOP_CC 0 - -/** \cfetblcmd Table Reset Counters -** -** \par Description -** This command resets the following counters within the Table -** Services housekeeping telemetry: -** - Command Execution Counter (\TBL_CMDPC) -** - Command Error Counter (\TBL_CMDEC) -** - Successful Table Validations Counter (\TBL_VALSUCCESSCTR) -** - Failed Table Validations Counter (\TBL_VALFAILEDCTR) -** - Number of Table Validations Requested (\TBL_VALREQCTR) -** - Number of completed table validations (\TBL_VALCOMPLTDCTR) -** -** \cfecmdmnemonic \TBL_RESETCTRS -** -** \par Command Structure -** #CFE_TBL_ResetCountersCmd_t -** -** \par Command Verification -** Successful execution of this command may be verified with -** the following telemetry: -** - \b \c \TBL_CMDPC - command execution counter will -** be reset to 0 -** - The #CFE_TBL_RESET_INF_EID debug event message will be -** generated -** -** \par Error Conditions -** There are no error conditions for this command. If the Table -** Services receives the command, the event is sent (although it -** may be filtered by EVS) and the counter is incremented -** unconditionally. -** -** \par Criticality -** This command is not inherently dangerous. However, it is -** possible for ground systems and on-board safing procedures -** to be designed such that they react to changes in the counter -** values that are reset by this command. -** -** \sa -*/ -#define CFE_TBL_RESET_COUNTERS_CC 1 - -/** \cfetblcmd Load Table -** -** \par Description -** This command loads the contents of the specified file into -** an inactive buffer for the table specified within the file. -** -** \cfecmdmnemonic \TBL_LOAD -** -** \par Command Structure -** #CFE_TBL_LoadCmd_t -** -** \par Command Verification -** Successful execution of this command may be verified with -** the following telemetry: -** - \b \c \TBL_CMDPC - command execution counter will -** increment -** - The #CFE_TBL_FILE_LOADED_INF_EID informational event message -** will be generated -** -** \par Error Conditions -** This command can fail for the following reasons: -** - Table name found in table image file's table header is not found -** in table registry (ie - The table associated with the table image -** in the file has not been registered by an application). -** - The table image file has an invalid or incorrect size. The size of -** the image file must match the size field within in the header, and -** must also match the expected size of the table indicated in the registry. -** - No working buffers are available for the load. This would indicate -** that too many single-buffered table loads are in progress at the same -** time. -** - An attempt is being made to load an uninitialized table with a file -** containing only a partial table image. -** - The table image file was unable to be opened. Either the file does -** not exist at the specified location, the filename is in error, or -** the file system has been corrupted. -** -** Evidence of failure may be found in the following telemetry: -** - \b \c \TBL_CMDEC - command error counter will increment -** - Command specific error event messages are issued for all error cases -** -** \par Criticality -** This command is not inherently dangerous. It is performing the first -** step of loading a table and can be aborted (using the Abort Table Load -** command described below) without affecting the contents of the active -** table image. -** -** \sa #CFE_TBL_DUMP_CC, #CFE_TBL_VALIDATE_CC, #CFE_TBL_ACTIVATE_CC, #CFE_TBL_ABORT_LOAD_CC -*/ -#define CFE_TBL_LOAD_CC 2 - -/** \cfetblcmd Dump Table -** -** \par Description -** This command will cause the Table Services to put the contents -** of the specified table buffer into the command specified file. -** -** \cfecmdmnemonic \TBL_DUMP -** -** \par Command Structure -** #CFE_TBL_DumpCmd_t -** -** \par Command Verification -** Successful execution of this command may be verified with the -** following telemetry: -** - \b \c \TBL_CMDPC - command execution counter will -** increment -** - Either the #CFE_TBL_OVERWRITE_DUMP_INF_EID OR the -** #CFE_TBL_WRITE_DUMP_INF_EID informational event message will -** be generated -** -** \par Error Conditions -** This command may fail for the following reason(s): -** - A single buffered table's inactive buffer was requested to be -** dumped and no such buffer is currently allocated. -** - Error occurred during write operation to file. Possible causes -** might be insufficient space in the file system or the filename -** or file path is improperly specified. -** - The specified table name was not found in the table registry. -** -** Evidence of failure may be found in the following telemetry: -** - \b \c \TBL_CMDEC - command error counter will increment -** - A command specific error event message is issued for all error -** cases -** -** \par Criticality -** This command is not inherently dangerous. It will create a new -** file in the file system and could, if performed repeatedly without -** sufficient file management by the operator, fill the file system. -** -** \sa #CFE_TBL_LOAD_CC, #CFE_TBL_VALIDATE_CC, #CFE_TBL_ACTIVATE_CC, #CFE_TBL_ABORT_LOAD_CC -*/ -#define CFE_TBL_DUMP_CC 3 - -/** \cfetblcmd Validate Table -** -** \par Description -** This command will cause Table Services to calculate the Data Integrity -** Value for the specified table and to notify the owning application that -** the table's validation function should be executed. The results of both -** the Data Integrity Value computation and the validation function are -** reported in Table Services Housekeeping Telemetry. -** -** \cfecmdmnemonic \TBL_VALIDATE -** -** \par Command Structure -** #CFE_TBL_ValidateCmd_t -** -** \par Command Verification -** Successful execution of this command may be verified with the following -** telemetry: -** - \b \c \TBL_CMDPC - command execution counter will increment -** - \b \c \TBL_VALREQCTR - table validation request counter will increment -** - \b \c \TBL_LASTVALCRC - calculated data integrity value will be updated -** - The #CFE_TBL_VAL_REQ_MADE_INF_EID debug event message (indicating the -** application is being notified of a validation request) -** -** If the specified table has an associated validation function, then the -** following telemetry will also change: -** - Either \b \c \TBL_VALSUCCESSCTR OR \b \c \TBL_VALFAILEDCTR will -** increment -** - \b \c \TBL_VALCOMPLTDCTR - table validations performed counter will -** increment -** - \b \c \TBL_LASTVALS - table validation function return status will -** update -** - The #CFE_TBL_VALIDATION_INF_EID informational event message (indicating the -** validation function return status) will be generated -** -** \par Error Conditions -** This command may fail for the following reason(s): -** - A single buffered table's inactive buffer was requested to be validated -** and no such buffer is currently allocated. -** - Too many validations have been requested simultaneously. The operator -** must wait for one or more applications to perform their table validation -** functions before trying again. -** - The specified table name was not found in the table registry. -** -** Evidence of failure may be found in the following telemetry: -** - \b \c \TBL_CMDEC - command error counter will increment -** - Command specific error event message are issued for all error cases -** -** \par Criticality -** The success or failure of a table validation does not have any immediate -** impact on table contents. The results are sent to the operator in telemetry -** and the operator must determine whether the results are acceptable and send a -** command to activate the validated table image. -** -** \sa #CFE_TBL_LOAD_CC, #CFE_TBL_DUMP_CC, #CFE_TBL_ACTIVATE_CC, #CFE_TBL_ABORT_LOAD_CC -*/ -#define CFE_TBL_VALIDATE_CC 4 - -/** \cfetblcmd Activate Table -** -** \par Description -** This command will cause Table Services to notify a table's owner -** that an update is pending. The owning application will then update -** the contents of the active table buffer with the contents of the -** associated inactive table buffer at a time of their convenience. -** -** \cfecmdmnemonic \TBL_ACTIVATE -** -** \par Command Structure -** #CFE_TBL_ActivateCmd_t -** -** \par Command Verification -** Successful execution of this command may be verified with the -** following telemetry: -** - \b \c \TBL_CMDPC - command execution counter will -** increment -** - The #CFE_TBL_UPDATE_SUCCESS_INF_EID informational event message -** will be generated -** -** \par Error Conditions -** This command may fail for the following reason(s): -** - The specified table name was not found in the table registry. -** - The table was registered as a "dump only" type and thus cannot be activated -** - The table buffer has not been validated. -** -** Evidence of failure may be found in the following telemetry: -** - \b \c \TBL_CMDEC - command error counter will increment -** - Command specific error event message are issued for all -** error cases -** -** \par Criticality -** This command will cause the contents of the specified table to be -** updated with the contents in the inactive table buffer. -** -** \sa #CFE_TBL_LOAD_CC, #CFE_TBL_DUMP_CC, #CFE_TBL_VALIDATE_CC, #CFE_TBL_ABORT_LOAD_CC -*/ -#define CFE_TBL_ACTIVATE_CC 5 - -/** \cfetblcmd Dump Table Registry -** -** \par Description -** This command will cause Table Services to write some of the -** contents of the Table Registry to the command specified file. -** This allows the operator to see the current state and configuration -** of all tables that have been registered with the cFE. -** -** \cfecmdmnemonic \TBL_WRITEREG2FILE -** -** \par Command Structure -** #CFE_TBL_DumpRegistryCmd_t -** -** \par Command Verification -** Successful execution of this command may be verified with the -** following telemetry: -** - \b \c \TBL_CMDPC - command execution counter will -** increment -** - The generation of either #CFE_TBL_OVERWRITE_REG_DUMP_INF_EID -** or #CFE_TBL_WRITE_REG_DUMP_INF_EID debug event messages -** - The specified file should appear (or be updated) at the -** specified location in the file system -** -** \par Error Conditions -** This command may fail for the following reason(s): -** - A table registry dump is already in progress, not yet completed -** - The specified DumpFilename could not be parsed -** - Error occurred during write operation to file. Possible -** causes might be insufficient space in the file system -** or the filename or file path is improperly specified. -** -** Evidence of failure may be found in the following telemetry: -** - \b \c \TBL_CMDEC - command error counter will increment -** - An Error specific event message -** -** \par Criticality -** This command is not inherently dangerous. It will create a new -** file in the file system and could, if performed repeatedly without -** sufficient file management by the operator, fill the file system. -** -** \sa #CFE_TBL_SEND_REGISTRY_CC -*/ -#define CFE_TBL_DUMP_REGISTRY_CC 6 - -/** \cfetblcmd Telemeter One Table Registry Entry -** -** \par Description -** This command will cause Table Services to telemeter the contents -** of the Table Registry for the command specified table. -** -** \cfecmdmnemonic \TBL_TLMREG -** -** \par Command Structure -** #CFE_TBL_SendRegistryCmd_t -** -** \par Command Verification -** Successful execution of this command may be verified with the -** following telemetry: -** - \b \c \TBL_CMDPC - command execution counter will increment -** - Receipt of a Table Registry Info Packet (see #CFE_TBL_TableRegistryTlm_t) -** - The #CFE_TBL_TLM_REG_CMD_INF_EID debug event message will -** be generated -** -** \par Error Conditions -** This command may fail for the following reason(s): -** - The specified table name was not found in the table registry. -** -** Evidence of failure may be found in the following telemetry: -** - \b \c \TBL_CMDEC - command error counter will increment -** - Error specific event message -** -** \par Criticality -** This command is not inherently dangerous. It will generate -** additional telemetry. -** -** \sa #CFE_TBL_DUMP_REGISTRY_CC -*/ -#define CFE_TBL_SEND_REGISTRY_CC 7 - -/** \cfetblcmd Delete Critical Table from Critical Data Store -** -** \par Description -** This command will delete the Critical Data Store (CDS) associated -** with the specified Critical Table. Note that any table still -** present in the Table Registry is unable to be deleted from -** the Critical Data Store. All Applications that are accessing -** the critical table must release and unregister their access -** before the CDS can be deleted. -** -** \cfecmdmnemonic \TBL_DELETECDS -** -** \par Command Structure -** #CFE_TBL_DeleteCDSCmd_t -** -** \par Command Verification -** Successful execution of this command may be verified with the -** following telemetry: -** - \b \c \TBL_CMDPC - command execution counter will -** increment -** - The #CFE_TBL_CDS_DELETED_INFO_EID informational event message -** will be generated -** -** \par Error Conditions -** This command may fail for the following reason(s): -** - The specified table name was not found in the critical data -** store registry -** - The specified table name WAS found in the table registry (all -** registrations/sharing of the table must be unregistered before -** the table's CDS can be deleted) -** - The table's owning application is still active -** -** Evidence of failure may be found in the following telemetry: -** - \b \c \TBL_CMDEC - command error counter will increment -** - Error specific event message -** -** \par Criticality -** This command will cause the loss of the specified table's contents -** before the owning Application was terminated. -** -** \sa #CFE_ES_DUMP_CDS_REGISTRY_CC, #CFE_ES_DELETE_CDS_CC -*/ -#define CFE_TBL_DELETE_CDS_CC 8 - -/** \cfetblcmd Abort Table Load -** -** \par Description -** This command will cause Table Services to discard the contents of -** a table buffer that was previously loaded with the data in a file -** as specified by a Table Load command. For single buffered tables, -** the allocated shared working buffer is freed and becomes available -** for other Table Load commands. -** -** \cfecmdmnemonic \TBL_LOADABORT -** -** \par Command Structure -** #CFE_TBL_AbortLoadCmd_t -** -** \par Command Verification -** Successful execution of this command may be verified with the -** following telemetry: -** - \b \c \TBL_CMDPC - command execution counter will increment -** - The #CFE_TBL_LOAD_ABORT_INF_EID informational event message -** is generated -** - If the load was aborted for a single buffered table, the -** \b \c \TBL_NUMFREESHRBUF telemetry point should increment -** -** \par Error Conditions -** This command may fail for the following reason(s): -** - The specified table name was not found in the table registry. -** - The specified table did not have a load in progress to be aborted. -** -** Evidence of failure may be found in the following telemetry: -** - \b \c \TBL_CMDEC - command error counter will increment -** - Error specific event message -** -** \par Criticality -** This command will cause the loss of data put into an inactive table buffer. -** -** \sa #CFE_TBL_LOAD_CC, #CFE_TBL_DUMP_CC, #CFE_TBL_VALIDATE_CC, #CFE_TBL_ACTIVATE_CC -*/ -#define CFE_TBL_ABORT_LOAD_CC 9 -/** \} */ - -/*************************************************************************/ +/************************************************************************ + * Includes + ************************************************************************/ +#include "cfe_mission_cfg.h" +#include "cfe_tbl_msgdefs.h" +#include "cfe_msg_hdr.h" /********************************/ /* Command Message Data Formats */ @@ -834,4 +398,4 @@ typedef struct CFE_TBL_TableRegistryTlm CFE_TBL_TblRegPacket_Payload_t Payload; /**< \brief Telemetry payload */ } CFE_TBL_TableRegistryTlm_t; -#endif /* CFE_TBL_MSG_H */ +#endif diff --git a/modules/tbl/config/default_cfe_tbl_platform_cfg.h b/modules/tbl/config/default_cfe_tbl_platform_cfg.h new file mode 100644 index 000000000..5bcff58d7 --- /dev/null +++ b/modules/tbl/config/default_cfe_tbl_platform_cfg.h @@ -0,0 +1,41 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Table Services (CFE_TBL) Application Platform Configuration Header File + * + * This is a compatibility header for the "platform_cfg.h" file that has + * traditionally provided both public and private config definitions + * for each CFS app. + * + * These definitions are now provided in two separate files, one for + * the public/mission scope and one for internal scope. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_TBL_PLATFORM_CFG_H +#define CFE_TBL_PLATFORM_CFG_H + +#include "cfe_tbl_mission_cfg.h" +#include "cfe_tbl_internal_cfg.h" + +#endif diff --git a/modules/tbl/config/default_cfe_tbl_topicids.h b/modules/tbl/config/default_cfe_tbl_topicids.h new file mode 100644 index 000000000..207cff719 --- /dev/null +++ b/modules/tbl/config/default_cfe_tbl_topicids.h @@ -0,0 +1,50 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Table Services (CFE_TBL) Application Topic IDs + */ +#ifndef CFE_TBL_TOPICIDS_H +#define CFE_TBL_TOPICIDS_H + +/** +** \cfemissioncfg cFE Portable Message Numbers for Commands +** +** \par Description: +** Portable message numbers for the cFE command messages +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_TBL_CMD_MSG 4 +#define CFE_MISSION_TBL_SEND_HK_MSG 12 + +/** +** \cfemissioncfg cFE Portable Message Numbers for Telemetry +** +** \par Description: +** Portable message numbers for the cFE telemetry messages +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_TBL_HK_TLM_MSG 4 +#define CFE_MISSION_TBL_REG_TLM_MSG 12 + +#endif diff --git a/modules/tbl/fsw/inc/cfe_tbl_events.h b/modules/tbl/fsw/inc/cfe_tbl_eventids.h similarity index 100% rename from modules/tbl/fsw/inc/cfe_tbl_events.h rename to modules/tbl/fsw/inc/cfe_tbl_eventids.h diff --git a/modules/tbl/fsw/src/cfe_tbl_internal.h b/modules/tbl/fsw/src/cfe_tbl_internal.h index 6af1def29..556394ffa 100644 --- a/modules/tbl/fsw/src/cfe_tbl_internal.h +++ b/modules/tbl/fsw/src/cfe_tbl_internal.h @@ -39,7 +39,7 @@ #include "cfe_perfids.h" #include "cfe_tbl_task.h" #include "cfe_tbl_task_cmds.h" -#include "cfe_tbl_events.h" +#include "cfe_tbl_eventids.h" #include "cfe_tbl_msg.h" /********************* Macro and Constant Type Definitions ***************************/ diff --git a/modules/tbl/fsw/src/cfe_tbl_module_all.h b/modules/tbl/fsw/src/cfe_tbl_module_all.h index a4b4a304e..a9f87a659 100644 --- a/modules/tbl/fsw/src/cfe_tbl_module_all.h +++ b/modules/tbl/fsw/src/cfe_tbl_module_all.h @@ -39,7 +39,7 @@ #include "cfe_tbl_core_internal.h" -#include "cfe_tbl_events.h" +#include "cfe_tbl_eventids.h" #include "cfe_tbl_msg.h" #include "cfe_tbl_internal.h" #include "cfe_tbl_task.h" diff --git a/modules/tbl/mission_build.cmake b/modules/tbl/mission_build.cmake new file mode 100644 index 000000000..d968d5f0c --- /dev/null +++ b/modules/tbl/mission_build.cmake @@ -0,0 +1,37 @@ +########################################################### +# +# TBL Core Module mission build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### + +# The list of header files that control the TBL configuration +set(TBL_MISSION_CONFIG_FILE_LIST + cfe_tbl_mission_cfg.h + cfe_tbl_interface_cfg.h + cfe_tbl_extern_typedefs.h + cfe_tbl_fcncodes.h + cfe_tbl_msgdefs.h + cfe_tbl_msg.h + cfe_tbl_msgstruct.h + cfe_tbl_topicids.h +) + +# Create wrappers around the all the config header files +# This makes them individually overridable by the missions, without modifying +# the distribution default copies +foreach(TBL_CFGFILE ${TBL_MISSION_CONFIG_FILE_LIST}) + get_filename_component(CFGKEY "${TBL_CFGFILE}" NAME_WE) + if (DEFINED TBL_CFGFILE_SRC_${CFGKEY}) + set(DEFAULT_SOURCE GENERATED_FILE "${TBL_CFGFILE_SRC_${CFGKEY}}") + else() + set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${TBL_CFGFILE}") + endif() + generate_config_includefile( + FILE_NAME "${TBL_CFGFILE}" + ${DEFAULT_SOURCE} + ) +endforeach() From d5e2d89d6d5f4604cd2fe63e357859a01306ad0f Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 2 May 2023 16:28:00 -0400 Subject: [PATCH 06/14] Fix #2320, reorganize TIME header files Organize TIME header file contents according to the convention --- modules/time/CMakeLists.txt | 2 +- modules/time/arch_build.cmake | 32 ++ .../default_cfe_time_extern_typedefs.h} | 12 - .../default_cfe_time_fcncodes.h} | 446 +----------------- .../config/default_cfe_time_interface_cfg.h | 210 +++++++++ .../config/default_cfe_time_internal_cfg.h | 243 ++++++++++ .../config/default_cfe_time_mission_cfg.h | 36 ++ modules/time/config/default_cfe_time_msg.h | 38 ++ .../time/config/default_cfe_time_msgdefs.h | 50 ++ modules/time/config/default_cfe_time_msgids.h | 49 ++ .../time/config/default_cfe_time_msgstruct.h | 441 +++++++++++++++++ .../config/default_cfe_time_platform_cfg.h | 41 ++ .../time/config/default_cfe_time_topicids.h | 64 +++ ...{cfe_time_events.h => cfe_time_eventids.h} | 0 modules/time/fsw/src/cfe_time_module_all.h | 2 +- modules/time/mission_build.cmake | 37 ++ 16 files changed, 1250 insertions(+), 453 deletions(-) create mode 100644 modules/time/arch_build.cmake rename modules/{core_api/fsw/inc/cfe_time_extern_typedefs.h => time/config/default_cfe_time_extern_typedefs.h} (96%) rename modules/time/{fsw/inc/cfe_time_msg.h => config/default_cfe_time_fcncodes.h} (64%) create mode 100644 modules/time/config/default_cfe_time_interface_cfg.h create mode 100644 modules/time/config/default_cfe_time_internal_cfg.h create mode 100644 modules/time/config/default_cfe_time_mission_cfg.h create mode 100644 modules/time/config/default_cfe_time_msg.h create mode 100644 modules/time/config/default_cfe_time_msgdefs.h create mode 100644 modules/time/config/default_cfe_time_msgids.h create mode 100644 modules/time/config/default_cfe_time_msgstruct.h create mode 100644 modules/time/config/default_cfe_time_platform_cfg.h create mode 100644 modules/time/config/default_cfe_time_topicids.h rename modules/time/fsw/inc/{cfe_time_events.h => cfe_time_eventids.h} (100%) create mode 100644 modules/time/mission_build.cmake diff --git a/modules/time/CMakeLists.txt b/modules/time/CMakeLists.txt index 7c61c9236..d4b7180f9 100644 --- a/modules/time/CMakeLists.txt +++ b/modules/time/CMakeLists.txt @@ -25,6 +25,6 @@ if(ENABLE_UNIT_TESTS) endif(ENABLE_UNIT_TESTS) cfs_app_check_intf(${DEP} - cfe_time_events.h + cfe_time_eventids.h cfe_time_msg.h ) diff --git a/modules/time/arch_build.cmake b/modules/time/arch_build.cmake new file mode 100644 index 000000000..534ca265f --- /dev/null +++ b/modules/time/arch_build.cmake @@ -0,0 +1,32 @@ +########################################################### +# +# TIME Core Module platform build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### + +# The list of header files that control the TIME configuration +set(TIME_PLATFORM_CONFIG_FILE_LIST + cfe_time_internal_cfg.h + cfe_time_msgids.h + cfe_time_platform_cfg.h +) + +# Create wrappers around the all the config header files +# This makes them individually overridable by the missions, without modifying +# the distribution default copies +foreach(TIME_CFGFILE ${TIME_PLATFORM_CONFIG_FILE_LIST}) + get_filename_component(CFGKEY "${TIME_CFGFILE}" NAME_WE) + if (DEFINED TIME_CFGFILE_SRC_${CFGKEY}) + set(DEFAULT_SOURCE "${TIME_CFGFILE_SRC_${CFGKEY}}") + else() + set(DEFAULT_SOURCE "${CMAKE_CURRENT_LIST_DIR}/config/default_${TIME_CFGFILE}") + endif() + generate_config_includefile( + FILE_NAME "${TIME_CFGFILE}" + FALLBACK_FILE ${DEFAULT_SOURCE} + ) +endforeach() diff --git a/modules/core_api/fsw/inc/cfe_time_extern_typedefs.h b/modules/time/config/default_cfe_time_extern_typedefs.h similarity index 96% rename from modules/core_api/fsw/inc/cfe_time_extern_typedefs.h rename to modules/time/config/default_cfe_time_extern_typedefs.h index 8b4d09661..455c1f8af 100644 --- a/modules/core_api/fsw/inc/cfe_time_extern_typedefs.h +++ b/modules/time/config/default_cfe_time_extern_typedefs.h @@ -25,16 +25,6 @@ #ifndef CFE_TIME_EXTERN_TYPEDEFS_H #define CFE_TIME_EXTERN_TYPEDEFS_H -/* This header may be generated from an EDS file, - * tools are available and the feature is enabled */ -#ifdef CFE_EDS_ENABLED_BUILD - -/* Use the EDS generated version of these types */ -#include "cfe_time_eds_typedefs.h" - -#else -/* Use the local definitions of these types */ - #include "common_types.h" /** @@ -289,6 +279,4 @@ enum CFE_TIME_SetState */ typedef uint8 CFE_TIME_SetState_Enum_t; -#endif /* CFE_EDS_ENABLED_BUILD */ - #endif /* CFE_TIME_EXTERN_TYPEDEFS_H */ diff --git a/modules/time/fsw/inc/cfe_time_msg.h b/modules/time/config/default_cfe_time_fcncodes.h similarity index 64% rename from modules/time/fsw/inc/cfe_time_msg.h rename to modules/time/config/default_cfe_time_fcncodes.h index 216821790..6fe06e1f8 100644 --- a/modules/time/fsw/inc/cfe_time_msg.h +++ b/modules/time/config/default_cfe_time_fcncodes.h @@ -18,26 +18,15 @@ /** * @file + * Specification for the CFE Time Services (CFE_TIME) command function codes * - * Purpose: cFE Time Services (TIME) SB message definitions header file - * - * Author: S.Walling/Microtel - * - * Notes: - * + * @note + * This file should be strictly limited to the command/function code (CC) + * macro definitions. Other definitions such as enums, typedefs, or other + * macros should be placed in the msgdefs.h or msg.h files. */ - -#ifndef CFE_TIME_MSG_H -#define CFE_TIME_MSG_H - -/* -** Required header files... -*/ -#include "common_types.h" /* Basic data types */ -#include "cfe_msg_hdr.h" /* for header definitions */ -#include "cfe_time_extern_typedefs.h" - -/*************************************************************************/ +#ifndef CFE_TIME_FCNCODES_H +#define CFE_TIME_FCNCODES_H /* ** Time task command packet command codes... @@ -702,425 +691,4 @@ #define CFE_TIME_SET_SIGNAL_CC 15 /* set clock signal (pri vs red) */ /** \} */ -/** \defgroup CFETIMEClkStates cFE Clock State Flag Defines - * \{ - */ -#define CFE_TIME_FLAG_CLKSET 0x8000 /**< \brief The spacecraft time has been set */ -#define CFE_TIME_FLAG_FLYING 0x4000 /**< \brief This instance of Time Services is flywheeling */ -#define CFE_TIME_FLAG_SRCINT 0x2000 /**< \brief The clock source is set to "internal" */ -#define CFE_TIME_FLAG_SIGPRI 0x1000 /**< \brief The clock signal is set to "primary" */ -#define CFE_TIME_FLAG_SRVFLY 0x0800 /**< \brief The Time Server is in flywheel mode */ -#define CFE_TIME_FLAG_CMDFLY 0x0400 /**< \brief This instance of Time Services was commanded into flywheel mode */ -#define CFE_TIME_FLAG_ADDADJ 0x0200 /**< \brief One time STCF Adjustment is to be done in positive direction */ -#define CFE_TIME_FLAG_ADD1HZ 0x0100 /**< \brief 1 Hz STCF Adjustment is to be done in a positive direction */ -#define CFE_TIME_FLAG_ADDTCL 0x0080 /**< \brief Time Client Latency is applied in a positive direction */ -#define CFE_TIME_FLAG_SERVER 0x0040 /**< \brief This instance of Time Services is a Time Server */ -#define CFE_TIME_FLAG_GDTONE 0x0020 /**< \brief The tone received is good compared to the last tone received */ -#define CFE_TIME_FLAG_REFERR \ - 0x0010 /**< \brief GetReference read error, will be set if unable to get a consistent ref value */ -#define CFE_TIME_FLAG_UNUSED 0x000F /**< \brief Reserved flags - should be zero */ -/** \} */ - -/*************************************************************************/ - -/** - * \brief Generic no argument command - */ -typedef struct CFE_TIME_NoArgsCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ -} CFE_TIME_NoArgsCmd_t; - -/* - * A separate typedef for each of the commands that share this definition - * This follows the convention for command handler prototypes and allows - * each one to independently evolve as necessary. - */ -typedef CFE_TIME_NoArgsCmd_t CFE_TIME_NoopCmd_t; -typedef CFE_TIME_NoArgsCmd_t CFE_TIME_ResetCountersCmd_t; -typedef CFE_TIME_NoArgsCmd_t CFE_TIME_SendDiagnosticCmd_t; -typedef CFE_TIME_NoArgsCmd_t CFE_TIME_1HzCmd_t; -typedef CFE_TIME_NoArgsCmd_t CFE_TIME_ToneSignalCmd_t; -typedef CFE_TIME_NoArgsCmd_t CFE_TIME_FakeToneCmd_t; -typedef CFE_TIME_NoArgsCmd_t CFE_TIME_SendHkCmd_t; - -/** - * \brief Set leap seconds command payload - */ -typedef struct CFE_TIME_LeapsCmd_Payload -{ - int16 LeapSeconds; -} CFE_TIME_LeapsCmd_Payload_t; - -/** - * \brief Set leap seconds command - */ -typedef struct CFE_TIME_SetLeapSecondsCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_TIME_LeapsCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_TIME_SetLeapSecondsCmd_t; - -/** - * \brief Set clock state command payload - */ -typedef struct CFE_TIME_StateCmd_Payload -{ - CFE_TIME_ClockState_Enum_t ClockState; /**< \brief #CFE_TIME_ClockState_INVALID=Spacecraft time has - not been accurately set, #CFE_TIME_ClockState_VALID=Spacecraft clock - has been accurately set, #CFE_TIME_ClockState_FLYWHEEL=Force into - FLYWHEEL mode */ - /**< Selects the current clock state */ -} CFE_TIME_StateCmd_Payload_t; - -/** - * \brief Set clock state command - */ -typedef struct CFE_TIME_SetStateCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_TIME_StateCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_TIME_SetStateCmd_t; - -/** - * \brief Set time data source command payload - */ -typedef struct CFE_TIME_SourceCmd_Payload -{ - int16 TimeSource; /**< \brief #CFE_TIME_SourceSelect_INTERNAL=Internal Source, - #CFE_TIME_SourceSelect_EXTERNAL=External Source */ - /**< Selects either the "Internal" and "External" clock source */ -} CFE_TIME_SourceCmd_Payload_t; - -/** - * \brief Set time data source command - */ -typedef struct CFE_TIME_SetSourceCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_TIME_SourceCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_TIME_SetSourceCmd_t; - -/** - * \brief Set tone signal source command payload - */ -typedef struct CFE_TIME_SignalCmd_Payload -{ - int16 ToneSource; /**< \brief #CFE_TIME_ToneSignalSelect_PRIMARY=Primary Source, - #CFE_TIME_ToneSignalSelect_REDUNDANT=Redundant Source */ - /**< Selects either the "Primary" or "Redundant" tone signal source */ -} CFE_TIME_SignalCmd_Payload_t; - -/** - * \brief Set tone signal source command - */ -typedef struct CFE_TIME_SetSignalCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_TIME_SignalCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_TIME_SetSignalCmd_t; - -/** - * \brief Generic seconds, microseconds command payload - */ -typedef struct CFE_TIME_TimeCmd_Payload -{ - uint32 Seconds; - uint32 MicroSeconds; -} CFE_TIME_TimeCmd_Payload_t; - -/** - * \brief Generic seconds, microseconds argument command - */ -typedef struct CFE_TIME_TimeCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_TIME_TimeCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_TIME_TimeCmd_t; - -/* - * A separate typedef for each of the commands that share this definition - * This follows the convention for command handler prototypes and allows - * each one to independently evolve as necessary. - */ -typedef CFE_TIME_TimeCmd_t CFE_TIME_AddDelayCmd_t; -typedef CFE_TIME_TimeCmd_t CFE_TIME_SubDelayCmd_t; -typedef CFE_TIME_TimeCmd_t CFE_TIME_SetMETCmd_t; -typedef CFE_TIME_TimeCmd_t CFE_TIME_SetSTCFCmd_t; -typedef CFE_TIME_TimeCmd_t CFE_TIME_AddAdjustCmd_t; -typedef CFE_TIME_TimeCmd_t CFE_TIME_SubAdjustCmd_t; -typedef CFE_TIME_TimeCmd_t CFE_TIME_SetTimeCmd_t; - -/** - * \brief Generic seconds, subseconds command payload - */ -typedef struct CFE_TIME_OneHzAdjustmentCmd_Payload -{ - uint32 Seconds; - uint32 Subseconds; -} CFE_TIME_OneHzAdjustmentCmd_Payload_t; - -/** - * \brief Generic seconds, subseconds adjustment command - */ -typedef struct CFE_TIME_OneHzAdjustmentCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_TIME_OneHzAdjustmentCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_TIME_OneHzAdjustmentCmd_t; - -/* - * A separate typedef for each of the commands that share this definition - * This follows the convention for command handler prototypes and allows - * each one to independently evolve as necessary. - */ -typedef CFE_TIME_OneHzAdjustmentCmd_t CFE_TIME_Add1HZAdjustmentCmd_t; -typedef CFE_TIME_OneHzAdjustmentCmd_t CFE_TIME_Sub1HZAdjustmentCmd_t; - -/** - * \brief Time at tone data command payload - */ -typedef struct CFE_TIME_ToneDataCmd_Payload -{ - CFE_TIME_SysTime_t AtToneMET; /**< \brief MET at time of tone */ - CFE_TIME_SysTime_t AtToneSTCF; /**< \brief STCF at time of tone */ - int16 AtToneLeapSeconds; /**< \brief Leap Seconds at time of tone */ - CFE_TIME_ClockState_Enum_t AtToneState; /**< \brief Clock state at time of tone */ -} CFE_TIME_ToneDataCmd_Payload_t; - -/** - * \brief Time at tone data command - */ -typedef struct CFE_TIME_ToneDataCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_TIME_ToneDataCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_TIME_ToneDataCmd_t; - -/*************************************************************************/ - -/** -** \cfetimetlm Time Services Housekeeping Packet -**/ -typedef struct CFE_TIME_HousekeepingTlm_Payload -{ - /* - ** Task command interface counters... - */ - uint8 CommandCounter; /**< \cfetlmmnemonic \TIME_CMDPC - \brief Time Command Execution Counter */ - uint8 CommandErrorCounter; /**< \cfetlmmnemonic \TIME_CMDEC - \brief Time Command Error Counter */ - - /* - ** Clock state flags and "as calculated" clock state... - */ - uint16 ClockStateFlags; /**< \cfetlmmnemonic \TIME_STATEFLG - \brief State Flags */ - CFE_TIME_ClockState_Enum_t ClockStateAPI; /**< \cfetlmmnemonic - \TIME_APISTATE \brief API State */ - - /* - ** Leap Seconds... - */ - int16 LeapSeconds; /**< \cfetlmmnemonic \TIME_LEAPSECS - \brief Current Leaps Seconds */ - - /* - ** Current MET and STCF time values... - */ - uint32 SecondsMET; /**< \cfetlmmnemonic \TIME_METSECS - \brief Current MET (seconds) */ - uint32 SubsecsMET; /**< \cfetlmmnemonic \TIME_METSUBSECS - \brief Current MET (sub-seconds) */ - - uint32 SecondsSTCF; /**< \cfetlmmnemonic \TIME_STCFSECS - \brief Current STCF (seconds) */ - uint32 SubsecsSTCF; /**< \cfetlmmnemonic \TIME_STCFSUBSECS - \brief Current STCF (sub-seconds) */ - -/* -** 1Hz STCF adjustment values (server only)... -*/ -#if (CFE_PLATFORM_TIME_CFG_SERVER == true) - uint32 Seconds1HzAdj; /**< \cfetlmmnemonic \TIME_1HZADJSECS - \brief Current 1 Hz SCTF adjustment (seconds) */ - uint32 Subsecs1HzAdj; /**< \cfetlmmnemonic \TIME_1HZADJSSECS - \brief Current 1 Hz SCTF adjustment (sub-seconds) */ -#endif - -/* -** Time at tone delay values (client only)... -*/ -#if (CFE_PLATFORM_TIME_CFG_CLIENT == true) - uint32 SecondsDelay; /**< \cfetlmmnemonic \TIME_1HZDLYSECS - \brief Current 1 Hz SCTF Delay (seconds) */ - uint32 SubsecsDelay; /**< \cfetlmmnemonic \TIME_1HZDLYSSECS - \brief Current 1 Hz SCTF Delay (sub-seconds) */ #endif -} CFE_TIME_HousekeepingTlm_Payload_t; - -typedef struct CFE_TIME_HousekeepingTlm -{ - CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ - CFE_TIME_HousekeepingTlm_Payload_t Payload; /**< \brief Telemetry payload */ -} CFE_TIME_HousekeepingTlm_t; - -/*************************************************************************/ - -/** -** \cfetimetlm Time Services Diagnostics Packet -**/ -typedef struct CFE_TIME_DiagnosticTlm_Payload -{ - /* - ** Data values used to compute time (in reference to "tone")... - */ - CFE_TIME_SysTime_t AtToneMET; /**< \cfetlmmnemonic \TIME_TMETS - \brief MET at time of tone */ - CFE_TIME_SysTime_t AtToneSTCF; /**< \cfetlmmnemonic \TIME_STCFS - \brief STCF at time of tone */ - CFE_TIME_SysTime_t AtToneDelay; /**< \cfetlmmnemonic \TIME_LATENTS - \brief Adjustment for slow tone detection */ - CFE_TIME_SysTime_t AtToneLatch; /**< \cfetlmmnemonic \TIME_TVALIDS - \brief Local clock latched at time of tone */ - - int16 AtToneLeapSeconds; /**< \cfetlmmnemonic \TIME_LEAPS - \brief Leap Seconds at time of tone */ - CFE_TIME_ClockState_Enum_t ClockStateAPI; /**< \cfetlmmnemonic \TIME_APISTATE - \brief Clock state as per API */ - - /* - ** Data values that reflect the time (right now)... - */ - CFE_TIME_SysTime_t TimeSinceTone; /**< \cfetlmmnemonic \TIME_ELAPSEDS - \brief Time elapsed since the tone */ - CFE_TIME_SysTime_t CurrentLatch; /**< \cfetlmmnemonic \TIME_LOCALS - \brief Local clock latched just "now" */ - CFE_TIME_SysTime_t CurrentMET; /**< \cfetlmmnemonic \TIME_METS - \brief MET at this instant */ - CFE_TIME_SysTime_t CurrentTAI; /**< \cfetlmmnemonic \TIME_TAIS - \brief TAI at this instant */ - CFE_TIME_SysTime_t CurrentUTC; /**< \cfetlmmnemonic \TIME_UTCS - \brief UTC at this instant */ - - /* - ** Data values used to define the current clock state... - */ - int16 ClockSetState; /**< \cfetlmmnemonic \TIME_VALID - \brief Time has been "set" */ - int16 ClockFlyState; /**< \cfetlmmnemonic \TIME_FLYWHEEL - \brief Current fly-wheel state */ - int16 ClockSource; /**< \cfetlmmnemonic \TIME_SOURCE - \brief Internal vs external, etc. */ - int16 ClockSignal; /**< \cfetlmmnemonic \TIME_SIGNAL - \brief Primary vs redundant, etc. */ - int16 ServerFlyState; /**< \cfetlmmnemonic \TIME_SRVFLY - \brief Used by clients only */ - int16 Forced2Fly; /**< \cfetlmmnemonic \TIME_CMD2FLY - \brief Commanded into fly-wheel */ - - /* - ** Clock state flags... - */ - uint16 ClockStateFlags; /**< \cfetlmmnemonic \TIME_STATEFLAGS - \brief Clock State Flags */ - - /* - ** STCF adjustment direction values... - */ - int16 OneTimeDirection; /**< \cfetlmmnemonic \TIME_ADJUSTDIR - \brief One time STCF adjustment direction (Add = 1, Sub = 2) */ - int16 OneHzDirection; /**< \cfetlmmnemonic \TIME_1HZADJDIR - \brief 1Hz STCF adjustment direction */ - int16 DelayDirection; /**< \cfetlmmnemonic \TIME_LATENTDIR - \brief Client latency adjustment direction */ - - /* - ** STCF adjustment values... - */ - CFE_TIME_SysTime_t OneTimeAdjust; /**< \cfetlmmnemonic \TIME_ADJUSTS - \brief Previous one-time STCF adjustment */ - CFE_TIME_SysTime_t OneHzAdjust; /**< \cfetlmmnemonic \TIME_1HZADJS - \brief Current 1Hz STCF adjustment */ - - /* - ** Most recent local clock latch values... - */ - CFE_TIME_SysTime_t ToneSignalLatch; /**< \cfetlmmnemonic \TIME_TTS - \brief Local Clock latched at most recent tone signal */ - CFE_TIME_SysTime_t ToneDataLatch; /**< \cfetlmmnemonic \TIME_TDS - \brief Local Clock latched at arrival of tone data */ - - /* - ** Miscellaneous counters (subject to reset command)... - */ - uint32 ToneMatchCounter; /**< \cfetlmmnemonic \TIME_VERIFYCNT - \brief Tone signal / data verification count */ - uint32 ToneMatchErrorCounter; /**< \cfetlmmnemonic \TIME_VERIFYER - \brief Tone signal / data verification error count */ - uint32 ToneSignalCounter; /**< \cfetlmmnemonic \TIME_TSDETCNT - \brief Tone signal detected SB message count */ - uint32 ToneDataCounter; /**< \cfetlmmnemonic \TIME_TATTCNT - \brief Time at the tone data SB message count */ - uint32 ToneIntCounter; /**< \cfetlmmnemonic \TIME_TSISRCNT - \brief Tone signal ISR execution count */ - uint32 ToneIntErrorCounter; /**< \cfetlmmnemonic \TIME_TSISRERR - \brief Tone signal ISR error count */ - uint32 ToneTaskCounter; /**< \cfetlmmnemonic \TIME_TSTASKCNT - \brief Tone task execution count */ - uint32 VersionCounter; /**< \cfetlmmnemonic \TIME_VERSIONCNT - \brief Count of mods to time at tone reference data (version) */ - uint32 LocalIntCounter; /**< \cfetlmmnemonic \TIME_1HZISRCNT - \brief Local 1Hz ISR execution count */ - uint32 LocalTaskCounter; /**< \cfetlmmnemonic \TIME_1HZTASKCNT - \brief Local 1Hz task execution count */ - - /* - ** Miscellaneous counters (not subject to reset command)... - */ - uint32 VirtualMET; /**< \cfetlmmnemonic \TIME_LOGICALMET - \brief Software MET */ - - /* - ** Time window verification values (converted from micro-secs)... - ** - ** Regardless of whether the tone follows the time packet, or vice - ** versa, these values define the acceptable window of time for - ** the second event to follow the first. The minimum value may - ** be as little as zero, and the maximum must be something less - ** than a second. - */ - uint32 MinElapsed; /**< \cfetlmmnemonic \TIME_MINWINDOW - \brief Min tone signal / data pkt arrival window (Sub-seconds) */ - uint32 MaxElapsed; /**< \cfetlmmnemonic \TIME_MAXWINDOW - \brief Max tone signal / data pkt arrival window (Sub-seconds) */ - - /* - ** Maximum local clock value (before roll-over)... - */ - CFE_TIME_SysTime_t MaxLocalClock; /**< \cfetlmmnemonic \TIME_WRAPS - \brief Max local clock value before rollover */ - - /* - ** Tone signal tolerance limits... - */ - uint32 ToneOverLimit; /**< \cfetlmmnemonic \TIME_MAXSS - \brief Max between tone signal interrupts */ - uint32 ToneUnderLimit; /**< \cfetlmmnemonic \TIME_MINSS - \brief Min between tone signal interrupts */ - - /* - ** Reset Area... - */ - uint32 DataStoreStatus; /**< \cfetlmmnemonic \TIME_ATASTSTAT - \brief Data Store status (preserved across processor reset) */ -} CFE_TIME_DiagnosticTlm_Payload_t; - -typedef struct CFE_TIME_DiagnosticTlm -{ - CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ - CFE_TIME_DiagnosticTlm_Payload_t Payload; /**< \brief Telemetry payload */ -} CFE_TIME_DiagnosticTlm_t; - -#endif /* CFE_TIME_MSG_H */ diff --git a/modules/time/config/default_cfe_time_interface_cfg.h b/modules/time/config/default_cfe_time_interface_cfg.h new file mode 100644 index 000000000..3e614f154 --- /dev/null +++ b/modules/time/config/default_cfe_time_interface_cfg.h @@ -0,0 +1,210 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Time Services (CFE_TIME) Application Public Definitions + * + * This provides default values for configurable items that affect + * the interface(s) of this module. This includes the CMD/TLM message + * interface, tables definitions, and any other data products that + * serve to exchange information with other entities. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_TIME_INTERFACE_CFG_H +#define CFE_TIME_INTERFACE_CFG_H + +/** +** \cfetimecfg Default Time Format +** +** \par Description: +** The following definitions select either UTC or TAI as the default +** (mission specific) time format. Although it is possible for an +** application to request time in a specific format, most callers +** should use CFE_TIME_GetTime(), which returns time in the default +** format. This avoids having to modify each individual caller +** when the default choice is changed. +** +** \par Limits +** if CFE_MISSION_TIME_CFG_DEFAULT_TAI is defined as true then CFE_MISSION_TIME_CFG_DEFAULT_UTC must be +** defined as false. +** if CFE_MISSION_TIME_CFG_DEFAULT_TAI is defined as false then CFE_MISSION_TIME_CFG_DEFAULT_UTC must be +** defined as true. +*/ +#define CFE_MISSION_TIME_CFG_DEFAULT_TAI true +#define CFE_MISSION_TIME_CFG_DEFAULT_UTC false + +/** +** \cfetimecfg Default Time Format +** +** \par Description: +** The following definition enables the use of a simulated time at +** the tone signal using a software bus message. +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_TIME_CFG_FAKE_TONE true + +/** +** \cfetimecfg Default Time and Tone Order +** +** \par Description: +** Time Services may be configured to expect the time at the tone +** data packet to either precede or follow the tone signal. If the +** time at the tone data packet follows the tone signal, then the +** data within the packet describes what the time "was" at the tone. +** If the time at the tone data packet precedes the tone signal, then +** the data within the packet describes what the time "will be" at +** the tone. One, and only one, of the following symbols must be set to true: +** - CFE_MISSION_TIME_AT_TONE_WAS +** - CFE_MISSION_TIME_AT_TONE_WILL_BE +** Note: If Time Services is defined as using a simulated tone signal +** (see #CFE_MISSION_TIME_CFG_FAKE_TONE above), then the tone data packet +** must follow the tone signal. +** +** \par Limits +** Either CFE_MISSION_TIME_AT_TONE_WAS or CFE_MISSION_TIME_AT_TONE_WILL_BE must be set to true. +** They may not both be true and they may not both be false. +*/ +#define CFE_MISSION_TIME_AT_TONE_WAS true +#define CFE_MISSION_TIME_AT_TONE_WILL_BE false + +/** +** \cfetimecfg Min and Max Time Elapsed +** +** \par Description: +** Based on the definition of Time and Tone Order +** (CFE_MISSION_TIME_AT_TONE_WAS/WILL_BE) either the "time at the tone" signal or +** data packet will follow the other. This definition sets the valid window +** of time for the second of the pair to lag behind the first. Time +** Services will invalidate both the tone and packet if the second does not +** arrive within this window following the first. +** +** For example, if the data packet follows the tone, it might be valid for +** the data packet to arrive between zero and 100,000 micro-seconds after +** the tone. But, if the tone follows the packet, it might be valid +** only if the packet arrived between 200,000 and 700,000 micro-seconds +** before the tone. +** +** Note: units are in micro-seconds +** +** \par Limits +** 0 to 999,999 decimal +*/ +#define CFE_MISSION_TIME_MIN_ELAPSED 0 +#define CFE_MISSION_TIME_MAX_ELAPSED 200000 + +/** +** \cfetimecfg Default Time Values +** +** \par Description: +** Default time values are provided to avoid problems due to time +** calculations performed after startup but before commands can be +** processed. For example, if the default time format is UTC then +** it is important that the sum of MET and STCF always exceed the +** value of Leap Seconds to prevent the UTC time calculation +** (time = MET + STCF - Leap Seconds) from resulting in a negative +** (very large) number.

+** Some past missions have also created known (albeit wrong) default +** timestamps. For example, assume the epoch is defined as Jan 1, 1970 +** and further assume the default time values are set to create a timestamp +** of Jan 1, 2000. Even though the year 2000 timestamps are wrong, it +** may be of value to keep the time within some sort of bounds acceptable +** to the software.

+** Note: Sub-second units are in micro-seconds (0 to 999,999) and +** all values must be defined +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_TIME_DEF_MET_SECS 1000 +#define CFE_MISSION_TIME_DEF_MET_SUBS 0 + +#define CFE_MISSION_TIME_DEF_STCF_SECS 1000000 +#define CFE_MISSION_TIME_DEF_STCF_SUBS 0 + +#define CFE_MISSION_TIME_DEF_LEAPS 37 + +#define CFE_MISSION_TIME_DEF_DELAY_SECS 0 +#define CFE_MISSION_TIME_DEF_DELAY_SUBS 1000 + +/** +** \cfetimecfg Default EPOCH Values +** +** \par Description: +** Default ground time epoch values +** Note: these values are used only by the CFE_TIME_Print() API function +** +** \par Limits +** Year - must be within 136 years +** Day - Jan 1 = 1, Feb 1 = 32, etc. +** Hour - 0 to 23 +** Minute - 0 to 59 +** Second - 0 to 59 +** Micros - 0 to 999999 +*/ +#define CFE_MISSION_TIME_EPOCH_YEAR 1980 +#define CFE_MISSION_TIME_EPOCH_DAY 1 +#define CFE_MISSION_TIME_EPOCH_HOUR 0 +#define CFE_MISSION_TIME_EPOCH_MINUTE 0 +#define CFE_MISSION_TIME_EPOCH_SECOND 0 +#define CFE_MISSION_TIME_EPOCH_MICROS 0 + +/** +** \cfetimecfg Time File System Factor +** +** \par Description: +** Define the s/c vs file system time conversion constant... +** +** Note: this value is intended for use only by CFE TIME API functions to +** convert time values based on the ground system epoch (s/c time) to +** and from time values based on the file system epoch (fs time). +** +** FS time = S/C time + factor +** S/C time = FS time - factor +** +** Worksheet: +** +** S/C epoch = Jan 1, 2005 (LRO ground system epoch) +** FS epoch = Jan 1, 1980 (vxWorks DOS file system epoch) +** +** Delta = 25 years, 0 days, 0 hours, 0 minutes, 0 seconds +** +** Leap years = 1980, 1984, 1988, 1992, 1996, 2000, 2004 +** (divisible by 4 -- except if by 100 -- unless also by 400) +** +** 1 year = 31,536,000 seconds +** 1 day = 86,400 seconds +** 1 hour = 3,600 seconds +** 1 minute = 60 seconds +** +** 25 years = 788,400,000 seconds +** 7 extra leap days = 604,800 seconds +** +** total delta = 789,004,800 seconds +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_TIME_FS_FACTOR 789004800 + +#endif diff --git a/modules/time/config/default_cfe_time_internal_cfg.h b/modules/time/config/default_cfe_time_internal_cfg.h new file mode 100644 index 000000000..3d284a24c --- /dev/null +++ b/modules/time/config/default_cfe_time_internal_cfg.h @@ -0,0 +1,243 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Time Service (CFE_TIME) Application Private Config Definitions + * + * This provides default values for configurable items that are internal + * to this module and do NOT affect the interface(s) of this module. Changes + * to items in this file only affect the local module and will be transparent + * to external entities that are using the public interface(s). + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_TIME_INTERNAL_CFG_H +#define CFE_TIME_INTERNAL_CFG_H + +/** +** \cfetimecfg Time Server or Time Client Selection +** +** \par Description: +** This configuration parameter selects whether the Time task functions as a +** time "server" or "client". A time server generates the "time at the tone" +** packet which is received by time clients. +** +** \par Limits +** Enable one, and only one by defining either CFE_PLATFORM_TIME_CFG_SERVER or +** CFE_PLATFORM_TIME_CFG_CLIENT AS true. The other must be defined as false. +*/ +#define CFE_PLATFORM_TIME_CFG_SERVER true +#define CFE_PLATFORM_TIME_CFG_CLIENT false + +/** +** \cfetimecfg Time Tone In Big-Endian Order +** +** \par Description: +** If this configuration parameter is defined, the CFE time server will +** publish time tones with payloads in big-endian order, and time clients +** will expect the tones to be in big-endian order. This is useful for +** mixed-endian environments. This will become obsolete once EDS is +** available and the CFE time tone message is defined. +*/ +#undef CFE_PLATFORM_TIME_CFG_BIGENDIAN + +/** +** \cfetimecfg Local MET or Virtual MET Selection for Time Servers +** +** \par Description: +** Depending on the specific hardware system configuration, it may be possible +** for Time Servers to read the "local" MET from a h/w register rather than +** having to track the MET as the count of tone signal interrupts (virtual MET) +** +** Time Clients must be defined as using a virtual MET. Also, a Time Server +** cannot be defined as having both a h/w MET and an external time source (they +** both cannot synchronize to the same tone). +** +** Note: "disable" this define (set to false) only for Time Servers with local hardware +** that supports a h/w MET that is synchronized to the tone signal !!! +** +** \par Limits +** Only applies if #CFE_PLATFORM_TIME_CFG_SERVER is set to true. +*/ +#define CFE_PLATFORM_TIME_CFG_VIRTUAL true + +/** +** \cfetimecfg Include or Exclude the Primary/Redundant Tone Selection Cmd +** +** \par Description: +** Depending on the specific hardware system configuration, it may be possible +** to switch between a primary and redundant tone signal. If supported by +** hardware, this definition will enable command interfaces to select the +** active tone signal. Both Time Clients and Time Servers support this feature. +** Note: Set the CFE_PLATFORM_TIME_CFG_SIGNAL define to true to enable tone signal commands. +** +** \par Limits +** Not Applicable +*/ +#define CFE_PLATFORM_TIME_CFG_SIGNAL false + +/** +** \cfetimecfg Include or Exclude the Internal/External Time Source Selection Cmd +** +** \par Description: +** By default, Time Servers maintain time using an internal MET which may be a +** h/w register or software counter, depending on available hardware. The +** following definition enables command interfaces to switch between an +** internal MET, or external time data received from one of several supported +** external time sources. Only a Time Server may be configured to use external +** time data. +** Note: Set the CFE_PLATFORM_TIME_CFG_SOURCE define to true to include the Time Source +** Selection Command (command allows selection between the internal +** or external time source). Then choose the external source with the +** CFE_TIME_CFG_SRC_??? define. +** +** \par Limits +** Only applies if #CFE_PLATFORM_TIME_CFG_SERVER is set to true. +*/ +#define CFE_PLATFORM_TIME_CFG_SOURCE false + +/** +** \cfetimecfg Choose the External Time Source for Server only +** +** \par Description: +** If #CFE_PLATFORM_TIME_CFG_SOURCE is set to true, then one of the following external time +** source types must also be set to true. Do not set any of the external time +** source types to true unless #CFE_PLATFORM_TIME_CFG_SOURCE is set to true. +** +** \par Limits +** -# If #CFE_PLATFORM_TIME_CFG_SOURCE is set to true then one and only one of the following +** three external time sources can and must be set true: +** #CFE_PLATFORM_TIME_CFG_SRC_MET, #CFE_PLATFORM_TIME_CFG_SRC_GPS, #CFE_PLATFORM_TIME_CFG_SRC_TIME +** -# Only applies if #CFE_PLATFORM_TIME_CFG_SERVER is set to true. +*/ +#define CFE_PLATFORM_TIME_CFG_SRC_MET false +#define CFE_PLATFORM_TIME_CFG_SRC_GPS false +#define CFE_PLATFORM_TIME_CFG_SRC_TIME false + +/** +** \cfetimecfg Define the Max Delta Limits for Time Servers using an Ext Time Source +** +** \par Description: +** If #CFE_PLATFORM_TIME_CFG_SOURCE is set to true and one of the external time sources is +** also set to true, then the delta time limits for range checking is used. +** +** When a new time value is received from an external source, the value is +** compared against the "expected" time value. If the delta exceeds the +** following defined amount, then the new time data will be ignored. This range +** checking is only performed after the clock state has been commanded to +** "valid". Until then, external time data is accepted unconditionally. +** +** \par Limits +** Applies only if both #CFE_PLATFORM_TIME_CFG_SERVER and #CFE_PLATFORM_TIME_CFG_SOURCE are set +** to true. +*/ +#define CFE_PLATFORM_TIME_MAX_DELTA_SECS 0 +#define CFE_PLATFORM_TIME_MAX_DELTA_SUBS 500000 + +/** +** \cfetimecfg Define the Local Clock Rollover Value in seconds and subseconds +** +** \par Description: +** Specifies the capability of the local clock. Indicates the time at which +** the local clock rolls over. +** +** \par Limits +** Not Applicable +*/ +#define CFE_PLATFORM_TIME_MAX_LOCAL_SECS 27 +#define CFE_PLATFORM_TIME_MAX_LOCAL_SUBS 0 + +/** +** \cfetimecfg Define Timing Limits From One Tone To The Next +** +** \par Description: +** Defines limits to the timing of the 1Hz tone signal. A tone signal is valid +** only if it arrives within one second (plus or minus the tone limit) from +** the previous tone signal.Units are microseconds as measured with the local +** clock. +** +** \par Limits +** Not Applicable +*/ +#define CFE_PLATFORM_TIME_CFG_TONE_LIMIT 20000 + +/** +** \cfetimecfg Define Time to Start Flywheel Since Last Tone +** +** \par Description: +** Define time to enter flywheel mode (in seconds since last tone data update) +** Units are microseconds as measured with the local clock. +** +** \par Limits +** Not Applicable +*/ +#define CFE_PLATFORM_TIME_CFG_START_FLY 2 + +/** +** \cfetimecfg Define Periodic Time to Update Local Clock Tone Latch +** +** \par Description: +** Define Periodic Time to Update Local Clock Tone Latch. Applies only when +** in flywheel mode. This define dictates the period at which the simulated +** 'last tone' time is updated. Units are seconds. +** +** \par Limits +** Not Applicable +*/ +#define CFE_PLATFORM_TIME_CFG_LATCH_FLY 8 + +/** +** \cfetimecfg Define TIME Task Priorities +** +** \par Description: +** Defines the cFE_TIME Task priority. +** Defines the cFE_TIME Tone Task priority. +** Defines the cFE_TIME 1HZ Task priority. +** +** \par Limits +** There is a lower limit of zero and an upper limit of 255 on these +** configuration parameters. Remember that the meaning of each task +** priority is inverted -- a "lower" number has a "higher" priority. +*/ +#define CFE_PLATFORM_TIME_START_TASK_PRIORITY 60 +#define CFE_PLATFORM_TIME_TONE_TASK_PRIORITY 25 +#define CFE_PLATFORM_TIME_1HZ_TASK_PRIORITY 25 + +/** +** \cfetimecfg Define TIME Task Stack Sizes +** +** \par Description: +** Defines the cFE_TIME Main Task Stack Size +** Defines the cFE_TIME Tone Task Stack Size +** Defines the cFE_TIME 1HZ Task Stack Size +** +** \par Limits +** There is a lower limit of 2048 on these configuration parameters. There +** are no restrictions on the upper limit however, the maximum stack size +** is system dependent and should be verified. Most operating systems provide +** tools for measuring the amount of stack used by a task during operation. It +** is always a good idea to verify that no more than 1/2 of the stack is used. +*/ +#define CFE_PLATFORM_TIME_START_TASK_STACK_SIZE CFE_PLATFORM_ES_DEFAULT_STACK_SIZE +#define CFE_PLATFORM_TIME_TONE_TASK_STACK_SIZE 4096 +#define CFE_PLATFORM_TIME_1HZ_TASK_STACK_SIZE 8192 + +#endif diff --git a/modules/time/config/default_cfe_time_mission_cfg.h b/modules/time/config/default_cfe_time_mission_cfg.h new file mode 100644 index 000000000..5e8e973c1 --- /dev/null +++ b/modules/time/config/default_cfe_time_mission_cfg.h @@ -0,0 +1,36 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Time Services (CFE_TIME) Application Mission Configuration Header File + * + * This is a compatibility header for the "mission_cfg.h" file that has + * traditionally provided public config definitions for each CFS app. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_TIME_MISSION_CFG_H +#define CFE_TIME_MISSION_CFG_H + +#include "cfe_time_interface_cfg.h" + +#endif diff --git a/modules/time/config/default_cfe_time_msg.h b/modules/time/config/default_cfe_time_msg.h new file mode 100644 index 000000000..12242f5cc --- /dev/null +++ b/modules/time/config/default_cfe_time_msg.h @@ -0,0 +1,38 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * Specification for the CFE Time Services (CFE_TIME) command and telemetry + * message data types. + * + * This is a compatibility header for the "cfe_time_msg.h" file that has + * traditionally provided the message definitions for cFS apps. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_TIME_MSG_H +#define CFE_TIME_MSG_H + +#include "cfe_mission_cfg.h" +#include "cfe_time_msgdefs.h" +#include "cfe_time_msgstruct.h" + +#endif diff --git a/modules/time/config/default_cfe_time_msgdefs.h b/modules/time/config/default_cfe_time_msgdefs.h new file mode 100644 index 000000000..0823706ba --- /dev/null +++ b/modules/time/config/default_cfe_time_msgdefs.h @@ -0,0 +1,50 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * Specification for the CFE Time Services (CFE_TIME) command and telemetry + * message constant definitions. + * + * For CFE_TIME this is only the function/command code definitions + */ +#ifndef CFE_TIME_MSGDEFS_H +#define CFE_TIME_MSGDEFS_H + +#include "cfe_time_fcncodes.h" + +/** \defgroup CFETIMEClkStates cFE Clock State Flag Defines + * \{ + */ +#define CFE_TIME_FLAG_CLKSET 0x8000 /**< \brief The spacecraft time has been set */ +#define CFE_TIME_FLAG_FLYING 0x4000 /**< \brief This instance of Time Services is flywheeling */ +#define CFE_TIME_FLAG_SRCINT 0x2000 /**< \brief The clock source is set to "internal" */ +#define CFE_TIME_FLAG_SIGPRI 0x1000 /**< \brief The clock signal is set to "primary" */ +#define CFE_TIME_FLAG_SRVFLY 0x0800 /**< \brief The Time Server is in flywheel mode */ +#define CFE_TIME_FLAG_CMDFLY 0x0400 /**< \brief This instance of Time Services was commanded into flywheel mode */ +#define CFE_TIME_FLAG_ADDADJ 0x0200 /**< \brief One time STCF Adjustment is to be done in positive direction */ +#define CFE_TIME_FLAG_ADD1HZ 0x0100 /**< \brief 1 Hz STCF Adjustment is to be done in a positive direction */ +#define CFE_TIME_FLAG_ADDTCL 0x0080 /**< \brief Time Client Latency is applied in a positive direction */ +#define CFE_TIME_FLAG_SERVER 0x0040 /**< \brief This instance of Time Services is a Time Server */ +#define CFE_TIME_FLAG_GDTONE 0x0020 /**< \brief The tone received is good compared to the last tone received */ +#define CFE_TIME_FLAG_REFERR \ + 0x0010 /**< \brief GetReference read error, will be set if unable to get a consistent ref value */ +#define CFE_TIME_FLAG_UNUSED 0x000F /**< \brief Reserved flags - should be zero */ +/** \} */ + +#endif diff --git a/modules/time/config/default_cfe_time_msgids.h b/modules/time/config/default_cfe_time_msgids.h new file mode 100644 index 000000000..b2ef0aa32 --- /dev/null +++ b/modules/time/config/default_cfe_time_msgids.h @@ -0,0 +1,49 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Time Services (CFE_TIME) Application Message IDs + */ +#ifndef CFE_TIME_MSGIDS_H +#define CFE_TIME_MSGIDS_H + +#include "cfe_core_api_base_msgids.h" +#include "cfe_time_topicids.h" + +/* +** cFE Command Message Id's +*/ +#define CFE_TIME_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TIME_CMD_MSG /* 0x1805 */ +#define CFE_TIME_SEND_HK_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TIME_SEND_HK_MSG /* 0x180D */ +#define CFE_TIME_TONE_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TIME_TONE_CMD_MSG /* 0x1810 */ +#define CFE_TIME_1HZ_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TIME_1HZ_CMD_MSG /* 0x1811 */ + +/* +** cFE Global Command Message Id's +*/ +#define CFE_TIME_DATA_CMD_MID CFE_PLATFORM_CMD_MID_BASE_GLOB + CFE_MISSION_TIME_DATA_CMD_MSG /* 0x1860 */ +#define CFE_TIME_SEND_CMD_MID CFE_PLATFORM_CMD_MID_BASE_GLOB + CFE_MISSION_TIME_SEND_CMD_MSG /* 0x1862 */ + +/* +** CFE Telemetry Message Id's +*/ +#define CFE_TIME_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TIME_HK_TLM_MSG /* 0x0805 */ +#define CFE_TIME_DIAG_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TIME_DIAG_TLM_MSG /* 0x0806 */ + +#endif diff --git a/modules/time/config/default_cfe_time_msgstruct.h b/modules/time/config/default_cfe_time_msgstruct.h new file mode 100644 index 000000000..a471f315e --- /dev/null +++ b/modules/time/config/default_cfe_time_msgstruct.h @@ -0,0 +1,441 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * + * Purpose: + * cFE Executive Services (TIME) Command and Telemetry packet definition file. + * + * References: + * Flight Software Branch C Coding Standard Version 1.0a + * cFE Flight Software Application Developers Guide + * + * Notes: + * + */ +#ifndef CFE_TIME_MSGSTRUCT_H +#define CFE_TIME_MSGSTRUCT_H + +/************************************************************************ + * Includes + ************************************************************************/ +#include "cfe_mission_cfg.h" +#include "cfe_msg_hdr.h" + +/** + * \brief Generic no argument command + */ +typedef struct CFE_TIME_NoArgsCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ +} CFE_TIME_NoArgsCmd_t; + +/* + * A separate typedef for each of the commands that share this definition + * This follows the convention for command handler prototypes and allows + * each one to independently evolve as necessary. + */ +typedef CFE_TIME_NoArgsCmd_t CFE_TIME_NoopCmd_t; +typedef CFE_TIME_NoArgsCmd_t CFE_TIME_ResetCountersCmd_t; +typedef CFE_TIME_NoArgsCmd_t CFE_TIME_SendDiagnosticCmd_t; +typedef CFE_TIME_NoArgsCmd_t CFE_TIME_1HzCmd_t; +typedef CFE_TIME_NoArgsCmd_t CFE_TIME_ToneSignalCmd_t; +typedef CFE_TIME_NoArgsCmd_t CFE_TIME_FakeToneCmd_t; +typedef CFE_TIME_NoArgsCmd_t CFE_TIME_SendHkCmd_t; + +/** + * \brief Set leap seconds command payload + */ +typedef struct CFE_TIME_LeapsCmd_Payload +{ + int16 LeapSeconds; +} CFE_TIME_LeapsCmd_Payload_t; + +/** + * \brief Set leap seconds command + */ +typedef struct CFE_TIME_SetLeapSecondsCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_TIME_LeapsCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_TIME_SetLeapSecondsCmd_t; + +/** + * \brief Set clock state command payload + */ +typedef struct CFE_TIME_StateCmd_Payload +{ + CFE_TIME_ClockState_Enum_t ClockState; /**< \brief #CFE_TIME_ClockState_INVALID=Spacecraft time has + not been accurately set, #CFE_TIME_ClockState_VALID=Spacecraft clock + has been accurately set, #CFE_TIME_ClockState_FLYWHEEL=Force into + FLYWHEEL mode */ + /**< Selects the current clock state */ +} CFE_TIME_StateCmd_Payload_t; + +/** + * \brief Set clock state command + */ +typedef struct CFE_TIME_SetStateCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_TIME_StateCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_TIME_SetStateCmd_t; + +/** + * \brief Set time data source command payload + */ +typedef struct CFE_TIME_SourceCmd_Payload +{ + int16 TimeSource; /**< \brief #CFE_TIME_SourceSelect_INTERNAL=Internal Source, + #CFE_TIME_SourceSelect_EXTERNAL=External Source */ + /**< Selects either the "Internal" and "External" clock source */ +} CFE_TIME_SourceCmd_Payload_t; + +/** + * \brief Set time data source command + */ +typedef struct CFE_TIME_SetSourceCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_TIME_SourceCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_TIME_SetSourceCmd_t; + +/** + * \brief Set tone signal source command payload + */ +typedef struct CFE_TIME_SignalCmd_Payload +{ + int16 ToneSource; /**< \brief #CFE_TIME_ToneSignalSelect_PRIMARY=Primary Source, + #CFE_TIME_ToneSignalSelect_REDUNDANT=Redundant Source */ + /**< Selects either the "Primary" or "Redundant" tone signal source */ +} CFE_TIME_SignalCmd_Payload_t; + +/** + * \brief Set tone signal source command + */ +typedef struct CFE_TIME_SetSignalCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_TIME_SignalCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_TIME_SetSignalCmd_t; + +/** + * \brief Generic seconds, microseconds command payload + */ +typedef struct CFE_TIME_TimeCmd_Payload +{ + uint32 Seconds; + uint32 MicroSeconds; +} CFE_TIME_TimeCmd_Payload_t; + +/** + * \brief Generic seconds, microseconds argument command + */ +typedef struct CFE_TIME_TimeCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_TIME_TimeCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_TIME_TimeCmd_t; + +/* + * A separate typedef for each of the commands that share this definition + * This follows the convention for command handler prototypes and allows + * each one to independently evolve as necessary. + */ +typedef CFE_TIME_TimeCmd_t CFE_TIME_AddDelayCmd_t; +typedef CFE_TIME_TimeCmd_t CFE_TIME_SubDelayCmd_t; +typedef CFE_TIME_TimeCmd_t CFE_TIME_SetMETCmd_t; +typedef CFE_TIME_TimeCmd_t CFE_TIME_SetSTCFCmd_t; +typedef CFE_TIME_TimeCmd_t CFE_TIME_AddAdjustCmd_t; +typedef CFE_TIME_TimeCmd_t CFE_TIME_SubAdjustCmd_t; +typedef CFE_TIME_TimeCmd_t CFE_TIME_SetTimeCmd_t; + +/** + * \brief Generic seconds, subseconds command payload + */ +typedef struct CFE_TIME_OneHzAdjustmentCmd_Payload +{ + uint32 Seconds; + uint32 Subseconds; +} CFE_TIME_OneHzAdjustmentCmd_Payload_t; + +/** + * \brief Generic seconds, subseconds adjustment command + */ +typedef struct CFE_TIME_OneHzAdjustmentCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_TIME_OneHzAdjustmentCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_TIME_OneHzAdjustmentCmd_t; + +/* + * A separate typedef for each of the commands that share this definition + * This follows the convention for command handler prototypes and allows + * each one to independently evolve as necessary. + */ +typedef CFE_TIME_OneHzAdjustmentCmd_t CFE_TIME_Add1HZAdjustmentCmd_t; +typedef CFE_TIME_OneHzAdjustmentCmd_t CFE_TIME_Sub1HZAdjustmentCmd_t; + +/** + * \brief Time at tone data command payload + */ +typedef struct CFE_TIME_ToneDataCmd_Payload +{ + CFE_TIME_SysTime_t AtToneMET; /**< \brief MET at time of tone */ + CFE_TIME_SysTime_t AtToneSTCF; /**< \brief STCF at time of tone */ + int16 AtToneLeapSeconds; /**< \brief Leap Seconds at time of tone */ + CFE_TIME_ClockState_Enum_t AtToneState; /**< \brief Clock state at time of tone */ +} CFE_TIME_ToneDataCmd_Payload_t; + +/** + * \brief Time at tone data command + */ +typedef struct CFE_TIME_ToneDataCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_TIME_ToneDataCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_TIME_ToneDataCmd_t; + +/*************************************************************************/ + +/** +** \cfetimetlm Time Services Housekeeping Packet +**/ +typedef struct CFE_TIME_HousekeepingTlm_Payload +{ + /* + ** Task command interface counters... + */ + uint8 CommandCounter; /**< \cfetlmmnemonic \TIME_CMDPC + \brief Time Command Execution Counter */ + uint8 CommandErrorCounter; /**< \cfetlmmnemonic \TIME_CMDEC + \brief Time Command Error Counter */ + + /* + ** Clock state flags and "as calculated" clock state... + */ + uint16 ClockStateFlags; /**< \cfetlmmnemonic \TIME_STATEFLG + \brief State Flags */ + CFE_TIME_ClockState_Enum_t ClockStateAPI; /**< \cfetlmmnemonic + \TIME_APISTATE \brief API State */ + + /* + ** Leap Seconds... + */ + int16 LeapSeconds; /**< \cfetlmmnemonic \TIME_LEAPSECS + \brief Current Leaps Seconds */ + + /* + ** Current MET and STCF time values... + */ + uint32 SecondsMET; /**< \cfetlmmnemonic \TIME_METSECS + \brief Current MET (seconds) */ + uint32 SubsecsMET; /**< \cfetlmmnemonic \TIME_METSUBSECS + \brief Current MET (sub-seconds) */ + + uint32 SecondsSTCF; /**< \cfetlmmnemonic \TIME_STCFSECS + \brief Current STCF (seconds) */ + uint32 SubsecsSTCF; /**< \cfetlmmnemonic \TIME_STCFSUBSECS + \brief Current STCF (sub-seconds) */ + +/* +** 1Hz STCF adjustment values (server only)... +*/ +#if (CFE_PLATFORM_TIME_CFG_SERVER == true) + uint32 Seconds1HzAdj; /**< \cfetlmmnemonic \TIME_1HZADJSECS + \brief Current 1 Hz SCTF adjustment (seconds) */ + uint32 Subsecs1HzAdj; /**< \cfetlmmnemonic \TIME_1HZADJSSECS + \brief Current 1 Hz SCTF adjustment (sub-seconds) */ +#endif + +/* +** Time at tone delay values (client only)... +*/ +#if (CFE_PLATFORM_TIME_CFG_CLIENT == true) + uint32 SecondsDelay; /**< \cfetlmmnemonic \TIME_1HZDLYSECS + \brief Current 1 Hz SCTF Delay (seconds) */ + uint32 SubsecsDelay; /**< \cfetlmmnemonic \TIME_1HZDLYSSECS + \brief Current 1 Hz SCTF Delay (sub-seconds) */ +#endif +} CFE_TIME_HousekeepingTlm_Payload_t; + +typedef struct CFE_TIME_HousekeepingTlm +{ + CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ + CFE_TIME_HousekeepingTlm_Payload_t Payload; /**< \brief Telemetry payload */ +} CFE_TIME_HousekeepingTlm_t; + +/*************************************************************************/ + +/** +** \cfetimetlm Time Services Diagnostics Packet +**/ +typedef struct CFE_TIME_DiagnosticTlm_Payload +{ + /* + ** Data values used to compute time (in reference to "tone")... + */ + CFE_TIME_SysTime_t AtToneMET; /**< \cfetlmmnemonic \TIME_TMETS + \brief MET at time of tone */ + CFE_TIME_SysTime_t AtToneSTCF; /**< \cfetlmmnemonic \TIME_STCFS + \brief STCF at time of tone */ + CFE_TIME_SysTime_t AtToneDelay; /**< \cfetlmmnemonic \TIME_LATENTS + \brief Adjustment for slow tone detection */ + CFE_TIME_SysTime_t AtToneLatch; /**< \cfetlmmnemonic \TIME_TVALIDS + \brief Local clock latched at time of tone */ + + int16 AtToneLeapSeconds; /**< \cfetlmmnemonic \TIME_LEAPS + \brief Leap Seconds at time of tone */ + CFE_TIME_ClockState_Enum_t ClockStateAPI; /**< \cfetlmmnemonic \TIME_APISTATE + \brief Clock state as per API */ + + /* + ** Data values that reflect the time (right now)... + */ + CFE_TIME_SysTime_t TimeSinceTone; /**< \cfetlmmnemonic \TIME_ELAPSEDS + \brief Time elapsed since the tone */ + CFE_TIME_SysTime_t CurrentLatch; /**< \cfetlmmnemonic \TIME_LOCALS + \brief Local clock latched just "now" */ + CFE_TIME_SysTime_t CurrentMET; /**< \cfetlmmnemonic \TIME_METS + \brief MET at this instant */ + CFE_TIME_SysTime_t CurrentTAI; /**< \cfetlmmnemonic \TIME_TAIS + \brief TAI at this instant */ + CFE_TIME_SysTime_t CurrentUTC; /**< \cfetlmmnemonic \TIME_UTCS + \brief UTC at this instant */ + + /* + ** Data values used to define the current clock state... + */ + int16 ClockSetState; /**< \cfetlmmnemonic \TIME_VALID + \brief Time has been "set" */ + int16 ClockFlyState; /**< \cfetlmmnemonic \TIME_FLYWHEEL + \brief Current fly-wheel state */ + int16 ClockSource; /**< \cfetlmmnemonic \TIME_SOURCE + \brief Internal vs external, etc. */ + int16 ClockSignal; /**< \cfetlmmnemonic \TIME_SIGNAL + \brief Primary vs redundant, etc. */ + int16 ServerFlyState; /**< \cfetlmmnemonic \TIME_SRVFLY + \brief Used by clients only */ + int16 Forced2Fly; /**< \cfetlmmnemonic \TIME_CMD2FLY + \brief Commanded into fly-wheel */ + + /* + ** Clock state flags... + */ + uint16 ClockStateFlags; /**< \cfetlmmnemonic \TIME_STATEFLAGS + \brief Clock State Flags */ + + /* + ** STCF adjustment direction values... + */ + int16 OneTimeDirection; /**< \cfetlmmnemonic \TIME_ADJUSTDIR + \brief One time STCF adjustment direction (Add = 1, Sub = 2) */ + int16 OneHzDirection; /**< \cfetlmmnemonic \TIME_1HZADJDIR + \brief 1Hz STCF adjustment direction */ + int16 DelayDirection; /**< \cfetlmmnemonic \TIME_LATENTDIR + \brief Client latency adjustment direction */ + + /* + ** STCF adjustment values... + */ + CFE_TIME_SysTime_t OneTimeAdjust; /**< \cfetlmmnemonic \TIME_ADJUSTS + \brief Previous one-time STCF adjustment */ + CFE_TIME_SysTime_t OneHzAdjust; /**< \cfetlmmnemonic \TIME_1HZADJS + \brief Current 1Hz STCF adjustment */ + + /* + ** Most recent local clock latch values... + */ + CFE_TIME_SysTime_t ToneSignalLatch; /**< \cfetlmmnemonic \TIME_TTS + \brief Local Clock latched at most recent tone signal */ + CFE_TIME_SysTime_t ToneDataLatch; /**< \cfetlmmnemonic \TIME_TDS + \brief Local Clock latched at arrival of tone data */ + + /* + ** Miscellaneous counters (subject to reset command)... + */ + uint32 ToneMatchCounter; /**< \cfetlmmnemonic \TIME_VERIFYCNT + \brief Tone signal / data verification count */ + uint32 ToneMatchErrorCounter; /**< \cfetlmmnemonic \TIME_VERIFYER + \brief Tone signal / data verification error count */ + uint32 ToneSignalCounter; /**< \cfetlmmnemonic \TIME_TSDETCNT + \brief Tone signal detected SB message count */ + uint32 ToneDataCounter; /**< \cfetlmmnemonic \TIME_TATTCNT + \brief Time at the tone data SB message count */ + uint32 ToneIntCounter; /**< \cfetlmmnemonic \TIME_TSISRCNT + \brief Tone signal ISR execution count */ + uint32 ToneIntErrorCounter; /**< \cfetlmmnemonic \TIME_TSISRERR + \brief Tone signal ISR error count */ + uint32 ToneTaskCounter; /**< \cfetlmmnemonic \TIME_TSTASKCNT + \brief Tone task execution count */ + uint32 VersionCounter; /**< \cfetlmmnemonic \TIME_VERSIONCNT + \brief Count of mods to time at tone reference data (version) */ + uint32 LocalIntCounter; /**< \cfetlmmnemonic \TIME_1HZISRCNT + \brief Local 1Hz ISR execution count */ + uint32 LocalTaskCounter; /**< \cfetlmmnemonic \TIME_1HZTASKCNT + \brief Local 1Hz task execution count */ + + /* + ** Miscellaneous counters (not subject to reset command)... + */ + uint32 VirtualMET; /**< \cfetlmmnemonic \TIME_LOGICALMET + \brief Software MET */ + + /* + ** Time window verification values (converted from micro-secs)... + ** + ** Regardless of whether the tone follows the time packet, or vice + ** versa, these values define the acceptable window of time for + ** the second event to follow the first. The minimum value may + ** be as little as zero, and the maximum must be something less + ** than a second. + */ + uint32 MinElapsed; /**< \cfetlmmnemonic \TIME_MINWINDOW + \brief Min tone signal / data pkt arrival window (Sub-seconds) */ + uint32 MaxElapsed; /**< \cfetlmmnemonic \TIME_MAXWINDOW + \brief Max tone signal / data pkt arrival window (Sub-seconds) */ + + /* + ** Maximum local clock value (before roll-over)... + */ + CFE_TIME_SysTime_t MaxLocalClock; /**< \cfetlmmnemonic \TIME_WRAPS + \brief Max local clock value before rollover */ + + /* + ** Tone signal tolerance limits... + */ + uint32 ToneOverLimit; /**< \cfetlmmnemonic \TIME_MAXSS + \brief Max between tone signal interrupts */ + uint32 ToneUnderLimit; /**< \cfetlmmnemonic \TIME_MINSS + \brief Min between tone signal interrupts */ + + /* + ** Reset Area... + */ + uint32 DataStoreStatus; /**< \cfetlmmnemonic \TIME_ATASTSTAT + \brief Data Store status (preserved across processor reset) */ +} CFE_TIME_DiagnosticTlm_Payload_t; + +typedef struct CFE_TIME_DiagnosticTlm +{ + CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ + CFE_TIME_DiagnosticTlm_Payload_t Payload; /**< \brief Telemetry payload */ +} CFE_TIME_DiagnosticTlm_t; + +#endif diff --git a/modules/time/config/default_cfe_time_platform_cfg.h b/modules/time/config/default_cfe_time_platform_cfg.h new file mode 100644 index 000000000..414213026 --- /dev/null +++ b/modules/time/config/default_cfe_time_platform_cfg.h @@ -0,0 +1,41 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Time Services (CFE_TIME) Application Platform Configuration Header File + * + * This is a compatibility header for the "platform_cfg.h" file that has + * traditionally provided both public and private config definitions + * for each CFS app. + * + * These definitions are now provided in two separate files, one for + * the public/mission scope and one for internal scope. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_TIME_PLATFORM_CFG_H +#define CFE_TIME_PLATFORM_CFG_H + +#include "cfe_time_mission_cfg.h" +#include "cfe_time_internal_cfg.h" + +#endif diff --git a/modules/time/config/default_cfe_time_topicids.h b/modules/time/config/default_cfe_time_topicids.h new file mode 100644 index 000000000..a3c2ec1ef --- /dev/null +++ b/modules/time/config/default_cfe_time_topicids.h @@ -0,0 +1,64 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Time Services (CFE_TIME) Application Topic IDs + */ +#ifndef CFE_TIME_TOPICIDS_H +#define CFE_TIME_TOPICIDS_H + +/** +** \cfemissioncfg cFE Portable Message Numbers for Commands +** +** \par Description: +** Portable message numbers for the cFE command messages +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_TIME_CMD_MSG 5 +#define CFE_MISSION_TIME_SEND_HK_MSG 13 +#define CFE_MISSION_TIME_TONE_CMD_MSG 16 +#define CFE_MISSION_TIME_1HZ_CMD_MSG 17 + +/** +** \cfemissioncfg cFE Portable Message Numbers for Global Messages +** +** \par Description: +** Portable message numbers for the cFE global messages +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_TIME_DATA_CMD_MSG 0 +#define CFE_MISSION_TIME_SEND_CMD_MSG 2 + +/** +** \cfemissioncfg cFE Portable Message Numbers for Telemetry +** +** \par Description: +** Portable message numbers for the cFE telemetry messages +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_TIME_HK_TLM_MSG 5 +#define CFE_MISSION_TIME_DIAG_TLM_MSG 6 + +#endif diff --git a/modules/time/fsw/inc/cfe_time_events.h b/modules/time/fsw/inc/cfe_time_eventids.h similarity index 100% rename from modules/time/fsw/inc/cfe_time_events.h rename to modules/time/fsw/inc/cfe_time_eventids.h diff --git a/modules/time/fsw/src/cfe_time_module_all.h b/modules/time/fsw/src/cfe_time_module_all.h index 8bd048ad6..cfcb6f89e 100644 --- a/modules/time/fsw/src/cfe_time_module_all.h +++ b/modules/time/fsw/src/cfe_time_module_all.h @@ -40,7 +40,7 @@ #include "cfe_time_core_internal.h" #include "cfe_time_msg.h" -#include "cfe_time_events.h" +#include "cfe_time_eventids.h" #include "cfe_time_utils.h" #include "cfe_time_dispatch.h" diff --git a/modules/time/mission_build.cmake b/modules/time/mission_build.cmake new file mode 100644 index 000000000..4b1deeda0 --- /dev/null +++ b/modules/time/mission_build.cmake @@ -0,0 +1,37 @@ +########################################################### +# +# TIME Core Module mission build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### + +# The list of header files that control the TIME configuration +set(TIME_MISSION_CONFIG_FILE_LIST + cfe_time_mission_cfg.h + cfe_time_interface_cfg.h + cfe_time_extern_typedefs.h + cfe_time_fcncodes.h + cfe_time_msgdefs.h + cfe_time_msg.h + cfe_time_msgstruct.h + cfe_time_topicids.h +) + +# Create wrappers around the all the config header files +# This makes them individually overridable by the missions, without modifying +# the distribution default copies +foreach(TIME_CFGFILE ${TIME_MISSION_CONFIG_FILE_LIST}) + get_filename_component(CFGKEY "${TIME_CFGFILE}" NAME_WE) + if (DEFINED TIME_CFGFILE_SRC_${CFGKEY}) + set(DEFAULT_SOURCE GENERATED_FILE "${TIME_CFGFILE_SRC_${CFGKEY}}") + else() + set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${TIME_CFGFILE}") + endif() + generate_config_includefile( + FILE_NAME "${TIME_CFGFILE}" + ${DEFAULT_SOURCE} + ) +endforeach() From d92d5b928cc3e046e3735f3aa01552103071925f Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 2 May 2023 16:28:00 -0400 Subject: [PATCH 07/14] Fix #2320, reorganize EVS header files Organize EVS header file contents according to the convention --- modules/evs/CMakeLists.txt | 2 +- modules/evs/arch_build.cmake | 32 ++ .../config/default_cfe_evs_extern_typedefs.h} | 12 - .../default_cfe_evs_fcncodes.h} | 408 +---------------- .../config/default_cfe_evs_interface_cfg.h | 49 +++ .../evs/config/default_cfe_evs_internal_cfg.h | 199 +++++++++ .../evs/config/default_cfe_evs_mission_cfg.h | 36 ++ modules/evs/config/default_cfe_evs_msg.h | 38 ++ modules/evs/config/default_cfe_evs_msgdefs.h | 43 ++ modules/evs/config/default_cfe_evs_msgids.h | 42 ++ .../evs/config/default_cfe_evs_msgstruct.h | 411 ++++++++++++++++++ .../evs/config/default_cfe_evs_platform_cfg.h | 41 ++ modules/evs/config/default_cfe_evs_topicids.h | 51 +++ .../{cfe_evs_events.h => cfe_evs_eventids.h} | 0 modules/evs/fsw/src/cfe_evs_module_all.h | 8 +- modules/evs/fsw/src/cfe_evs_task.h | 2 +- modules/evs/mission_build.cmake | 37 ++ 17 files changed, 993 insertions(+), 418 deletions(-) create mode 100644 modules/evs/arch_build.cmake rename modules/{core_api/fsw/inc/cfe_evs_extern_typedefs.h => evs/config/default_cfe_evs_extern_typedefs.h} (92%) rename modules/evs/{fsw/inc/cfe_evs_msg.h => config/default_cfe_evs_fcncodes.h} (68%) create mode 100644 modules/evs/config/default_cfe_evs_interface_cfg.h create mode 100644 modules/evs/config/default_cfe_evs_internal_cfg.h create mode 100644 modules/evs/config/default_cfe_evs_mission_cfg.h create mode 100644 modules/evs/config/default_cfe_evs_msg.h create mode 100644 modules/evs/config/default_cfe_evs_msgdefs.h create mode 100644 modules/evs/config/default_cfe_evs_msgids.h create mode 100644 modules/evs/config/default_cfe_evs_msgstruct.h create mode 100644 modules/evs/config/default_cfe_evs_platform_cfg.h create mode 100644 modules/evs/config/default_cfe_evs_topicids.h rename modules/evs/fsw/inc/{cfe_evs_events.h => cfe_evs_eventids.h} (100%) create mode 100644 modules/evs/mission_build.cmake diff --git a/modules/evs/CMakeLists.txt b/modules/evs/CMakeLists.txt index 66cb966c8..2a88e0316 100644 --- a/modules/evs/CMakeLists.txt +++ b/modules/evs/CMakeLists.txt @@ -26,5 +26,5 @@ endif(ENABLE_UNIT_TESTS) cfs_app_check_intf(${DEP} cfe_evs_msg.h - cfe_evs_events.h + cfe_evs_eventids.h ) diff --git a/modules/evs/arch_build.cmake b/modules/evs/arch_build.cmake new file mode 100644 index 000000000..63c50f8e2 --- /dev/null +++ b/modules/evs/arch_build.cmake @@ -0,0 +1,32 @@ +########################################################### +# +# EVS Core Module platform build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### + +# The list of header files that control the EVS configuration +set(EVS_PLATFORM_CONFIG_FILE_LIST + cfe_evs_internal_cfg.h + cfe_evs_msgids.h + cfe_evs_platform_cfg.h +) + +# Create wrappers around the all the config header files +# This makes them individually overridable by the missions, without modifying +# the distribution default copies +foreach(EVS_CFGFILE ${EVS_PLATFORM_CONFIG_FILE_LIST}) + get_filename_component(CFGKEY "${EVS_CFGFILE}" NAME_WE) + if (DEFINED EVS_CFGFILE_SRC_${CFGKEY}) + set(DEFAULT_SOURCE "${EVS_CFGFILE_SRC_${CFGKEY}}") + else() + set(DEFAULT_SOURCE "${CMAKE_CURRENT_LIST_DIR}/config/default_${EVS_CFGFILE}") + endif() + generate_config_includefile( + FILE_NAME "${EVS_CFGFILE}" + FALLBACK_FILE ${DEFAULT_SOURCE} + ) +endforeach() diff --git a/modules/core_api/fsw/inc/cfe_evs_extern_typedefs.h b/modules/evs/config/default_cfe_evs_extern_typedefs.h similarity index 92% rename from modules/core_api/fsw/inc/cfe_evs_extern_typedefs.h rename to modules/evs/config/default_cfe_evs_extern_typedefs.h index 1b8124d41..d10de9fb8 100644 --- a/modules/core_api/fsw/inc/cfe_evs_extern_typedefs.h +++ b/modules/evs/config/default_cfe_evs_extern_typedefs.h @@ -25,16 +25,6 @@ #ifndef CFE_EVS_EXTERN_TYPEDEFS_H #define CFE_EVS_EXTERN_TYPEDEFS_H -/* This header may be generated from an EDS file, - * tools are available and the feature is enabled */ -#ifdef CFE_EDS_ENABLED_BUILD - -/* Use the EDS generated version of these types */ -#include "cfe_evs_eds_typedefs.h" - -#else -/* Use the local definitions of these types */ - #include "common_types.h" /** @@ -167,6 +157,4 @@ enum CFE_EVS_EventOutput */ typedef uint8 CFE_EVS_EventOutput_Enum_t; -#endif /* CFE_EDS_ENABLED_BUILD */ - #endif /* CFE_EVS_EXTERN_TYPEDEFS_H */ diff --git a/modules/evs/fsw/inc/cfe_evs_msg.h b/modules/evs/config/default_cfe_evs_fcncodes.h similarity index 68% rename from modules/evs/fsw/inc/cfe_evs_msg.h rename to modules/evs/config/default_cfe_evs_fcncodes.h index 1a106fcd3..7f639081e 100644 --- a/modules/evs/fsw/inc/cfe_evs_msg.h +++ b/modules/evs/config/default_cfe_evs_fcncodes.h @@ -18,27 +18,15 @@ /** * @file + * Specification for the CFE Event Services (CFE_EVS) command function codes * - * Title: Event Services Message definition header file Header File - * - * Purpose: - * Unit specification for Event services command codes and data structures. - * - * Design Notes: - * - * References: - * Flight Software Branch C Coding Standard Version 1.0a - * + * @note + * This file should be strictly limited to the command/function code (CC) + * macro definitions. Other definitions such as enums, typedefs, or other + * macros should be placed in the msgdefs.h or msg.h files. */ - -#ifndef CFE_EVS_MSG_H -#define CFE_EVS_MSG_H - -/********************************** Include Files ************************************/ -#include "common_types.h" /* Basic data types */ -#include "cfe_msg_hdr.h" /* for header definitions */ -#include "cfe_evs_extern_typedefs.h" /* for EVS-specific types such as CFE_EVS_LogMode_Enum_t */ -#include "cfe_es_extern_typedefs.h" /* for CFE_ES_AppId_t type */ +#ifndef CFE_EVS_FCNCODES_H +#define CFE_EVS_FCNCODES_H /** \name Event Services Command Codes */ /** \{ */ @@ -885,384 +873,4 @@ #define CFE_EVS_CLEAR_LOG_CC 20 /** \} */ -/* Event Type bit masks */ -#define CFE_EVS_DEBUG_BIT 0x0001 -#define CFE_EVS_INFORMATION_BIT 0x0002 -#define CFE_EVS_ERROR_BIT 0x0004 -#define CFE_EVS_CRITICAL_BIT 0x0008 - -/* Output Port bit masks */ -#define CFE_EVS_PORT1_BIT 0x0001 -#define CFE_EVS_PORT2_BIT 0x0002 -#define CFE_EVS_PORT3_BIT 0x0004 -#define CFE_EVS_PORT4_BIT 0x0008 - -/****************** Structure Definitions *********************/ - -/** -** \brief Command with no additional arguments -**/ -typedef struct CFE_EVS_NoArgsCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ -} CFE_EVS_NoArgsCmd_t; - -/* - * The NoArgsCmd is shared by several EVS command handlers. - * Create a unique type for each one so the prototypes will follow the naming pattern, - * allowing each command to evolve independently. - */ -typedef CFE_EVS_NoArgsCmd_t CFE_EVS_NoopCmd_t; -typedef CFE_EVS_NoArgsCmd_t CFE_EVS_ResetCountersCmd_t; -typedef CFE_EVS_NoArgsCmd_t CFE_EVS_ClearLogCmd_t; -typedef CFE_EVS_NoArgsCmd_t CFE_EVS_SendHkCmd_t; - -/** -** \brief Write Event Log to File Command Payload -** -** For command details, see #CFE_EVS_WRITE_LOG_DATA_FILE_CC -** -**/ -typedef struct CFE_EVS_LogFileCmd_Payload -{ - char LogFilename[CFE_MISSION_MAX_PATH_LEN]; /**< \brief Filename where log data is to be written */ -} CFE_EVS_LogFileCmd_Payload_t; - -/** - * \brief Write Event Log to File Command - */ -typedef struct CFE_EVS_WriteLogDataFileCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_EVS_LogFileCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_EVS_WriteLogDataFileCmd_t; - -/** -** \brief Write Event Services Application Information to File Command Payload -** -** For command details, see #CFE_EVS_WRITE_APP_DATA_FILE_CC -** -**/ -typedef struct CFE_EVS_AppDataCmd_Payload -{ - char AppDataFilename[CFE_MISSION_MAX_PATH_LEN]; /**< \brief Filename where application data is to be written */ -} CFE_EVS_AppDataCmd_Payload_t; - -/** - * \brief Write Event Services Application Information to File Command - */ -typedef struct CFE_EVS_WriteAppDataFileCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_EVS_AppDataCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_EVS_WriteAppDataFileCmd_t; - -/** -** \brief Set Log Mode Command Payload -** -** For command details, see #CFE_EVS_SET_LOG_MODE_CC -** -**/ -typedef struct CFE_EVS_SetLogMode_Payload -{ - CFE_EVS_LogMode_Enum_t LogMode; /**< \brief Mode to use in the command*/ - uint8 Spare; /**< \brief Pad to even byte*/ -} CFE_EVS_SetLogMode_Payload_t; - -/** - * \brief Set Log Mode Command - */ -typedef struct CFE_EVS_SetLogModeCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_EVS_SetLogMode_Payload_t Payload; /**< \brief Command payload */ -} CFE_EVS_SetLogModeCmd_t; - -/** -** \brief Set Event Format Mode Command Payload -** -** For command details, see #CFE_EVS_SET_EVENT_FORMAT_MODE_CC -** -**/ -typedef struct CFE_EVS_SetEventFormatCode_Payload -{ - CFE_EVS_MsgFormat_Enum_t MsgFormat; /**< \brief Mode to use in the command*/ - uint8 Spare; /**< \brief Pad to even byte*/ -} CFE_EVS_SetEventFormatMode_Payload_t; - -/** - * \brief Set Event Format Mode Command - */ -typedef struct CFE_EVS_SetEventFormatModeCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_EVS_SetEventFormatMode_Payload_t Payload; /**< \brief Command payload */ -} CFE_EVS_SetEventFormatModeCmd_t; - -/** -** \brief Generic Bitmask Command Payload -** -** For command details, see #CFE_EVS_ENABLE_EVENT_TYPE_CC, #CFE_EVS_DISABLE_EVENT_TYPE_CC, -** #CFE_EVS_ENABLE_PORTS_CC and/or #CFE_EVS_DISABLE_PORTS_CC -** -**/ -typedef struct CFE_EVS_BitMaskCmd_Payload -{ - uint8 BitMask; /**< \brief BitMask to use in the command */ - uint8 Spare; /**< \brief Pad to even byte*/ -} CFE_EVS_BitMaskCmd_Payload_t; - -/** - * \brief Generic Bitmask Command - */ -typedef struct CFE_EVS_BitMaskCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_EVS_BitMaskCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_EVS_BitMaskCmd_t; - -/* - * The CFE_EVS_BitMaskCmd_t is shared by several EVS command handlers. - * Create a unique type for each one so the prototypes will follow the naming pattern, - * allowing each command to evolve independently. - */ -typedef CFE_EVS_BitMaskCmd_t CFE_EVS_EnablePortsCmd_t; -typedef CFE_EVS_BitMaskCmd_t CFE_EVS_DisablePortsCmd_t; -typedef CFE_EVS_BitMaskCmd_t CFE_EVS_EnableEventTypeCmd_t; -typedef CFE_EVS_BitMaskCmd_t CFE_EVS_DisableEventTypeCmd_t; - -/** -** \brief Generic App Name Command Payload -** -** For command details, see #CFE_EVS_ENABLE_APP_EVENTS_CC, #CFE_EVS_DISABLE_APP_EVENTS_CC, -** #CFE_EVS_RESET_APP_COUNTER_CC and/or #CFE_EVS_RESET_ALL_FILTERS_CC -** -**/ -typedef struct CFE_EVS_AppNameCmd_Payload -{ - char AppName[CFE_MISSION_MAX_API_LEN]; /**< \brief Application name to use in the command*/ -} CFE_EVS_AppNameCmd_Payload_t; - -/** - * \brief Generic App Name Command - */ -typedef struct CFE_EVS_AppNameCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_EVS_AppNameCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_EVS_AppNameCmd_t; - -/* - * The CFE_EVS_AppNameCmd_t is shared by several EVS command handlers. - * Create a unique type for each one so the prototypes will follow the naming pattern, - * allowing each command to evolve independently. - */ -typedef CFE_EVS_AppNameCmd_t CFE_EVS_EnableAppEventsCmd_t; -typedef CFE_EVS_AppNameCmd_t CFE_EVS_DisableAppEventsCmd_t; -typedef CFE_EVS_AppNameCmd_t CFE_EVS_ResetAppCounterCmd_t; -typedef CFE_EVS_AppNameCmd_t CFE_EVS_ResetAllFiltersCmd_t; - -/** -** \brief Generic App Name and Event ID Command Payload -** -** For command details, see #CFE_EVS_RESET_FILTER_CC and #CFE_EVS_DELETE_EVENT_FILTER_CC -** -**/ -typedef struct CFE_EVS_AppNameEventIDCmd_Payload -{ - char AppName[CFE_MISSION_MAX_API_LEN]; /**< \brief Application name to use in the command*/ - uint16 EventID; /**< \brief Event ID to use in the command*/ -} CFE_EVS_AppNameEventIDCmd_Payload_t; - -/** - * \brief Generic App Name and Event ID Command - */ -typedef struct CFE_EVS_AppNameEventIDCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_EVS_AppNameEventIDCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_EVS_AppNameEventIDCmd_t; - -/* - * The CFE_EVS_AppNameEventIDCmd_t is shared by several EVS command handlers. - * Create a unique type for each one so the prototypes will follow the naming pattern, - * allowing each command to evolve independently. - */ -typedef CFE_EVS_AppNameEventIDCmd_t CFE_EVS_ResetFilterCmd_t; -typedef CFE_EVS_AppNameEventIDCmd_t CFE_EVS_DeleteEventFilterCmd_t; - -/** -** \brief Generic App Name and Bitmask Command Payload -** -** For command details, see #CFE_EVS_ENABLE_APP_EVENT_TYPE_CC and/or #CFE_EVS_DISABLE_APP_EVENT_TYPE_CC -** -**/ -typedef struct CFE_EVS_AppNameBitMaskCmd_Payload -{ - char AppName[CFE_MISSION_MAX_API_LEN]; /**< \brief Application name to use in the command*/ - uint8 BitMask; /**< \brief BitMask to use in the command*/ - uint8 Spare; /**< \brief Pad to even byte*/ -} CFE_EVS_AppNameBitMaskCmd_Payload_t; - -/** - * \brief Generic App Name and Bitmask Command - */ -typedef struct CFE_EVS_AppNameBitMaskCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_EVS_AppNameBitMaskCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_EVS_AppNameBitMaskCmd_t; - -/* - * The CFE_EVS_AppNameBitMaskCmd_t is shared by several EVS command handlers. - * Create a unique type for each one so the prototypes will follow the naming pattern, - * allowing each command to evolve independently. - */ -typedef CFE_EVS_AppNameBitMaskCmd_t CFE_EVS_EnableAppEventTypeCmd_t; -typedef CFE_EVS_AppNameBitMaskCmd_t CFE_EVS_DisableAppEventTypeCmd_t; - -/** -** \brief Generic App Name, Event ID, Mask Command Payload -** -** For command details, see #CFE_EVS_SET_FILTER_CC, #CFE_EVS_ADD_EVENT_FILTER_CC -** and/or #CFE_EVS_DELETE_EVENT_FILTER_CC -** -**/ -typedef struct CFE_EVS_AppNameEventIDMaskCmd_Payload -{ - char AppName[CFE_MISSION_MAX_API_LEN]; /**< \brief Application name to use in the command*/ - uint16 EventID; /**< \brief Event ID to use in the command*/ - uint16 Mask; /**< \brief Mask to use in the command */ -} CFE_EVS_AppNameEventIDMaskCmd_Payload_t; - -/** - * \brief Generic App Name, Event ID, Mask Command - */ -typedef struct CFE_EVS_AppNameEventIDMaskCmd -{ - CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ - CFE_EVS_AppNameEventIDMaskCmd_Payload_t Payload; /**< \brief Command payload */ -} CFE_EVS_AppNameEventIDMaskCmd_t; - -/* - * The CFE_EVS_AppNameEventIDMaskCmd_t is shared by several EVS command handlers. - * Create a unique type for each one so the prototypes will follow the naming pattern, - * allowing each command to evolve independently. - */ -typedef CFE_EVS_AppNameEventIDMaskCmd_t CFE_EVS_AddEventFilterCmd_t; -typedef CFE_EVS_AppNameEventIDMaskCmd_t CFE_EVS_SetFilterCmd_t; - -/*************************************************************************/ -/**********************************/ -/* Telemetry Message Data Formats */ -/**********************************/ -typedef struct CFE_EVS_AppTlmData -{ - CFE_ES_AppId_t AppID; /**< \cfetlmmnemonic \EVS_APPID - \brief Numerical application identifier */ - uint16 AppMessageSentCounter; /**< \cfetlmmnemonic \EVS_APPMSGSENTC - \brief Application message sent counter */ - uint8 AppEnableStatus; /**< \cfetlmmnemonic \EVS_APPENASTAT - \brief Application event service enable status */ - uint8 AppMessageSquelchedCounter; /**< \cfetlmmnemonic \EVS_SQUELCHEDC - \brief Number of events squelched */ -} CFE_EVS_AppTlmData_t; - -/** -** \cfeevstlm Event Services Housekeeping Telemetry Packet -**/ -typedef struct CFE_EVS_HousekeepingTlm_Payload -{ - uint8 CommandCounter; /**< \cfetlmmnemonic \EVS_CMDPC - \brief EVS Command Counter */ - uint8 CommandErrorCounter; /**< \cfetlmmnemonic \EVS_CMDEC - \brief EVS Command Error Counter */ - uint8 MessageFormatMode; /**< \cfetlmmnemonic \EVS_MSGFMTMODE - \brief Event message format mode (short/long) */ - uint8 MessageTruncCounter; /**< \cfetlmmnemonic \EVS_MSGTRUNC - \brief Event message truncation counter */ - - uint8 UnregisteredAppCounter; /**< \cfetlmmnemonic \EVS_UNREGAPPC - \brief Unregistered application message send counter */ - uint8 OutputPort; /**< \cfetlmmnemonic \EVS_OUTPUTPORT - \brief Output port mask */ - uint8 LogFullFlag; /**< \cfetlmmnemonic \EVS_LOGFULL - \brief Local event log full flag */ - uint8 LogMode; /**< \cfetlmmnemonic \EVS_LOGMODE - \brief Local event logging mode (overwrite/discard) */ - - uint16 MessageSendCounter; /**< \cfetlmmnemonic \EVS_MSGSENTC - \brief Event message send counter */ - uint16 LogOverflowCounter; /**< \cfetlmmnemonic \EVS_LOGOVERFLOWC - \brief Local event log overflow counter */ - - uint8 LogEnabled; /**< \cfetlmmnemonic \EVS_LOGENABLED - \brief Current event log enable/disable state */ - uint8 Spare1; /**< \cfetlmmnemonic \EVS_HK_SPARE1 - \brief Padding for 32 bit boundary */ - uint8 Spare2; /**< \cfetlmmnemonic \EVS_HK_SPARE2 - \brief Padding for 32 bit boundary */ - uint8 Spare3; /**< \cfetlmmnemonic \EVS_HK_SPARE3 - \brief Padding for 32 bit boundary */ - - CFE_EVS_AppTlmData_t AppData[CFE_MISSION_ES_MAX_APPLICATIONS]; /**< \cfetlmmnemonic \EVS_APP - \brief Array of registered application table data */ -} CFE_EVS_HousekeepingTlm_Payload_t; - -typedef struct CFE_EVS_HousekeepingTlm -{ - CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ - CFE_EVS_HousekeepingTlm_Payload_t Payload; /**< \brief Telemetry payload */ -} CFE_EVS_HousekeepingTlm_t; - -/** Telemetry packet structures */ - -typedef struct CFE_EVS_PacketID -{ - char AppName[CFE_MISSION_MAX_API_LEN]; /**< \cfetlmmnemonic \EVS_APPNAME - \brief Application name */ - uint16 EventID; /**< \cfetlmmnemonic \EVS_EVENTID - \brief Numerical event identifier */ - uint16 EventType; /**< \cfetlmmnemonic \EVS_EVENTTYPE - \brief Numerical event type identifier */ - uint32 SpacecraftID; /**< \cfetlmmnemonic \EVS_SCID - \brief Spacecraft identifier */ - uint32 ProcessorID; /**< \cfetlmmnemonic \EVS_PROCESSORID - \brief Numerical processor identifier */ -} CFE_EVS_PacketID_t; - -/** -** \cfeevstlm Event Message Telemetry Packet (Long format) -**/ -typedef struct CFE_EVS_LongEventTlm_Payload -{ - CFE_EVS_PacketID_t PacketID; /**< \brief Event packet information */ - char Message[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH]; /**< \cfetlmmnemonic \EVS_EVENT - \brief Event message string */ - uint8 Spare1; /**< \cfetlmmnemonic \EVS_SPARE1 - \brief Structure padding */ - uint8 Spare2; /**< \cfetlmmnemonic \EVS_SPARE2 - \brief Structure padding */ -} CFE_EVS_LongEventTlm_Payload_t; - -/** -** \cfeevstlm Event Message Telemetry Packet (Short format) -**/ -typedef struct CFE_EVS_ShortEventTlm_Payload -{ - CFE_EVS_PacketID_t PacketID; /**< \brief Event packet information */ -} CFE_EVS_ShortEventTlm_Payload_t; - -typedef struct CFE_EVS_LongEventTlm -{ - CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ - CFE_EVS_LongEventTlm_Payload_t Payload; /**< \brief Telemetry payload */ -} CFE_EVS_LongEventTlm_t; - -typedef struct CFE_EVS_ShortEventTlm -{ - CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ - CFE_EVS_ShortEventTlm_Payload_t Payload; /**< \brief Telemetry payload */ -} CFE_EVS_ShortEventTlm_t; - -#endif /* CFE_EVS_MSG_H */ +#endif diff --git a/modules/evs/config/default_cfe_evs_interface_cfg.h b/modules/evs/config/default_cfe_evs_interface_cfg.h new file mode 100644 index 000000000..a8f6643fc --- /dev/null +++ b/modules/evs/config/default_cfe_evs_interface_cfg.h @@ -0,0 +1,49 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Event Services (CFE_EVS) Application Public Definitions + * + * This provides default values for configurable items that affect + * the interface(s) of this module. This includes the CMD/TLM message + * interface, tables definitions, and any other data products that + * serve to exchange information with other entities. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_EVS_INTERFACE_CFG_H +#define CFE_EVS_INTERFACE_CFG_H + +/** +** \cfeevscfg Maximum Event Message Length +** +** \par Description: +** Indicates the maximum length (in characters) of the formatted text +** string portion of an event message +** +** This length does not need to include an extra character for NULL termination. +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_EVS_MAX_MESSAGE_LENGTH 122 + +#endif diff --git a/modules/evs/config/default_cfe_evs_internal_cfg.h b/modules/evs/config/default_cfe_evs_internal_cfg.h new file mode 100644 index 000000000..728b7d07d --- /dev/null +++ b/modules/evs/config/default_cfe_evs_internal_cfg.h @@ -0,0 +1,199 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Event Services (CFE_EVS) Application Private Config Definitions + * + * This provides default values for configurable items that are internal + * to this module and do NOT affect the interface(s) of this module. Changes + * to items in this file only affect the local module and will be transparent + * to external entities that are using the public interface(s). + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_EVS_INTERNAL_CFG_H +#define CFE_EVS_INTERNAL_CFG_H + +/** +** \cfeescfg Define EVS Task Priority +** +** \par Description: +** Defines the cFE_EVS Task priority. +** +** \par Limits +** Not Applicable +*/ +#define CFE_PLATFORM_EVS_START_TASK_PRIORITY 61 + +/** +** \cfeescfg Define EVS Task Stack Size +** +** \par Description: +** Defines the cFE_EVS Task Stack Size +** +** \par Limits +** There is a lower limit of 2048 on this configuration parameter. There +** are no restrictions on the upper limit however, the maximum stack size +** is system dependent and should be verified. Most operating systems provide +** tools for measuring the amount of stack used by a task during operation. It +** is always a good idea to verify that no more than 1/2 of the stack is used. +*/ +#define CFE_PLATFORM_EVS_START_TASK_STACK_SIZE CFE_PLATFORM_ES_DEFAULT_STACK_SIZE + +/** +** \cfeevscfg Define Maximum Number of Event Filters per Application +** +** \par Description: +** Maximum number of events that may be filtered per application. +** +** \par Limits +** There are no restrictions on the lower and upper limits however, +** the maximum number of event filters is system dependent and should be +** verified. +*/ +#define CFE_PLATFORM_EVS_MAX_EVENT_FILTERS 8 + +/** +** \cfeevscfg Maximum number of event before squelching +** +** \par Description: +** Maximum number of events that may be emitted per app per second. +** Setting this to 0 will cause events to be unrestricted. +** +** \par Limits +** This number must be less than or equal to INT_MAX/1000 +*/ +#define CFE_PLATFORM_EVS_MAX_APP_EVENT_BURST 32 + +/** +** \cfeevscfg Sustained number of event messages per second per app before squelching +** +** \par Description: +** Sustained number of events that may be emitted per app per second. +** +** \par Limits +** This number must be less than or equal to #CFE_PLATFORM_EVS_MAX_APP_EVENT_BURST. +** Values lower than 8 may cause functional and unit test failures. +*/ +#define CFE_PLATFORM_EVS_APP_EVENTS_PER_SEC 8 + +/** +** \cfeevscfg Default Event Log Filename +** +** \par Description: +** The value of this constant defines the filename used to store the Event +** Services local event log. This filename is used only when no filename is +** specified in the command to dump the event log. +** +** \par Limits +** The length of each string, including the NULL terminator cannot exceed the +** #OS_MAX_PATH_LEN value. +*/ +#define CFE_PLATFORM_EVS_DEFAULT_LOG_FILE "/ram/cfe_evs.log" + +/** +** \cfeevscfg Maximum Number of Events in EVS Local Event Log +** +** \par Description: +** Dictates the EVS local event log capacity. Units are the number of events. +** +** \par Limits +** There are no restrictions on the lower and upper limits however, +** the maximum log size is system dependent and should be verified. +*/ +#define CFE_PLATFORM_EVS_LOG_MAX 20 + +/** +** \cfeevscfg Default EVS Application Data Filename +** +** \par Description: +** The value of this constant defines the filename used to store the EVS +** Application Data(event counts/filtering information). This filename is +** used only when no filename is specified in the command to dump the event +** log. +** +** \par Limits +** The length of each string, including the NULL terminator cannot exceed the +** #OS_MAX_PATH_LEN value. +*/ +#define CFE_PLATFORM_EVS_DEFAULT_APP_DATA_FILE "/ram/cfe_evs_app.dat" + +/** +** \cfeevscfg Default EVS Output Port State +** +** \par Description: +** Defines the default port state (enabled or disabled) for the four output +** ports defined within the Event Service. Port 1 is usually the uart output +** terminal. To enable a port, set the proper bit to a 1. Bit 0 is port 1, +** bit 1 is port2 etc. +** +** \par Limits +** The valid settings are 0x0 to 0xF. +*/ +#define CFE_PLATFORM_EVS_PORT_DEFAULT 0x0001 + +/** +** \cfeevscfg Default EVS Event Type Filter Mask +** +** \par Description: +** Defines a state of on or off for all four event types. The term event +** 'type' refers to the criticality level and may be Debug, Informational, +** Error or Critical. Each event type has a bit position. (bit 0 = Debug, +** bit 1 = Info, bit 2 = Error, bit 3 = Critical). This is a global setting, +** meaning it applies to all applications. To filter an event type, set its +** bit to zero. For example, +** 0xE means Debug = OFF, Info = ON, Error = ON, Critical = ON +** +** \par Limits +** The valid settings are 0x0 to 0xF. +*/ +#define CFE_PLATFORM_EVS_DEFAULT_TYPE_FLAG 0xE + +/** +** \cfeevscfg Default EVS Local Event Log Mode +** +** \par Description: +** Defines a state of overwrite(0) or discard(1) for the operation of the +** EVS local event log. The log may operate in either Overwrite mode = 0, +** where once the log becomes full the oldest event in the log will be +** overwritten, or Discard mode = 1, where once the log becomes full the +** contents of the log are preserved and the new event is discarded. +** Overwrite Mode = 0, Discard Mode = 1. +** +** \par Limits +** The valid settings are 0 or 1 +*/ +#define CFE_PLATFORM_EVS_DEFAULT_LOG_MODE 1 + +/** +** \cfeevscfg Default EVS Message Format Mode +** +** \par Description: +** Defines the default message format (long or short) for event messages being +** sent to the ground. Choose between #CFE_EVS_MsgFormat_LONG or +** #CFE_EVS_MsgFormat_SHORT. +** +** \par Limits +** The valid settings are #CFE_EVS_MsgFormat_LONG or #CFE_EVS_MsgFormat_SHORT +*/ +#define CFE_PLATFORM_EVS_DEFAULT_MSG_FORMAT_MODE CFE_EVS_MsgFormat_LONG + +#endif diff --git a/modules/evs/config/default_cfe_evs_mission_cfg.h b/modules/evs/config/default_cfe_evs_mission_cfg.h new file mode 100644 index 000000000..5146773c2 --- /dev/null +++ b/modules/evs/config/default_cfe_evs_mission_cfg.h @@ -0,0 +1,36 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Event Services (CFE_EVS) Application Mission Configuration Header File + * + * This is a compatibility header for the "mission_cfg.h" file that has + * traditionally provided public config definitions for each CFS app. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_EVS_MISSION_CFG_H +#define CFE_EVS_MISSION_CFG_H + +#include "cfe_evs_interface_cfg.h" + +#endif diff --git a/modules/evs/config/default_cfe_evs_msg.h b/modules/evs/config/default_cfe_evs_msg.h new file mode 100644 index 000000000..6f30ea47f --- /dev/null +++ b/modules/evs/config/default_cfe_evs_msg.h @@ -0,0 +1,38 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * Specification for the CFE Event Services (CFE_EVS) command and telemetry + * message data types. + * + * This is a compatibility header for the "cfe_evs_msg.h" file that has + * traditionally provided the message definitions for cFS apps. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_EVS_MSG_H +#define CFE_EVS_MSG_H + +#include "cfe_mission_cfg.h" +#include "cfe_evs_fcncodes.h" +#include "cfe_evs_msgstruct.h" + +#endif diff --git a/modules/evs/config/default_cfe_evs_msgdefs.h b/modules/evs/config/default_cfe_evs_msgdefs.h new file mode 100644 index 000000000..654829e29 --- /dev/null +++ b/modules/evs/config/default_cfe_evs_msgdefs.h @@ -0,0 +1,43 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * Specification for the CFE Event Services (CFE_EVS) command and telemetry + * message constant definitions. + * + * For CFE_EVS this is only the function/command code definitions + */ +#ifndef CFE_EVS_MSGDEFS_H +#define CFE_EVS_MSGDEFS_H + +#include "cfe_evs_fcncodes.h" + +/* Event Type bit masks */ +#define CFE_EVS_DEBUG_BIT 0x0001 +#define CFE_EVS_INFORMATION_BIT 0x0002 +#define CFE_EVS_ERROR_BIT 0x0004 +#define CFE_EVS_CRITICAL_BIT 0x0008 + +/* Output Port bit masks */ +#define CFE_EVS_PORT1_BIT 0x0001 +#define CFE_EVS_PORT2_BIT 0x0002 +#define CFE_EVS_PORT3_BIT 0x0004 +#define CFE_EVS_PORT4_BIT 0x0008 + +#endif diff --git a/modules/evs/config/default_cfe_evs_msgids.h b/modules/evs/config/default_cfe_evs_msgids.h new file mode 100644 index 000000000..1d31ddb5b --- /dev/null +++ b/modules/evs/config/default_cfe_evs_msgids.h @@ -0,0 +1,42 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Event Services (CFE_EVS) Application Message IDs + */ +#ifndef CFE_EVS_MSGIDS_H +#define CFE_EVS_MSGIDS_H + +#include "cfe_core_api_base_msgids.h" +#include "cfe_evs_topicids.h" + +/* +** cFE Command Message Id's +*/ +#define CFE_EVS_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_EVS_CMD_MSG /* 0x1801 */ +#define CFE_EVS_SEND_HK_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_EVS_SEND_HK_MSG /* 0x1809 */ + +/* +** CFE Telemetry Message Id's +*/ +#define CFE_EVS_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_EVS_HK_TLM_MSG /* 0x0801 */ +#define CFE_EVS_LONG_EVENT_MSG_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_EVS_LONG_EVENT_MSG_MSG /* 0x0808 */ +#define CFE_EVS_SHORT_EVENT_MSG_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_EVS_SHORT_EVENT_MSG_MSG /* 0x0809 */ + +#endif diff --git a/modules/evs/config/default_cfe_evs_msgstruct.h b/modules/evs/config/default_cfe_evs_msgstruct.h new file mode 100644 index 000000000..ba0b394a7 --- /dev/null +++ b/modules/evs/config/default_cfe_evs_msgstruct.h @@ -0,0 +1,411 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * + * Purpose: + * cFE Executive Services (EVS) Command and Telemetry packet definition file. + * + * References: + * Flight Software Branch C Coding Standard Version 1.0a + * cFE Flight Software Application Developers Guide + * + * Notes: + * + */ +#ifndef CFE_EVS_MSGSTRUCT_H +#define CFE_EVS_MSGSTRUCT_H + +/************************************************************************ + * Includes + ************************************************************************/ +#include "common_types.h" +#include "cfe_evs_msgdefs.h" +#include "cfe_evs_extern_typedefs.h" +#include "cfe_msg_hdr.h" + +/****************** Structure Definitions *********************/ + +/** +** \brief Command with no additional arguments +**/ +typedef struct CFE_EVS_NoArgsCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ +} CFE_EVS_NoArgsCmd_t; + +/* + * The NoArgsCmd is shared by several EVS command handlers. + * Create a unique type for each one so the prototypes will follow the naming pattern, + * allowing each command to evolve independently. + */ +typedef CFE_EVS_NoArgsCmd_t CFE_EVS_NoopCmd_t; +typedef CFE_EVS_NoArgsCmd_t CFE_EVS_ResetCountersCmd_t; +typedef CFE_EVS_NoArgsCmd_t CFE_EVS_ClearLogCmd_t; +typedef CFE_EVS_NoArgsCmd_t CFE_EVS_SendHkCmd_t; + +/** +** \brief Write Event Log to File Command Payload +** +** For command details, see #CFE_EVS_WRITE_LOG_DATA_FILE_CC +** +**/ +typedef struct CFE_EVS_LogFileCmd_Payload +{ + char LogFilename[CFE_MISSION_MAX_PATH_LEN]; /**< \brief Filename where log data is to be written */ +} CFE_EVS_LogFileCmd_Payload_t; + +/** + * \brief Write Event Log to File Command + */ +typedef struct CFE_EVS_WriteLogDataFileCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_EVS_LogFileCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_EVS_WriteLogDataFileCmd_t; + +/** +** \brief Write Event Services Application Information to File Command Payload +** +** For command details, see #CFE_EVS_WRITE_APP_DATA_FILE_CC +** +**/ +typedef struct CFE_EVS_AppDataCmd_Payload +{ + char AppDataFilename[CFE_MISSION_MAX_PATH_LEN]; /**< \brief Filename where application data is to be written */ +} CFE_EVS_AppDataCmd_Payload_t; + +/** + * \brief Write Event Services Application Information to File Command + */ +typedef struct CFE_EVS_WriteAppDataFileCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_EVS_AppDataCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_EVS_WriteAppDataFileCmd_t; + +/** +** \brief Set Log Mode Command Payload +** +** For command details, see #CFE_EVS_SET_LOG_MODE_CC +** +**/ +typedef struct CFE_EVS_SetLogMode_Payload +{ + CFE_EVS_LogMode_Enum_t LogMode; /**< \brief Mode to use in the command*/ + uint8 Spare; /**< \brief Pad to even byte*/ +} CFE_EVS_SetLogMode_Payload_t; + +/** + * \brief Set Log Mode Command + */ +typedef struct CFE_EVS_SetLogModeCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_EVS_SetLogMode_Payload_t Payload; /**< \brief Command payload */ +} CFE_EVS_SetLogModeCmd_t; + +/** +** \brief Set Event Format Mode Command Payload +** +** For command details, see #CFE_EVS_SET_EVENT_FORMAT_MODE_CC +** +**/ +typedef struct CFE_EVS_SetEventFormatCode_Payload +{ + CFE_EVS_MsgFormat_Enum_t MsgFormat; /**< \brief Mode to use in the command*/ + uint8 Spare; /**< \brief Pad to even byte*/ +} CFE_EVS_SetEventFormatMode_Payload_t; + +/** + * \brief Set Event Format Mode Command + */ +typedef struct CFE_EVS_SetEventFormatModeCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_EVS_SetEventFormatMode_Payload_t Payload; /**< \brief Command payload */ +} CFE_EVS_SetEventFormatModeCmd_t; + +/** +** \brief Generic Bitmask Command Payload +** +** For command details, see #CFE_EVS_ENABLE_EVENT_TYPE_CC, #CFE_EVS_DISABLE_EVENT_TYPE_CC, +** #CFE_EVS_ENABLE_PORTS_CC and/or #CFE_EVS_DISABLE_PORTS_CC +** +**/ +typedef struct CFE_EVS_BitMaskCmd_Payload +{ + uint8 BitMask; /**< \brief BitMask to use in the command */ + uint8 Spare; /**< \brief Pad to even byte*/ +} CFE_EVS_BitMaskCmd_Payload_t; + +/** + * \brief Generic Bitmask Command + */ +typedef struct CFE_EVS_BitMaskCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_EVS_BitMaskCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_EVS_BitMaskCmd_t; + +/* + * The CFE_EVS_BitMaskCmd_t is shared by several EVS command handlers. + * Create a unique type for each one so the prototypes will follow the naming pattern, + * allowing each command to evolve independently. + */ +typedef CFE_EVS_BitMaskCmd_t CFE_EVS_EnablePortsCmd_t; +typedef CFE_EVS_BitMaskCmd_t CFE_EVS_DisablePortsCmd_t; +typedef CFE_EVS_BitMaskCmd_t CFE_EVS_EnableEventTypeCmd_t; +typedef CFE_EVS_BitMaskCmd_t CFE_EVS_DisableEventTypeCmd_t; + +/** +** \brief Generic App Name Command Payload +** +** For command details, see #CFE_EVS_ENABLE_APP_EVENTS_CC, #CFE_EVS_DISABLE_APP_EVENTS_CC, +** #CFE_EVS_RESET_APP_COUNTER_CC and/or #CFE_EVS_RESET_ALL_FILTERS_CC +** +**/ +typedef struct CFE_EVS_AppNameCmd_Payload +{ + char AppName[CFE_MISSION_MAX_API_LEN]; /**< \brief Application name to use in the command*/ +} CFE_EVS_AppNameCmd_Payload_t; + +/** + * \brief Generic App Name Command + */ +typedef struct CFE_EVS_AppNameCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_EVS_AppNameCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_EVS_AppNameCmd_t; + +/* + * The CFE_EVS_AppNameCmd_t is shared by several EVS command handlers. + * Create a unique type for each one so the prototypes will follow the naming pattern, + * allowing each command to evolve independently. + */ +typedef CFE_EVS_AppNameCmd_t CFE_EVS_EnableAppEventsCmd_t; +typedef CFE_EVS_AppNameCmd_t CFE_EVS_DisableAppEventsCmd_t; +typedef CFE_EVS_AppNameCmd_t CFE_EVS_ResetAppCounterCmd_t; +typedef CFE_EVS_AppNameCmd_t CFE_EVS_ResetAllFiltersCmd_t; + +/** +** \brief Generic App Name and Event ID Command Payload +** +** For command details, see #CFE_EVS_RESET_FILTER_CC and #CFE_EVS_DELETE_EVENT_FILTER_CC +** +**/ +typedef struct CFE_EVS_AppNameEventIDCmd_Payload +{ + char AppName[CFE_MISSION_MAX_API_LEN]; /**< \brief Application name to use in the command*/ + uint16 EventID; /**< \brief Event ID to use in the command*/ +} CFE_EVS_AppNameEventIDCmd_Payload_t; + +/** + * \brief Generic App Name and Event ID Command + */ +typedef struct CFE_EVS_AppNameEventIDCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_EVS_AppNameEventIDCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_EVS_AppNameEventIDCmd_t; + +/* + * The CFE_EVS_AppNameEventIDCmd_t is shared by several EVS command handlers. + * Create a unique type for each one so the prototypes will follow the naming pattern, + * allowing each command to evolve independently. + */ +typedef CFE_EVS_AppNameEventIDCmd_t CFE_EVS_ResetFilterCmd_t; +typedef CFE_EVS_AppNameEventIDCmd_t CFE_EVS_DeleteEventFilterCmd_t; + +/** +** \brief Generic App Name and Bitmask Command Payload +** +** For command details, see #CFE_EVS_ENABLE_APP_EVENT_TYPE_CC and/or #CFE_EVS_DISABLE_APP_EVENT_TYPE_CC +** +**/ +typedef struct CFE_EVS_AppNameBitMaskCmd_Payload +{ + char AppName[CFE_MISSION_MAX_API_LEN]; /**< \brief Application name to use in the command*/ + uint8 BitMask; /**< \brief BitMask to use in the command*/ + uint8 Spare; /**< \brief Pad to even byte*/ +} CFE_EVS_AppNameBitMaskCmd_Payload_t; + +/** + * \brief Generic App Name and Bitmask Command + */ +typedef struct CFE_EVS_AppNameBitMaskCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_EVS_AppNameBitMaskCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_EVS_AppNameBitMaskCmd_t; + +/* + * The CFE_EVS_AppNameBitMaskCmd_t is shared by several EVS command handlers. + * Create a unique type for each one so the prototypes will follow the naming pattern, + * allowing each command to evolve independently. + */ +typedef CFE_EVS_AppNameBitMaskCmd_t CFE_EVS_EnableAppEventTypeCmd_t; +typedef CFE_EVS_AppNameBitMaskCmd_t CFE_EVS_DisableAppEventTypeCmd_t; + +/** +** \brief Generic App Name, Event ID, Mask Command Payload +** +** For command details, see #CFE_EVS_SET_FILTER_CC, #CFE_EVS_ADD_EVENT_FILTER_CC +** and/or #CFE_EVS_DELETE_EVENT_FILTER_CC +** +**/ +typedef struct CFE_EVS_AppNameEventIDMaskCmd_Payload +{ + char AppName[CFE_MISSION_MAX_API_LEN]; /**< \brief Application name to use in the command*/ + uint16 EventID; /**< \brief Event ID to use in the command*/ + uint16 Mask; /**< \brief Mask to use in the command */ +} CFE_EVS_AppNameEventIDMaskCmd_Payload_t; + +/** + * \brief Generic App Name, Event ID, Mask Command + */ +typedef struct CFE_EVS_AppNameEventIDMaskCmd +{ + CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */ + CFE_EVS_AppNameEventIDMaskCmd_Payload_t Payload; /**< \brief Command payload */ +} CFE_EVS_AppNameEventIDMaskCmd_t; + +/* + * The CFE_EVS_AppNameEventIDMaskCmd_t is shared by several EVS command handlers. + * Create a unique type for each one so the prototypes will follow the naming pattern, + * allowing each command to evolve independently. + */ +typedef CFE_EVS_AppNameEventIDMaskCmd_t CFE_EVS_AddEventFilterCmd_t; +typedef CFE_EVS_AppNameEventIDMaskCmd_t CFE_EVS_SetFilterCmd_t; + +/*************************************************************************/ +/**********************************/ +/* Telemetry Message Data Formats */ +/**********************************/ +typedef struct CFE_EVS_AppTlmData +{ + CFE_ES_AppId_t AppID; /**< \cfetlmmnemonic \EVS_APPID + \brief Numerical application identifier */ + uint16 AppMessageSentCounter; /**< \cfetlmmnemonic \EVS_APPMSGSENTC + \brief Application message sent counter */ + uint8 AppEnableStatus; /**< \cfetlmmnemonic \EVS_APPENASTAT + \brief Application event service enable status */ + uint8 AppMessageSquelchedCounter; /**< \cfetlmmnemonic \EVS_SQUELCHEDC + \brief Number of events squelched */ +} CFE_EVS_AppTlmData_t; + +/** +** \cfeevstlm Event Services Housekeeping Telemetry Packet +**/ +typedef struct CFE_EVS_HousekeepingTlm_Payload +{ + uint8 CommandCounter; /**< \cfetlmmnemonic \EVS_CMDPC + \brief EVS Command Counter */ + uint8 CommandErrorCounter; /**< \cfetlmmnemonic \EVS_CMDEC + \brief EVS Command Error Counter */ + uint8 MessageFormatMode; /**< \cfetlmmnemonic \EVS_MSGFMTMODE + \brief Event message format mode (short/long) */ + uint8 MessageTruncCounter; /**< \cfetlmmnemonic \EVS_MSGTRUNC + \brief Event message truncation counter */ + + uint8 UnregisteredAppCounter; /**< \cfetlmmnemonic \EVS_UNREGAPPC + \brief Unregistered application message send counter */ + uint8 OutputPort; /**< \cfetlmmnemonic \EVS_OUTPUTPORT + \brief Output port mask */ + uint8 LogFullFlag; /**< \cfetlmmnemonic \EVS_LOGFULL + \brief Local event log full flag */ + uint8 LogMode; /**< \cfetlmmnemonic \EVS_LOGMODE + \brief Local event logging mode (overwrite/discard) */ + + uint16 MessageSendCounter; /**< \cfetlmmnemonic \EVS_MSGSENTC + \brief Event message send counter */ + uint16 LogOverflowCounter; /**< \cfetlmmnemonic \EVS_LOGOVERFLOWC + \brief Local event log overflow counter */ + + uint8 LogEnabled; /**< \cfetlmmnemonic \EVS_LOGENABLED + \brief Current event log enable/disable state */ + uint8 Spare1; /**< \cfetlmmnemonic \EVS_HK_SPARE1 + \brief Padding for 32 bit boundary */ + uint8 Spare2; /**< \cfetlmmnemonic \EVS_HK_SPARE2 + \brief Padding for 32 bit boundary */ + uint8 Spare3; /**< \cfetlmmnemonic \EVS_HK_SPARE3 + \brief Padding for 32 bit boundary */ + + CFE_EVS_AppTlmData_t AppData[CFE_MISSION_ES_MAX_APPLICATIONS]; /**< \cfetlmmnemonic \EVS_APP + \brief Array of registered application table data */ +} CFE_EVS_HousekeepingTlm_Payload_t; + +typedef struct CFE_EVS_HousekeepingTlm +{ + CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ + CFE_EVS_HousekeepingTlm_Payload_t Payload; /**< \brief Telemetry payload */ +} CFE_EVS_HousekeepingTlm_t; + +/** Telemetry packet structures */ + +typedef struct CFE_EVS_PacketID +{ + char AppName[CFE_MISSION_MAX_API_LEN]; /**< \cfetlmmnemonic \EVS_APPNAME + \brief Application name */ + uint16 EventID; /**< \cfetlmmnemonic \EVS_EVENTID + \brief Numerical event identifier */ + uint16 EventType; /**< \cfetlmmnemonic \EVS_EVENTTYPE + \brief Numerical event type identifier */ + uint32 SpacecraftID; /**< \cfetlmmnemonic \EVS_SCID + \brief Spacecraft identifier */ + uint32 ProcessorID; /**< \cfetlmmnemonic \EVS_PROCESSORID + \brief Numerical processor identifier */ +} CFE_EVS_PacketID_t; + +/** +** \cfeevstlm Event Message Telemetry Packet (Long format) +**/ +typedef struct CFE_EVS_LongEventTlm_Payload +{ + CFE_EVS_PacketID_t PacketID; /**< \brief Event packet information */ + char Message[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH]; /**< \cfetlmmnemonic \EVS_EVENT + \brief Event message string */ + uint8 Spare1; /**< \cfetlmmnemonic \EVS_SPARE1 + \brief Structure padding */ + uint8 Spare2; /**< \cfetlmmnemonic \EVS_SPARE2 + \brief Structure padding */ +} CFE_EVS_LongEventTlm_Payload_t; + +/** +** \cfeevstlm Event Message Telemetry Packet (Short format) +**/ +typedef struct CFE_EVS_ShortEventTlm_Payload +{ + CFE_EVS_PacketID_t PacketID; /**< \brief Event packet information */ +} CFE_EVS_ShortEventTlm_Payload_t; + +typedef struct CFE_EVS_LongEventTlm +{ + CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ + CFE_EVS_LongEventTlm_Payload_t Payload; /**< \brief Telemetry payload */ +} CFE_EVS_LongEventTlm_t; + +typedef struct CFE_EVS_ShortEventTlm +{ + CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ + CFE_EVS_ShortEventTlm_Payload_t Payload; /**< \brief Telemetry payload */ +} CFE_EVS_ShortEventTlm_t; + +#endif diff --git a/modules/evs/config/default_cfe_evs_platform_cfg.h b/modules/evs/config/default_cfe_evs_platform_cfg.h new file mode 100644 index 000000000..83f40168c --- /dev/null +++ b/modules/evs/config/default_cfe_evs_platform_cfg.h @@ -0,0 +1,41 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Event Services (CFE_EVS) Application Platform Configuration Header File + * + * This is a compatibility header for the "platform_cfg.h" file that has + * traditionally provided both public and private config definitions + * for each CFS app. + * + * These definitions are now provided in two separate files, one for + * the public/mission scope and one for internal scope. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_EVS_PLATFORM_CFG_H +#define CFE_EVS_PLATFORM_CFG_H + +#include "cfe_evs_mission_cfg.h" +#include "cfe_evs_internal_cfg.h" + +#endif diff --git a/modules/evs/config/default_cfe_evs_topicids.h b/modules/evs/config/default_cfe_evs_topicids.h new file mode 100644 index 000000000..842758da0 --- /dev/null +++ b/modules/evs/config/default_cfe_evs_topicids.h @@ -0,0 +1,51 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Event Services (CFE_EVS) Application Topic IDs + */ +#ifndef CFE_EVS_TOPICIDS_H +#define CFE_EVS_TOPICIDS_H + +/** +** \cfemissioncfg cFE Portable Message Numbers for Commands +** +** \par Description: +** Portable message numbers for the cFE EVS command messages +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_EVS_CMD_MSG 1 +#define CFE_MISSION_EVS_SEND_HK_MSG 9 + +/** +** \cfemissioncfg cFE Portable Message Numbers for Telemetry +** +** \par Description: +** Portable message numbers for the cFE EVS telemetry messages +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_EVS_HK_TLM_MSG 1 +#define CFE_MISSION_EVS_LONG_EVENT_MSG_MSG 8 +#define CFE_MISSION_EVS_SHORT_EVENT_MSG_MSG 9 + +#endif diff --git a/modules/evs/fsw/inc/cfe_evs_events.h b/modules/evs/fsw/inc/cfe_evs_eventids.h similarity index 100% rename from modules/evs/fsw/inc/cfe_evs_events.h rename to modules/evs/fsw/inc/cfe_evs_eventids.h diff --git a/modules/evs/fsw/src/cfe_evs_module_all.h b/modules/evs/fsw/src/cfe_evs_module_all.h index 312d60789..206a44e52 100644 --- a/modules/evs/fsw/src/cfe_evs_module_all.h +++ b/modules/evs/fsw/src/cfe_evs_module_all.h @@ -39,10 +39,10 @@ #include "cfe_evs_core_internal.h" -#include "cfe_evs_events.h" /* EVS event IDs */ -#include "cfe_evs_task.h" /* EVS internal definitions */ -#include "cfe_evs_log.h" /* EVS log file definitions */ -#include "cfe_evs_utils.h" /* EVS utility function definitions */ +#include "cfe_evs_eventids.h" /* EVS event IDs */ +#include "cfe_evs_task.h" /* EVS internal definitions */ +#include "cfe_evs_log.h" /* EVS log file definitions */ +#include "cfe_evs_utils.h" /* EVS utility function definitions */ #include "cfe_evs_dispatch.h" #endif /* CFE_EVS_MODULE_ALL_H */ diff --git a/modules/evs/fsw/src/cfe_evs_task.h b/modules/evs/fsw/src/cfe_evs_task.h index f8274057e..bd111c7a8 100644 --- a/modules/evs/fsw/src/cfe_evs_task.h +++ b/modules/evs/fsw/src/cfe_evs_task.h @@ -48,7 +48,7 @@ #include "cfe_evs_api_typedefs.h" #include "cfe_evs_log_typedef.h" #include "cfe_sb_api_typedefs.h" -#include "cfe_evs_events.h" +#include "cfe_evs_eventids.h" /********************* Macro and Constant Type Definitions ***************************/ diff --git a/modules/evs/mission_build.cmake b/modules/evs/mission_build.cmake new file mode 100644 index 000000000..cb1581740 --- /dev/null +++ b/modules/evs/mission_build.cmake @@ -0,0 +1,37 @@ +########################################################### +# +# EVS Core Module mission build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### + +# The list of header files that control the EVS configuration +set(EVS_MISSION_CONFIG_FILE_LIST + cfe_evs_mission_cfg.h + cfe_evs_interface_cfg.h + cfe_evs_extern_typedefs.h + cfe_evs_fcncodes.h + cfe_evs_msgdefs.h + cfe_evs_msg.h + cfe_evs_msgstruct.h + cfe_evs_topicids.h +) + +# Create wrappers around the all the config header files +# This makes them individually overridable by the missions, without modifying +# the distribution default copies +foreach(EVS_CFGFILE ${EVS_MISSION_CONFIG_FILE_LIST}) + get_filename_component(CFGKEY "${EVS_CFGFILE}" NAME_WE) + if (DEFINED EVS_CFGFILE_SRC_${CFGKEY}) + set(DEFAULT_SOURCE GENERATED_FILE "${EVS_CFGFILE_SRC_${CFGKEY}}") + else() + set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${EVS_CFGFILE}") + endif() + generate_config_includefile( + FILE_NAME "${EVS_CFGFILE}" + ${DEFAULT_SOURCE} + ) +endforeach() From 134b9d743713edfd5ad05cc5381bc0f00b0cdde7 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 2 May 2023 16:28:00 -0400 Subject: [PATCH 08/14] Fix #2320, reorganize FS header files Organize FS header file contents according to the convention --- .../config/default_cfe_fs_extern_typedefs.h | 31 ++++++++++++++ .../config/default_cfe_fs_filedef.h} | 30 ++------------ .../fs/config/default_cfe_fs_interface_cfg.h | 41 +++++++++++++++++++ .../fs/config/default_cfe_fs_mission_cfg.h | 36 ++++++++++++++++ modules/fs/mission_build.cmake | 33 +++++++++++++++ 5 files changed, 144 insertions(+), 27 deletions(-) create mode 100644 modules/fs/config/default_cfe_fs_extern_typedefs.h rename modules/{core_api/fsw/inc/cfe_fs_extern_typedefs.h => fs/config/default_cfe_fs_filedef.h} (86%) create mode 100644 modules/fs/config/default_cfe_fs_interface_cfg.h create mode 100644 modules/fs/config/default_cfe_fs_mission_cfg.h create mode 100644 modules/fs/mission_build.cmake diff --git a/modules/fs/config/default_cfe_fs_extern_typedefs.h b/modules/fs/config/default_cfe_fs_extern_typedefs.h new file mode 100644 index 000000000..65f3c6fa5 --- /dev/null +++ b/modules/fs/config/default_cfe_fs_extern_typedefs.h @@ -0,0 +1,31 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * + * Declarations and prototypes for cfe_fs_extern_typedefs module + */ + +#ifndef CFE_FS_EXTERN_TYPEDEFS_H +#define CFE_FS_EXTERN_TYPEDEFS_H + +#include "cfe_mission_cfg.h" +#include "cfe_fs_filedef.h" + +#endif /* CFE_FS_EXTERN_TYPEDEFS_H */ diff --git a/modules/core_api/fsw/inc/cfe_fs_extern_typedefs.h b/modules/fs/config/default_cfe_fs_filedef.h similarity index 86% rename from modules/core_api/fsw/inc/cfe_fs_extern_typedefs.h rename to modules/fs/config/default_cfe_fs_filedef.h index 489db9c84..6cda8119c 100644 --- a/modules/core_api/fsw/inc/cfe_fs_extern_typedefs.h +++ b/modules/fs/config/default_cfe_fs_filedef.h @@ -22,33 +22,11 @@ * Declarations and prototypes for cfe_fs_extern_typedefs module */ -#ifndef CFE_FS_EXTERN_TYPEDEFS_H -#define CFE_FS_EXTERN_TYPEDEFS_H - -/* This header may be generated from an EDS file, - * tools are available and the feature is enabled */ -#ifdef CFE_EDS_ENABLED_BUILD - -/* Use the EDS generated version of these types */ -#include "cfe_fs_eds_typedefs.h" - -#else -/* Use the local definitions of these types */ +#ifndef CFE_FS_FILEHDR_H +#define CFE_FS_FILEHDR_H #include "common_types.h" - -/******************* Macro Definitions ***********************/ - -/* - * NOTE: the value of CFE_FS_HDR_DESC_MAX_LEN, if modified, should - * be constrained to multiples of 4, as it is used within a structure that - * also contains uint32 types. This ensures that the entire structure - * remains 32-bit aligned without the need for implicit padding bytes. - */ - -#define CFE_FS_HDR_DESC_MAX_LEN 32 /**< \brief Max length of description field in a standard cFE File Header */ - -#define CFE_FS_FILE_CONTENT_ID 0x63464531 /**< \brief Magic Number for cFE compliant files (= 'cFE1') */ +#include "cfe_fs_interface_cfg.h" /* to define CFE_FS_HDR_DESC_MAX_LEN */ /** * @brief File subtypes used within cFE @@ -217,6 +195,4 @@ typedef struct CFE_FS_Header char Description[CFE_FS_HDR_DESC_MAX_LEN]; /**< \brief File description */ } CFE_FS_Header_t; -#endif /* CFE_EDS_ENABLED_BUILD */ - #endif /* CFE_FS_EXTERN_TYPEDEFS_H */ diff --git a/modules/fs/config/default_cfe_fs_interface_cfg.h b/modules/fs/config/default_cfe_fs_interface_cfg.h new file mode 100644 index 000000000..3f02853d3 --- /dev/null +++ b/modules/fs/config/default_cfe_fs_interface_cfg.h @@ -0,0 +1,41 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * + * Declarations and prototypes for cfe_fs_extern_typedefs module + */ + +#ifndef CFE_FS_INTERFACE_CFG_H +#define CFE_FS_INTERFACE_CFG_H + +/******************* Macro Definitions ***********************/ + +/* + * NOTE: the value of CFE_FS_HDR_DESC_MAX_LEN, if modified, should + * be constrained to multiples of 4, as it is used within a structure that + * also contains uint32 types. This ensures that the entire structure + * remains 32-bit aligned without the need for implicit padding bytes. + */ + +#define CFE_FS_HDR_DESC_MAX_LEN 32 /**< \brief Max length of description field in a standard cFE File Header */ + +#define CFE_FS_FILE_CONTENT_ID 0x63464531 /**< \brief Magic Number for cFE compliant files (= 'cFE1') */ + +#endif /* CFE_FS_INTERFACE_CFG_H */ diff --git a/modules/fs/config/default_cfe_fs_mission_cfg.h b/modules/fs/config/default_cfe_fs_mission_cfg.h new file mode 100644 index 000000000..23a583325 --- /dev/null +++ b/modules/fs/config/default_cfe_fs_mission_cfg.h @@ -0,0 +1,36 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 File Services (CFE_FS) Application Mission Configuration Header File + * + * This is a compatibility header for the "mission_cfg.h" file that has + * traditionally provided public config definitions for each CFS app. + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_FS_MISSION_CFG_H +#define CFE_FS_MISSION_CFG_H + +#include "cfe_fs_interface_cfg.h" + +#endif diff --git a/modules/fs/mission_build.cmake b/modules/fs/mission_build.cmake new file mode 100644 index 000000000..80b644e5b --- /dev/null +++ b/modules/fs/mission_build.cmake @@ -0,0 +1,33 @@ +########################################################### +# +# FS Core Module mission build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### + +# The list of header files that control the FS configuration +set(FS_MISSION_CONFIG_FILE_LIST + cfe_fs_mission_cfg.h + cfe_fs_interface_cfg.h + cfe_fs_filedef.h + cfe_fs_extern_typedefs.h +) + +# Create wrappers around the all the config header files +# This makes them individually overridable by the missions, without modifying +# the distribution default copies +foreach(FS_CFGFILE ${FS_MISSION_CONFIG_FILE_LIST}) + get_filename_component(CFGKEY "${FS_CFGFILE}" NAME_WE) + if (DEFINED FS_CFGFILE_SRC_${CFGKEY}) + set(DEFAULT_SOURCE GENERATED_FILE "${FS_CFGFILE_SRC_${CFGKEY}}") + else() + set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${FS_CFGFILE}") + endif() + generate_config_includefile( + FILE_NAME "${FS_CFGFILE}" + ${DEFAULT_SOURCE} + ) +endforeach() From ef4d3597320305bc4fcb56c64d508cbb1c8d1962 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 2 May 2023 16:28:00 -0400 Subject: [PATCH 09/14] Fix #2320, reorganize CORE_API header files Organize CORE_API header file contents according to the convention --- modules/core_api/arch_build.cmake | 6 + .../config/default_cfe_core_api_base_msgids.h | 72 ++++++++++ .../default_cfe_core_api_interface_cfg.h | 132 ++++++++++++++++++ .../core_api/config/default_cfe_mission_cfg.h | 39 ++++++ modules/core_api/config/default_cfe_msgids.h | 42 ++++++ modules/core_api/mission_build.cmake | 7 + 6 files changed, 298 insertions(+) create mode 100644 modules/core_api/config/default_cfe_core_api_base_msgids.h create mode 100644 modules/core_api/config/default_cfe_core_api_interface_cfg.h create mode 100644 modules/core_api/config/default_cfe_mission_cfg.h create mode 100644 modules/core_api/config/default_cfe_msgids.h diff --git a/modules/core_api/arch_build.cmake b/modules/core_api/arch_build.cmake index fe0b72634..2836d8683 100644 --- a/modules/core_api/arch_build.cmake +++ b/modules/core_api/arch_build.cmake @@ -14,6 +14,12 @@ generate_config_includefile( FILE_NAME "cfe_msgids.h" MATCH_SUFFIX "msgids.h" + FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_cfe_msgids.h" PREFIXES ${BUILD_CONFIG} ) +generate_config_includefile( + FILE_NAME "cfe_core_api_base_msgids.h" + FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_cfe_core_api_base_msgids.h" + PREFIXES ${BUILD_CONFIG} +) diff --git a/modules/core_api/config/default_cfe_core_api_base_msgids.h b/modules/core_api/config/default_cfe_core_api_base_msgids.h new file mode 100644 index 000000000..ffb8b6d62 --- /dev/null +++ b/modules/core_api/config/default_cfe_core_api_base_msgids.h @@ -0,0 +1,72 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * + * Purpose: + * This header file contains the Message Id's for messages used by the + * cFE core. + * + */ + +#ifndef CFE_CORE_BASE_MSGIDS_H +#define CFE_CORE_BASE_MSGIDS_H + +/** + * \brief Platform command message ID base offset + * + * Example mechanism for setting default command bits and deconflicting MIDs across multiple + * platforms in a mission. For any sufficiently complex mission this method is + * typically replaced by a centralized message ID management scheme. + * + * 0x1800 - Nominal value for default message ID implementation (V1). This sets the command + * field and the secondary header present field. Typical V1 command MID range + * is 0x1800-1FFF. Additional cpus can deconflict message IDs by incrementing + * this value to provide sub-allocations (0x1900 for example). + * 0x0080 - Command bit for MISSION_MSGID_V2 message ID implementation (V2). Although + * this can be used for the value below due to the relatively small set + * of MIDs in the framework it will not scale so an alternative + * method of deconfliction is recommended. + */ +#define CFE_PLATFORM_CMD_MID_BASE 0x1800 + +/** + * \brief Platform telemetry message ID base offset + * + * 0x0800 - Nominal for message ID V1 + * 0x0000 - Potential value for MISSION_MSGID_V2, but limited to a range of + * 0x0000-0x007F since the command bit is 0x0080. Alternative + * method of deconfliction is recommended. + * + * See #CFE_PLATFORM_CMD_MID_BASE for more information + */ +#define CFE_PLATFORM_TLM_MID_BASE 0x0800 + +/** + * \brief "Global" command message ID base offset + * + * 0x1860 - Nominal value for message ID V1 + * 0x00E0 - Potential value for MISSION_MSGID_V2, note command bit is 0x0080. + * Works in limited cases only, alternative method of deconfliction + * is recommended. + * See #CFE_PLATFORM_CMD_MID_BASE for more information + */ +#define CFE_PLATFORM_CMD_MID_BASE_GLOB 0x1860 + +#endif /* CFE_CORE_BASE_MSGIDS_H */ diff --git a/modules/core_api/config/default_cfe_core_api_interface_cfg.h b/modules/core_api/config/default_cfe_core_api_interface_cfg.h new file mode 100644 index 000000000..1f96eb73e --- /dev/null +++ b/modules/core_api/config/default_cfe_core_api_interface_cfg.h @@ -0,0 +1,132 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * + * Purpose: + * This header file contains the mission configuration parameters and + * typedefs with mission scope. + */ + +#ifndef CFE_CORE_API_INTERFACE_CFG_H +#define CFE_CORE_API_INTERFACE_CFG_H + +/** +** \cfemissioncfg cFE Maximum length for pathnames within data exchange structures +** +** \par Description: +** The value of this constant dictates the size of pathnames within all structures +** used for external data exchange, such as Software bus messages and table definitions. +** This is typically the same as OS_MAX_PATH_LEN but that is OSAL dependent -- +** and as such it definable on a per-processor/OS basis and hence may be different +** across multiple processors. It is recommended to set this to the value of the +** largest OS_MAX_PATH_LEN in use on any CPU on the mission. +** +** This affects only the layout of command/telemetry messages and table definitions; +** internal allocation may use the platform-specific OS_MAX_PATH_LEN value. +** +** This length must include an extra character for NULL termination. +** +** \par Limits +** All CPUs within the same SB domain (mission) and ground tools must share the +** same definition. +** Note this affects the size of messages, so it must not cause any message +** to exceed the max length. +** +** This value should be kept as a multiple of 4, to maintain alignment of +** any possible neighboring fields without implicit padding. +*/ +#define CFE_MISSION_MAX_PATH_LEN 64 + +/** +** \cfemissioncfg cFE Maximum length for filenames within data exchange structures +** +** \par Description: +** The value of this constant dictates the size of filenames within all structures +** used for external data exchange, such as Software bus messages and table definitions. +** This is typically the same as OS_MAX_FILE_LEN but that is OSAL dependent -- +** and as such it definable on a per-processor/OS basis and hence may be different +** across multiple processors. It is recommended to set this to the value of the +** largest OS_MAX_FILE_LEN in use on any CPU on the mission. +** +** This affects only the layout of command/telemetry messages and table definitions; +** internal allocation may use the platform-specific OS_MAX_FILE_LEN value. +** +** This length must include an extra character for NULL termination. +** +** \par Limits +** All CPUs within the same SB domain (mission) and ground tools must share the +** same definition. +** Note this affects the size of messages, so it must not cause any message +** to exceed the max length. +** +** This value should be kept as a multiple of 4, to maintain alignment of +** any possible neighboring fields without implicit padding. +*/ +#define CFE_MISSION_MAX_FILE_LEN 20 + +/** +** \cfemissioncfg cFE Maximum length for API names within data exchange structures +** +** \par Description: +** The value of this constant dictates the size of filenames within all structures +** used for external data exchange, such as Software bus messages and table definitions. +** This is typically the same as OS_MAX_API_LEN but that is OSAL dependent -- +** and as such it definable on a per-processor/OS basis and hence may be different +** across multiple processors. It is recommended to set this to the value of the +** largest OS_MAX_API_LEN in use on any CPU on the mission. +** +** This affects only the layout of command/telemetry messages and table definitions; +** internal allocation may use the platform-specific OS_MAX_API_LEN value. +** +** This length must include an extra character for NULL termination. +** +** \par Limits +** All CPUs within the same SB domain (mission) must share the same definition +** Note this affects the size of messages, so it must not cause any message +** to exceed the max length. +** +** This value should be kept as a multiple of 4, to maintain alignment of +** any possible neighboring fields without implicit padding. +*/ +#define CFE_MISSION_MAX_API_LEN 20 + +/** +** \cfemissioncfg cFE Maximum number of files in a message/data exchange +** +** \par Description: +** The value of this constant dictates the maximum number of files within all structures +** used for external data exchange, such as Software bus messages and table definitions. +** This is typically the same as OS_MAX_NUM_OPEN_FILES but that is OSAL dependent -- +** and as such it definable on a per-processor/OS basis and hence may be different +** across multiple processors. It is recommended to set this to the value of the +** largest OS_MAX_NUM_OPEN_FILES in use on any CPU on the mission. +** +** This affects only the layout of command/telemetry messages and table definitions; +** internal allocation may use the platform-specific OS_MAX_NUM_OPEN_FILES value. +** +** \par Limits +** All CPUs within the same SB domain (mission) must share the same definition +** Note this affects the size of messages, so it must not cause any message +** to exceed the max length. +** +*/ +#define CFE_MISSION_MAX_NUM_FILES 50 + +#endif /* SAMPLE_MISSION_CFG_H */ diff --git a/modules/core_api/config/default_cfe_mission_cfg.h b/modules/core_api/config/default_cfe_mission_cfg.h new file mode 100644 index 000000000..9d7b21cf1 --- /dev/null +++ b/modules/core_api/config/default_cfe_mission_cfg.h @@ -0,0 +1,39 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * + * Purpose: + * This header file contains the mission configuration parameters and + * typedefs with mission scope. + * + */ + +#ifndef CFE_MISSION_CFG_H +#define CFE_MISSION_CFG_H + +#include "cfe_core_api_interface_cfg.h" +#include "cfe_es_mission_cfg.h" +#include "cfe_evs_mission_cfg.h" +#include "cfe_sb_mission_cfg.h" +#include "cfe_tbl_mission_cfg.h" +#include "cfe_time_mission_cfg.h" +#include "cfe_fs_mission_cfg.h" + +#endif /* CFE_MISSION_CFG_H */ diff --git a/modules/core_api/config/default_cfe_msgids.h b/modules/core_api/config/default_cfe_msgids.h new file mode 100644 index 000000000..300734644 --- /dev/null +++ b/modules/core_api/config/default_cfe_msgids.h @@ -0,0 +1,42 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * + * Purpose: + * This header file contains the Message Id's for messages used by the + * cFE core. + * + */ + +#ifndef CFE_MSGIDS_H +#define CFE_MSGIDS_H + +/* +** Includes +*/ + +#include "cfe_es_msgids.h" +#include "cfe_evs_msgids.h" +#include "cfe_sb_msgids.h" +#include "cfe_tbl_msgids.h" +#include "cfe_time_msgids.h" +#include "cfe_test_msgids.h" + +#endif /* CFE_MSGIDS_H */ diff --git a/modules/core_api/mission_build.cmake b/modules/core_api/mission_build.cmake index 6bc99b88b..1139b1bc1 100644 --- a/modules/core_api/mission_build.cmake +++ b/modules/core_api/mission_build.cmake @@ -13,12 +13,19 @@ generate_config_includefile( FILE_NAME "cfe_mission_cfg.h" MATCH_SUFFIX "mission_cfg.h" + FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_cfe_mission_cfg.h" PREFIXES ${MISSIONCONFIG} cfe ) generate_config_includefile( FILE_NAME "cfe_perfids.h" MATCH_SUFFIX "perfids.h" + FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_cfe_perfids.h" PREFIXES ${MISSIONCONFIG} cfe ) +generate_config_includefile( + FILE_NAME "cfe_core_api_interface_cfg.h" + FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_cfe_core_api_interface_cfg.h" + PREFIXES ${BUILD_CONFIG} +) From f0edf1f23e3cea59c21b11296b8aea83528dcf1a Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 2 May 2023 16:28:00 -0400 Subject: [PATCH 10/14] Fix #2320, reorganize CORE_PRIVATE header files Organize CORE_PRIVATE header file contents according to the convention --- modules/core_private/arch_build.cmake | 6 ++ .../default_cfe_core_private_internal_cfg.h | 70 +++++++++++++++++++ .../config/default_cfe_platform_cfg.h | 44 ++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 modules/core_private/config/default_cfe_core_private_internal_cfg.h create mode 100644 modules/core_private/config/default_cfe_platform_cfg.h diff --git a/modules/core_private/arch_build.cmake b/modules/core_private/arch_build.cmake index 6bba56507..0fc3aa355 100644 --- a/modules/core_private/arch_build.cmake +++ b/modules/core_private/arch_build.cmake @@ -13,7 +13,13 @@ generate_config_includefile( FILE_NAME "cfe_platform_cfg.h" + FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_cfe_platform_cfg.h" MATCH_SUFFIX "platform_cfg.h" PREFIXES ${BUILD_CONFIG} ) +generate_config_includefile( + FILE_NAME "cfe_core_private_internal_cfg.h" + FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_cfe_core_private_internal_cfg.h" + PREFIXES ${BUILD_CONFIG} +) diff --git a/modules/core_private/config/default_cfe_core_private_internal_cfg.h b/modules/core_private/config/default_cfe_core_private_internal_cfg.h new file mode 100644 index 000000000..f654d66a2 --- /dev/null +++ b/modules/core_private/config/default_cfe_core_private_internal_cfg.h @@ -0,0 +1,70 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Executive Services (CFE_ES) Application Private Config Definitions + * + * This provides default values for configurable items that are internal + * to this module and do NOT affect the interface(s) of this module. Changes + * to items in this file only affect the local module and will be transparent + * to external entities that are using the public interface(s). + * + * @note This file may be overridden/superceded by mission-provided defintions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef CFE_CORE_PRIVATE_INTERNAL_CFG_H +#define CFE_CORE_PRIVATE_INTERNAL_CFG_H + +/** +** \cfesbcfg Platform Endian Indicator +** +** \par Description: +** The value of this constant indicates the endianess of the target system +** +** \par Limits +** This parameter has a lower limit of 0 and an upper limit of 1. +*/ +#define CFE_PLATFORM_ENDIAN CCSDS_LITTLE_ENDIAN + +/** \cfeescfg CFE core application startup timeout +** +** \par Description: +** The upper limit for the amount of time that the cFE core applications +** (ES, SB, EVS, TIME, TBL) are each allotted to reach their respective +** "ready" states. +** +** The CFE "main" thread starts individual tasks for each of the core applications +** (except FS). Each of these must perform some initialization work before the +** next core application can be started, so the main thread waits to ensure that the +** application has reached the "ready" state before starting the next application. +** +** If any core application fails to start, then it indicates a major problem with +** the system and startup is aborted. +** +** Units are in milliseconds +** +** \par Limits: +** Must be defined as an integer value that is greater than +** or equal to zero. +** +*/ +#define CFE_PLATFORM_CORE_MAX_STARTUP_MSEC 30000 + +#endif diff --git a/modules/core_private/config/default_cfe_platform_cfg.h b/modules/core_private/config/default_cfe_platform_cfg.h new file mode 100644 index 000000000..b61ccb8f0 --- /dev/null +++ b/modules/core_private/config/default_cfe_platform_cfg.h @@ -0,0 +1,44 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 + * + * Purpose: + * This header file contains the platform configuration parameters. + * + * Notes: + * The impact of changing these configurations from their default value is + * not yet documented. Changing these values may impact the performance + * and functionality of the system. + * + * Author: R.McGraw/SSI + * + */ + +#ifndef CFE_PLATFORM_CFG_H +#define CFE_PLATFORM_CFG_H + +#include "cfe_core_private_internal_cfg.h" +#include "cfe_es_platform_cfg.h" +#include "cfe_evs_platform_cfg.h" +#include "cfe_sb_platform_cfg.h" +#include "cfe_tbl_platform_cfg.h" +#include "cfe_time_platform_cfg.h" + +#endif /* CFE_PLATFORM_CFG_H */ From 2db14ee522f1dfce9313684bb4f4d0c676498ba2 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Thu, 4 May 2023 10:22:30 -0400 Subject: [PATCH 11/14] Fix #2320, reorganize CFE_TESTCASE header files Organize CFE_TESTCASE header file contents according to the convention --- modules/cfe_testcase/arch_build.cmake | 30 ++++++++++++ .../config/default_cfe_test_msgids.h | 39 +++++++++++++++ .../default_cfe_test_tbl.h} | 0 .../config/default_cfe_test_topicids.h | 48 +++++++++++++++++++ .../config/default_cfe_testcase_msgids.h | 39 +++++++++++++++ modules/cfe_testcase/mission_build.cmake | 31 ++++++++++++ 6 files changed, 187 insertions(+) create mode 100644 modules/cfe_testcase/arch_build.cmake create mode 100644 modules/cfe_testcase/config/default_cfe_test_msgids.h rename modules/cfe_testcase/{inc/cfe_test_tbl.h => config/default_cfe_test_tbl.h} (100%) create mode 100644 modules/cfe_testcase/config/default_cfe_test_topicids.h create mode 100644 modules/cfe_testcase/config/default_cfe_testcase_msgids.h create mode 100644 modules/cfe_testcase/mission_build.cmake diff --git a/modules/cfe_testcase/arch_build.cmake b/modules/cfe_testcase/arch_build.cmake new file mode 100644 index 000000000..b04904ed0 --- /dev/null +++ b/modules/cfe_testcase/arch_build.cmake @@ -0,0 +1,30 @@ +########################################################### +# +# TEST Core Module platform build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### + +# The list of header files that control the TEST configuration +set(TEST_PLATFORM_CONFIG_FILE_LIST + cfe_test_msgids.h +) + +# Create wrappers around the all the config header files +# This makes them individually overridable by the missions, without modifying +# the distribution default copies +foreach(TEST_CFGFILE ${TEST_PLATFORM_CONFIG_FILE_LIST}) + get_filename_component(CFGKEY "${TEST_CFGFILE}" NAME_WE) + if (DEFINED TEST_CFGFILE_SRC_${CFGKEY}) + set(DEFAULT_SOURCE "${TEST_CFGFILE_SRC_${CFGKEY}}") + else() + set(DEFAULT_SOURCE "${CMAKE_CURRENT_LIST_DIR}/config/default_${TEST_CFGFILE}") + endif() + generate_config_includefile( + FILE_NAME "${TEST_CFGFILE}" + FALLBACK_FILE ${DEFAULT_SOURCE} + ) +endforeach() diff --git a/modules/cfe_testcase/config/default_cfe_test_msgids.h b/modules/cfe_testcase/config/default_cfe_test_msgids.h new file mode 100644 index 000000000..a4b41aa30 --- /dev/null +++ b/modules/cfe_testcase/config/default_cfe_test_msgids.h @@ -0,0 +1,39 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Test app (CFE_TEST) Application Message IDs + */ +#ifndef CFE_TEST_MSGIDS_H +#define CFE_TEST_MSGIDS_H + +#include "cfe_core_api_base_msgids.h" +#include "cfe_test_topicids.h" + +/* +** cFE Command Message Id's +*/ +#define CFE_TEST_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TEST_CMD_MSG /* 0x1802 */ + +/* +** CFE Telemetry Message Id's +*/ +#define CFE_TEST_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TEST_HK_TLM_MSG /* 0x0802 */ + +#endif diff --git a/modules/cfe_testcase/inc/cfe_test_tbl.h b/modules/cfe_testcase/config/default_cfe_test_tbl.h similarity index 100% rename from modules/cfe_testcase/inc/cfe_test_tbl.h rename to modules/cfe_testcase/config/default_cfe_test_tbl.h diff --git a/modules/cfe_testcase/config/default_cfe_test_topicids.h b/modules/cfe_testcase/config/default_cfe_test_topicids.h new file mode 100644 index 000000000..6ecca4fb5 --- /dev/null +++ b/modules/cfe_testcase/config/default_cfe_test_topicids.h @@ -0,0 +1,48 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Test app (CFE_TESTCASE) Application Topic IDs + */ +#ifndef CFE_TESTCASE_TOPICIDS_H +#define CFE_TESTCASE_TOPICIDS_H + +/** +** \cfemissioncfg cFE Portable Message Numbers for Commands +** +** \par Description: +** Portable message numbers for the cFE TEST command messages +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_TEST_CMD_MSG 2 + +/** +** \cfemissioncfg cFE Portable Message Numbers for Telemetry +** +** \par Description: +** Portable message numbers for the cFE TEST telemetry messages +** +** \par Limits +** Not Applicable +*/ +#define CFE_MISSION_TEST_HK_TLM_MSG 2 + +#endif diff --git a/modules/cfe_testcase/config/default_cfe_testcase_msgids.h b/modules/cfe_testcase/config/default_cfe_testcase_msgids.h new file mode 100644 index 000000000..a4b41aa30 --- /dev/null +++ b/modules/cfe_testcase/config/default_cfe_testcase_msgids.h @@ -0,0 +1,39 @@ +/************************************************************************ + * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” + * + * Copyright (c) 2020 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 Test app (CFE_TEST) Application Message IDs + */ +#ifndef CFE_TEST_MSGIDS_H +#define CFE_TEST_MSGIDS_H + +#include "cfe_core_api_base_msgids.h" +#include "cfe_test_topicids.h" + +/* +** cFE Command Message Id's +*/ +#define CFE_TEST_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TEST_CMD_MSG /* 0x1802 */ + +/* +** CFE Telemetry Message Id's +*/ +#define CFE_TEST_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TEST_HK_TLM_MSG /* 0x0802 */ + +#endif diff --git a/modules/cfe_testcase/mission_build.cmake b/modules/cfe_testcase/mission_build.cmake new file mode 100644 index 000000000..fd1df0bc0 --- /dev/null +++ b/modules/cfe_testcase/mission_build.cmake @@ -0,0 +1,31 @@ +########################################################### +# +# TEST Core Module mission build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### + +# The list of header files that control the TEST configuration +set(TEST_MISSION_CONFIG_FILE_LIST + cfe_test_tbl.h + cfe_test_topicids.h +) + +# Create wrappers around the all the config header files +# This makes them individually overridable by the missions, without modifying +# the distribution default copies +foreach(TEST_CFGFILE ${TEST_MISSION_CONFIG_FILE_LIST}) + get_filename_component(CFGKEY "${TEST_CFGFILE}" NAME_WE) + if (DEFINED TEST_CFGFILE_SRC_${CFGKEY}) + set(DEFAULT_SOURCE GENERATED_FILE "${TEST_CFGFILE_SRC_${CFGKEY}}") + else() + set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${TEST_CFGFILE}") + endif() + generate_config_includefile( + FILE_NAME "${TEST_CFGFILE}" + ${DEFAULT_SOURCE} + ) +endforeach() From 4bff7972ecd76b2acbfaf65d810f85d221a8f6dd Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Wed, 3 May 2023 11:09:10 -0400 Subject: [PATCH 12/14] Fix #2320, adjust scripts and docs for header renames Corrects the paths and references in the documentation build to reflect the header name changes. Removes the overrides from "sample_defs" as these are no longer strictly required, user only needs to override if they really need to change something. --- cmake/mission_build.cmake | 7 +- cmake/sample_defs/cpu1_msgids.h | 131 -- cmake/sample_defs/cpu1_platform_cfg.h | 1733 ------------------------ cmake/sample_defs/sample_mission_cfg.h | 565 -------- docs/src/cfe_frontpage.dox | 10 +- docs/src/cfe_sb.dox | 2 +- 6 files changed, 12 insertions(+), 2436 deletions(-) delete mode 100644 cmake/sample_defs/cpu1_msgids.h delete mode 100644 cmake/sample_defs/cpu1_platform_cfg.h delete mode 100644 cmake/sample_defs/sample_mission_cfg.h diff --git a/cmake/mission_build.cmake b/cmake/mission_build.cmake index 2ee6f7094..192c2e6c4 100644 --- a/cmake/mission_build.cmake +++ b/cmake/mission_build.cmake @@ -308,7 +308,12 @@ function(prepare) "${psp_MISSION_DIR}/psp/fsw/inc/*.h" ) foreach(MODULE core_api ${MISSION_CORE_MODULES}) - list(APPEND SUBMODULE_HEADER_PATHS "${${MODULE}_MISSION_DIR}/fsw/inc/*.h") + if (IS_DIRECTORY "${${MODULE}_MISSION_DIR}/fsw/inc") + list(APPEND SUBMODULE_HEADER_PATHS "${${MODULE}_MISSION_DIR}/fsw/inc/*.h") + endif() + if (IS_DIRECTORY "${${MODULE}_MISSION_DIR}/config") + list(APPEND SUBMODULE_HEADER_PATHS "${${MODULE}_MISSION_DIR}/config/default_*.h") + endif() endforeach() file(GLOB MISSION_USERGUIDE_HEADERFILES ${SUBMODULE_HEADER_PATHS} diff --git a/cmake/sample_defs/cpu1_msgids.h b/cmake/sample_defs/cpu1_msgids.h deleted file mode 100644 index 76fca0ca2..000000000 --- a/cmake/sample_defs/cpu1_msgids.h +++ /dev/null @@ -1,131 +0,0 @@ -/************************************************************************ - * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” - * - * Copyright (c) 2020 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 - * - * Purpose: - * This header file contains the Message Id's for messages used by the - * cFE core. - * - * Author: R.McGraw/SSI - * - * Notes: - * This file should not contain messages defined by cFE external - * applications. - * - */ - -#ifndef CPU1_MSGIDS_H -#define CPU1_MSGIDS_H - -/* -** Includes -*/ - -#include "cfe_mission_cfg.h" - -/** - * \brief Platform command message ID base offset - * - * Example mechanism for setting default command bits and deconflicting MIDs across multiple - * platforms in a mission. For any sufficiently complex mission this method is - * typically replaced by a centralized message ID management scheme. - * - * 0x1800 - Nominal value for default message ID implementation (V1). This sets the command - * field and the secondary header present field. Typical V1 command MID range - * is 0x1800-1FFF. Additional cpus can deconflict message IDs by incrementing - * this value to provide sub-allocations (0x1900 for example). - * 0x0080 - Command bit for MISSION_MSGID_V2 message ID implementation (V2). Although - * this can be used for the value below due to the relatively small set - * of MIDs in the framework it will not scale so an alternative - * method of deconfliction is recommended. - */ -#define CFE_PLATFORM_CMD_MID_BASE 0x1800 - -/** - * \brief Platform telemetry message ID base offset - * - * 0x0800 - Nominal for message ID V1 - * 0x0000 - Potential value for MISSION_MSGID_V2, but limited to a range of - * 0x0000-0x007F since the command bit is 0x0080. Alternative - * method of deconfliction is recommended. - * - * See #CFE_PLATFORM_CMD_MID_BASE for more information - */ -#define CFE_PLATFORM_TLM_MID_BASE 0x0800 - -/** - * \brief "Global" command message ID base offset - * - * 0x1860 - Nominal value for message ID V1 - * 0x00E0 - Potential value for MISSION_MSGID_V2, note command bit is 0x0080. - * Works in limited cases only, alternative method of deconfliction - * is recommended. - * See #CFE_PLATFORM_CMD_MID_BASE for more information - */ -#define CFE_PLATFORM_CMD_MID_BASE_GLOB 0x1860 - -/* -** cFE Command Message Id's -*/ -#define CFE_EVS_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_EVS_CMD_MSG /* 0x1801 */ -#define CFE_TEST_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TEST_CMD_MSG /* 0x1802 */ -#define CFE_SB_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_SB_CMD_MSG /* 0x1803 */ -#define CFE_TBL_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TBL_CMD_MSG /* 0x1804 */ -#define CFE_TIME_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TIME_CMD_MSG /* 0x1805 */ -#define CFE_ES_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_ES_CMD_MSG /* 0x1806 */ - -#define CFE_ES_SEND_HK_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_ES_SEND_HK_MSG /* 0x1808 */ -#define CFE_EVS_SEND_HK_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_EVS_SEND_HK_MSG /* 0x1809 */ -/* Message ID 0x180A is available */ -#define CFE_SB_SEND_HK_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_SB_SEND_HK_MSG /* 0x180B */ -#define CFE_TBL_SEND_HK_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TBL_SEND_HK_MSG /* 0x180C */ -#define CFE_TIME_SEND_HK_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TIME_SEND_HK_MSG /* 0x180D */ - -#define CFE_SB_SUB_RPT_CTRL_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_SB_SUB_RPT_CTRL_MSG /* 0x180E */ - -#define CFE_TIME_TONE_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TIME_TONE_CMD_MSG /* 0x1810 */ -#define CFE_TIME_1HZ_CMD_MID CFE_PLATFORM_CMD_MID_BASE + CFE_MISSION_TIME_1HZ_CMD_MSG /* 0x1811 */ - -/* -** cFE Global Command Message Id's -*/ -#define CFE_TIME_DATA_CMD_MID CFE_PLATFORM_CMD_MID_BASE_GLOB + CFE_MISSION_TIME_DATA_CMD_MSG /* 0x1860 */ -#define CFE_TIME_SEND_CMD_MID CFE_PLATFORM_CMD_MID_BASE_GLOB + CFE_MISSION_TIME_SEND_CMD_MSG /* 0x1862 */ - -/* -** CFE Telemetry Message Id's -*/ -#define CFE_ES_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_ES_HK_TLM_MSG /* 0x0800 */ -#define CFE_EVS_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_EVS_HK_TLM_MSG /* 0x0801 */ -#define CFE_TEST_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TEST_HK_TLM_MSG /* 0x0802 */ -#define CFE_SB_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_SB_HK_TLM_MSG /* 0x0803 */ -#define CFE_TBL_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TBL_HK_TLM_MSG /* 0x0804 */ -#define CFE_TIME_HK_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TIME_HK_TLM_MSG /* 0x0805 */ -#define CFE_TIME_DIAG_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TIME_DIAG_TLM_MSG /* 0x0806 */ -#define CFE_EVS_LONG_EVENT_MSG_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_EVS_LONG_EVENT_MSG_MSG /* 0x0808 */ -#define CFE_EVS_SHORT_EVENT_MSG_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_EVS_SHORT_EVENT_MSG_MSG /* 0x0809 */ -#define CFE_SB_STATS_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_SB_STATS_TLM_MSG /* 0x080A */ -#define CFE_ES_APP_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_ES_APP_TLM_MSG /* 0x080B */ -#define CFE_TBL_REG_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_TBL_REG_TLM_MSG /* 0x080C */ -#define CFE_SB_ALLSUBS_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_SB_ALLSUBS_TLM_MSG /* 0x080D */ -#define CFE_SB_ONESUB_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_SB_ONESUB_TLM_MSG /* 0x080E */ -#define CFE_ES_MEMSTATS_TLM_MID CFE_PLATFORM_TLM_MID_BASE + CFE_MISSION_ES_MEMSTATS_TLM_MSG /* 0x0810 */ - -#endif /* CPU1_MSGIDS_H */ diff --git a/cmake/sample_defs/cpu1_platform_cfg.h b/cmake/sample_defs/cpu1_platform_cfg.h deleted file mode 100644 index b898e7b37..000000000 --- a/cmake/sample_defs/cpu1_platform_cfg.h +++ /dev/null @@ -1,1733 +0,0 @@ -/************************************************************************ - * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” - * - * Copyright (c) 2020 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 - * - * Purpose: - * This header file contains the platform configuration parameters. - * - * Notes: - * The impact of changing these configurations from their default value is - * not yet documented. Changing these values may impact the performance - * and functionality of the system. - * - * Author: R.McGraw/SSI - * - */ - -#ifndef CPU1_PLATFORM_CFG_H -#define CPU1_PLATFORM_CFG_H - -/** -** \cfeescfg Default virtual path for persistent storage -** -** \par Description: -** This configures the default location in the virtual file system -** for persistent/non-volatile storage. Files such as the startup -** script, app/library dynamic modules, and configuration tables are -** expected to be stored in this directory. -** -*/ -#define CFE_PLATFORM_ES_NONVOL_DISK_MOUNT_STRING "/cf" - -/** -** \cfeescfg Default virtual path for volatile storage -** -** \par Description: -** The #CFE_PLATFORM_ES_RAM_DISK_MOUNT_STRING parameter is used to set the cFE mount path -** for the CFE RAM disk. This is a parameter for missions that do not want to -** use the default value of "/ram", or for missions that need to have a different -** value for different CPUs or Spacecraft. -** Note that the vxWorks OSAL cannot currently handle names that have more than one -** path separator in it. The names "/ram", "/ramdisk", "/disk123" will all work, but -** "/disks/ram" will not. -** Multiple separators can be used with the posix or RTEMS ports. -** -*/ -#define CFE_PLATFORM_ES_RAM_DISK_MOUNT_STRING "/ram" - -/** -** \cfesbcfg Maximum Number of Unique Message IDs SB Routing Table can hold -** -** \par Description: -** Dictates the maximum number of unique MsgIds the SB routing table will hold. -** This constant has a direct effect on the size of SB's tables and arrays. -** Keeping this count as low as possible will save memory. -** To see the run-time, high-water mark and the current utilization figures -** regarding this parameter, send an SB command to 'Send Statistics Pkt'. -** -** \par Limits -** This must be a power of two if software bus message routing hash implementation -** is being used. Lower than 64 will cause unit test failures, and -** telemetry reporting is impacted below 32. There is no hard -** upper limit, but impacts memory footprint. For software bus message routing -** search implementation the number of msg ids subscribed to impacts performance. -** -*/ -#define CFE_PLATFORM_SB_MAX_MSG_IDS 256 - -/** -** \cfesbcfg Maximum Number of Unique Pipes SB Routing Table can hold -** -** \par Description: -** Dictates the maximum number of unique Pipes the SB routing table will hold. -** This constant has a direct effect on the size of SB's tables and arrays. -** Keeping this count as low as possible will save memory. -** To see the run-time, high-water mark and the current utilization figures -** regarding this parameter, send an SB command to 'Send Statistics Pkt'. -** -** \par Limits -** This parameter has a lower limit of 1. This parameter must also be less than -** or equal to OS_MAX_QUEUES. -** -*/ -#define CFE_PLATFORM_SB_MAX_PIPES 64 - -/** -** \cfesbcfg Maximum Number of unique local destinations a single MsgId can have -** -** \par Description: -** Dictates the maximum number of unique local destinations a single MsgId can -** have. -** -** \par Limits -** This parameter has a lower limit of 1. There are no restrictions on the upper -** limit however, the maximum number of destinations per packet is system dependent -** and should be verified. Destination number values that are checked against this -** configuration are defined by a 16 bit data word. -** -*/ -#define CFE_PLATFORM_SB_MAX_DEST_PER_PKT 16 - -/** -** \cfesbcfg Default Subscription Message Limit -** -** \par Description: -** Dictates the default Message Limit when using the #CFE_SB_Subscribe API. This will -** limit the number of messages with a specific message ID that can be received through -** a subscription. This only changes the default; other message limits can be set on a per -** subscription basis using #CFE_SB_SubscribeEx . -** -** \par Limits -** This parameter has a lower limit of 4 and an upper limit of 65535. -** -*/ -#define CFE_PLATFORM_SB_DEFAULT_MSG_LIMIT 4 - -/** -** \cfesbcfg Size of the SB buffer memory pool -** -** \par Description: -** Dictates the size of the SB memory pool. For each message the SB -** sends, the SB dynamically allocates from this memory pool, the memory needed -** to process the message. The memory needed to process each message is msg -** size + msg descriptor(CFE_SB_BufferD_t). This memory pool is also used -** to allocate destination descriptors (CFE_SB_DestinationD_t) during the -** subscription process. -** To see the run-time, high-water mark and the current utilization figures -** regarding this parameter, send an SB command to 'Send Statistics Pkt'. -** Some memory statistics have been added to the SB housekeeping packet. -** NOTE: It is important to monitor these statistics to ensure the desired -** memory margin is met. -** -** \par Limits -** This parameter has a lower limit of 512 and an upper limit of UINT_MAX (4 Gigabytes). -** -*/ -#define CFE_PLATFORM_SB_BUF_MEMORY_BYTES 524288 - -/** -** \cfesbcfg Highest Valid Message Id -** -** \par Description: -** The value of this constant dictates the range of valid message ID's, from 0 -** to CFE_PLATFORM_SB_HIGHEST_VALID_MSGID (inclusive). -** -** Although this can be defined differently across platforms, each platform can -** only publish/subscribe to message ids within their allowable range. Typically -** this value is set the same across all mission platforms to avoid this complexity. -** -** \par Limits -** CFE_SB_INVALID_MSG is set to the maximum representable number of type CFE_SB_MsgId_t. -** CFE_PLATFORM_SB_HIGHEST_VALID_MSGID lower limit is 1, up to CFE_SB_INVALID_MSG_ID - 1. -** -** When using the direct message map implementation for software bus routing, this -** value is used to size the map where a value of 0x1FFF results in a 16 KBytes map -** and 0xFFFF is 128 KBytes. -** -** When using the hash implementation for software bus routing, a multiple of the -** CFE_PLATFORM_SB_MAX_MSG_IDS is used to size the message map. In that case -** the range selected here does not impact message map memory use, so it's -** reasonable to use up to the full range supported by the message ID implementation. -*/ -#define CFE_PLATFORM_SB_HIGHEST_VALID_MSGID 0x1FFF - -/** -** \cfesbcfg Platform Endian Indicator -** -** \par Description: -** The value of this constant indicates the endianess of the target system -** -** \par Limits -** This parameter has a lower limit of 0 and an upper limit of 1. -*/ -#define CFE_PLATFORM_ENDIAN CCSDS_LITTLE_ENDIAN - -/** -** \cfesbcfg Default Routing Information Filename -** -** \par Description: -** The value of this constant defines the filename used to store the software -** bus routing information. This filename is used only when no filename is -** specified in the command. -** -** \par Limits -** The length of each string, including the NULL terminator cannot exceed the -** #OS_MAX_PATH_LEN value. -*/ -#define CFE_PLATFORM_SB_DEFAULT_ROUTING_FILENAME "/ram/cfe_sb_route.dat" - -/** -** \cfesbcfg Default Pipe Information Filename -** -** \par Description: -** The value of this constant defines the filename used to store the software -** bus pipe information. This filename is used only when no filename is -** specified in the command. -** -** \par Limits -** The length of each string, including the NULL terminator cannot exceed the -** #OS_MAX_PATH_LEN value. -*/ -#define CFE_PLATFORM_SB_DEFAULT_PIPE_FILENAME "/ram/cfe_sb_pipe.dat" - -/** -** \cfesbcfg Default Message Map Filename -** -** \par Description: -** The value of this constant defines the filename used to store the software -** bus message map information. This filename is used only when no filename is -** specified in the command. The message map is a lookup table (array of 16bit -** words) that has an element for each possible MsgId value and holds the -** routing table index for that MsgId. The Msg Map provides fast access to the -** destinations of a message. -** -** \par Limits -** The length of each string, including the NULL terminator cannot exceed the -** #OS_MAX_PATH_LEN value. -*/ -#define CFE_PLATFORM_SB_DEFAULT_MAP_FILENAME "/ram/cfe_sb_msgmap.dat" - -/** -** \cfesbcfg SB Event Filtering -** -** \par Description: -** This group of configuration parameters dictates what SB events will be -** filtered through EVS. The filtering will begin after the SB task initializes -** and stay in effect until a cmd to EVS changes it. -** This allows the operator to set limits on the number of event messages that -** are sent during system initialization. -** NOTE: Set all unused event values and mask values to zero -** -** \par Limits -** This filtering applies only to SB events. -** These parameters have a lower limit of 0 and an upper limit of 65535. -*/ -#define CFE_PLATFORM_SB_FILTERED_EVENT1 CFE_SB_SEND_NO_SUBS_EID -#define CFE_PLATFORM_SB_FILTER_MASK1 CFE_EVS_FIRST_4_STOP - -#define CFE_PLATFORM_SB_FILTERED_EVENT2 CFE_SB_DUP_SUBSCRIP_EID -#define CFE_PLATFORM_SB_FILTER_MASK2 CFE_EVS_FIRST_4_STOP - -#define CFE_PLATFORM_SB_FILTERED_EVENT3 CFE_SB_MSGID_LIM_ERR_EID -#define CFE_PLATFORM_SB_FILTER_MASK3 CFE_EVS_FIRST_16_STOP - -#define CFE_PLATFORM_SB_FILTERED_EVENT4 CFE_SB_Q_FULL_ERR_EID -#define CFE_PLATFORM_SB_FILTER_MASK4 CFE_EVS_FIRST_16_STOP - -#define CFE_PLATFORM_SB_FILTERED_EVENT5 0 -#define CFE_PLATFORM_SB_FILTER_MASK5 CFE_EVS_NO_FILTER - -#define CFE_PLATFORM_SB_FILTERED_EVENT6 0 -#define CFE_PLATFORM_SB_FILTER_MASK6 CFE_EVS_NO_FILTER - -#define CFE_PLATFORM_SB_FILTERED_EVENT7 0 -#define CFE_PLATFORM_SB_FILTER_MASK7 CFE_EVS_NO_FILTER - -#define CFE_PLATFORM_SB_FILTERED_EVENT8 0 -#define CFE_PLATFORM_SB_FILTER_MASK8 CFE_EVS_NO_FILTER - -/** -** \cfeescfg Define SB Memory Pool Block Sizes -** -** \par Description: -** Software Bus Memory Pool Block Sizes -** -** \par Limits -** These sizes MUST be increasing and MUST be an integral multiple of 4. -** The number of block sizes defined cannot exceed -** #CFE_PLATFORM_ES_POOL_MAX_BUCKETS -*/ -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_01 8 -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_02 16 -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_03 20 -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_04 36 -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_05 64 -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_06 96 -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_07 128 -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_08 160 -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_09 256 -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_10 512 -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_11 1024 -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_12 2048 -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_13 4096 -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_14 8192 -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_15 16384 -#define CFE_PLATFORM_SB_MEM_BLOCK_SIZE_16 32768 -#define CFE_PLATFORM_SB_MAX_BLOCK_SIZE (CFE_MISSION_SB_MAX_SB_MSG_SIZE + 128) - -/** -** \cfetimecfg Time Server or Time Client Selection -** -** \par Description: -** This configuration parameter selects whether the Time task functions as a -** time "server" or "client". A time server generates the "time at the tone" -** packet which is received by time clients. -** -** \par Limits -** Enable one, and only one by defining either CFE_PLATFORM_TIME_CFG_SERVER or -** CFE_PLATFORM_TIME_CFG_CLIENT AS true. The other must be defined as false. -*/ -#define CFE_PLATFORM_TIME_CFG_SERVER true -#define CFE_PLATFORM_TIME_CFG_CLIENT false - -/** -** \cfetimecfg Time Tone In Big-Endian Order -** -** \par Description: -** If this configuration parameter is defined, the CFE time server will -** publish time tones with payloads in big-endian order, and time clients -** will expect the tones to be in big-endian order. This is useful for -** mixed-endian environments. This will become obsolete once EDS is -** available and the CFE time tone message is defined. -*/ -#undef CFE_PLATFORM_TIME_CFG_BIGENDIAN - -/** -** \cfetimecfg Local MET or Virtual MET Selection for Time Servers -** -** \par Description: -** Depending on the specific hardware system configuration, it may be possible -** for Time Servers to read the "local" MET from a h/w register rather than -** having to track the MET as the count of tone signal interrupts (virtual MET) -** -** Time Clients must be defined as using a virtual MET. Also, a Time Server -** cannot be defined as having both a h/w MET and an external time source (they -** both cannot synchronize to the same tone). -** -** Note: "disable" this define (set to false) only for Time Servers with local hardware -** that supports a h/w MET that is synchronized to the tone signal !!! -** -** \par Limits -** Only applies if #CFE_PLATFORM_TIME_CFG_SERVER is set to true. -*/ -#define CFE_PLATFORM_TIME_CFG_VIRTUAL true - -/** -** \cfetimecfg Include or Exclude the Primary/Redundant Tone Selection Cmd -** -** \par Description: -** Depending on the specific hardware system configuration, it may be possible -** to switch between a primary and redundant tone signal. If supported by -** hardware, this definition will enable command interfaces to select the -** active tone signal. Both Time Clients and Time Servers support this feature. -** Note: Set the CFE_PLATFORM_TIME_CFG_SIGNAL define to true to enable tone signal commands. -** -** \par Limits -** Not Applicable -*/ -#define CFE_PLATFORM_TIME_CFG_SIGNAL false - -/** -** \cfetimecfg Include or Exclude the Internal/External Time Source Selection Cmd -** -** \par Description: -** By default, Time Servers maintain time using an internal MET which may be a -** h/w register or software counter, depending on available hardware. The -** following definition enables command interfaces to switch between an -** internal MET, or external time data received from one of several supported -** external time sources. Only a Time Server may be configured to use external -** time data. -** Note: Set the CFE_PLATFORM_TIME_CFG_SOURCE define to true to include the Time Source -** Selection Command (command allows selection between the internal -** or external time source). Then choose the external source with the -** CFE_TIME_CFG_SRC_??? define. -** -** \par Limits -** Only applies if #CFE_PLATFORM_TIME_CFG_SERVER is set to true. -*/ -#define CFE_PLATFORM_TIME_CFG_SOURCE false - -/** -** \cfetimecfg Choose the External Time Source for Server only -** -** \par Description: -** If #CFE_PLATFORM_TIME_CFG_SOURCE is set to true, then one of the following external time -** source types must also be set to true. Do not set any of the external time -** source types to true unless #CFE_PLATFORM_TIME_CFG_SOURCE is set to true. -** -** \par Limits -** -# If #CFE_PLATFORM_TIME_CFG_SOURCE is set to true then one and only one of the following -** three external time sources can and must be set true: -** #CFE_PLATFORM_TIME_CFG_SRC_MET, #CFE_PLATFORM_TIME_CFG_SRC_GPS, #CFE_PLATFORM_TIME_CFG_SRC_TIME -** -# Only applies if #CFE_PLATFORM_TIME_CFG_SERVER is set to true. -*/ -#define CFE_PLATFORM_TIME_CFG_SRC_MET false -#define CFE_PLATFORM_TIME_CFG_SRC_GPS false -#define CFE_PLATFORM_TIME_CFG_SRC_TIME false - -/** -** \cfetimecfg Define the Max Delta Limits for Time Servers using an Ext Time Source -** -** \par Description: -** If #CFE_PLATFORM_TIME_CFG_SOURCE is set to true and one of the external time sources is -** also set to true, then the delta time limits for range checking is used. -** -** When a new time value is received from an external source, the value is -** compared against the "expected" time value. If the delta exceeds the -** following defined amount, then the new time data will be ignored. This range -** checking is only performed after the clock state has been commanded to -** "valid". Until then, external time data is accepted unconditionally. -** -** \par Limits -** Applies only if both #CFE_PLATFORM_TIME_CFG_SERVER and #CFE_PLATFORM_TIME_CFG_SOURCE are set -** to true. -*/ -#define CFE_PLATFORM_TIME_MAX_DELTA_SECS 0 -#define CFE_PLATFORM_TIME_MAX_DELTA_SUBS 500000 - -/** -** \cfetimecfg Define the Local Clock Rollover Value in seconds and subseconds -** -** \par Description: -** Specifies the capability of the local clock. Indicates the time at which -** the local clock rolls over. -** -** \par Limits -** Not Applicable -*/ -#define CFE_PLATFORM_TIME_MAX_LOCAL_SECS 27 -#define CFE_PLATFORM_TIME_MAX_LOCAL_SUBS 0 - -/** -** \cfetimecfg Define Timing Limits From One Tone To The Next -** -** \par Description: -** Defines limits to the timing of the 1Hz tone signal. A tone signal is valid -** only if it arrives within one second (plus or minus the tone limit) from -** the previous tone signal.Units are microseconds as measured with the local -** clock. -** -** \par Limits -** Not Applicable -*/ -#define CFE_PLATFORM_TIME_CFG_TONE_LIMIT 20000 - -/** -** \cfetimecfg Define Time to Start Flywheel Since Last Tone -** -** \par Description: -** Define time to enter flywheel mode (in seconds since last tone data update) -** Units are microseconds as measured with the local clock. -** -** \par Limits -** Not Applicable -*/ -#define CFE_PLATFORM_TIME_CFG_START_FLY 2 - -/** -** \cfetimecfg Define Periodic Time to Update Local Clock Tone Latch -** -** \par Description: -** Define Periodic Time to Update Local Clock Tone Latch. Applies only when -** in flywheel mode. This define dictates the period at which the simulated -** 'last tone' time is updated. Units are seconds. -** -** \par Limits -** Not Applicable -*/ -#define CFE_PLATFORM_TIME_CFG_LATCH_FLY 8 - -/** -** \cfeescfg Define Max Number of Applications -** -** \par Description: -** Defines the maximum number of applications that can be loaded into the -** system. This number does not include child tasks. -** -** \par Limits -** There is a lower limit of 6. The lower limit corresponds to the cFE internal -** applications. There are no restrictions on the upper limit however, the -** maximum number of applications is system dependent and should be verified. -** AppIDs that are checked against this configuration are defined by a 32 bit -** data word. -*/ -#define CFE_PLATFORM_ES_MAX_APPLICATIONS 32 - -/** -** \cfeescfg Define Max Number of Shared libraries -** -** \par Description: -** Defines the maximum number of cFE Shared libraries that can be loaded into -** the system. -** -** \par Limits -** There is a lower limit of 1. There are no restrictions on the upper limit -** however, the maximum number of libraries is system dependent and should be -** verified. -*/ -#define CFE_PLATFORM_ES_MAX_LIBRARIES 10 - -/** -** \cfeescfg Define Max Number of ER (Exception and Reset) log entries -** -** \par Description: -** Defines the maximum number of ER (Exception and Reset) log entries -** -** \par Limits -** There is a lower limit of 1. There are no restrictions on the upper limit -** however, the maximum number of log entries is system dependent and should be -** verified. -*/ -#define CFE_PLATFORM_ES_ER_LOG_ENTRIES 20 - -/** \cfeescfg Maximum size of CPU Context in ES Error Log -** -** \par Description: -** This should be large enough to accommodate the CPU context -** information supplied by the PSP on the given platform. -** -** \par Limits: -** Must be greater than zero and a multiple of sizeof(uint32). -** Limited only by the available memory and the number of entries -** in the error log. Any context information beyond this size will -** be truncated. -*/ -#define CFE_PLATFORM_ES_ER_LOG_MAX_CONTEXT_SIZE 256 - -/** -** \cfeescfg Define Size of the cFE System Log. -** -** \par Description: -** Defines the size in bytes of the cFE system log. The system log holds -** variable length strings that are terminated by a linefeed and null -** character. -** -** \par Limits -** There is a lower limit of 512. There are no restrictions on the upper limit -** however, the maximum system log size is system dependent and should be -** verified. -*/ -#define CFE_PLATFORM_ES_SYSTEM_LOG_SIZE 3072 - -/** -** \cfeescfg Define Number of entries in the ES Object table -** -** \par Description: -** Defines the number of entries in the ES Object table. This table controls -** the core cFE startup. -** -** \par Limits -** There is a lower limit of 15. There are no restrictions on the upper limit -** however, the maximum object table size is system dependent and should be -** verified. -*/ -#define CFE_PLATFORM_ES_OBJECT_TABLE_SIZE 30 - -/** -** \cfeescfg Define Max Number of Generic Counters -** -** \par Description: -** Defines the maximum number of Generic Counters that can be registered. -** -** \par Limits -** This parameter has a lower limit of 1 and an upper limit of 65535. -*/ -#define CFE_PLATFORM_ES_MAX_GEN_COUNTERS 8 - -/** -** \cfeescfg Define ES Application Control Scan Rate -** -** \par Description: -** ES Application Control Scan Rate. This parameter controls the speed that ES -** scans the Application Table looking for App Delete/Restart/Reload requests. -** All Applications are deleted, restarted, or reloaded by the ES Application. -** ES will periodically scan for control requests to process. The scan rate is -** controlled by this parameter, which is given in milliseconds. A value of -** 1000 means that ES will scan the Application Table once per second. Be -** careful not to set the value of this too low, because ES will use more CPU -** cycles scanning the table. -** -** \par Limits -** There is a lower limit of 100 and an upper limit of 20000 on this -** configuration parameter. millisecond units. -*/ -#define CFE_PLATFORM_ES_APP_SCAN_RATE 1000 - -/** -** \cfeescfg Define ES Application Kill Timeout -** -** \par Description: -** ES Application Kill Timeout. This parameter controls the number of -** "scan periods" that ES will wait for an application to Exit after getting -** the signal Delete, Reload or Restart. The sequence works as follows: -** -# ES will set the control request for an App to Delete/Restart/Reload and -** set this kill timer to the value in this parameter. -** -# If the App is responding and Calls it's RunLoop function, it will drop out -** of it's main loop and call CFE_ES_ExitApp. Once it calls Exit App, then -** ES can delete, restart, or reload the app the next time it scans the app -** table. -** -# If the App is not responding, the ES App will decrement this Kill Timeout -** value each time it runs. If the timeout value reaches zero, ES will kill -** the app. -** -** The Kill timeout value depends on the #CFE_PLATFORM_ES_APP_SCAN_RATE. If the Scan Rate -** is 1000, or 1 second, and this #CFE_PLATFORM_ES_APP_KILL_TIMEOUT is set to 5, then it -** will take 5 seconds to kill a non-responding App. -** If the Scan Rate is 250, or 1/4 second, and the #CFE_PLATFORM_ES_APP_KILL_TIMEOUT is -** set to 2, then it will take 1/2 second to time out. -** -** \par Limits -** There is a lower limit of 1 and an upper limit of 100 on this configuration -** parameter. Units are number of #CFE_PLATFORM_ES_APP_SCAN_RATE cycles. -*/ -#define CFE_PLATFORM_ES_APP_KILL_TIMEOUT 5 - -/** -** \cfeescfg ES Ram Disk Sector Size -** -** \par Description: -** Defines the ram disk sector size. The ram disk is 1 of 4 memory areas that -** are preserved on a processor reset. -** NOTE: Changing this value changes memory allocation, and may -** require changes to platform specific values (in CFE_PSP) such as -** USER_RESERVED_MEM in VxWorks depending on the memory areas -** being used for preserved data and on OS specific behavior. -** -** \par Limits -** There is a lower limit of 128. There are no restrictions on the upper limit -** however, the maximum RAM disk sector size is system dependent and should be -** verified. -*/ -#define CFE_PLATFORM_ES_RAM_DISK_SECTOR_SIZE 512 - -/** -** \cfeescfg ES Ram Disk Number of Sectors -** -** \par Description: -** Defines the ram disk number of sectors. The ram disk is one of four memory -** areas that are preserved on a processor reset. -** NOTE: Changing this value changes memory allocation, and may -** require changes to platform specific values (in CFE_PSP) such as -** USER_RESERVED_MEM in VxWorks depending on the memory areas -** being used for preserved data and on OS specific behavior. -** -** \par Limits -** There is a lower limit of 128. There are no restrictions on the upper limit -** however, the maximum number of RAM sectors is system dependent and should be -** verified. -*/ -#define CFE_PLATFORM_ES_RAM_DISK_NUM_SECTORS 4096 - -/** -** \cfeescfg Percentage of Ram Disk Reserved for Decompressing Apps -** -** \par Description: -** The #CFE_PLATFORM_ES_RAM_DISK_PERCENT_RESERVED parameter is used to make sure that the -** Volatile ( RAM ) Disk has a defined amount of free space during a processor -** reset. The cFE uses the Volatile disk to decompress cFE applications during -** system startup. If this Volatile disk happens to get filled with logs and -** misc files, then a processor reset may not work, because there will be no -** room to decompress cFE apps. To solve that problem, this parameter sets the -** "Low Water Mark" for disk space on a Processor reset. It should be set to -** allow the largest cFE Application to be decompressed. -** During a Processor reset, if there is not sufficient space left on the disk, -** it will be re-formatted in order to clear up some space. -** -** This feature can be turned OFF by setting the parameter to 0. -** -** \par Limits -** There is a lower limit of 0 and an upper limit of 75 on this configuration -** parameter.Units are percentage. A setting of zero will turn this feature -** off. -*/ -#define CFE_PLATFORM_ES_RAM_DISK_PERCENT_RESERVED 30 - -/** -** \cfeescfg Define Critical Data Store Size -** -** \par Description: -** Defines the Critical Data Store (CDS) area size in bytes size. The CDS is -** one of four memory areas that are preserved during a processor reset. -** NOTE: Changing this value changes memory allocation, and may -** require changes to platform specific values (in CFE_PSP) such as -** USER_RESERVED_MEM in VxWorks depending on the memory areas -** being used for preserved data and on OS specific behavior. -** -** \par Limits -** There is a lower limit of 8192 and an upper limit of UINT_MAX (4 Gigabytes) -** on this configuration parameter. -*/ -#define CFE_PLATFORM_ES_CDS_SIZE (128 * 1024) - -/** -** \cfeescfg Define User Reserved Memory Size -** -** \par Description: -** User Reserved Memory Size. This is the size in bytes of the cFE User -** reserved Memory area. This is a block of memory that is available for cFE -** application use. The address is obtained by calling -** #CFE_PSP_GetUserReservedArea. The User Reserved Memory is one of four memory -** areas that are preserved during a processor reset. -** NOTE: Changing this value changes memory allocation, and may -** require changes to platform specific values (in CFE_PSP) such as -** USER_RESERVED_MEM in VxWorks depending on the memory areas -** being used for preserved data and on OS specific behavior. -** -** \par Limits -** There is a lower limit of 1024 and an upper limit of UINT_MAX (4 Gigabytes) -** on this configuration parameter. -*/ -#define CFE_PLATFORM_ES_USER_RESERVED_SIZE (1024 * 1024) - -/** -** \cfeescfg Define ES Reset Area Size -** -** \par Description: -** The ES Reset Area Size. This is the size in bytes of the cFE Reset variable -** and log area. This is a block of memory used by the cFE to store the system -** log ER Log and critical reset variables. This is 4 of 4 of the memory areas -** that are preserved during a processor reset. -** Note: This area must be sized large enough to hold all of the data -** structures. It should be automatically sized based on the CFE_ES_ResetData_t -** type, but circular dependencies in the headers prevent it from being defined -** this way. -** NOTE: Changing this value changes memory allocation, and may -** require changes to platform specific values (in CFE_PSP) such as -** USER_RESERVED_MEM in VxWorks depending on the memory areas -** being used for preserved data and on OS specific behavior. -** -** \par Limits -** There is a lower limit of 153600 (150KBytes) and an upper limit of UINT_MAX -** (4 Gigabytes) on this configuration parameter. -*/ -#define CFE_PLATFORM_ES_RESET_AREA_SIZE (170 * 1024) - -/** -** \cfeescfg Define Memory Pool Alignment Size -** -** \par Description: -** Ensures that buffers obtained from a memory pool are aligned -** to a certain minimum block size. Note the allocator will always -** align to the minimum required by the CPU architecture. This may -** be set greater than the CPU requirement as desired for optimal -** performance. -** -** For some architectures/applications it may be beneficial to set this -** to the cache line size of the target CPU, or to use special SIMD -** instructions that require a more stringent memory alignment. -** -** \par Limits -** This must always be a power of 2, as it is used as a binary address mask. -*/ -#define CFE_PLATFORM_ES_MEMPOOL_ALIGN_SIZE_MIN 4 - -/** -** \cfeescfg ES Nonvolatile Startup Filename -** -** \par Description: -** The value of this constant defines the path and name of the file that -** contains a list of modules that will be loaded and started by the cFE after -** the cFE finishes its startup sequence. -** -** \par Limits -** The length of each string, including the NULL terminator cannot exceed the -** #OS_MAX_PATH_LEN value. -*/ -#define CFE_PLATFORM_ES_NONVOL_STARTUP_FILE "/cf/cfe_es_startup.scr" - -/** -** \cfeescfg ES Volatile Startup Filename -** -** \par Description: -** The value of this constant defines the path and name of the file that -** contains a list of modules that will be loaded and started by the cFE after -** the cFE finishes its startup sequence. -** -** \par Limits -** The length of each string, including the NULL terminator cannot exceed the -** #OS_MAX_PATH_LEN value. -*/ -#define CFE_PLATFORM_ES_VOLATILE_STARTUP_FILE "/ram/cfe_es_startup.scr" - -/** -** \cfeescfg Default Application Information Filename -** -** \par Description: -** The value of this constant defines the filename used to store information -** pertaining to all of the Applications that are registered with Executive -** Services. This filename is used only when no filename is specified in the -** the command to query all system apps. -** -** \par Limits -** The length of each string, including the NULL terminator cannot exceed the -** #OS_MAX_PATH_LEN value. -*/ -#define CFE_PLATFORM_ES_DEFAULT_APP_LOG_FILE "/ram/cfe_es_app_info.log" - -/** -** \cfeescfg Default Application Information Filename -** -** \par Description: -** The value of this constant defines the filename used to store information -** pertaining to all of the Applications that are registered with Executive -** Services. This filename is used only when no filename is specified in the -** the command to query all system tasks. -** -** \par Limits -** The length of each string, including the NULL terminator cannot exceed the -** #OS_MAX_PATH_LEN value. -*/ -#define CFE_PLATFORM_ES_DEFAULT_TASK_LOG_FILE "/ram/cfe_es_taskinfo.log" - -/** -** \cfeescfg Default System Log Filename -** -** \par Description: -** The value of this constant defines the filename used to store important -** information (as ASCII text strings) that might not be able to be sent in an -** Event Message. This filename is used only when no filename is specified in -** the command to dump the system log. No file specified in the cmd means the -** first character in the cmd filename is a NULL terminator (zero). -** -** \par Limits -** The length of each string, including the NULL terminator cannot exceed the -** #OS_MAX_PATH_LEN value. -*/ -#define CFE_PLATFORM_ES_DEFAULT_SYSLOG_FILE "/ram/cfe_es_syslog.log" - -/** -** \cfeescfg Default Exception and Reset (ER) Log Filename -** -** \par Description: -** The value of this constant defines the filename used to store the -** Exception and Reset (ER) Log. This filename is used only when no filename is -** specified in the command to dump the ER log. No file specified in the cmd -** means the first character in the cmd filename is a NULL terminator (zero). -** -** \par Limits -** The length of each string, including the NULL terminator cannot exceed the -** #OS_MAX_PATH_LEN value. -*/ -#define CFE_PLATFORM_ES_DEFAULT_ER_LOG_FILE "/ram/cfe_erlog.log" - -/** -** \cfeescfg Default Performance Data Filename -** -** \par Description: -** The value of this constant defines the filename used to store the -** Performance Data. This filename is used only when no filename is specified -** in the command to stop performance data collecting. -** -** \par Limits -** The length of each string, including the NULL terminator cannot exceed the -** #OS_MAX_PATH_LEN value. -*/ -#define CFE_PLATFORM_ES_DEFAULT_PERF_DUMP_FILENAME "/ram/cfe_es_perf.dat" - -/** -** \cfeescfg Default Critical Data Store Registry Filename -** -** \par Description: -** The value of this constant defines the filename used to store the -** Critical Data Store Registry. This filename is used only when no filename is -** specified in the command to stop performance data collecting. -** -** \par Limits -** The length of each string, including the NULL terminator cannot exceed the -** #OS_MAX_PATH_LEN value. -*/ -#define CFE_PLATFORM_ES_DEFAULT_CDS_REG_DUMP_FILE "/ram/cfe_cds_reg.log" - -/** -** \cfeescfg Define Default System Log Mode following Power On Reset -** -** \par Description: -** Defines the default mode for the operation of the ES System log following a power -** on reset. The log may operate in either Overwrite mode = 0, where once the -** log becomes full the oldest message in the log will be overwritten, or -** Discard mode = 1, where once the log becomes full the contents of the log are -** preserved and the new event is discarded. This constant may hold a value of -** either 0 or 1 depending on the desired default. -** Overwrite Mode = 0, Discard Mode = 1. -** -** \par Limits -** There is a lower limit of 0 and an upper limit of 1 on this configuration -** parameter. -*/ -#define CFE_PLATFORM_ES_DEFAULT_POR_SYSLOG_MODE 0 - -/** -** \cfeescfg Define Default System Log Mode following Processor Reset -** -** \par Description: -** Defines the default mode for the operation of the ES System log following a -** processor reset. The log may operate in either Overwrite mode = 0, where once -** the log becomes full the oldest message in the log will be overwritten, or -** Discard mode = 1, where once the log becomes full the contents of the log are -** preserved and the new event is discarded. This constant may hold a value of -** either 0 or 1 depending on the desired default. -** Overwrite Mode = 0, Discard Mode = 1. -** -** \par Limits -** There is a lower limit of 0 and an upper limit of 1 on this configuration -** parameter. -*/ -#define CFE_PLATFORM_ES_DEFAULT_PR_SYSLOG_MODE 1 - -/** -** \cfeescfg Define Max Size of Performance Data Buffer -** -** \par Description: -** Defines the maximum size of the performance data buffer. Units are number of -** performance data entries. An entry is defined by a 32 bit data word followed -** by a 64 bit time stamp. -** -** \par Limits -** There is a lower limit of 1025. There are no restrictions on the upper limit -** however, the maximum buffer size is system dependent and should be verified. -** The units are number of entries. An entry is defined by a 32 bit data word followed -** by a 64 bit time stamp. -*/ -#define CFE_PLATFORM_ES_PERF_DATA_BUFFER_SIZE 10000 - -/** -** \cfeescfg Define Filter Mask Setting for Disabling All Performance Entries -** -** \par Description: -** Defines the filter mask for disabling all performance entries. The value is a -** bit mask. For each bit, 0 means the corresponding entry is disabled and -** 1 means it is enabled. -*/ -#define CFE_PLATFORM_ES_PERF_FILTMASK_NONE 0 - -/** -** \cfeescfg Define Filter Mask Setting for Enabling All Performance Entries -** -** \par Description: -** Defines the filter mask for enabling all performance entries. The value is a -** bit mask. For each bit, 0 means the corresponding entry is disabled and -** 1 means it is enabled. -*/ -#define CFE_PLATFORM_ES_PERF_FILTMASK_ALL ~CFE_PLATFORM_ES_PERF_FILTMASK_NONE - -/** -** \cfeescfg Define Default Filter Mask Setting for Performance Data Buffer -** -** \par Description: -** Defines the default filter mask for the performance data buffer. The value is a -** bit mask. For each bit, 0 means the corresponding entry is disabled and 1 -** means it is enabled. -** -*/ -#define CFE_PLATFORM_ES_PERF_FILTMASK_INIT CFE_PLATFORM_ES_PERF_FILTMASK_ALL - -/** -** \cfeescfg Define Default Filter Trigger Setting for Disabling All Performance Entries -** -** \par Description: -** Defines the default trigger mask for disabling all performance data entries. The value -** is a bit mask. For each bit, 0 means the trigger for the corresponding entry is -** disabled and 1 means it is enabled. -** -*/ -#define CFE_PLATFORM_ES_PERF_TRIGMASK_NONE 0 - -/** -** \cfeescfg Define Filter Trigger Setting for Enabling All Performance Entries -** -** \par Description: -** Defines the trigger mask for enabling all performance data entries. The value is -** a bit mask. For each bit, 0 means the trigger for the corresponding entry is -** disabled and 1 means it is enabled. -** -*/ -#define CFE_PLATFORM_ES_PERF_TRIGMASK_ALL ~CFE_PLATFORM_ES_PERF_TRIGMASK_NONE - -/** -** \cfeescfg Define Default Filter Trigger Setting for Performance Data Buffer -** -** \par Description: -** Defines the default trigger mask for the performance data buffer. The value is a -** 32-bit mask. For each bit, 0 means the trigger for the corresponding entry is -** disabled and 1 means it is enabled. -** -*/ -#define CFE_PLATFORM_ES_PERF_TRIGMASK_INIT CFE_PLATFORM_ES_PERF_TRIGMASK_NONE - -/** -** \cfeescfg Define Performance Analyzer Child Task Priority -** -** \par Description: -** This parameter defines the priority of the child task spawned by the -** Executive Services to write performance data to a file. Lower numbers -** are higher priority, with 1 being the highest priority in the case of a -** child task. -** -** \par Limits -** Valid range for a child task is 1 to 255 however, the priority cannot -** be higher (lower number) than the ES parent application priority. -*/ -#define CFE_PLATFORM_ES_PERF_CHILD_PRIORITY 200 - -/** -** \cfeescfg Define Performance Analyzer Child Task Stack Size -** -** \par Description: -** This parameter defines the stack size of the child task spawned by the -** Executive Services to write performance data to a file. -** -** \par Limits -** It is recommended this parameter be greater than or equal to 4KB. This parameter -** is limited by the maximum value allowed by the data type. In this case, the data -** type is an unsigned 32-bit integer, so the valid range is 0 to 0xFFFFFFFF. -*/ -#define CFE_PLATFORM_ES_PERF_CHILD_STACK_SIZE 4096 - -/** -** \cfeescfg Define Performance Analyzer Child Task Delay -** -** \par Description: -** This parameter defines the delay time (in milliseconds) between performance -** data file writes performed by the Executive Services Performance Analyzer -** Child Task. -** -** \par Limits -** It is recommended this parameter be greater than or equal to 20ms. This parameter -** is limited by the maximum value allowed by the data type. In this case, the data -** type is an unsigned 32-bit integer, so the valid range is 0 to 0xFFFFFFFF. -*/ -#define CFE_PLATFORM_ES_PERF_CHILD_MS_DELAY 20 - -/** -** \cfeescfg Define Performance Analyzer Child Task Number of Entries Between Delay -** -** \par Description: -** This parameter defines the number of performance analyzer entries the Performance -** Analyzer Child Task will write to the file between delays. -** -*/ -#define CFE_PLATFORM_ES_PERF_ENTRIES_BTWN_DLYS 50 - -/** -** \cfeescfg Define Default Stack Size for an Application -** -** \par Description: -** This parameter defines a default stack size. This parameter is used by the -** cFE Core Applications. -** -** \par Limits -** There is a lower limit of 2048. There are no restrictions on the upper limit -** however, the maximum stack size is system dependent and should be verified. -** Most operating systems provide tools for measuring the amount of stack used by a -** task during operation. It is always a good idea to verify that no more than 1/2 -** of the stack is used. -*/ -#define CFE_PLATFORM_ES_DEFAULT_STACK_SIZE 8192 - -/** -** \cfeescfg Define EVS Task Priority -** -** \par Description: -** Defines the cFE_EVS Task priority. -** -** \par Limits -** Not Applicable -*/ -#define CFE_PLATFORM_EVS_START_TASK_PRIORITY 61 - -/** -** \cfeescfg Define EVS Task Stack Size -** -** \par Description: -** Defines the cFE_EVS Task Stack Size -** -** \par Limits -** There is a lower limit of 2048 on this configuration parameter. There -** are no restrictions on the upper limit however, the maximum stack size -** is system dependent and should be verified. Most operating systems provide -** tools for measuring the amount of stack used by a task during operation. It -** is always a good idea to verify that no more than 1/2 of the stack is used. -*/ -#define CFE_PLATFORM_EVS_START_TASK_STACK_SIZE CFE_PLATFORM_ES_DEFAULT_STACK_SIZE - -/** -** \cfeescfg Define SB Task Priority -** -** \par Description: -** Defines the cFE_SB Task priority. -** -** \par Limits -** Not Applicable -*/ -#define CFE_PLATFORM_SB_START_TASK_PRIORITY 64 - -/** -** \cfeescfg Define SB Task Stack Size -** -** \par Description: -** Defines the cFE_SB Task Stack Size -** -** \par Limits -** There is a lower limit of 2048 on this configuration parameter. There -** are no restrictions on the upper limit however, the maximum stack size -** is system dependent and should be verified. Most operating systems provide -** tools for measuring the amount of stack used by a task during operation. It -** is always a good idea to verify that no more than 1/2 of the stack is used. -*/ -#define CFE_PLATFORM_SB_START_TASK_STACK_SIZE CFE_PLATFORM_ES_DEFAULT_STACK_SIZE - -/** -** \cfeescfg Define ES Task Priority -** -** \par Description: -** Defines the cFE_ES Task priority. -** -** \par Limits -** Not Applicable -*/ -#define CFE_PLATFORM_ES_START_TASK_PRIORITY 68 - -/** -** \cfeescfg Define ES Task Stack Size -** -** \par Description: -** Defines the cFE_ES Task Stack Size -** -** \par Limits -** There is a lower limit of 2048 on this configuration parameter. There -** are no restrictions on the upper limit however, the maximum stack size -** is system dependent and should be verified. Most operating systems provide -** tools for measuring the amount of stack used by a task during operation. It -** is always a good idea to verify that no more than 1/2 of the stack is used. -*/ -#define CFE_PLATFORM_ES_START_TASK_STACK_SIZE CFE_PLATFORM_ES_DEFAULT_STACK_SIZE - -/** -** \cfetimecfg Define TIME Task Priorities -** -** \par Description: -** Defines the cFE_TIME Task priority. -** Defines the cFE_TIME Tone Task priority. -** Defines the cFE_TIME 1HZ Task priority. -** -** \par Limits -** There is a lower limit of zero and an upper limit of 255 on these -** configuration parameters. Remember that the meaning of each task -** priority is inverted -- a "lower" number has a "higher" priority. -*/ -#define CFE_PLATFORM_TIME_START_TASK_PRIORITY 60 -#define CFE_PLATFORM_TIME_TONE_TASK_PRIORITY 25 -#define CFE_PLATFORM_TIME_1HZ_TASK_PRIORITY 25 - -/** -** \cfetimecfg Define TIME Task Stack Sizes -** -** \par Description: -** Defines the cFE_TIME Main Task Stack Size -** Defines the cFE_TIME Tone Task Stack Size -** Defines the cFE_TIME 1HZ Task Stack Size -** -** \par Limits -** There is a lower limit of 2048 on these configuration parameters. There -** are no restrictions on the upper limit however, the maximum stack size -** is system dependent and should be verified. Most operating systems provide -** tools for measuring the amount of stack used by a task during operation. It -** is always a good idea to verify that no more than 1/2 of the stack is used. -*/ -#define CFE_PLATFORM_TIME_START_TASK_STACK_SIZE CFE_PLATFORM_ES_DEFAULT_STACK_SIZE -#define CFE_PLATFORM_TIME_TONE_TASK_STACK_SIZE 4096 -#define CFE_PLATFORM_TIME_1HZ_TASK_STACK_SIZE 8192 - -/** -** \cfeescfg Define TBL Task Priority -** -** \par Description: -** Defines the cFE_TBL Task priority. -** -** \par Limits -** Not Applicable -*/ -#define CFE_PLATFORM_TBL_START_TASK_PRIORITY 70 - -/** -** \cfeescfg Define TBL Task Stack Size -** -** \par Description: -** Defines the cFE_TBL Task Stack Size -** -** \par Limits -** There is a lower limit of 2048 on this configuration parameter. There -** are no restrictions on the upper limit however, the maximum stack size -** is system dependent and should be verified. Most operating systems provide -** tools for measuring the amount of stack used by a task during operation. It -** is always a good idea to verify that no more than 1/2 of the stack is used. -*/ -#define CFE_PLATFORM_TBL_START_TASK_STACK_SIZE CFE_PLATFORM_ES_DEFAULT_STACK_SIZE - -/** -** \cfeescfg Define Maximum Number of Registered CDS Blocks -** -** \par Description: -** Maximum number of registered CDS Blocks -** -** \par Limits -** There is a lower limit of 8. There are no restrictions on the upper limit -** however, the maximum number of CDS entries is system dependent and -** should be verified. -*/ -#define CFE_PLATFORM_ES_CDS_MAX_NUM_ENTRIES 512 - -/** -** \cfeescfg Define Number of Processor Resets Before a Power On Reset -** -** \par Description: -** Number of Processor Resets before a Power On Reset is called. If set to 2, -** then 2 processor resets will occur, and the 3rd processor reset will be a -** power on reset instead. -** -** \par Limits -** There is a lower limit of 0. There are no restrictions on the upper limit -** however, the maximum number of processor resets may be system dependent and -** should be verified. -*/ -#define CFE_PLATFORM_ES_MAX_PROCESSOR_RESETS 2 - -/** \cfeescfg Maximum number of block sizes in pool structures -** -** \par Description: -** The upper limit for the number of block sizes supported in the generic -** pool implementation, which in turn implements the memory pools and CDS. -** -** \par Limits: -** Must be at least one. No specific upper limit, but the number is -** anticipated to be reasonably small (i.e. tens, not hundreds). Large -** values have not been tested. -** -** The ES and CDS block size lists must correlate with this value -*/ -#define CFE_PLATFORM_ES_POOL_MAX_BUCKETS 17 - -/** \cfeescfg Maximum number of memory pools -** -** \par Description: -** The upper limit for the number of memory pools that can concurrently -** exist within the system. -** -** The CFE_SB and CFE_TBL core subsystems each define a memory pool. -** -** Individual applications may also create memory pools, so this value -** should be set sufficiently high enough to support the applications -** being used on this platform. -** -** \par Limits: -** Must be at least 2 to support CFE core - SB and TBL pools. No -** specific upper limit. -*/ -#define CFE_PLATFORM_ES_MAX_MEMORY_POOLS 10 - -/** -** \cfeescfg Define Default ES Memory Pool Block Sizes -** -** \par Description: -** Default Intermediate ES Memory Pool Block Sizes. If an application -** is using the CFE_ES Memory Pool APIs (#CFE_ES_PoolCreate, #CFE_ES_PoolCreateNoSem, -** #CFE_ES_GetPoolBuf and #CFE_ES_PutPoolBuf) but finds these sizes -** inappropriate for their use, they may wish to use the #CFE_ES_PoolCreateEx -** API to specify their own intermediate block sizes -** -** \par Limits -** These sizes MUST be increasing and MUST be an integral multiple of 4. Also, -** CFE_PLATFORM_ES_MAX_BLOCK_SIZE must be larger than CFE_MISSION_SB_MAX_SB_MSG_SIZE and both -** CFE_PLATFORM_TBL_MAX_SNGL_TABLE_SIZE and CFE_PLATFORM_TBL_MAX_DBL_TABLE_SIZE. Note that if Table -** Services have been removed from the CFE, the table size limits are still -** enforced although the table size definitions may be reduced. -*/ -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_01 8 -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_02 16 -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_03 32 -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_04 48 -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_05 64 -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_06 96 -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_07 128 -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_08 160 -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_09 256 -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_10 512 -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_11 1024 -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_12 2048 -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_13 4096 -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_14 8192 -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_15 16384 -#define CFE_PLATFORM_ES_MEM_BLOCK_SIZE_16 32768 -#define CFE_PLATFORM_ES_MAX_BLOCK_SIZE 80000 - -/** -** \cfeescfg Define ES Critical Data Store Memory Pool Block Sizes -** -** \par Description: -** Intermediate ES Critical Data Store Memory Pool Block Sizes -** -** \par Limits -** These sizes MUST be increasing and MUST be an integral multiple of 4. -*/ -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_01 8 -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_02 16 -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_03 32 -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_04 48 -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_05 64 -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_06 96 -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_07 128 -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_08 160 -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_09 256 -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_10 512 -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_11 1024 -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_12 2048 -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_13 4096 -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_14 8192 -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_15 16384 -#define CFE_PLATFORM_ES_CDS_MEM_BLOCK_SIZE_16 32768 -#define CFE_PLATFORM_ES_CDS_MAX_BLOCK_SIZE 80000 - -/** -** \cfeevscfg Define Maximum Number of Event Filters per Application -** -** \par Description: -** Maximum number of events that may be filtered per application. -** -** \par Limits -** There are no restrictions on the lower and upper limits however, -** the maximum number of event filters is system dependent and should be -** verified. -*/ -#define CFE_PLATFORM_EVS_MAX_EVENT_FILTERS 8 - -/** -** \cfeevscfg Maximum number of event before squelching -** -** \par Description: -** Maximum number of events that may be emitted per app per second. -** Setting this to 0 will cause events to be unrestricted. -** -** \par Limits -** This number must be less than or equal to INT_MAX/1000 -*/ -#define CFE_PLATFORM_EVS_MAX_APP_EVENT_BURST 32 - -/** -** \cfeevscfg Sustained number of event messages per second per app before squelching -** -** \par Description: -** Sustained number of events that may be emitted per app per second. -** -** \par Limits -** This number must be less than or equal to #CFE_PLATFORM_EVS_MAX_APP_EVENT_BURST. -** Values lower than 8 may cause functional and unit test failures. -*/ -#define CFE_PLATFORM_EVS_APP_EVENTS_PER_SEC 8 - -/** -** \cfeevscfg Default Event Log Filename -** -** \par Description: -** The value of this constant defines the filename used to store the Event -** Services local event log. This filename is used only when no filename is -** specified in the command to dump the event log. -** -** \par Limits -** The length of each string, including the NULL terminator cannot exceed the -** #OS_MAX_PATH_LEN value. -*/ -#define CFE_PLATFORM_EVS_DEFAULT_LOG_FILE "/ram/cfe_evs.log" - -/** -** \cfeevscfg Maximum Number of Events in EVS Local Event Log -** -** \par Description: -** Dictates the EVS local event log capacity. Units are the number of events. -** -** \par Limits -** There are no restrictions on the lower and upper limits however, -** the maximum log size is system dependent and should be verified. -*/ -#define CFE_PLATFORM_EVS_LOG_MAX 20 - -/** -** \cfeevscfg Default EVS Application Data Filename -** -** \par Description: -** The value of this constant defines the filename used to store the EVS -** Application Data(event counts/filtering information). This filename is -** used only when no filename is specified in the command to dump the event -** log. -** -** \par Limits -** The length of each string, including the NULL terminator cannot exceed the -** #OS_MAX_PATH_LEN value. -*/ -#define CFE_PLATFORM_EVS_DEFAULT_APP_DATA_FILE "/ram/cfe_evs_app.dat" - -/** -** \cfeevscfg Default EVS Output Port State -** -** \par Description: -** Defines the default port state (enabled or disabled) for the four output -** ports defined within the Event Service. Port 1 is usually the uart output -** terminal. To enable a port, set the proper bit to a 1. Bit 0 is port 1, -** bit 1 is port2 etc. -** -** \par Limits -** The valid settings are 0x0 to 0xF. -*/ -#define CFE_PLATFORM_EVS_PORT_DEFAULT 0x0001 - -/** -** \cfeevscfg Default EVS Event Type Filter Mask -** -** \par Description: -** Defines a state of on or off for all four event types. The term event -** 'type' refers to the criticality level and may be Debug, Informational, -** Error or Critical. Each event type has a bit position. (bit 0 = Debug, -** bit 1 = Info, bit 2 = Error, bit 3 = Critical). This is a global setting, -** meaning it applies to all applications. To filter an event type, set its -** bit to zero. For example, -** 0xE means Debug = OFF, Info = ON, Error = ON, Critical = ON -** -** \par Limits -** The valid settings are 0x0 to 0xF. -*/ -#define CFE_PLATFORM_EVS_DEFAULT_TYPE_FLAG 0xE - -/** -** \cfeevscfg Default EVS Local Event Log Mode -** -** \par Description: -** Defines a state of overwrite(0) or discard(1) for the operation of the -** EVS local event log. The log may operate in either Overwrite mode = 0, -** where once the log becomes full the oldest event in the log will be -** overwritten, or Discard mode = 1, where once the log becomes full the -** contents of the log are preserved and the new event is discarded. -** Overwrite Mode = 0, Discard Mode = 1. -** -** \par Limits -** The valid settings are 0 or 1 -*/ -#define CFE_PLATFORM_EVS_DEFAULT_LOG_MODE 1 - -/** -** \cfeevscfg Default EVS Message Format Mode -** -** \par Description: -** Defines the default message format (long or short) for event messages being -** sent to the ground. Choose between #CFE_EVS_MsgFormat_LONG or -** #CFE_EVS_MsgFormat_SHORT. -** -** \par Limits -** The valid settings are #CFE_EVS_MsgFormat_LONG or #CFE_EVS_MsgFormat_SHORT -*/ -#define CFE_PLATFORM_EVS_DEFAULT_MSG_FORMAT_MODE CFE_EVS_MsgFormat_LONG - -/* Platform Configuration Parameters for Table Service (TBL) */ - -/** -** \cfetblcfg Size of Table Services Table Memory Pool -** -** \par Description: -** Defines the TOTAL size of the memory pool that cFE Table Services allocates -** from the system. The size must be large enough to provide memory for each -** registered table, the inactive buffers for double buffered tables and for -** the shared inactive buffers for single buffered tables. -** -** \par Limits -** The cFE does not place a limit on the size of this parameter. -*/ -#define CFE_PLATFORM_TBL_BUF_MEMORY_BYTES 524288 - -/** -** \cfetblcfg Maximum Size Allowed for a Double Buffered Table -** -** \par Description: -** Defines the maximum allowed size (in bytes) of a double buffered table. -** -** \par Limits -** The cFE does not place a limit on the size of this parameter but it must be -** less than half of #CFE_PLATFORM_TBL_BUF_MEMORY_BYTES. -*/ -#define CFE_PLATFORM_TBL_MAX_DBL_TABLE_SIZE 16384 - -/** -** \cfetblcfg Maximum Size Allowed for a Single Buffered Table -** -** \par Description: -** Defines the maximum allowed size (in bytes) of a single buffered table. -** \b NOTE: This size determines the size of all shared table buffers. -** Therefore, this size will be multiplied by #CFE_PLATFORM_TBL_MAX_SIMULTANEOUS_LOADS -** below when allocating memory for shared tables. -** -** \par Limits -** The cFE does not place a limit on the size of this parameter but it must be -** small enough to allow for #CFE_PLATFORM_TBL_MAX_SIMULTANEOUS_LOADS number of tables -** to fit into #CFE_PLATFORM_TBL_BUF_MEMORY_BYTES. -*/ -#define CFE_PLATFORM_TBL_MAX_SNGL_TABLE_SIZE 16384 - -/** -** \cfetblcfg Maximum Number of Tables Allowed to be Registered -** -** \par Description: -** Defines the maximum number of tables supported by this processor's Table Services. -** -** \par Limits -** This number must be less than 32767. It should be recognized that this parameter -** determines the size of the Table Registry. An excessively high number will waste -** memory. -*/ -#define CFE_PLATFORM_TBL_MAX_NUM_TABLES 128 - -/** -** \cfetblcfg Maximum Number of Critical Tables that can be Registered -** -** \par Description: -** Defines the maximum number of critical tables supported by this processor's Table Services. -** -** \par Limits -** This number must be less than 32767. It should be recognized that this parameter -** determines the size of the Critical Table Registry which is maintained in the Critical -** Data Store. An excessively high number will waste Critical Data Store memory. Therefore, -** this number must not exceed the value defined in CFE_ES_CDS_MAX_CRITICAL_TABLES. -*/ -#define CFE_PLATFORM_TBL_MAX_CRITICAL_TABLES 32 - -/** -** \cfetblcfg Maximum Number of Table Handles -** -** \par Description: -** Defines the maximum number of Table Handles. -** -** \par Limits -** This number must be less than 32767. This number must be at least as big as -** the number of tables (#CFE_PLATFORM_TBL_MAX_NUM_TABLES) and should be set higher if tables -** are shared between applications. -*/ -#define CFE_PLATFORM_TBL_MAX_NUM_HANDLES 256 - -/** -** \cfetblcfg Maximum Number of Simultaneous Loads to Support -** -** \par Description: -** Defines the maximum number of single buffered tables that can be -** loaded simultaneously. This number is used to determine the number -** of shared buffers to allocate. -** -** \par Limits -** This number must be less than 32767. An excessively high number will -** degrade system performance and waste memory. A number less than 5 is -** suggested but not required. -*/ -#define CFE_PLATFORM_TBL_MAX_SIMULTANEOUS_LOADS 4 - -/** -** \cfetblcfg Maximum Number of Simultaneous Table Validations -** -** \par Description: -** Defines the maximum number of pending validations that -** the Table Services can handle at any one time. When a -** table has a validation function, a validation request is -** made of the application to perform that validation. This -** number determines how many of those requests can be -** outstanding at any one time. -** -** \par Limits -** This number must be less than 32767. An excessively high number will -** degrade system performance and waste memory. A number less than 20 is -** suggested but not required. -*/ -#define CFE_PLATFORM_TBL_MAX_NUM_VALIDATIONS 10 - -/** -** \cfetblcfg Default Filename for a Table Registry Dump -** -** \par Description: -** Defines the file name used to store the table registry when -** no filename is specified in the dump registry command. -** -** \par Limits -** The length of each string, including the NULL terminator cannot exceed the -** #OS_MAX_PATH_LEN value. -*/ -#define CFE_PLATFORM_TBL_DEFAULT_REG_DUMP_FILE "/ram/cfe_tbl_reg.log" - -/** -** \cfetblcfg Number of Spacecraft ID's specified for validation -** -** \par Description: -** Defines the number of specified spacecraft ID values that -** are verified during table loads. If the number is zero -** then no validation of the spacecraft ID field in the table -** file header is performed when tables are loaded. Non-zero -** values indicate how many values from the list of spacecraft -** ID's defined below are compared to the spacecraft ID field -** in the table file header. The ELF2CFETBL tool may be used -** to create table files with specified spacecraft ID values. -** -** \par Limits -** This number must be greater than or equal to zero and -** less than or equal to 2. -*/ -#define CFE_PLATFORM_TBL_VALID_SCID_COUNT 0 - -/* macro to construct 32 bit value from 4 chars */ -#define CFE_PLATFORM_TBL_U32FROM4CHARS(_C1, _C2, _C3, _C4) \ - ((uint32)(_C1) << 24 | (uint32)(_C2) << 16 | (uint32)(_C3) << 8 | (uint32)(_C4)) - -/** -** \cfetblcfg Spacecraft ID values used for table load validation -** -** \par Description: -** Defines the spacecraft ID values used for validating the -** spacecraft ID field in the table file header. To be valid, -** the spacecraft ID specified in the table file header must -** match one of the values defined here. -** -** \par Limits -** This value can be any 32 bit unsigned integer. -*/ -#define CFE_PLATFORM_TBL_VALID_SCID_1 (0x42) -#define CFE_PLATFORM_TBL_VALID_SCID_2 (CFE_PLATFORM_TBL_U32FROM4CHARS('a', 'b', 'c', 'd')) - -/** -** \cfetblcfg Number of Processor ID's specified for validation -** -** \par Description: -** Defines the number of specified processor ID values that -** are verified during table loads. If the number is zero -** then no validation of the processor ID field in the table -** file header is performed when tables are loaded. Non-zero -** values indicate how many values from the list of processor -** ID's defined below are compared to the processor ID field -** in the table file header. The ELF2CFETBL tool may be used -** to create table files with specified processor ID values. -** -** \par Limits -** This number must be greater than or equal to zero and -** less than or equal to 4. -*/ -#define CFE_PLATFORM_TBL_VALID_PRID_COUNT 0 - -/** -** \cfetblcfg Processor ID values used for table load validation -** -** \par Description: -** Defines the processor ID values used for validating the -** processor ID field in the table file header. To be valid, -** the spacecraft ID specified in the table file header must -** match one of the values defined here. -** -** \par Limits -** This value can be any 32 bit unsigned integer. -*/ -#define CFE_PLATFORM_TBL_VALID_PRID_1 (1) -#define CFE_PLATFORM_TBL_VALID_PRID_2 (CFE_PLATFORM_TBL_U32FROM4CHARS('a', 'b', 'c', 'd')) -#define CFE_PLATFORM_TBL_VALID_PRID_3 0 -#define CFE_PLATFORM_TBL_VALID_PRID_4 0 - -/** \cfeescfg Poll timer for startup sync delay -** -** \par Description: -** During startup, some tasks may need to synchronize their own initialization -** with the initialization of other applications in the system. -** -** CFE ES implements an API to accomplish this, that performs a task delay (sleep) -** while polling the overall system state until other tasks are ready. -** -** This value controls the amount of time that the CFE_ES_ApplicationSyncDelay -** will sleep between each check of the system state. This should be large enough -** to allow other tasks to run, but not so large as to noticeably delay the startup -** completion. -** -** Units are in milliseconds -** -** \par Limits: -** Must be defined as an integer value that is greater than -** or equal to zero. -*/ -#define CFE_PLATFORM_ES_STARTUP_SYNC_POLL_MSEC 50 - -/** \cfeescfg CFE core application startup timeout -** -** \par Description: -** The upper limit for the amount of time that the cFE core applications -** (ES, SB, EVS, TIME, TBL) are each allotted to reach their respective -** "ready" states. -** -** The CFE "main" thread starts individual tasks for each of the core applications -** (except FS). Each of these must perform some initialization work before the -** next core application can be started, so the main thread waits to ensure that the -** application has reached the "ready" state before starting the next application. -** -** If any core application fails to start, then it indicates a major problem with -** the system and startup is aborted. -** -** Units are in milliseconds -** -** \par Limits: -** Must be defined as an integer value that is greater than -** or equal to zero. -** -*/ -#define CFE_PLATFORM_CORE_MAX_STARTUP_MSEC 30000 - -/** \cfeescfg Startup script timeout -** -** \par Description: -** The upper limit for the total amount of time that all apps listed in the CFE ES startup -** script may take to all become ready. -** -** Unlike the "core" app timeout, this is a soft limit; if the allotted time is exceeded, -** it probably indicates an issue with one of the apps, but does not cause CFE ES to take -** any additional action other than logging the event to the syslog. -** -** Units are in milliseconds -** -** \par Limits: -** Must be defined as an integer value that is greater than -** or equal to zero. -*/ -#define CFE_PLATFORM_ES_STARTUP_SCRIPT_TIMEOUT_MSEC 1000 - -#endif /* CPU1_PLATFORM_CFG_H */ diff --git a/cmake/sample_defs/sample_mission_cfg.h b/cmake/sample_defs/sample_mission_cfg.h deleted file mode 100644 index f59f23930..000000000 --- a/cmake/sample_defs/sample_mission_cfg.h +++ /dev/null @@ -1,565 +0,0 @@ -/************************************************************************ - * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” - * - * Copyright (c) 2020 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 - * - * Purpose: - * This header file contains the mission configuration parameters and - * typedefs with mission scope. - * - * Notes: - * The impact of changing these configurations from their default value is - * not yet documented. Changing these values may impact the performance - * and functionality of the system. - * - * Author: R.McGraw/SSI - * - */ - -#ifndef SAMPLE_MISSION_CFG_H -#define SAMPLE_MISSION_CFG_H - -/** -** \cfesbcfg Maximum SB Message Size -** -** \par Description: -** The following definition dictates the maximum message size allowed on -** the software bus. SB checks the pkt length field in the header of all -** messages sent. If the pkt length field indicates the message is larger -** than this define, SB sends an event and rejects the send. -** -** \par Limits -** This parameter has a lower limit of 6 (CCSDS primary header size). There -** are no restrictions on the upper limit however, the maximum message size is -** system dependent and should be verified. Total message size values that are -** checked against this configuration are defined by a 16 bit data word. -*/ -#define CFE_MISSION_SB_MAX_SB_MSG_SIZE 32768 - -/** -** \cfetimecfg Default Time Format -** -** \par Description: -** The following definitions select either UTC or TAI as the default -** (mission specific) time format. Although it is possible for an -** application to request time in a specific format, most callers -** should use CFE_TIME_GetTime(), which returns time in the default -** format. This avoids having to modify each individual caller -** when the default choice is changed. -** -** \par Limits -** if CFE_MISSION_TIME_CFG_DEFAULT_TAI is defined as true then CFE_MISSION_TIME_CFG_DEFAULT_UTC must be -** defined as false. -** if CFE_MISSION_TIME_CFG_DEFAULT_TAI is defined as false then CFE_MISSION_TIME_CFG_DEFAULT_UTC must be -** defined as true. -*/ -#define CFE_MISSION_TIME_CFG_DEFAULT_TAI true -#define CFE_MISSION_TIME_CFG_DEFAULT_UTC false - -/** -** \cfetimecfg Default Time Format -** -** \par Description: -** The following definition enables the use of a simulated time at -** the tone signal using a software bus message. -** -** \par Limits -** Not Applicable -*/ -#define CFE_MISSION_TIME_CFG_FAKE_TONE true - -/** -** \cfetimecfg Default Time and Tone Order -** -** \par Description: -** Time Services may be configured to expect the time at the tone -** data packet to either precede or follow the tone signal. If the -** time at the tone data packet follows the tone signal, then the -** data within the packet describes what the time "was" at the tone. -** If the time at the tone data packet precedes the tone signal, then -** the data within the packet describes what the time "will be" at -** the tone. One, and only one, of the following symbols must be set to true: -** - CFE_MISSION_TIME_AT_TONE_WAS -** - CFE_MISSION_TIME_AT_TONE_WILL_BE -** Note: If Time Services is defined as using a simulated tone signal -** (see #CFE_MISSION_TIME_CFG_FAKE_TONE above), then the tone data packet -** must follow the tone signal. -** -** \par Limits -** Either CFE_MISSION_TIME_AT_TONE_WAS or CFE_MISSION_TIME_AT_TONE_WILL_BE must be set to true. -** They may not both be true and they may not both be false. -*/ -#define CFE_MISSION_TIME_AT_TONE_WAS true -#define CFE_MISSION_TIME_AT_TONE_WILL_BE false - -/** -** \cfetimecfg Min and Max Time Elapsed -** -** \par Description: -** Based on the definition of Time and Tone Order -** (CFE_MISSION_TIME_AT_TONE_WAS/WILL_BE) either the "time at the tone" signal or -** data packet will follow the other. This definition sets the valid window -** of time for the second of the pair to lag behind the first. Time -** Services will invalidate both the tone and packet if the second does not -** arrive within this window following the first. -** -** For example, if the data packet follows the tone, it might be valid for -** the data packet to arrive between zero and 100,000 micro-seconds after -** the tone. But, if the tone follows the packet, it might be valid -** only if the packet arrived between 200,000 and 700,000 micro-seconds -** before the tone. -** -** Note: units are in micro-seconds -** -** \par Limits -** 0 to 999,999 decimal -*/ -#define CFE_MISSION_TIME_MIN_ELAPSED 0 -#define CFE_MISSION_TIME_MAX_ELAPSED 200000 - -/** -** \cfetimecfg Default Time Values -** -** \par Description: -** Default time values are provided to avoid problems due to time -** calculations performed after startup but before commands can be -** processed. For example, if the default time format is UTC then -** it is important that the sum of MET and STCF always exceed the -** value of Leap Seconds to prevent the UTC time calculation -** (time = MET + STCF - Leap Seconds) from resulting in a negative -** (very large) number.

-** Some past missions have also created known (albeit wrong) default -** timestamps. For example, assume the epoch is defined as Jan 1, 1970 -** and further assume the default time values are set to create a timestamp -** of Jan 1, 2000. Even though the year 2000 timestamps are wrong, it -** may be of value to keep the time within some sort of bounds acceptable -** to the software.

-** Note: Sub-second units are in micro-seconds (0 to 999,999) and -** all values must be defined -** -** \par Limits -** Not Applicable -*/ -#define CFE_MISSION_TIME_DEF_MET_SECS 1000 -#define CFE_MISSION_TIME_DEF_MET_SUBS 0 - -#define CFE_MISSION_TIME_DEF_STCF_SECS 1000000 -#define CFE_MISSION_TIME_DEF_STCF_SUBS 0 - -#define CFE_MISSION_TIME_DEF_LEAPS 37 - -#define CFE_MISSION_TIME_DEF_DELAY_SECS 0 -#define CFE_MISSION_TIME_DEF_DELAY_SUBS 1000 - -/** -** \cfetimecfg Default EPOCH Values -** -** \par Description: -** Default ground time epoch values -** Note: these values are used only by the CFE_TIME_Print() API function -** -** \par Limits -** Year - must be within 136 years -** Day - Jan 1 = 1, Feb 1 = 32, etc. -** Hour - 0 to 23 -** Minute - 0 to 59 -** Second - 0 to 59 -** Micros - 0 to 999999 -*/ -#define CFE_MISSION_TIME_EPOCH_YEAR 1980 -#define CFE_MISSION_TIME_EPOCH_DAY 1 -#define CFE_MISSION_TIME_EPOCH_HOUR 0 -#define CFE_MISSION_TIME_EPOCH_MINUTE 0 -#define CFE_MISSION_TIME_EPOCH_SECOND 0 -#define CFE_MISSION_TIME_EPOCH_MICROS 0 - -/** -** \cfetimecfg Time File System Factor -** -** \par Description: -** Define the s/c vs file system time conversion constant... -** -** Note: this value is intended for use only by CFE TIME API functions to -** convert time values based on the ground system epoch (s/c time) to -** and from time values based on the file system epoch (fs time). -** -** FS time = S/C time + factor -** S/C time = FS time - factor -** -** Worksheet: -** -** S/C epoch = Jan 1, 2005 (LRO ground system epoch) -** FS epoch = Jan 1, 1980 (vxWorks DOS file system epoch) -** -** Delta = 25 years, 0 days, 0 hours, 0 minutes, 0 seconds -** -** Leap years = 1980, 1984, 1988, 1992, 1996, 2000, 2004 -** (divisible by 4 -- except if by 100 -- unless also by 400) -** -** 1 year = 31,536,000 seconds -** 1 day = 86,400 seconds -** 1 hour = 3,600 seconds -** 1 minute = 60 seconds -** -** 25 years = 788,400,000 seconds -** 7 extra leap days = 604,800 seconds -** -** total delta = 789,004,800 seconds -** -** \par Limits -** Not Applicable -*/ -#define CFE_MISSION_TIME_FS_FACTOR 789004800 - -/** -** \cfeescfg Maximum Length of CDS Name -** -** \par Description: -** Indicates the maximum length (in characters) of the CDS name ('CDSName') -** portion of a Full CDS Name of the following form: -** "ApplicationName.CDSName" -** -** This length does not need to include an extra character for NULL termination. -** -** \par Limits -** This value should be kept as a multiple of 4, to maintain alignment of -** any possible neighboring fields without implicit padding. -** -*/ -#define CFE_MISSION_ES_CDS_MAX_NAME_LENGTH 16 - -/** -** \cfeevscfg Maximum Event Message Length -** -** \par Description: -** Indicates the maximum length (in characters) of the formatted text -** string portion of an event message -** -** This length does not need to include an extra character for NULL termination. -** -** \par Limits -** Not Applicable -*/ -#define CFE_MISSION_EVS_MAX_MESSAGE_LENGTH 122 - -#ifndef CFE_OMIT_DEPRECATED_6_8 -/* These names have been converted to an enum in cfe_es_api_typedefs.h */ - -/** \name Checksum/CRC algorithm identifiers */ - -#define CFE_MISSION_ES_CRC_8 CFE_ES_CrcType_CRC_8 /* 1 */ -#define CFE_MISSION_ES_CRC_16 CFE_ES_CrcType_CRC_16 /* 2 */ -#define CFE_MISSION_ES_CRC_32 CFE_ES_CrcType_CRC_32 /* 3 */ - -#endif - -/** -** \cfeescfg Mission Default CRC algorithm -** -** \par Description: -** Indicates the which CRC algorithm should be used as the default -** for verifying the contents of Critical Data Stores and when calculating -** Table Image data integrity values. -** -** \par Limits -** Currently only CFE_ES_CrcType_CRC_16 is supported (see brief in CFE_ES_CrcType_Enum -** definition in cfe_es_api_typedefs.h) -*/ -#define CFE_MISSION_ES_DEFAULT_CRC CFE_ES_CrcType_CRC_16 - -/** -** \cfetblcfg Maximum Table Name Length -** -** \par Description: -** Indicates the maximum length (in characters) of the table name -** ('TblName') portion of a Full Table Name of the following -** form: "ApplicationName.TblName" -** -** This length does not need to include an extra character for NULL termination. -** -** \par Limits -** This value should be kept as a multiple of 4, to maintain alignment of -** any possible neighboring fields without implicit padding. -*/ -#define CFE_MISSION_TBL_MAX_NAME_LENGTH 16 - -/** -** \cfemissioncfg cFE Portable Message Numbers for Commands -** -** \par Description: -** Portable message numbers for the cFE command messages -** NOTE: cFE MsgIds are the sum of the base numbers and the portable msg -** numbers. -** -** \par Limits -** Not Applicable -*/ -#define CFE_MISSION_EVS_CMD_MSG 1 -#define CFE_MISSION_TEST_CMD_MSG 2 -#define CFE_MISSION_SB_CMD_MSG 3 -#define CFE_MISSION_TBL_CMD_MSG 4 -#define CFE_MISSION_TIME_CMD_MSG 5 -#define CFE_MISSION_ES_CMD_MSG 6 - -#define CFE_MISSION_ES_SEND_HK_MSG 8 -#define CFE_MISSION_EVS_SEND_HK_MSG 9 -/* Offset 10 is available */ -#define CFE_MISSION_SB_SEND_HK_MSG 11 -#define CFE_MISSION_TBL_SEND_HK_MSG 12 -#define CFE_MISSION_TIME_SEND_HK_MSG 13 - -#define CFE_MISSION_SB_SUB_RPT_CTRL_MSG 14 - -#define CFE_MISSION_TIME_TONE_CMD_MSG 16 -#define CFE_MISSION_TIME_1HZ_CMD_MSG 17 - -/** -** \cfemissioncfg cFE Portable Message Numbers for Global Messages -** -** \par Description: -** Portable message numbers for the cFE global messages -** NOTE: cFE MsgIds are the sum of the base numbers and the portable msg -** numbers. -** -** \par Limits -** Not Applicable -*/ -#define CFE_MISSION_TIME_DATA_CMD_MSG 0 -#define CFE_MISSION_TIME_SEND_CMD_MSG 2 - -/** -** \cfemissioncfg cFE Portable Message Numbers for Telemetry -** -** \par Description: -** Portable message numbers for the cFE telemetry messages -** NOTE: cFE MsgIds are the sum of the base numbers and the portable msg -** numbers. -** -** \par Limits -** Not Applicable -*/ -#define CFE_MISSION_ES_HK_TLM_MSG 0 -#define CFE_MISSION_EVS_HK_TLM_MSG 1 -#define CFE_MISSION_TEST_HK_TLM_MSG 2 -#define CFE_MISSION_SB_HK_TLM_MSG 3 -#define CFE_MISSION_TBL_HK_TLM_MSG 4 -#define CFE_MISSION_TIME_HK_TLM_MSG 5 -#define CFE_MISSION_TIME_DIAG_TLM_MSG 6 - -#define CFE_MISSION_EVS_LONG_EVENT_MSG_MSG 8 -#define CFE_MISSION_EVS_SHORT_EVENT_MSG_MSG 9 -#define CFE_MISSION_SB_STATS_TLM_MSG 10 -#define CFE_MISSION_ES_APP_TLM_MSG 11 -#define CFE_MISSION_TBL_REG_TLM_MSG 12 -#define CFE_MISSION_SB_ALLSUBS_TLM_MSG 13 -#define CFE_MISSION_SB_ONESUB_TLM_MSG 14 -#define CFE_MISSION_ES_MEMSTATS_TLM_MSG 16 - -/** -** \cfeescfg Mission Max Apps in a message -** -** \par Description: -** Indicates the maximum number of apps in a telemetry housekeeping message -** -** This affects the layout of command/telemetry messages but does not affect run -** time behavior or internal allocation. -** -** \par Limits -** All CPUs within the same SB domain (mission) must share the same definition -** Note this affects the size of messages, so it must not cause any message -** to exceed the max length. -*/ -#define CFE_MISSION_ES_MAX_APPLICATIONS 16 - -/** -** \cfeescfg Define Max Number of Performance IDs for messages -** -** \par Description: -** Defines the maximum number of perf ids allowed in command/telemetry messages -** -** This affects the layout of command/telemetry messages but does not affect run -** time behavior or internal allocation. -** -** \par Limits -** All CPUs within the same SB domain (mission) must share the same definition -** Note this affects the size of messages, so it must not cause any message -** to exceed the max length. -** -*/ -#define CFE_MISSION_ES_PERF_MAX_IDS 128 - -/** \cfeescfg Maximum number of block sizes in pool structures -** -** \par Description: -** The upper limit for the number of block sizes supported in the generic -** pool implementation, which in turn implements the memory pools and CDS. -** This definition is used as the array size with the pool stats structure, -** and therefore should be consistent across all CPUs in a mission, as well -** as with the ground station. -** -** There is also a platform-specific limit which may be fewer than this -** value. -** -** \par Limits: -** Must be at least one. No specific upper limit, but the number is -** anticipated to be reasonably small (i.e. tens, not hundreds). Large -** values have not been tested. -** -** -*/ -#define CFE_MISSION_ES_POOL_MAX_BUCKETS 17 - -/** -** \cfetblcfg Maximum Length of Full Table Name in messages -** -** \par Description: -** Indicates the maximum length (in characters) of the entire table name -** within software bus messages, in "AppName.TableName" notation. -** -** This affects the layout of command/telemetry messages but does not affect run -** time behavior or internal allocation. -** -** \par Limits -** All CPUs within the same SB domain (mission) must share the same definition -** Note this affects the size of messages, so it must not cause any message -** to exceed the max length. -** -** This value should be kept as a multiple of 4, to maintain alignment of -** any possible neighboring fields without implicit padding. -*/ -#define CFE_MISSION_TBL_MAX_FULL_NAME_LEN (CFE_MISSION_TBL_MAX_NAME_LENGTH + CFE_MISSION_MAX_API_LEN + 4) - -/** -** \cfesbcfg Maximum Number of pipes that SB command/telemetry messages may hold -** -** \par Description: -** Dictates the maximum number of unique Pipes the SB message definitions will hold. -** -** This affects the layout of command/telemetry messages but does not affect run -** time behavior or internal allocation. -** -** \par Limits -** All CPUs within the same SB domain (mission) must share the same definition -** Note this affects the size of messages, so it must not cause any message -** to exceed the max length. -** -*/ -#define CFE_MISSION_SB_MAX_PIPES 64 - -/** -** \cfemissioncfg cFE Maximum length for pathnames within data exchange structures -** -** \par Description: -** The value of this constant dictates the size of pathnames within all structures -** used for external data exchange, such as Software bus messages and table definitions. -** This is typically the same as OS_MAX_PATH_LEN but that is OSAL dependent -- -** and as such it definable on a per-processor/OS basis and hence may be different -** across multiple processors. It is recommended to set this to the value of the -** largest OS_MAX_PATH_LEN in use on any CPU on the mission. -** -** This affects only the layout of command/telemetry messages and table definitions; -** internal allocation may use the platform-specific OS_MAX_PATH_LEN value. -** -** This length must include an extra character for NULL termination. -** -** \par Limits -** All CPUs within the same SB domain (mission) and ground tools must share the -** same definition. -** Note this affects the size of messages, so it must not cause any message -** to exceed the max length. -** -** This value should be kept as a multiple of 4, to maintain alignment of -** any possible neighboring fields without implicit padding. -*/ -#define CFE_MISSION_MAX_PATH_LEN 64 - -/** -** \cfemissioncfg cFE Maximum length for filenames within data exchange structures -** -** \par Description: -** The value of this constant dictates the size of filenames within all structures -** used for external data exchange, such as Software bus messages and table definitions. -** This is typically the same as OS_MAX_FILE_LEN but that is OSAL dependent -- -** and as such it definable on a per-processor/OS basis and hence may be different -** across multiple processors. It is recommended to set this to the value of the -** largest OS_MAX_FILE_LEN in use on any CPU on the mission. -** -** This affects only the layout of command/telemetry messages and table definitions; -** internal allocation may use the platform-specific OS_MAX_FILE_LEN value. -** -** This length must include an extra character for NULL termination. -** -** \par Limits -** All CPUs within the same SB domain (mission) and ground tools must share the -** same definition. -** Note this affects the size of messages, so it must not cause any message -** to exceed the max length. -** -** This value should be kept as a multiple of 4, to maintain alignment of -** any possible neighboring fields without implicit padding. -*/ -#define CFE_MISSION_MAX_FILE_LEN 20 - -/** -** \cfemissioncfg cFE Maximum length for API names within data exchange structures -** -** \par Description: -** The value of this constant dictates the size of filenames within all structures -** used for external data exchange, such as Software bus messages and table definitions. -** This is typically the same as OS_MAX_API_LEN but that is OSAL dependent -- -** and as such it definable on a per-processor/OS basis and hence may be different -** across multiple processors. It is recommended to set this to the value of the -** largest OS_MAX_API_LEN in use on any CPU on the mission. -** -** This affects only the layout of command/telemetry messages and table definitions; -** internal allocation may use the platform-specific OS_MAX_API_LEN value. -** -** This length must include an extra character for NULL termination. -** -** \par Limits -** All CPUs within the same SB domain (mission) must share the same definition -** Note this affects the size of messages, so it must not cause any message -** to exceed the max length. -** -** This value should be kept as a multiple of 4, to maintain alignment of -** any possible neighboring fields without implicit padding. -*/ -#define CFE_MISSION_MAX_API_LEN 20 - -/** -** \cfeescfg Maximum Length of Full CDS Name in messages -** -** \par Description: -** Indicates the maximum length (in characters) of the entire CDS name -** of the following form: "ApplicationName.CDSName" -** -** This affects the layout of command/telemetry messages but does not affect run -** time behavior or internal allocation. -** -** \par Limits -** All CPUs within the same SB domain (mission) must share the same definition -** Note this affects the size of messages, so it must not cause any message -** to exceed the max length. -** -** This value should be kept as a multiple of 4, to maintain alignment of -** any possible neighboring fields without implicit padding. -*/ -#define CFE_MISSION_ES_CDS_MAX_FULL_NAME_LEN (CFE_MISSION_ES_CDS_MAX_NAME_LENGTH + CFE_MISSION_MAX_API_LEN + 4) - -#endif /* SAMPLE_MISSION_CFG_H */ diff --git a/docs/src/cfe_frontpage.dox b/docs/src/cfe_frontpage.dox index 9d6fb21ee..d25c48d58 100644 --- a/docs/src/cfe_frontpage.dox +++ b/docs/src/cfe_frontpage.dox @@ -16,7 +16,7 @@
  • \subpage cfeesovr
  • \subpage cfeescmds
  • \subpage cfeestlm -
  • \subpage cfe_es_events.h "ES Event Message Reference" +
  • \subpage cfe_es_eventids.h "ES Event Message Reference"
  • \subpage cfeescfg
  • Events Services (EVS) @@ -24,7 +24,7 @@
  • \subpage cfeevsovr
  • \subpage cfeevscmds
  • \subpage cfeevstlm -
  • \subpage cfe_evs_events.h "EVS Event Message Reference" +
  • \subpage cfe_evs_eventids.h "EVS Event Message Reference"
  • \subpage cfeevscfg
  • Software Bus Services (SB) @@ -32,7 +32,7 @@
  • \subpage cfesbovr
  • \subpage cfesbcmds
  • \subpage cfesbtlm -
  • \subpage cfe_sb_events.h "SB Event Message Reference" +
  • \subpage cfe_sb_eventids.h "SB Event Message Reference"
  • \subpage cfesbcfg
  • Table Services (TBL) @@ -40,7 +40,7 @@
  • \subpage cfetblovr
  • \subpage cfetblcmds
  • \subpage cfetbltlm -
  • \subpage cfe_tbl_events.h "TBL Event Message Reference" +
  • \subpage cfe_tbl_eventids.h "TBL Event Message Reference"
  • \subpage cfetblcfg
  • Time Services (TIME) @@ -48,7 +48,7 @@
  • \subpage cfetimeovr
  • \subpage cfetimecmds
  • \subpage cfetimetlm -
  • \subpage cfe_time_events.h "TIME Event Message Reference" +
  • \subpage cfe_time_eventids.h "TIME Event Message Reference"
  • \subpage cfetimecfg
  • \subpage cfeevents diff --git a/docs/src/cfe_sb.dox b/docs/src/cfe_sb.dox index f97aeb2f7..243b8f4b0 100644 --- a/docs/src/cfe_sb.dox +++ b/docs/src/cfe_sb.dox @@ -484,7 +484,7 @@ the condition is happening by viewing the counter in SB HK telemetry. If the condition is happening, you can view the SB filter information through the EVS App Data Main page by clicking the 'go to' button for SB. The event Id for these - events can be learned through a previous event or from the cfe_sb_events.h file. + events can be learned through a previous event or from the cfe_sb_eventids.h file. (Q) From dc0027e24fb8628510525e28b106b2b2b4fb2f22 Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 4 May 2023 15:55:12 -0400 Subject: [PATCH 13/14] Bump to v7.0.0-rc4+dev304 --- CHANGELOG.md | 6 ++++++ modules/core_api/fsw/inc/cfe_version.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e5f5e828..870ca5c88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Development Build: v7.0.0-rc4+dev304 +- reorganize headers +- Update XML files per interoperability testing +- uniqueness of tbl target names +- See , , and + ## Development Build: v7.0.0-rc4+dev287 - document CFS component file naming - Add EVS port timestamp and simplify port selection diff --git a/modules/core_api/fsw/inc/cfe_version.h b/modules/core_api/fsw/inc/cfe_version.h index d00df42b9..40ab3c02f 100644 --- a/modules/core_api/fsw/inc/cfe_version.h +++ b/modules/core_api/fsw/inc/cfe_version.h @@ -26,7 +26,7 @@ #define CFE_VERSION_H /* Development Build Macro Definitions */ -#define CFE_BUILD_NUMBER 287 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */ +#define CFE_BUILD_NUMBER 304 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */ #define CFE_BUILD_BASELINE "v7.0.0-rc4" /**< @brief Development: Reference git tag for build number */ /* See \ref cfsversions for definitions */ From ca5106fbe382740058b48d1a29b11af04cfa9fd3 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Thu, 4 May 2023 16:47:30 -0400 Subject: [PATCH 14/14] Fix #2320, do not assume cfe_test is present This is an optional component and thus may not be part of the build. Hotfix based on workflow testing. --- modules/cfe_testcase/src/sb_sendrecv_test.c | 1 + modules/cfe_testcase/src/sb_subscription_test.c | 1 + modules/cfe_testcase/src/tbl_information_test.c | 1 + modules/cfe_testcase/src/tbl_registration_test.c | 1 + modules/core_api/config/default_cfe_msgids.h | 1 - 5 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/cfe_testcase/src/sb_sendrecv_test.c b/modules/cfe_testcase/src/sb_sendrecv_test.c index 79abe472e..81909d0e5 100644 --- a/modules/cfe_testcase/src/sb_sendrecv_test.c +++ b/modules/cfe_testcase/src/sb_sendrecv_test.c @@ -29,6 +29,7 @@ #include "cfe_test.h" #include "cfe_msgids.h" +#include "cfe_test_msgids.h" #define CFE_FT_STRINGBUF_SIZE 12 diff --git a/modules/cfe_testcase/src/sb_subscription_test.c b/modules/cfe_testcase/src/sb_subscription_test.c index 491c8d526..a55c73716 100644 --- a/modules/cfe_testcase/src/sb_subscription_test.c +++ b/modules/cfe_testcase/src/sb_subscription_test.c @@ -29,6 +29,7 @@ #include "cfe_test.h" #include "cfe_msgids.h" +#include "cfe_test_msgids.h" /* * This test procedure should be agnostic to specific MID values, but it should diff --git a/modules/cfe_testcase/src/tbl_information_test.c b/modules/cfe_testcase/src/tbl_information_test.c index 3b0988ac8..1a85f2bca 100644 --- a/modules/cfe_testcase/src/tbl_information_test.c +++ b/modules/cfe_testcase/src/tbl_information_test.c @@ -30,6 +30,7 @@ #include "cfe_test.h" #include "cfe_test_table.h" #include "cfe_msgids.h" +#include "cfe_test_msgids.h" void TestGetStatus(void) { diff --git a/modules/cfe_testcase/src/tbl_registration_test.c b/modules/cfe_testcase/src/tbl_registration_test.c index 68c3bfd58..d14c6c897 100644 --- a/modules/cfe_testcase/src/tbl_registration_test.c +++ b/modules/cfe_testcase/src/tbl_registration_test.c @@ -30,6 +30,7 @@ #include "cfe_test.h" #include "cfe_test_table.h" #include "cfe_msgids.h" +#include "cfe_test_msgids.h" int32 CallbackFunc(void *TblPtr) { diff --git a/modules/core_api/config/default_cfe_msgids.h b/modules/core_api/config/default_cfe_msgids.h index 300734644..e5759d437 100644 --- a/modules/core_api/config/default_cfe_msgids.h +++ b/modules/core_api/config/default_cfe_msgids.h @@ -37,6 +37,5 @@ #include "cfe_sb_msgids.h" #include "cfe_tbl_msgids.h" #include "cfe_time_msgids.h" -#include "cfe_test_msgids.h" #endif /* CFE_MSGIDS_H */