From 122840f0a8b4ee8bbe0430a626863c3b2eba1856 Mon Sep 17 00:00:00 2001 From: Avi Weiss Date: Mon, 27 Mar 2023 13:45:10 +1000 Subject: [PATCH] Fix #1303, Add struct for cFE/OSAL/PSP Version in ES Tlm Packet --- docs/src/mnem_maps/cfe_es_tlm_mnem_map | 16 ++---- modules/es/config/default_cfe_es_msgdefs.h | 47 +++++++--------- modules/es/config/default_cfe_es_msgstruct.h | 11 ++++ modules/es/eds/cfe_es.xml | 57 +++----------------- modules/es/fsw/src/cfe_es_task.c | 24 ++++----- 5 files changed, 52 insertions(+), 103 deletions(-) diff --git a/docs/src/mnem_maps/cfe_es_tlm_mnem_map b/docs/src/mnem_maps/cfe_es_tlm_mnem_map index e76b8701d..78b9f2d28 100644 --- a/docs/src/mnem_maps/cfe_es_tlm_mnem_map +++ b/docs/src/mnem_maps/cfe_es_tlm_mnem_map @@ -17,19 +17,9 @@ ALIASES += \ ES_CMDPC=$sc_$cpu_ES_CMDPC \ ES_CMDEC=$sc_$cpu_ES_CMDEC \ ES_CKSUM=$sc_$cpu_ES_CKSUM \ -ES_CFEMAJORVER=$sc_$cpu_ES_CFEMAJORVER \ -ES_CFEMINORVER=$sc_$cpu_ES_CFEMINORVER \ -ES_CFEREVISION=$sc_$cpu_ES_CFEREVISION \ -ES_CFEMISSIONREV=$sc_$cpu_ES_CFEMISSIONREV \ -ES_CFESUBMINORVER=$sc_$cpu_ES_CFESUBMINORVER \ -ES_OSMAJORVER=$sc_$cpu_ES_OSMAJORVER \ -ES_OSMINORVER=$sc_$cpu_ES_OSMINORVER \ -ES_OSREVISION=$sc_$cpu_ES_OSREVISION \ -ES_OSMISSIONREV=$sc_$cpu_ES_OSMISSIONREV \ -ES_PSPMAJORVER=$sc_$cpu_ES_PSPMAJORVER \ -ES_PSPMINORVER=$sc_$cpu_ES_PSPMINORVER \ -ES_PSPREVISION=$sc_$cpu_ES_PSPREVISION \ -ES_PSPMISSIONREV=$sc_$cpu_ES_PSPMISSIONREV \ +ES_CFEVERSION=$sc_$cpu_ES_CFEVERSION \ +ES_OSALVERSION=$sc_$cpu_ES_OSALVERSION \ +ES_PSPVERSION=$sc_$cpu_ES_PSPVERSION \ ES_PAD1=$sc_$cpu_ES_PAD1 \ ES_PAD2=$sc_$cpu_ES_PAD2 \ ES_PAD3=$sc_$cpu_ES_PAD3 \ diff --git a/modules/es/config/default_cfe_es_msgdefs.h b/modules/es/config/default_cfe_es_msgdefs.h index 61dd65dee..83c4b8df3 100644 --- a/modules/es/config/default_cfe_es_msgdefs.h +++ b/modules/es/config/default_cfe_es_msgdefs.h @@ -243,6 +243,17 @@ typedef struct CFE_ES_PoolStatsTlm_Payload /*************************************************************************/ +/** + * \brief Version Number of cFE/OSAL/PSP for the ES Housekeeping Packet + */ +typedef struct CFE_ES_Version +{ + uint8 Major; /**< \brief Major Version Number */ + uint8 Minor; /**< \brief Minor Version Number */ + uint8 Revision; /**< \brief Revision Number */ + uint8 MissionRevision; /**< \brief Mission-specific Revision Number */ +} CFE_ES_Version_t; + /** ** \cfeestlm Executive Services Housekeeping Packet **/ @@ -253,33 +264,15 @@ typedef struct CFE_ES_HousekeepingTlm_Payload 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 */ + uint16 CFECoreChecksum; /**< \cfetlmmnemonic \ES_CKSUM + \brief Checksum of cFE Core Code */ + + CFE_ES_Version_t CFEVersion; /**< \cfetlmmnemonic \ES_CFEVERSION + \brief cFE Version Number */ + CFE_ES_Version_t OSALVersion; /**< \cfetlmmnemonic \ES_OSALVERSION + \brief OSAL Version Number */ + CFE_ES_Version_t PSPVersion; /**< \cfetlmmnemonic \ES_PSPVERSION + \brief PSP Version Number */ CFE_ES_MemOffset_t SysLogBytesUsed; /**< \cfetlmmnemonic \ES_SYSLOGBYTEUSED \brief Total number of bytes used in system log */ diff --git a/modules/es/config/default_cfe_es_msgstruct.h b/modules/es/config/default_cfe_es_msgstruct.h index 89732f035..0bffb19c1 100644 --- a/modules/es/config/default_cfe_es_msgstruct.h +++ b/modules/es/config/default_cfe_es_msgstruct.h @@ -273,6 +273,17 @@ typedef struct CFE_ES_MemStatsTlm CFE_ES_PoolStatsTlm_Payload_t Payload; /**< \brief Telemetry payload */ } CFE_ES_MemStatsTlm_t; +/** + * \brief Version Number of cFE/OSAL/PSP for the ES Housekeeping Packet + */ +typedef struct CFE_ES_Version +{ + uint8 Major; /**< \brief Major Version Number */ + uint8 Minor; /**< \brief Minor Version Number */ + uint8 Revision; /**< \brief Revision Number */ + uint8 MissionRevision; /**< \brief Mission-specific Revision Number */ +} CFE_ES_Version_t; + /** ** \cfeestlm Executive Services Housekeeping Packet **/ diff --git a/modules/es/eds/cfe_es.xml b/modules/es/eds/cfe_es.xml index c5f7e7a18..7ce48809c 100644 --- a/modules/es/eds/cfe_es.xml +++ b/modules/es/eds/cfe_es.xml @@ -562,64 +562,19 @@ \cfetlmmnemonic \ES_CKSUM - + - \cfetlmmnemonic \ES_CFEMAJORVER + \cfetlmmnemonic \ES_CFEVERSION - + - \cfetlmmnemonic \ES_CFEMINORVER + \cfetlmmnemonic \ES_OSALVERSION - + - \cfetlmmnemonic \ES_CFEREVISION - - - - - \cfetlmmnemonic \ES_CFEMISSIONREV - - - - - \cfetlmmnemonic \ES_OSMAJORVER - - - - - \cfetlmmnemonic \ES_OSMINORVER - - - - - \cfetlmmnemonic \ES_OSREVISION - - - - - \cfetlmmnemonic \ES_OSMISSIONREV - - - - - \cfetlmmnemonic \ES_PSPMAJORVER - - - - - \cfetlmmnemonic \ES_PSPMINORVER - - - - - \cfetlmmnemonic \ES_PSPREVISION - - - - - \cfetlmmnemonic \ES_PSPMISSIONREV + \cfetlmmnemonic \ES_PSPVERSION diff --git a/modules/es/fsw/src/cfe_es_task.c b/modules/es/fsw/src/cfe_es_task.c index a862ffabf..e440fc74e 100644 --- a/modules/es/fsw/src/cfe_es_task.c +++ b/modules/es/fsw/src/cfe_es_task.c @@ -374,22 +374,22 @@ int32 CFE_ES_TaskInit(void) /* ** Initialize the version numbers in the ES Housekeeping pkt */ - CFE_ES_Global.TaskData.HkPacket.Payload.CFEMajorVersion = CFE_MAJOR_VERSION; - CFE_ES_Global.TaskData.HkPacket.Payload.CFEMinorVersion = CFE_MINOR_VERSION; - CFE_ES_Global.TaskData.HkPacket.Payload.CFERevision = CFE_REVISION; - CFE_ES_Global.TaskData.HkPacket.Payload.CFEMissionRevision = CFE_MISSION_REV; + CFE_ES_Global.TaskData.HkPacket.Payload.CFEVersion.Major = CFE_MAJOR_VERSION; + CFE_ES_Global.TaskData.HkPacket.Payload.CFEVersion.Minor = CFE_MINOR_VERSION; + CFE_ES_Global.TaskData.HkPacket.Payload.CFEVersion.Revision = CFE_REVISION; + CFE_ES_Global.TaskData.HkPacket.Payload.CFEVersion.MissionRevision = CFE_MISSION_REV; OS_GetVersionNumber(VersionNumber); - CFE_ES_Global.TaskData.HkPacket.Payload.OSALMajorVersion = VersionNumber[0]; - CFE_ES_Global.TaskData.HkPacket.Payload.OSALMinorVersion = VersionNumber[1]; - CFE_ES_Global.TaskData.HkPacket.Payload.OSALRevision = VersionNumber[2]; - CFE_ES_Global.TaskData.HkPacket.Payload.OSALMissionRevision = VersionNumber[3]; + CFE_ES_Global.TaskData.HkPacket.Payload.OSALVersion.Major = VersionNumber[0]; + CFE_ES_Global.TaskData.HkPacket.Payload.OSALVersion.Minor = VersionNumber[1]; + CFE_ES_Global.TaskData.HkPacket.Payload.OSALVersion.Revision = VersionNumber[2]; + CFE_ES_Global.TaskData.HkPacket.Payload.OSALVersion.MissionRevision = VersionNumber[3]; CFE_PSP_GetVersionNumber(VersionNumber); - CFE_ES_Global.TaskData.HkPacket.Payload.PSPMajorVersion = VersionNumber[0]; - CFE_ES_Global.TaskData.HkPacket.Payload.PSPMinorVersion = VersionNumber[1]; - CFE_ES_Global.TaskData.HkPacket.Payload.PSPRevision = VersionNumber[2]; - CFE_ES_Global.TaskData.HkPacket.Payload.PSPMissionRevision = VersionNumber[3]; + CFE_ES_Global.TaskData.HkPacket.Payload.PSPVersion.Major = VersionNumber[0]; + CFE_ES_Global.TaskData.HkPacket.Payload.PSPVersion.Minor = VersionNumber[1]; + CFE_ES_Global.TaskData.HkPacket.Payload.PSPVersion.Revision = VersionNumber[2]; + CFE_ES_Global.TaskData.HkPacket.Payload.PSPVersion.MissionRevision = VersionNumber[3]; /* ** Task startup event message.