diff --git a/CHANGELOG.md b/CHANGELOG.md index c49b189ad..5a13ff859 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Development Build: v7.0.0-rc4+dev242 +- EDS Updates to match the current mainline +- Update UTs to use correct cmd types +- Move CRC types and convert to enum +- See , , and + ## Development Build: v7.0.0-rc4+dev233 - Replace CFE_MSG_CommandHeader_t w/ CFE_TBL_NoArgsCmd_t - See diff --git a/cmake/sample_defs/sample_mission_cfg.h b/cmake/sample_defs/sample_mission_cfg.h index ed2332b2c..f59f23930 100644 --- a/cmake/sample_defs/sample_mission_cfg.h +++ b/cmake/sample_defs/sample_mission_cfg.h @@ -258,14 +258,16 @@ */ #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 1 /**< \brief CRC ( 8 bit additive - returns 32 bit total) (Currently not implemented) */ -#define CFE_MISSION_ES_CRC_16 2 /**< \brief CRC (16 bit additive - returns 32 bit total) */ -#define CFE_MISSION_ES_CRC_32 \ - 3 /**< \brief CRC (32 bit additive - returns 32 bit total) (Currently not implemented) \ - */ -/** \} */ + +#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 @@ -276,9 +278,10 @@ ** Table Image data integrity values. ** ** \par Limits -** Currently only CFE_MISSION_ES_CRC_16 is supported (see #CFE_MISSION_ES_CRC_16) +** 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_MISSION_ES_CRC_16 +#define CFE_MISSION_ES_DEFAULT_CRC CFE_ES_CrcType_CRC_16 /** ** \cfetblcfg Maximum Table Name Length diff --git a/docs/cFE Application Developers Guide.md b/docs/cFE Application Developers Guide.md index 9a13ecc0d..f80ac237b 100644 --- a/docs/cFE Application Developers Guide.md +++ b/docs/cFE Application Developers Guide.md @@ -1293,24 +1293,28 @@ an API for a CRC calculation that can be used by all Applications on a mission. This function looks like the following: ```c -uint32 CFE_ES_CalculateCRC(void *pData, uint32 DataLength, uint32 InputCRC, uint32 TypeCRC); +uint32 CFE_ES_CalculateCRC(const void *DataPtr, size_t DataLength, uint32 InputCRC, CFE_ES_CrcType_Enum_t TypeCRC); ``` -where pData points to the first byte of an array of bytes that are to have +where DataPtr points to the first byte of an array of bytes that are to have the CRC calculated on, DataLength specifies the number of sequential bytes to include in the calculation, InputCRC is the initial value of the CRC and TypeCRC identifies which of the standard CRC polynomials to be used. Currently, there are the following types available: ``` -CFE_MISSION_ES_CRC_8 – an 8-bit additive checksum calculation that returns a 32-bit value -CFE_MISSION_ES_CRC_16 – a 16-bit additive checksum calculation that returns a 32-bit value -CFE_MISSION_ES_CRC_32 – a 32-bit additive checksum calculation that returns a 32-bit value -CFE_MISSION_ES_DEFAULT_CRC – the mission specified default CRC calculation +CFE_ES_CrcType_CRC_8 – an 8-bit additive checksum calculation that returns a 32-bit value +CFE_ES_CrcType_CRC_16 – a 16-bit additive checksum calculation that returns a 32-bit value +CFE_ES_CrcType_CRC_32 – a 32-bit additive checksum calculation that returns a 32-bit value +CFE_MISSION_ES_DEFAULT_CRC – the mission specified default CRC calculation (currently + this is set to CFE_ES_CrcType_CRC_16 in sample_mission_cfg.h) ``` -Unless there is a specific interface with a specified CRC calculation, -Applications must use the CFE_MISSION_ES_DEFAULT_CRC type. +Unless there is a specific interface with a specified CRC calculation, applications +must use the CFE_MISSION_ES_DEFAULT_CRC type. + +Currently only CFE_ES_CrcType_CRC_16 is supported. CFE_ES_CrcType_CRC_8 and CFE_ES_CrcType_CRC_32 are yet +to be implemented. ## 5.11 File System Functions diff --git a/modules/cfe_testcase/eds/cfe_testcase.xml b/modules/cfe_testcase/eds/cfe_testcase.xml new file mode 100644 index 000000000..31c8cdfa7 --- /dev/null +++ b/modules/cfe_testcase/eds/cfe_testcase.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/cfe_testcase/src/es_misc_test.c b/modules/cfe_testcase/src/es_misc_test.c index 32fd8f8a5..83d34f1e6 100644 --- a/modules/cfe_testcase/src/es_misc_test.c +++ b/modules/cfe_testcase/src/es_misc_test.c @@ -41,19 +41,19 @@ void TestCalculateCRC(void) UtAssert_VOIDCALL(Result = CFE_ES_CalculateCRC(Data, sizeof(Data), 0, CFE_MISSION_ES_DEFAULT_CRC)); UtAssert_MIR("Confirm mission default CRC of \"%s\" is %lu", Data, (unsigned long)Result); - UtAssert_VOIDCALL(Result = CFE_ES_CalculateCRC(Data, sizeof(Data), inputCrc, CFE_MISSION_ES_CRC_16)); + UtAssert_VOIDCALL(Result = CFE_ES_CalculateCRC(Data, sizeof(Data), inputCrc, CFE_ES_CrcType_CRC_16)); UtAssert_MIR("Confirm CRC16 of \"%s\" with input CRC of %lu is %lu", Data, (unsigned long)inputCrc, (unsigned long)Result); - UtAssert_VOIDCALL(Result = CFE_ES_CalculateCRC(Data, sizeof(Data), 0, CFE_MISSION_ES_CRC_8)); + UtAssert_VOIDCALL(Result = CFE_ES_CalculateCRC(Data, sizeof(Data), 0, CFE_ES_CrcType_CRC_8)); UtAssert_MIR("Confirm CRC8 of \"%s\" is %lu", Data, (unsigned long)Result); - UtAssert_VOIDCALL(Result = CFE_ES_CalculateCRC(Data, sizeof(Data), 0, CFE_MISSION_ES_CRC_32)); + UtAssert_VOIDCALL(Result = CFE_ES_CalculateCRC(Data, sizeof(Data), 0, CFE_ES_CrcType_CRC_32)); UtAssert_MIR("Confirm CRC32 of \"%s\" is %lu", Data, (unsigned long)Result); /* NULL input or 0 size returns input crc */ - UtAssert_UINT32_EQ(CFE_ES_CalculateCRC(NULL, sizeof(Data), inputCrc, CFE_MISSION_ES_CRC_16), inputCrc); - UtAssert_UINT32_EQ(CFE_ES_CalculateCRC(Data, 0, inputCrc, CFE_MISSION_ES_CRC_16), inputCrc); + UtAssert_UINT32_EQ(CFE_ES_CalculateCRC(NULL, sizeof(Data), inputCrc, CFE_ES_CrcType_CRC_16), inputCrc); + UtAssert_UINT32_EQ(CFE_ES_CalculateCRC(Data, 0, inputCrc, CFE_ES_CrcType_CRC_16), inputCrc); } void TestWriteToSysLog(void) diff --git a/modules/core_api/eds/base_types.xml b/modules/core_api/eds/base_types.xml index f5a495dca..009375352 100644 --- a/modules/core_api/eds/base_types.xml +++ b/modules/core_api/eds/base_types.xml @@ -102,44 +102,6 @@ - - - - - - - - - - diff --git a/modules/core_api/fsw/inc/cfe_es.h b/modules/core_api/fsw/inc/cfe_es.h index a7701f740..cac2c8f03 100644 --- a/modules/core_api/fsw/inc/cfe_es.h +++ b/modules/core_api/fsw/inc/cfe_es.h @@ -999,20 +999,20 @@ CFE_Status_t CFE_ES_WriteToSysLog(const char *SpecStringPtr, ...) OS_PRINTF(1, 2 ** a single value. Nominally, the user should set this value to zero. ** ** \param[in] TypeCRC One of the following CRC algorithm selections: -** \arg \c CFE_MISSION_ES_CRC_8 - (Not currently implemented) -** \arg \c CFE_MISSION_ES_CRC_16 - CRC-16/ARC
+** \arg \c CFE_ES_CrcType_CRC_8 - (Not currently implemented) +** \arg \c CFE_ES_CrcType_CRC_16 - CRC-16/ARC
** Polynomial: 0x8005
** Initialization: 0x0000
** Reflect Input/Output: true
** XorOut: 0x0000 -** \arg \c CFE_MISSION_ES_CRC_32 - (not currently implemented) +** \arg \c CFE_ES_CrcType_CRC_32 - (not currently implemented) ** ** \return The result of the CRC calculation on the specified memory block. ** If the TypeCRC is unimplemented will return 0. ** If DataPtr is null or DataLength is 0, will return InputCRC ** ******************************************************************************/ -uint32 CFE_ES_CalculateCRC(const void *DataPtr, size_t DataLength, uint32 InputCRC, uint32 TypeCRC); +uint32 CFE_ES_CalculateCRC(const void *DataPtr, size_t DataLength, uint32 InputCRC, CFE_ES_CrcType_Enum_t TypeCRC); /*****************************************************************************/ /** diff --git a/modules/core_api/fsw/inc/cfe_es_api_typedefs.h b/modules/core_api/fsw/inc/cfe_es_api_typedefs.h index 2e846b4ae..3b1ec6758 100644 --- a/modules/core_api/fsw/inc/cfe_es_api_typedefs.h +++ b/modules/core_api/fsw/inc/cfe_es_api_typedefs.h @@ -83,6 +83,18 @@ typedef CFE_ES_TaskEntryFuncPtr_t CFE_ES_ChildTaskMainFuncPtr_t; */ typedef void *CFE_ES_StackPointer_t; /* aka osal_stackptr_t in proposed OSAL change */ +/** + * \brief Checksum/CRC algorithm identifiers + * + * Currently only CFE_ES_CrcType_CRC_16 is supported. + */ +typedef enum CFE_ES_CrcType_Enum +{ + CFE_ES_CrcType_CRC_8 = 1, /**< \brief CRC ( 8 bit additive - returns 32 bit total) (Not currently implemented) */ + CFE_ES_CrcType_CRC_16 = 2, /**< \brief CRC (16 bit additive - returns 32 bit total) */ + CFE_ES_CrcType_CRC_32 = 3 /**< \brief CRC (32 bit additive - returns 32 bit total) (Not currently implemented) */ +} CFE_ES_CrcType_Enum_t; + /** * \brief Pool Alignment * diff --git a/modules/core_api/fsw/inc/cfe_version.h b/modules/core_api/fsw/inc/cfe_version.h index 6d48704d9..e31fe2ba3 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 233 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */ +#define CFE_BUILD_NUMBER 242 /**< @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 */ diff --git a/modules/core_api/ut-stubs/src/cfe_es_stubs.c b/modules/core_api/ut-stubs/src/cfe_es_stubs.c index 209df5e16..9dfdf261b 100644 --- a/modules/core_api/ut-stubs/src/cfe_es_stubs.c +++ b/modules/core_api/ut-stubs/src/cfe_es_stubs.c @@ -77,14 +77,14 @@ void CFE_ES_BackgroundWakeup(void) * Generated stub function for CFE_ES_CalculateCRC() * ---------------------------------------------------- */ -uint32 CFE_ES_CalculateCRC(const void *DataPtr, size_t DataLength, uint32 InputCRC, uint32 TypeCRC) +uint32 CFE_ES_CalculateCRC(const void *DataPtr, size_t DataLength, uint32 InputCRC, CFE_ES_CrcType_Enum_t TypeCRC) { UT_GenStub_SetupReturnBuffer(CFE_ES_CalculateCRC, uint32); UT_GenStub_AddParam(CFE_ES_CalculateCRC, const void *, DataPtr); UT_GenStub_AddParam(CFE_ES_CalculateCRC, size_t, DataLength); UT_GenStub_AddParam(CFE_ES_CalculateCRC, uint32, InputCRC); - UT_GenStub_AddParam(CFE_ES_CalculateCRC, uint32, TypeCRC); + UT_GenStub_AddParam(CFE_ES_CalculateCRC, CFE_ES_CrcType_Enum_t, TypeCRC); UT_GenStub_Execute(CFE_ES_CalculateCRC, Basic, NULL); diff --git a/modules/es/eds/cfe_es.xml b/modules/es/eds/cfe_es.xml index 0cb3701a8..0832cb034 100644 --- a/modules/es/eds/cfe_es.xml +++ b/modules/es/eds/cfe_es.xml @@ -50,12 +50,14 @@ + + @@ -65,6 +67,7 @@ + @@ -113,10 +116,97 @@ + + + This is the type that is used for any API accepting or returning an App ID + + + + + + This is the type that is used for any API accepting or returning a Task ID + + + + + + This is the type that is used for any API accepting or returning a Lib ID + + + + + + This is the type that is used for any API accepting or returning an Counter ID + + + + + + Data type used to hold Handles of Memory Pools + created via CFE_ES_PoolCreate and CFE_ES_PoolCreateNoSem + + + + + + Data type used to hold Handles of Critical Data Stores. See #CFE_ES_RegisterCDS + + + + + + @note the valid range is only 0-255 (same as OSAL) but + a wider type is used for backward compatibility + in binary formats of messages. + + + + + + + + + + For backward compatibility with existing CFE 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 + memory objects, but this will break compatibility with existing control + systems, and may also change the alignment/padding of messages. + + In either case this must be an unsigned type. + + + + + + + + + + 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. + + In either case this must be an unsigned type. + + 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. + + + + + + - - @@ -131,7 +221,7 @@ QueryAll Commands. - + \cfetlmmnemonic \ES_APP_ID @@ -171,37 +261,37 @@ \cfetlmmnemonic \ES_ADDRVALID - + \cfetlmmnemonic \ES_CODEADDR - + \cfetlmmnemonic \ES_CODESIZE - + \cfetlmmnemonic \ES_DATAADDR - + \cfetlmmnemonic \ES_DATASIZE - + \cfetlmmnemonic \ES_BSSADDR - + \cfetlmmnemonic \ES_BSSSIZE - + \cfetlmmnemonic \ES_STARTADDR @@ -211,12 +301,12 @@ \cfetlmmnemonic \ES_EXCEPTNACTN - + \cfetlmmnemonic \ES_PRIORITY - + \cfetlmmnemonic \ES_MAINTASKID @@ -239,6 +329,28 @@ + + + Structure that is used to provide information about a task. It is primarily + used for the Query All Tasks (#CFE_ES_QUERY_ALL_TASKS_CC) command. + + @note There is not currently a telemetry message directly containing this + data structure, but it does define the format of the data file generated + by the Query All Tasks command. Therefore it should be considered + part of the overall telemetry interface. + + + + + + + + + + + + + @@ -249,13 +361,13 @@ - + - + \cfetlmmnemonic \ES_POOLSIZE @@ -270,7 +382,7 @@ \cfetlmmnemonic \ES_BLKERRCTR - + \cfetlmmnemonic \ES_FREEBYTES @@ -292,16 +404,6 @@ - - - For command details, see #CFE_ES_SHELL_CMD_CC - - - - - - - @@ -423,7 +525,7 @@ - + @@ -444,7 +546,7 @@ - + \cfetlmmnemonic \ES_POOLHANDLE @@ -668,46 +770,31 @@ - - - - - \brief ASCII text string containing output from OS Shell - that was received in response to an OS Shell Command - - - + - - + - + - + - - - - - - - + - + \cfeescmd Executive Services No-Op @@ -743,11 +830,11 @@ None - + - + \cfeescmd Executive Services Reset Counters @@ -790,11 +877,11 @@ \sa #CFE_ES_RESET_PR_COUNT_CC - + - + \cfeescmd Executive Services Processor / Power-On Reset @@ -848,71 +935,14 @@ \sa #CFE_ES_RESET_PR_COUNT_CC, #CFE_ES_SET_MAX_PR_COUNT_CC - + - - - \cfeescmd Executive Services O/S Shell Command - - \par Description - - This command passes an ASCII string as a command line to the - underlying realtime operating system shell. Any response to - the command is both written to the shell command output file - and sent as a series of shell command output telemetry packets. - - If the shell command output filename argument is empty, then - #CFE_ES_DEFAULT_SHELL_FILENAME will be used as the filename. - \cfecmdmnemonic \ES_SHELL - - \par Command Structure - #CFE_ES_ShellCmd_t - - \par Command Verification - - Successful execution of this command may be verified with - the following telemetry: - - \b \c \ES_CMDPC - command execution counter will - increment - - The #CFE_ES_SHELL_INF_EID informational event message will be - generated - - \par Error Conditions - - This command may fail for the following reason(s): - - The command packet length is incorrect - - Failure to create the shell command output file - - The shell command started with ES_ but was not one of the - recognized cFE shell commands - - There was an error while performing a #OS_lseek on the shell command output file - - There was an error while redirecting the shell command response to the - shell command output file - - Evidence of failure may be found in the following telemetry: - - \b \c \ES_CMDEC - command error counter will increment - - the #CFE_ES_SHELL_ERR_EID error event message will be generated - - Additional information on the error should be found in the System Log - - \par Criticality - - This command should be used with caution. Interfering with the - operation of the underlying realtime operating system can cause - significant problems. - - - - - - - - - - + \cfeescmd Load and Start an Application @@ -962,14 +992,14 @@ \sa #CFE_ES_STOP_APP_CC, #CFE_ES_RESTART_APP_CC, #CFE_ES_RELOAD_APP_CC - + - + \cfeescmd Stop and Unload Application @@ -1023,14 +1053,14 @@ \sa #CFE_ES_START_APP_CC, #CFE_ES_RESTART_APP_CC, #CFE_ES_RELOAD_APP_CC - + - + \cfeescmd Stops and Restarts an Application @@ -1077,14 +1107,14 @@ \sa #CFE_ES_START_APP_CC, #CFE_ES_STOP_APP_CC, #CFE_ES_RELOAD_APP_CC - + - + \cfeescmd Stops, Unloads, Loads from a File and Restarts an Application @@ -1134,14 +1164,14 @@ \sa #CFE_ES_START_APP_CC, #CFE_ES_STOP_APP_CC, #CFE_ES_RESTART_APP_CC - + - + \cfeescmd Request Executive Services Information on a Specified Application @@ -1182,14 +1212,14 @@ \sa #CFE_ES_QUERY_ALL_CC, #CFE_ES_QUERY_ALL_TASKS_CC - + - + \cfeescmd Writes all Executive Services Information on All Applications to a File @@ -1235,14 +1265,14 @@ \sa #CFE_ES_QUERY_ONE_CC, #CFE_ES_QUERY_ALL_TASKS_CC - + - + \cfeescmd Clear Executive Services System Log @@ -1284,11 +1314,11 @@ #CFE_ES_OVERWRITE_SYSLOG_CC - + - + \cfeescmd Writes contents of Executive Services System Log to a File @@ -1299,7 +1329,7 @@ \cfecmdmnemonic \ES_WRITESYSLOG2FILE \par Command Structure - #CFE_ES_WriteSyslogCmd_t + #CFE_ES_WriteSysLogCmd_t \par Command Verification @@ -1335,14 +1365,14 @@ #CFE_ES_OVERWRITE_SYSLOG_CC - + - + \cfeescmd Clears the contents of the Exception and Reset Log @@ -1383,11 +1413,11 @@ \sa #CFE_ES_CLEAR_SYSLOG_CC, #CFE_ES_WRITE_SYSLOG_CC, #CFE_ES_WRITE_ERLOG_CC - + - + \cfeescmd Writes Exception and Reset Log to a File @@ -1433,14 +1463,14 @@ \sa #CFE_ES_CLEAR_SYSLOG_CC, #CFE_ES_WRITE_SYSLOG_CC, #CFE_ES_CLEAR_ERLOG_CC - + - + \cfeescmd Start Performance Analyzer @@ -1490,14 +1520,14 @@ \sa #CFE_ES_PERF_STOPDATA_CC, #CFE_ES_PERF_SETFILTERMASK_CC, #CFE_ES_PERF_SETTRIGMASK_CC - + - + \cfeescmd Stop Performance Analyzer @@ -1544,14 +1574,14 @@ \sa #CFE_ES_PERF_STARTDATA_CC, #CFE_ES_PERF_SETFILTERMASK_CC, #CFE_ES_PERF_SETTRIGMASK_CC - + - + \cfeescmd Set Performance Analyzer's Filter Masks @@ -1593,14 +1623,14 @@ \sa #CFE_ES_PERF_STARTDATA_CC, #CFE_ES_PERF_STOPDATA_CC, #CFE_ES_PERF_SETTRIGMASK_CC - + - + \cfeescmd Set Performance Analyzer's Trigger Masks @@ -1641,14 +1671,14 @@ \sa #CFE_ES_PERF_STARTDATA_CC, #CFE_ES_PERF_STOPDATA_CC, #CFE_ES_PERF_SETFILTERMASK_CC - + - + \cfeescmd Set Executive Services System Log Mode to Discard/Overwrite @@ -1693,14 +1723,14 @@ \sa #CFE_ES_CLEAR_SYSLOG_CC, #CFE_ES_WRITE_SYSLOG_CC - + - + \cfeescmd Resets the Processor Reset Counter to Zero @@ -1744,11 +1774,11 @@ \sa #CFE_ES_SET_MAX_PR_COUNT_CC, #CFE_ES_RESET_CC - + - + \cfeescmd Configure the Maximum Number of Processor Resets before a Power-On Reset @@ -1793,14 +1823,14 @@ \sa #CFE_ES_RESET_PR_COUNT_CC - + - + \cfeescmd Delete Critical Data Store @@ -1847,14 +1877,14 @@ \sa #CFE_ES_DUMP_CDS_REG_CC, #CFE_TBL_DELETE_CDS_CC - + - + \cfeescmd Telemeter Memory Pool Statistics @@ -1898,14 +1928,14 @@ used in the command is correct. - + - + \cfeescmd Dump Critical Data Store Registry to a File @@ -1950,14 +1980,14 @@ \sa #CFE_ES_DELETE_CDS_CC, #CFE_TBL_DELETE_CDS_CC - + - + \cfeescmd Writes a list of All Executive Services Tasks to a File @@ -2003,13 +2033,32 @@ \sa #CFE_ES_QUERY_ALL_CC, CFE_ES_QUERY_ONE_CC - + + + + Structure that is used to provide information about a critical data store. + It is primarily used for the Dump CDS registry (#CFE_ES_DUMP_CDS_REGISTRY_CC) + command. + + @note There is not currently a telemetry message directly containing this + data structure, but it does define the format of the data file generated + by the Dump CDS registry command. Therefore it should be considered + part of the overall telemetry interface. + + + + + + + + + @@ -2023,7 +2072,7 @@ - + @@ -2036,11 +2085,6 @@ - - - - - @@ -2053,7 +2097,6 @@ - @@ -2062,7 +2105,6 @@ - diff --git a/modules/es/fsw/inc/cfe_es_msg.h b/modules/es/fsw/inc/cfe_es_msg.h index 5c2285ebb..b320df61e 100644 --- a/modules/es/fsw/inc/cfe_es_msg.h +++ b/modules/es/fsw/inc/cfe_es_msg.h @@ -1073,6 +1073,7 @@ 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 diff --git a/modules/es/fsw/src/cfe_es_api.c b/modules/es/fsw/src/cfe_es_api.c index 6ee3dd42c..2a9c2b8a1 100644 --- a/modules/es/fsw/src/cfe_es_api.c +++ b/modules/es/fsw/src/cfe_es_api.c @@ -1571,7 +1571,7 @@ CFE_Status_t CFE_ES_WriteToSysLog(const char *SpecStringPtr, ...) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -uint32 CFE_ES_CalculateCRC(const void *DataPtr, size_t DataLength, uint32 InputCRC, uint32 TypeCRC) +uint32 CFE_ES_CalculateCRC(const void *DataPtr, size_t DataLength, uint32 InputCRC, CFE_ES_CrcType_Enum_t TypeCRC) { uint32 i; int16 Index; @@ -1610,11 +1610,11 @@ uint32 CFE_ES_CalculateCRC(const void *DataPtr, size_t DataLength, uint32 InputC switch (TypeCRC) { - case CFE_MISSION_ES_CRC_32: + case CFE_ES_CrcType_CRC_32: CFE_ES_WriteToSysLog("%s: Calculate CRC32 not Implemented\n", __func__); break; - case CFE_MISSION_ES_CRC_16: + case CFE_ES_CrcType_CRC_16: Crc = (int16)(0xFFFF & InputCRC); BufPtr = (const uint8 *)DataPtr; @@ -1631,7 +1631,7 @@ uint32 CFE_ES_CalculateCRC(const void *DataPtr, size_t DataLength, uint32 InputC } break; - case CFE_MISSION_ES_CRC_8: + case CFE_ES_CrcType_CRC_8: CFE_ES_WriteToSysLog("%s: Calculate CRC8 not Implemented\n", __func__); break; diff --git a/modules/es/fsw/src/cfe_es_task.c b/modules/es/fsw/src/cfe_es_task.c index 06fad06b2..d31700d59 100644 --- a/modules/es/fsw/src/cfe_es_task.c +++ b/modules/es/fsw/src/cfe_es_task.c @@ -452,7 +452,7 @@ void CFE_ES_TaskPipe(CFE_SB_Buffer_t *SBBufPtr) ** Housekeeping telemetry request */ case CFE_ES_SEND_HK_MID: - CFE_ES_HousekeepingCmd((CFE_MSG_CommandHeader_t *)SBBufPtr); + CFE_ES_HousekeepingCmd((CFE_ES_SendHkCmd_t *)SBBufPtr); break; /* @@ -655,7 +655,7 @@ void CFE_ES_TaskPipe(CFE_SB_Buffer_t *SBBufPtr) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_HousekeepingCmd(const CFE_MSG_CommandHeader_t *data) +int32 CFE_ES_HousekeepingCmd(const CFE_ES_SendHkCmd_t *data) { OS_heap_prop_t HeapProp; int32 OsStatus; diff --git a/modules/es/fsw/src/cfe_es_task.h b/modules/es/fsw/src/cfe_es_task.h index 815152eaa..04bb495fd 100644 --- a/modules/es/fsw/src/cfe_es_task.h +++ b/modules/es/fsw/src/cfe_es_task.h @@ -128,7 +128,7 @@ void CFE_ES_BackgroundCleanup(void); /* ** ES Task message dispatch functions */ -int32 CFE_ES_HousekeepingCmd(const CFE_MSG_CommandHeader_t *data); +int32 CFE_ES_HousekeepingCmd(const CFE_ES_SendHkCmd_t *data); /*---------------------------------------------------------------------------------------*/ /** diff --git a/modules/es/ut-coverage/es_UT.c b/modules/es/ut-coverage/es_UT.c index 8453288d1..f59480b46 100644 --- a/modules/es/ut-coverage/es_UT.c +++ b/modules/es/ut-coverage/es_UT.c @@ -664,7 +664,7 @@ void ES_ResetUnitTest(void) * so it must be re-initialized here every time CFE_ES_Global is reset. */ CFE_ES_Global.ResetDataPtr = ES_UT_PersistentResetData; -} +} /* end ES_ResetUnitTest() */ void TestInit(void) { @@ -2466,7 +2466,9 @@ void TestTask(void) union { CFE_MSG_Message_t Msg; - CFE_MSG_CommandHeader_t NoArgsCmd; + CFE_ES_SendHkCmd_t SendHkCmd; + CFE_ES_NoopCmd_t NoopCmd; + CFE_ES_ResetCountersCmd_t ResetCountersCmd; CFE_ES_ClearSysLogCmd_t ClearSysLogCmd; CFE_ES_ClearERLogCmd_t ClearERLogCmd; CFE_ES_ResetPRCountCmd_t ResetPRCountCmd; @@ -2587,23 +2589,24 @@ void TestTask(void) /* Test a successful HK request */ ES_ResetUnitTest(); - UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoArgsCmd), UT_TPID_CFE_ES_SEND_HK); + UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.SendHkCmd), UT_TPID_CFE_ES_SEND_HK); UtAssert_NONZERO(CFE_ES_Global.TaskData.HkPacket.Payload.HeapBytesFree); /* Test the HK request with a get heap failure */ ES_ResetUnitTest(); UT_SetDeferredRetcode(UT_KEY(OS_HeapGetInfo), 1, -1); - UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoArgsCmd), UT_TPID_CFE_ES_SEND_HK); + UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.SendHkCmd), UT_TPID_CFE_ES_SEND_HK); UtAssert_ZERO(CFE_ES_Global.TaskData.HkPacket.Payload.HeapBytesFree); /* Test successful no-op command */ ES_ResetUnitTest(); - UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoArgsCmd), UT_TPID_CFE_ES_CMD_NOOP_CC); + UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoopCmd), UT_TPID_CFE_ES_CMD_NOOP_CC); CFE_UtAssert_EVENTSENT(CFE_ES_NOOP_INF_EID); /* Test successful reset counters command */ ES_ResetUnitTest(); - UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoArgsCmd), UT_TPID_CFE_ES_CMD_RESET_COUNTERS_CC); + UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.ResetCountersCmd), + UT_TPID_CFE_ES_CMD_RESET_COUNTERS_CC); CFE_UtAssert_EVENTSENT(CFE_ES_RESET_INF_EID); /* Test successful cFE restart */ @@ -3328,7 +3331,7 @@ void TestTask(void) /* Test the command pipe message process with an invalid command */ ES_ResetUnitTest(); - UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoArgsCmd), UT_TPID_CFE_ES_CMD_INVALID_CC); + UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoopCmd), UT_TPID_CFE_ES_CMD_INVALID_CC); CFE_UtAssert_EVENTSENT(CFE_ES_CC1_ERR_EID); /* Test sending a no-op command with an invalid command length */ @@ -3504,7 +3507,7 @@ void TestTask(void) /* Test error when sending Build Info event */ ES_ResetUnitTest(); UT_SetDeferredRetcode(UT_KEY(CFE_EVS_SendEvent), 1, CFE_EVS_INVALID_PARAMETER); - UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoArgsCmd), UT_TPID_CFE_ES_CMD_NOOP_CC); + UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoopCmd), UT_TPID_CFE_ES_CMD_NOOP_CC); CFE_UtAssert_PRINTF("Error sending build info event"); /* @@ -3518,7 +3521,7 @@ void TestTask(void) UT_SetHandlerFunction(UT_KEY(CFE_Config_IterateAll), ES_UT_Config_IterateAll, NULL); UtAssert_VOIDCALL(CFE_ES_TaskInit()); CFE_UtAssert_PRINTF("Error sending mission version event"); -} +} /* end TestTask */ void TestPerf(void) { @@ -4386,17 +4389,17 @@ void TestAPI(void) */ memset(Data, 1, sizeof(Data)); ES_ResetUnitTest(); - UtAssert_UINT32_EQ(CFE_ES_CalculateCRC(&Data, 12, 345353, CFE_MISSION_ES_CRC_8), 0); + UtAssert_UINT32_EQ(CFE_ES_CalculateCRC(&Data, 12, 345353, CFE_ES_CrcType_CRC_8), 0); /* Test calculating a CRC on a range of memory using CRC type 16 */ ES_ResetUnitTest(); - UtAssert_UINT32_EQ(CFE_ES_CalculateCRC(&Data, 12, 345353, CFE_MISSION_ES_CRC_16), 2688); + UtAssert_UINT32_EQ(CFE_ES_CalculateCRC(&Data, 12, 345353, CFE_ES_CrcType_CRC_16), 2688); /* Test calculating a CRC on a range of memory using CRC type 32 * NOTE: This capability is not currently implemented in cFE */ ES_ResetUnitTest(); - UtAssert_UINT32_EQ(CFE_ES_CalculateCRC(&Data, 12, 345353, CFE_MISSION_ES_CRC_32), 0); + UtAssert_UINT32_EQ(CFE_ES_CalculateCRC(&Data, 12, 345353, CFE_ES_CrcType_CRC_32), 0); /* Test calculating a CRC on a range of memory using an invalid CRC type */ @@ -4405,8 +4408,8 @@ void TestAPI(void) /* Test NULL and zero size */ ES_ResetUnitTest(); - UtAssert_UINT32_EQ(CFE_ES_CalculateCRC(NULL, 12, 345353, CFE_MISSION_ES_CRC_16), 345353); - UtAssert_UINT32_EQ(CFE_ES_CalculateCRC(&Data, 0, 345353, CFE_MISSION_ES_CRC_16), 345353); + UtAssert_UINT32_EQ(CFE_ES_CalculateCRC(NULL, 12, 345353, CFE_ES_CrcType_CRC_16), 345353); + UtAssert_UINT32_EQ(CFE_ES_CalculateCRC(&Data, 0, 345353, CFE_ES_CrcType_CRC_16), 345353); /* Test shared mutex take with a take error */ ES_ResetUnitTest(); @@ -5014,7 +5017,7 @@ void TestCDS() CFE_ES_Global.CDSIsAvailable = false; UtAssert_INT32_EQ(CFE_ES_GetCDSBlockIDByName(&CDSHandle, "NotNULL"), CFE_ES_NOT_IMPLEMENTED); UtAssert_INT32_EQ(CFE_ES_GetCDSBlockName(CDSName, CDSHandle, sizeof(CDSName)), CFE_ES_NOT_IMPLEMENTED); -} +} /* End TestCDS */ void TestCDSMempool(void) { diff --git a/modules/evs/eds/cfe_evs.xml b/modules/evs/eds/cfe_evs.xml index 4e5adc9bb..5a3146555 100644 --- a/modules/evs/eds/cfe_evs.xml +++ b/modules/evs/eds/cfe_evs.xml @@ -164,7 +164,7 @@ - + \cfetlmmnemonic \EVS_APPID @@ -305,28 +305,30 @@ - + - + + + - + - + - + \cfeevscmd Event Services No-Op @@ -354,11 +356,11 @@ None - + - + \cfeevscmd Event Services Reset Counters @@ -395,11 +397,11 @@ \sa #CFE_EVS_RESET_APP_COUNTER_CC - + - + \cfeevscmd Enable Event Type @@ -445,14 +447,14 @@ #CFE_EVS_DISABLE_APP_EVENT_TYPE_CC, #CFE_EVS_ENABLE_APP_EVENTS_CC, #CFE_EVS_DISABLE_APP_EVENTS_CC - + - + \cfeevscmd Disable Event Type @@ -499,14 +501,14 @@ #CFE_EVS_DISABLE_APP_EVENT_TYPE_CC, #CFE_EVS_ENABLE_APP_EVENTS_CC, #CFE_EVS_DISABLE_APP_EVENTS_CC - + - + \cfeevscmd Set Event Format Mode @@ -552,14 +554,14 @@ \sa - + - + \cfeevscmd Enable Application Event Type @@ -609,14 +611,14 @@ #CFE_EVS_DISABLE_APP_EVENT_TYPE_CC, #CFE_EVS_ENABLE_APP_EVENTS_CC, #CFE_EVS_DISABLE_APP_EVENTS_CC - + - + \cfeevscmd Disable Application Event Type @@ -666,14 +668,14 @@ #CFE_EVS_ENABLE_APP_EVENTS_CC, #CFE_EVS_DISABLE_APP_EVENTS_CC - + - + \cfeevscmd Enable Event Services for an Application @@ -713,14 +715,14 @@ #CFE_EVS_DISABLE_APP_EVENT_TYPE_CC, #CFE_EVS_DISABLE_APP_EVENTS_CC - + - + \cfeevscmd Disable Event Services for an Application @@ -760,14 +762,14 @@ #CFE_EVS_DISABLE_APP_EVENT_TYPE_CC, #CFE_EVS_ENABLE_APP_EVENTS_CC - + - + \cfeevscmd Reset Application Event Counters @@ -803,14 +805,14 @@ \sa #CFE_EVS_RESET_COUNTERS_CC - + - + \cfeevscmd Set Application Event Filter @@ -850,14 +852,14 @@ \sa #CFE_EVS_RESET_FILTER_CC, #CFE_EVS_RESET_ALL_FILTERS_CC, #CFE_EVS_ADD_EVENT_FILTER_CC, #CFE_EVS_DELETE_EVENT_FILTER_CC - + - + \cfeevscmd Enable Event Services Output Ports @@ -895,14 +897,14 @@ \sa #CFE_EVS_DISABLE_PORTS_CC - + - + \cfeevscmd Disable Event Services Output Ports @@ -941,14 +943,14 @@ \sa #CFE_EVS_ENABLE_PORTS_CC - + - + \cfeevscmd Reset an Event Filter for an Application @@ -982,14 +984,14 @@ \sa #CFE_EVS_SET_FILTER_CC, #CFE_EVS_RESET_ALL_FILTERS_CC, #CFE_EVS_ADD_EVENT_FILTER_CC, #CFE_EVS_DELETE_EVENT_FILTER_CC - + - + \cfeevscmd Reset All Event Filters for an Application @@ -1024,14 +1026,14 @@ \sa #CFE_EVS_SET_FILTER_CC, #CFE_EVS_RESET_FILTER_CC, #CFE_EVS_ADD_EVENT_FILTER_CC, #CFE_EVS_DELETE_EVENT_FILTER_CC - + - + \cfeevscmd Add Application Event Filter @@ -1066,14 +1068,14 @@ \sa #CFE_EVS_SET_FILTER_CC, #CFE_EVS_RESET_FILTER_CC, #CFE_EVS_RESET_ALL_FILTERS_CC, #CFE_EVS_DELETE_EVENT_FILTER_CC - + - + \cfeevscmd Delete Application Event Filter @@ -1108,14 +1110,14 @@ \sa #CFE_EVS_SET_FILTER_CC, #CFE_EVS_RESET_FILTER_CC, #CFE_EVS_RESET_ALL_FILTERS_CC, #CFE_EVS_ADD_EVENT_FILTER_CC - + - + \cfeevscmd Write Event Services Application Information to File @@ -1150,14 +1152,14 @@ \sa #CFE_EVS_FILE_WRITE_LOG_DATA_CC, #CFE_EVS_SET_LOG_MODE_CC - + - + \cfeevscmd Write Event Log to File @@ -1190,14 +1192,14 @@ \sa #CFE_EVS_FILE_WRITE_APP_DATA_CC, #CFE_EVS_SET_LOG_MODE_CC, #CFE_EVS_CLEAR_LOG_CC - + - + \cfeevscmd Set Logging Mode @@ -1232,14 +1234,14 @@ \sa #CFE_EVS_FILE_WRITE_LOG_DATA_CC, #CFE_EVS_CLEAR_LOG_CC - + - + \cfeevscmd Clear Event Log @@ -1273,7 +1275,7 @@ \sa #CFE_EVS_FILE_WRITE_LOG_DATA_CC, #CFE_EVS_SET_LOG_MODE_CC - + @@ -1291,7 +1293,7 @@ - + diff --git a/modules/evs/fsw/inc/cfe_evs_msg.h b/modules/evs/fsw/inc/cfe_evs_msg.h index 41fc2b28c..1a106fcd3 100644 --- a/modules/evs/fsw/inc/cfe_evs_msg.h +++ b/modules/evs/fsw/inc/cfe_evs_msg.h @@ -915,6 +915,7 @@ typedef struct CFE_EVS_NoArgsCmd 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 diff --git a/modules/evs/fsw/src/cfe_evs_task.c b/modules/evs/fsw/src/cfe_evs_task.c index aa17309da..1dd39ca09 100644 --- a/modules/evs/fsw/src/cfe_evs_task.c +++ b/modules/evs/fsw/src/cfe_evs_task.c @@ -329,7 +329,7 @@ void CFE_EVS_ProcessCommandPacket(CFE_SB_Buffer_t *SBBufPtr) case CFE_EVS_SEND_HK_MID: /* Housekeeping request */ - CFE_EVS_ReportHousekeepingCmd((CFE_MSG_CommandHeader_t *)SBBufPtr); + CFE_EVS_ReportHousekeepingCmd((CFE_EVS_SendHkCmd_t *)SBBufPtr); break; default: @@ -613,7 +613,7 @@ int32 CFE_EVS_ClearLogCmd(const CFE_EVS_ClearLogCmd_t *data) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_EVS_ReportHousekeepingCmd(const CFE_MSG_CommandHeader_t *data) +int32 CFE_EVS_ReportHousekeepingCmd(const CFE_EVS_SendHkCmd_t *data) { uint32 i, j; EVS_AppData_t * AppDataPtr; diff --git a/modules/evs/fsw/src/cfe_evs_task.h b/modules/evs/fsw/src/cfe_evs_task.h index 677e9c042..e22c498ad 100644 --- a/modules/evs/fsw/src/cfe_evs_task.h +++ b/modules/evs/fsw/src/cfe_evs_task.h @@ -161,7 +161,7 @@ void CFE_EVS_ProcessCommandPacket(CFE_SB_Buffer_t *SBBufPtr); * * Request for housekeeping status telemetry packet. */ -int32 CFE_EVS_ReportHousekeepingCmd(const CFE_MSG_CommandHeader_t *data); +int32 CFE_EVS_ReportHousekeepingCmd(const CFE_EVS_SendHkCmd_t *data); /*---------------------------------------------------------------------------------------*/ /** diff --git a/modules/evs/ut-coverage/evs_UT.c b/modules/evs/ut-coverage/evs_UT.c index 5ead8f850..534743970 100644 --- a/modules/evs/ut-coverage/evs_UT.c +++ b/modules/evs/ut-coverage/evs_UT.c @@ -906,7 +906,8 @@ void Test_Logging(void) char tmpString[100]; union { - CFE_MSG_CommandHeader_t cmd; + CFE_EVS_NoopCmd_t noopcmd; + CFE_EVS_ClearLogCmd_t clearlogcmd; CFE_EVS_SetLogModeCmd_t modecmd; CFE_EVS_WriteLogDataFileCmd_t logfilecmd; } CmdBuf; @@ -976,13 +977,15 @@ void Test_Logging(void) /* Test sending a no op command */ UT_InitData(); memset(&CmdBuf, 0, sizeof(CmdBuf)); - UT_EVS_DoDispatchCheckEvents(&CmdBuf.cmd, sizeof(CmdBuf.cmd), UT_TPID_CFE_EVS_CMD_NOOP_CC, &UT_EVS_EventBuf); + UT_EVS_DoDispatchCheckEvents(&CmdBuf.noopcmd, sizeof(CmdBuf.noopcmd), UT_TPID_CFE_EVS_CMD_NOOP_CC, + &UT_EVS_EventBuf); UtAssert_UINT32_EQ(UT_EVS_EventBuf.EventID, CFE_EVS_NOOP_EID); /* Clear log for next test */ UT_InitData(); CFE_EVS_Global.EVS_TlmPkt.Payload.LogEnabled = true; - UT_EVS_DoDispatchCheckEvents(&CmdBuf.cmd, sizeof(CmdBuf.cmd), UT_TPID_CFE_EVS_CMD_CLEAR_LOG_CC, &UT_EVS_EventBuf); + UT_EVS_DoDispatchCheckEvents(&CmdBuf.clearlogcmd, sizeof(CmdBuf.clearlogcmd), UT_TPID_CFE_EVS_CMD_CLEAR_LOG_CC, + &UT_EVS_EventBuf); UtAssert_BOOL_FALSE(CFE_EVS_Global.EVS_LogPtr->LogFullFlag); UtAssert_UINT32_EQ(CFE_EVS_Global.EVS_LogPtr->LogOverflowCounter, 0); @@ -1056,7 +1059,7 @@ void Test_WriteApp(void) { union { - CFE_MSG_CommandHeader_t cmd; + CFE_EVS_ResetCountersCmd_t ResetCountersCmd; CFE_EVS_WriteAppDataFileCmd_t AppDataCmd; CFE_EVS_AppNameBitMaskCmd_t appbitcmd; } CmdBuf; @@ -1078,8 +1081,8 @@ void Test_WriteApp(void) /* Test resetting counters */ UT_InitData(); - UT_EVS_DoDispatchCheckEvents(&CmdBuf.cmd, sizeof(CmdBuf.cmd), UT_TPID_CFE_EVS_CMD_RESET_COUNTERS_CC, - &UT_EVS_EventBuf); + UT_EVS_DoDispatchCheckEvents(&CmdBuf.ResetCountersCmd, sizeof(CmdBuf.ResetCountersCmd), + UT_TPID_CFE_EVS_CMD_RESET_COUNTERS_CC, &UT_EVS_EventBuf); UtAssert_UINT32_EQ(UT_EVS_EventBuf.EventID, CFE_EVS_RSTCNT_EID); /* Test writing application data with a create failure using default @@ -1993,7 +1996,7 @@ void Test_Misc(void) union { CFE_MSG_Message_t msg; - CFE_MSG_CommandHeader_t cmd; + CFE_EVS_SendHkCmd_t sendhkcmd; CFE_EVS_SetLogModeCmd_t modecmd; CFE_EVS_WriteLogDataFileCmd_t writelogdatacmd; } PktBuf; @@ -2051,7 +2054,7 @@ void Test_Misc(void) CFE_EVS_Global.EVS_TlmPkt.Payload.LogEnabled = true; HK_SnapshotData.Count = 0; UT_SetHookFunction(UT_KEY(CFE_SB_TransmitMsg), UT_SoftwareBusSnapshotHook, &HK_SnapshotData); - UT_CallTaskPipe(CFE_EVS_ProcessCommandPacket, &PktBuf.msg, sizeof(PktBuf.cmd), UT_TPID_CFE_EVS_SEND_HK); + UT_CallTaskPipe(CFE_EVS_ProcessCommandPacket, &PktBuf.msg, sizeof(PktBuf.sendhkcmd), UT_TPID_CFE_EVS_SEND_HK); UtAssert_UINT32_EQ(HK_SnapshotData.Count, 1); /* Test successful application cleanup */ @@ -2067,7 +2070,7 @@ void Test_Misc(void) CFE_EVS_Global.EVS_TlmPkt.Payload.LogEnabled = false; HK_SnapshotData.Count = 0; UT_SetHookFunction(UT_KEY(CFE_SB_TransmitMsg), UT_SoftwareBusSnapshotHook, &HK_SnapshotData); - UT_CallTaskPipe(CFE_EVS_ProcessCommandPacket, &PktBuf.msg, sizeof(PktBuf.cmd), UT_TPID_CFE_EVS_SEND_HK); + UT_CallTaskPipe(CFE_EVS_ProcessCommandPacket, &PktBuf.msg, sizeof(PktBuf.sendhkcmd), UT_TPID_CFE_EVS_SEND_HK); UtAssert_UINT32_EQ(HK_SnapshotData.Count, 1); /* Test sending a packet with the message counter and the event counter diff --git a/modules/fs/eds/cfe_fs.xml b/modules/fs/eds/cfe_fs.xml new file mode 100644 index 000000000..50b123a7b --- /dev/null +++ b/modules/fs/eds/cfe_fs.xml @@ -0,0 +1,160 @@ + + + + + + + + + + + Executive Services Exception/Reset Log File which is generated in response to a + \link #CFE_ES_WRITE_ERLOG_CC \ES_WRITEERLOG2FILE \endlink + command. + + + + + Executive Services System Log File which is generated in response to a + \link #CFE_ES_WRITE_SYSLOG_CC \ES_WRITESYSLOG2FILE \endlink + command. + + + + + Executive Services Information on All Applications File which is generated in response to a + \link #CFE_ES_QUERY_ALL_CC \ES_WRITEAPPINFO2FILE \endlink + command. + + + + + Executive Services Performance Analyzer Data File which is generated in response to a + \link #CFE_ES_PERF_STOPDATA_CC \ES_STOPLADATA \endlink + command. + + + + + Executive Services Shell Response Data File which is generated in response to a + \link #CFE_ES_SHELL_CMD_CC \ES_SHELL \endlink + command. + + + + + Executive Services Critical Data Store Registry Dump File which is generated in response to a + \link #CFE_ES_DUMP_CDS_REG_CC \ES_DUMPCDSREG \endlink + command. + + + + + Table Services Registry Dump File which is generated in response to a + \link #CFE_TBL_DUMP_REG_CC \TBL_WRITEREG2FILE \endlink + command. + + + + + Table Services Table Image File which is generated either on the ground or in response to a + \link #CFE_TBL_DUMP_CC \TBL_DUMP \endlink command. + + + + + Event Services Application Data Dump File which is generated in response to a + \link #CFE_EVS_FILE_WRITE_APP_DATA_CC \EVS_WRITEAPPDATA2FILE \endlink + command. + + + + + Event Services Local Event Log Dump File which is generated in response to a + \link #CFE_EVS_FILE_WRITE_LOG_DATA_CC \EVS_WRITELOG2FILE \endlink + command. + + + + + Software Bus Pipe Data Dump File which is generated in response to a + \link #CFE_SB_SEND_PIPE_INFO_CC \SB_WRITEPIPE2FILE \endlink + command. + + + + + Software Bus Message Routing Data Dump File which is generated in response to a + \link #CFE_SB_SEND_ROUTING_INFO_CC \SB_WRITEROUTING2FILE \endlink + command. + + + + + Software Bus Message Mapping Data Dump File which is generated in response to a + \link #CFE_SB_SEND_MAP_INFO_CC \SB_WRITEMAP2FILE \endlink + command. + + + + + Executive Services Query All Tasks Data File which is generated in response to a + \link #CFE_ES_QUERY_ALL_TASKS_CC \ES_WRITETASKINFO2FILE \endlink + command. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/resourceid/eds/cfe_resourceid.xml b/modules/resourceid/eds/cfe_resourceid.xml new file mode 100644 index 000000000..675558554 --- /dev/null +++ b/modules/resourceid/eds/cfe_resourceid.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/modules/sb/eds/cfe_sb.xml b/modules/sb/eds/cfe_sb.xml index 073f1313e..7fff096e8 100644 --- a/modules/sb/eds/cfe_sb.xml +++ b/modules/sb/eds/cfe_sb.xml @@ -25,21 +25,24 @@ - + - - - - - - + + + + + + + + + - + @@ -62,10 +65,44 @@ - + + + Currently an unused parameter in #CFE_SB_SubscribeEx + Intended to be used for interprocessor communication only + - - + + + + + + + + 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. + + + + + + + + + + + + @@ -146,6 +183,11 @@ \cfetlmmnemonic \SB_DUPSUBCNT + + + \cfetlmmnemonic \SB_GETPIPEIDBYNAMEEC + + \cfetlmmnemonic \SB_PIPEOVREC @@ -156,7 +198,7 @@ \cfetlmmnemonic \SB_MSGLIMEC - + \cfetlmmnemonic \SB_MEMPOOLHANDLE @@ -184,21 +226,22 @@ \cfetlmmnemonic \SB_PDPIPEID - + \cfetlmmnemonic \SB_PDDEPTH - + \cfetlmmnemonic \SB_PDINUSE - + \cfetlmmnemonic \SB_PDPKINUSE + @@ -318,7 +361,7 @@ - + @@ -334,7 +377,7 @@ - + @@ -347,7 +390,7 @@ - + @@ -374,38 +417,47 @@ - + - + + + + + + + - + - + - + - + \cfesbcmd Software Bus No-Op @@ -434,11 +486,11 @@ None - + - + \cfesbcmd Software Bus Reset Counters @@ -471,11 +523,11 @@ values that are reset by this command. - + - + \cfesbcmd Send Software Bus Statistics @@ -509,11 +561,11 @@ \sa - + - + \cfesbcmd Write Software Bus Routing Info to a File @@ -556,14 +608,14 @@ \sa #CFE_SB_SEND_PIPE_INFO_CC, #CFE_SB_SEND_MAP_INFO_CC, #CFE_SB_WriteFileInfoCmd_t - + - + \cfesbcmd Enable Software Bus Route @@ -602,14 +654,14 @@ \sa #CFE_SB_SEND_ROUTING_INFO_CC, #CFE_SB_DISABLE_ROUTE_CC, #CFE_SB_EnableRouteCmd_t - + - + \cfesbcmd Disable Software Bus Route @@ -651,14 +703,14 @@ \sa #CFE_SB_SEND_ROUTING_INFO_CC, #CFE_SB_ENABLE_ROUTE_CC, #CFE_SB_EnableRouteCmd_t - + - + \cfesbcmd Write Pipe Info to a File @@ -701,14 +753,14 @@ \sa #CFE_SB_SEND_ROUTING_INFO_CC, #CFE_SB_SEND_MAP_INFO_CC - + - + \cfesbcmd Write Map Info to a File @@ -752,14 +804,14 @@ \sa #CFE_SB_SEND_ROUTING_INFO_CC, #CFE_SB_SEND_PIPE_INFO_CC - + - + \cfesbcmd Enable Subscription Reporting Command @@ -791,11 +843,11 @@ #CFE_SB_SEND_PREV_SUBS_CC - + - + \cfesbcmd Disable Subscription Reporting Command @@ -827,11 +879,11 @@ #CFE_SB_SEND_PREV_SUBS_CC - + - + \cfesbcmd Send Previous Subscriptions Command @@ -863,7 +915,7 @@ #CFE_SB_DISABLE_SUB_REPORTING_CC - + @@ -879,10 +931,10 @@ - + - + @@ -901,10 +953,10 @@ - + - + @@ -925,7 +977,7 @@ the software bus. This is typically the various types of telemetry that the application generates. - + @@ -953,7 +1005,7 @@ This is a receive-only interface; the Telemetry interface provides the equivalent send function. - + @@ -1015,10 +1067,15 @@ + + + + + - + @@ -1049,6 +1106,7 @@ + @@ -1058,6 +1116,7 @@ + diff --git a/modules/sb/fsw/inc/cfe_sb_msg.h b/modules/sb/fsw/inc/cfe_sb_msg.h index 1fe847b66..87a7c1dc6 100644 --- a/modules/sb/fsw/inc/cfe_sb_msg.h +++ b/modules/sb/fsw/inc/cfe_sb_msg.h @@ -486,6 +486,7 @@ 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 diff --git a/modules/sb/fsw/src/cfe_sb_priv.h b/modules/sb/fsw/src/cfe_sb_priv.h index 52c59484f..76cbc93fd 100644 --- a/modules/sb/fsw/src/cfe_sb_priv.h +++ b/modules/sb/fsw/src/cfe_sb_priv.h @@ -802,7 +802,7 @@ int32 CFE_SB_DisableSubReportingCmd(const CFE_SB_DisableSubReportingCmd_t *data) * \param[in] data Pointer to command structure * \return Execution status, see \ref CFEReturnCodes */ -int32 CFE_SB_SendHKTlmCmd(const CFE_MSG_CommandHeader_t *data); +int32 CFE_SB_SendHKTlmCmd(const CFE_SB_SendHkCmd_t *data); /*---------------------------------------------------------------------------------------*/ /** diff --git a/modules/sb/fsw/src/cfe_sb_task.c b/modules/sb/fsw/src/cfe_sb_task.c index 00d1debd2..c651056e8 100644 --- a/modules/sb/fsw/src/cfe_sb_task.c +++ b/modules/sb/fsw/src/cfe_sb_task.c @@ -503,7 +503,7 @@ int32 CFE_SB_DisableSubReportingCmd(const CFE_SB_DisableSubReportingCmd_t *data) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_SB_SendHKTlmCmd(const CFE_MSG_CommandHeader_t *data) +int32 CFE_SB_SendHKTlmCmd(const CFE_SB_SendHkCmd_t *data) { CFE_SB_LockSharedData(__FILE__, __LINE__); diff --git a/modules/sb/ut-coverage/sb_UT.c b/modules/sb/ut-coverage/sb_UT.c index c2bc481a6..272974836 100644 --- a/modules/sb/ut-coverage/sb_UT.c +++ b/modules/sb/ut-coverage/sb_UT.c @@ -4321,8 +4321,8 @@ void Test_SB_TransmitMsgPaths_Nominal(void) { union { - CFE_SB_Buffer_t SBBuf; - CFE_MSG_CommandHeader_t Cmd; + CFE_SB_Buffer_t SBBuf; + CFE_SB_SendHkCmd_t SendHkCmd; } Housekeeping; CFE_SB_MsgId_t MsgId; CFE_SB_PipeId_t PipeId = CFE_SB_INVALID_PIPE; @@ -4335,7 +4335,7 @@ void Test_SB_TransmitMsgPaths_Nominal(void) memset(&TlmPkt, 0, sizeof(TlmPkt)); /* Set up for dispatch FIRST */ - UT_SetupBasicMsgDispatch(&UT_TPID_CFE_SB_SEND_HK, sizeof(Housekeeping.Cmd), false); + UT_SetupBasicMsgDispatch(&UT_TPID_CFE_SB_SEND_HK, sizeof(Housekeeping.SendHkCmd), false); /* For internal send message call */ MsgId = CFE_SB_ValueToMsgId(CFE_SB_HK_TLM_MID); @@ -4357,7 +4357,7 @@ void Test_SB_TransmitMsgPaths_Nominal(void) CFE_SB_Global.StopRecurseFlags[1] |= CFE_BIT(CFE_SB_GET_BUF_ERR_EID_BIT); /* Set up for dispatch FIRST */ - UT_SetupBasicMsgDispatch(&UT_TPID_CFE_SB_SEND_HK, sizeof(Housekeeping.Cmd), false); + UT_SetupBasicMsgDispatch(&UT_TPID_CFE_SB_SEND_HK, sizeof(Housekeeping.SendHkCmd), false); /* For internal send message call */ MsgId = CFE_SB_ValueToMsgId(CFE_SB_HK_TLM_MID); diff --git a/modules/tbl/eds/cfe_tbl.xml b/modules/tbl/eds/cfe_tbl.xml index f3eacf07d..cce7acfe2 100644 --- a/modules/tbl/eds/cfe_tbl.xml +++ b/modules/tbl/eds/cfe_tbl.xml @@ -53,8 +53,8 @@ - - + + @@ -236,7 +236,7 @@ \cfetlmmnemonic \TBL_NUMFREESHRBUF - + \cfetlmmnemonic \TBL_MEMPOOLHANDLE @@ -269,9 +269,9 @@ - + - + \cfetlmmnemonic \TBL_SIZE @@ -281,17 +281,17 @@ \cfetlmmnemonic \TBL_CRC - + \cfetlmmnemonic \TBL_ACTBUFADD - + \cfetlmmnemonic \TBL_IACTBUFADD - + \cfetlmmnemonic \TBL_VALFUNCPTR @@ -301,9 +301,14 @@ \cfetlmmnemonic \TBL_TIMELASTUPD - + - \cfetlmmnemonic \TBL_FILECSECONDS + \cfetlmmnemonic \TBL_FILECSECONDS + + + + + \cfetlmmnemonic \TBL_FILECSUBSECONDS @@ -346,33 +351,36 @@ \cfetlmmnemonic \TBL_CRITICAL + - + + + - + - + - + - + - + \cfetblcmd Table No-Op @@ -399,11 +407,11 @@ None - + - + \cfetblcmd Table Reset Counters @@ -437,11 +445,11 @@ values that are reset by this command. - + - + \cfetblcmd Load Table @@ -491,14 +499,14 @@ \sa #CFE_TBL_DUMP_CC, #CFE_TBL_VALIDATE_CC, #CFE_TBL_ACTIVATE_CC, #CFE_TBL_ABORT_LOAD_CC - + - + \cfetblcmd Dump Table @@ -538,14 +546,14 @@ \sa #CFE_TBL_LOAD_CC, #CFE_TBL_VALIDATE_CC, #CFE_TBL_ACTIVATE_CC, #CFE_TBL_ABORT_LOAD_CC - + - + \cfetblcmd Validate Table @@ -597,14 +605,14 @@ \sa #CFE_TBL_LOAD_CC, #CFE_TBL_DUMP_CC, #CFE_TBL_ACTIVATE_CC, #CFE_TBL_ABORT_LOAD_CC - + - + \cfetblcmd Activate Table @@ -641,14 +649,14 @@ \sa #CFE_TBL_LOAD_CC, #CFE_TBL_DUMP_CC, #CFE_TBL_VALIDATE_CC, #CFE_TBL_ABORT_LOAD_CC - + - + \cfetblcmd Dump Table Registry @@ -688,14 +696,14 @@ \sa #CFE_TBL_TLM_REG_CC - + - + \cfetblcmd Telemeter One Table Registry Entry @@ -728,14 +736,14 @@ \sa #CFE_TBL_DUMP_REG_CC - + - + \cfetblcmd Delete Critical Table from Critical Data Store @@ -777,14 +785,14 @@ \sa #CFE_ES_DUMP_CDS_REG_CC, #CFE_ES_DELETE_CDS_CC - + - + \cfetblcmd Abort Table Load @@ -821,7 +829,7 @@ \sa #CFE_TBL_LOAD_CC, #CFE_TBL_DUMP_CC, #CFE_TBL_VALIDATE_CC, #CFE_TBL_ACTIVATE_CC - + @@ -842,7 +850,7 @@ - + diff --git a/modules/tbl/fsw/inc/cfe_tbl_msg.h b/modules/tbl/fsw/inc/cfe_tbl_msg.h index d43571d68..f48494194 100644 --- a/modules/tbl/fsw/inc/cfe_tbl_msg.h +++ b/modules/tbl/fsw/inc/cfe_tbl_msg.h @@ -499,6 +499,7 @@ typedef struct CFE_TBL_NoArgsCmd */ typedef CFE_TBL_NoArgsCmd_t CFE_TBL_NoopCmd_t; typedef CFE_TBL_NoArgsCmd_t CFE_TBL_ResetCountersCmd_t; +typedef CFE_TBL_NoArgsCmd_t CFE_TBL_SendHkCmd_t; /** ** \brief Load Table Command Payload diff --git a/modules/tbl/ut-coverage/tbl_UT.c b/modules/tbl/ut-coverage/tbl_UT.c index d37a9ad0d..102584a51 100644 --- a/modules/tbl/ut-coverage/tbl_UT.c +++ b/modules/tbl/ut-coverage/tbl_UT.c @@ -227,8 +227,10 @@ void Test_CFE_TBL_TaskInit(void) uint32 ExitCode; union { - CFE_MSG_CommandHeader_t NoArgsCmd; - CFE_MSG_Message_t Msg; + CFE_TBL_NoopCmd_t NoopCmd; + CFE_TBL_SendHkCmd_t SendHkCmd; + CFE_TBL_ResetCountersCmd_t ResetCountersCmd; + CFE_MSG_Message_t Msg; } CmdBuf; CFE_SB_MsgId_t MsgId = CFE_SB_INVALID_MSG_ID; CFE_MSG_FcnCode_t FcnCode = 0; @@ -298,28 +300,28 @@ void Test_CFE_TBL_TaskInit(void) /* Test command pipe messages handler response to a valid command */ UT_InitData(); - UT_CallTaskPipe(CFE_TBL_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoArgsCmd), UT_TPID_CFE_TBL_CMD_NOOP_CC); + UT_CallTaskPipe(CFE_TBL_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoopCmd), UT_TPID_CFE_TBL_CMD_NOOP_CC); CFE_UtAssert_EVENTSENT(CFE_TBL_NOOP_INF_EID); /* Test command pipe messages handler response to an invalid * message length */ UT_InitData(); - UT_CallTaskPipe(CFE_TBL_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoArgsCmd) - 1, UT_TPID_CFE_TBL_CMD_NOOP_CC); + UT_CallTaskPipe(CFE_TBL_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoopCmd) - 1, UT_TPID_CFE_TBL_CMD_NOOP_CC); CFE_UtAssert_EVENTSENT(CFE_TBL_LEN_ERR_EID); /* Test command pipe messages handler response to an invalid * command code */ UT_InitData(); - UT_CallTaskPipe(CFE_TBL_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoArgsCmd), UT_TPID_CFE_TBL_CMD_INVALID_CC); + UT_CallTaskPipe(CFE_TBL_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoopCmd), UT_TPID_CFE_TBL_CMD_INVALID_CC); CFE_UtAssert_EVENTSENT(CFE_TBL_CC1_ERR_EID); /* Test command pipe messages handler response to other errors */ UT_InitData(); CFE_TBL_Global.CommandCounter = 0; CFE_TBL_Global.CommandErrorCounter = 0; - UT_CallTaskPipe(CFE_TBL_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoArgsCmd), UT_TPID_CFE_TBL_INVALID_MID); + UT_CallTaskPipe(CFE_TBL_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoopCmd), UT_TPID_CFE_TBL_INVALID_MID); CFE_UtAssert_EVENTSENT(CFE_TBL_MID_ERR_EID); UtAssert_ZERO(CFE_TBL_Global.CommandCounter); UtAssert_ZERO(CFE_TBL_Global.CommandErrorCounter); @@ -328,13 +330,14 @@ void Test_CFE_TBL_TaskInit(void) UT_InitData(); CFE_TBL_Global.CommandCounter = 0; CFE_TBL_Global.CommandErrorCounter = 0; - UT_CallTaskPipe(CFE_TBL_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoArgsCmd), UT_TPID_CFE_TBL_MSG_HK); + UT_CallTaskPipe(CFE_TBL_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.SendHkCmd), UT_TPID_CFE_TBL_MSG_HK); UtAssert_ZERO(CFE_TBL_Global.CommandCounter); UtAssert_ZERO(CFE_TBL_Global.CommandErrorCounter); /* Test command pipe messages handler response to "command type" message */ UT_InitData(); - UT_CallTaskPipe(CFE_TBL_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoArgsCmd), UT_TPID_CFE_TBL_CMD_RESET_COUNTERS_CC); + UT_CallTaskPipe(CFE_TBL_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.ResetCountersCmd), + UT_TPID_CFE_TBL_CMD_RESET_COUNTERS_CC); CFE_UtAssert_EVENTSENT(CFE_TBL_RESET_INF_EID); UtAssert_ZERO(CFE_TBL_Global.CommandCounter); UtAssert_ZERO(CFE_TBL_Global.CommandErrorCounter); diff --git a/modules/time/eds/cfe_time.xml b/modules/time/eds/cfe_time.xml index 4be579eea..0e58d9605 100644 --- a/modules/time/eds/cfe_time.xml +++ b/modules/time/eds/cfe_time.xml @@ -42,6 +42,7 @@ + @@ -173,7 +174,8 @@ - + + @@ -182,7 +184,7 @@ - + @@ -236,7 +238,7 @@ \cfetlmmnemonic \TIME_STCFSUBSECS - + @@ -270,7 +272,7 @@ \cfetlmmnemonic \TIME_LEAPS - + \cfetlmmnemonic \TIME_APISTATE @@ -458,10 +460,25 @@ - + + + + + + + + + + + + + + - + + + \cfetimecmd Time No-Op @@ -490,11 +507,11 @@ None - + - + \cfetimecmd Time Reset Counters @@ -536,11 +553,11 @@ None - + - + \cfetimecmd Request TIME Diagnostic Telemetry @@ -573,7 +590,7 @@ \sa - + @@ -630,7 +647,7 @@ \sa #CFE_TIME_SET_STATE_CC, #CFE_TIME_SET_SIGNAL_CC - + @@ -697,7 +714,7 @@ \sa #CFE_TIME_SET_SOURCE_CC, #CFE_TIME_SET_SIGNAL_CC - + @@ -743,7 +760,7 @@ \sa #CFE_TIME_SUB_DELAY_CC - + @@ -790,7 +807,7 @@ \sa #CFE_TIME_ADD_DELAY_CC - + @@ -845,7 +862,7 @@ \sa #CFE_TIME_SET_MET_CC, #CFE_TIME_SET_STCF_CC, #CFE_TIME_SET_LEAPS_CC - + @@ -896,7 +913,7 @@ \sa #CFE_TIME_SET_TIME_CC, #CFE_TIME_SET_STCF_CC, #CFE_TIME_SET_LEAPS_CC - + @@ -941,7 +958,7 @@ \sa #CFE_TIME_SET_TIME_CC, #CFE_TIME_SET_MET_CC, #CFE_TIME_SET_LEAPS_CC - + @@ -984,7 +1001,7 @@ \sa #CFE_TIME_SET_TIME_CC, #CFE_TIME_SET_MET_CC, #CFE_TIME_SET_STCF_CC - + @@ -1027,7 +1044,7 @@ \sa #CFE_TIME_ADD_ADJUST_CC, #CFE_TIME_SUB_ADJUST_CC, #CFE_TIME_ADD_1HZADJ_CC, #CFE_TIME_SUB_1HZADJ_CC - + @@ -1069,7 +1086,7 @@ \sa #CFE_TIME_ADD_ADJUST_CC, #CFE_TIME_ADD_1HZADJ_CC, #CFE_TIME_SUB_1HZADJ_CC - + @@ -1125,7 +1142,7 @@ \sa #CFE_TIME_ADD_ADJUST_CC, #CFE_TIME_SUB_ADJUST_CC, #CFE_TIME_SUB_1HZADJ_CC - + @@ -1181,7 +1198,7 @@ \sa #CFE_TIME_ADD_ADJUST_CC, #CFE_TIME_SUB_ADJUST_CC, #CFE_TIME_ADD_1HZADJ_CC - + @@ -1232,26 +1249,26 @@ \sa #CFE_TIME_SET_STATE_CC, #CFE_TIME_SET_SOURCE_CC - + - + - + - + @@ -1272,7 +1289,7 @@ - + @@ -1283,12 +1300,12 @@ - + - + @@ -1298,7 +1315,7 @@ - + diff --git a/modules/time/fsw/inc/cfe_time_msg.h b/modules/time/fsw/inc/cfe_time_msg.h index 59ea87147..216821790 100644 --- a/modules/time/fsw/inc/cfe_time_msg.h +++ b/modules/time/fsw/inc/cfe_time_msg.h @@ -742,6 +742,7 @@ 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 diff --git a/modules/time/fsw/src/cfe_time_task.c b/modules/time/fsw/src/cfe_time_task.c index 841d1fd53..aa316c7a6 100644 --- a/modules/time/fsw/src/cfe_time_task.c +++ b/modules/time/fsw/src/cfe_time_task.c @@ -359,7 +359,7 @@ void CFE_TIME_TaskPipe(CFE_SB_Buffer_t *SBBufPtr) ** Housekeeping telemetry request... */ case CFE_TIME_SEND_HK_MID: - CFE_TIME_HousekeepingCmd((CFE_MSG_CommandHeader_t *)SBBufPtr); + CFE_TIME_HousekeepingCmd((CFE_TIME_SendHkCmd_t *)SBBufPtr); break; /* @@ -547,7 +547,7 @@ void CFE_TIME_TaskPipe(CFE_SB_Buffer_t *SBBufPtr) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TIME_HousekeepingCmd(const CFE_MSG_CommandHeader_t *data) +int32 CFE_TIME_HousekeepingCmd(const CFE_TIME_SendHkCmd_t *data) { CFE_TIME_Reference_t Reference; diff --git a/modules/time/fsw/src/cfe_time_utils.h b/modules/time/fsw/src/cfe_time_utils.h index 60b0491be..7885acbc1 100644 --- a/modules/time/fsw/src/cfe_time_utils.h +++ b/modules/time/fsw/src/cfe_time_utils.h @@ -672,7 +672,7 @@ void CFE_TIME_Local1HzTimerCallback(osal_id_t TimerId, void *Arg); /** * @brief Onboard command (HK request) */ -int32 CFE_TIME_HousekeepingCmd(const CFE_MSG_CommandHeader_t *data); +int32 CFE_TIME_HousekeepingCmd(const CFE_TIME_SendHkCmd_t *data); /* ** Command handler for "tone signal detected"... diff --git a/modules/time/ut-coverage/time_UT.c b/modules/time/ut-coverage/time_UT.c index 55a31a31f..3a4961ac1 100644 --- a/modules/time/ut-coverage/time_UT.c +++ b/modules/time/ut-coverage/time_UT.c @@ -1312,10 +1312,13 @@ void Test_PipeCmds(void) union { CFE_MSG_Message_t message; - CFE_MSG_CommandHeader_t cmd; CFE_TIME_ToneDataCmd_t tonedatacmd; + CFE_TIME_ToneSignalCmd_t tonesignalcmd; + CFE_TIME_FakeToneCmd_t timesendcmd; + CFE_TIME_SendHkCmd_t sendhkcmd; + CFE_TIME_1HzCmd_t onehzcmd; CFE_TIME_NoopCmd_t noopcmd; - CFE_TIME_ResetCountersCmd_t resetcountercmd; + CFE_TIME_ResetCountersCmd_t resetcounterscmd; CFE_TIME_SendDiagnosticCmd_t diagtlmcmd; CFE_TIME_SetStateCmd_t statecmd; CFE_TIME_SetSourceCmd_t sourcecmd; @@ -1344,14 +1347,14 @@ void Test_PipeCmds(void) UT_InitData(); memset(&CmdBuf, 0, sizeof(CmdBuf)); UT_SetHookFunction(UT_KEY(CFE_SB_TransmitMsg), UT_SoftwareBusSnapshotHook, &LocalSnapshotData); - UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.cmd), UT_TPID_CFE_TIME_SEND_HK); + UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.sendhkcmd), UT_TPID_CFE_TIME_SEND_HK); UtAssert_INT32_EQ(LocalSnapshotData.Count, 1); /* Test sending the time at the tone "signal" command */ UT_InitData(); memset(&CmdBuf, 0, sizeof(CmdBuf)); CFE_TIME_Global.ToneSignalCounter = 0; - UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.cmd), UT_TPID_CFE_TIME_TONE_CMD); + UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.tonesignalcmd), UT_TPID_CFE_TIME_TONE_CMD); UtAssert_INT32_EQ(CFE_TIME_Global.ToneSignalCounter, 1); /* Test sending the time at the tone "data" command */ @@ -1379,7 +1382,7 @@ void Test_PipeCmds(void) count = CFE_TIME_Global.InternalCount; #endif - UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.cmd), UT_TPID_CFE_TIME_SEND_CMD); + UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.timesendcmd), UT_TPID_CFE_TIME_SEND_CMD); #if (CFE_PLATFORM_TIME_CFG_SERVER == true) UtAssert_UINT32_EQ(CFE_TIME_Global.InternalCount, count + 1); @@ -1391,7 +1394,7 @@ void Test_PipeCmds(void) /* Test sending the no-op command */ UT_InitData(); memset(&CmdBuf, 0, sizeof(CmdBuf)); - UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.cmd), UT_TPID_CFE_TIME_CMD_NOOP_CC); + UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.noopcmd), UT_TPID_CFE_TIME_CMD_NOOP_CC); CFE_UtAssert_EVENTSENT(CFE_TIME_NOOP_EID); /* Noop with bad size */ @@ -1416,7 +1419,8 @@ void Test_PipeCmds(void) CFE_TIME_Global.LocalIntCounter = 1; CFE_TIME_Global.LocalTaskCounter = 1; memset(&CmdBuf, 0, sizeof(CmdBuf)); - UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.cmd), UT_TPID_CFE_TIME_CMD_RESET_COUNTERS_CC); + UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.resetcounterscmd), + UT_TPID_CFE_TIME_CMD_RESET_COUNTERS_CC); CFE_UtAssert_EVENTSENT(CFE_TIME_RESET_EID); /* Confirm error counters get reset to help cover requirements that are difficult operationally */ @@ -1443,7 +1447,7 @@ void Test_PipeCmds(void) /* Test sending the request diagnostics command */ UT_InitData(); memset(&CmdBuf, 0, sizeof(CmdBuf)); - UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.cmd), + UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.diagtlmcmd), UT_TPID_CFE_TIME_CMD_SEND_DIAGNOSTIC_TLM_CC); CFE_UtAssert_EVENTSENT(CFE_TIME_DIAG_EID); @@ -1911,20 +1915,20 @@ void Test_PipeCmds(void) /* Test response to sending an invalid command */ UT_InitData(); memset(&CmdBuf, 0, sizeof(CmdBuf)); - UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.cmd), UT_TPID_CFE_TIME_CMD_INVALID_CC); + UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.noopcmd), UT_TPID_CFE_TIME_CMD_INVALID_CC); CFE_UtAssert_EVENTSENT(CFE_TIME_CC_ERR_EID); /* Test response to sending a command using an invalid message ID */ UT_InitData(); memset(&CmdBuf, 0, sizeof(CmdBuf)); - UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.cmd), UT_TPID_CFE_TIME_INVALID_MID); + UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.noopcmd), UT_TPID_CFE_TIME_INVALID_MID); CFE_UtAssert_EVENTSENT(CFE_TIME_ID_ERR_EID); /* Call the Task Pipe with the 1Hz command. */ /* In the 1Hz state machine it should call PSP GetTime as part, of latching the clock. This is tested only to see that the latch executed. */ UT_InitData(); - UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.cmd), UT_TPID_CFE_TIME_1HZ_CMD); + UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.onehzcmd), UT_TPID_CFE_TIME_1HZ_CMD); UtAssert_NONZERO(UT_GetStubCount(UT_KEY(CFE_PSP_GetTime))); }