From 10dbf4af5bdf5d9919718acac2cb9f881ca92c40 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 23 Mar 2021 12:23:34 -0400 Subject: [PATCH] Fix #1206, report PSP version in ES HK TLM Add PSP version info to ES Housekeeping TLM messages. This is equivalent to OSAL version info. Changes both to use the proper version API. --- docs/src/mnem_maps/cfe_es_tlm_mnem_map | 4 ++ modules/es/eds/cfe_es.xml | 66 +++++++++++++++++--------- modules/es/fsw/inc/cfe_es_msg.h | 9 ++++ modules/es/fsw/src/cfe_es_task.c | 25 ++++++---- 4 files changed, 73 insertions(+), 31 deletions(-) diff --git a/docs/src/mnem_maps/cfe_es_tlm_mnem_map b/docs/src/mnem_maps/cfe_es_tlm_mnem_map index 63a21c636..e76b8701d 100644 --- a/docs/src/mnem_maps/cfe_es_tlm_mnem_map +++ b/docs/src/mnem_maps/cfe_es_tlm_mnem_map @@ -26,6 +26,10 @@ 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_PAD1=$sc_$cpu_ES_PAD1 \ ES_PAD2=$sc_$cpu_ES_PAD2 \ ES_PAD3=$sc_$cpu_ES_PAD3 \ diff --git a/modules/es/eds/cfe_es.xml b/modules/es/eds/cfe_es.xml index 517e1e778..5e2f2077b 100644 --- a/modules/es/eds/cfe_es.xml +++ b/modules/es/eds/cfe_es.xml @@ -512,6 +512,26 @@ \cfetlmmnemonic \ES_OSMISSIONREV + + + \cfetlmmnemonic \ES_PSPMAJORVER + + + + + \cfetlmmnemonic \ES_PSPMINORVER + + + + + \cfetlmmnemonic \ES_PSPREVISION + + + + + \cfetlmmnemonic \ES_PSPMISSIONREV + + \cfetlmmnemonic \ES_SYSLOGBYTEUSED @@ -746,7 +766,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -857,7 +877,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -909,7 +929,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -970,7 +990,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1028,7 +1048,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1085,7 +1105,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1138,7 +1158,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1186,7 +1206,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1238,7 +1258,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1285,7 +1305,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1339,7 +1359,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1384,7 +1404,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1436,7 +1456,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1493,7 +1513,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1547,7 +1567,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1595,7 +1615,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1646,7 +1666,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1699,7 +1719,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1745,7 +1765,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1797,7 +1817,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1851,7 +1871,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1902,7 +1922,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment @@ -1954,7 +1974,7 @@ \par Command Verification - Successful execution of this command may be verified with + Successful execution of this command may be verified with the following telemetry: - \b \c \ES_CMDPC - command execution counter will increment diff --git a/modules/es/fsw/inc/cfe_es_msg.h b/modules/es/fsw/inc/cfe_es_msg.h index 623651255..c6b0b61bb 100644 --- a/modules/es/fsw/inc/cfe_es_msg.h +++ b/modules/es/fsw/inc/cfe_es_msg.h @@ -1489,6 +1489,15 @@ typedef struct CFE_ES_HousekeepingTlm_Payload 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 diff --git a/modules/es/fsw/src/cfe_es_task.c b/modules/es/fsw/src/cfe_es_task.c index c559c6625..73f4e98a7 100644 --- a/modules/es/fsw/src/cfe_es_task.c +++ b/modules/es/fsw/src/cfe_es_task.c @@ -338,6 +338,7 @@ int32 CFE_ES_TaskInit(void) int32 Status; uint32 SizeofCfeSegment; cpuaddr CfeSegmentAddr; + uint8 VersionNumber[4]; /* ** Register the Application @@ -444,14 +445,22 @@ int32 CFE_ES_TaskInit(void) /* ** Initialize the version numbers in the ES Housekeeping pkt */ - CFE_ES_TaskData.HkPacket.Payload.CFEMajorVersion = CFE_MAJOR_VERSION; - CFE_ES_TaskData.HkPacket.Payload.CFEMinorVersion = CFE_MINOR_VERSION; - CFE_ES_TaskData.HkPacket.Payload.CFERevision = CFE_REVISION; - CFE_ES_TaskData.HkPacket.Payload.CFEMissionRevision = CFE_MISSION_REV; - CFE_ES_TaskData.HkPacket.Payload.OSALMajorVersion = OS_MAJOR_VERSION; - CFE_ES_TaskData.HkPacket.Payload.OSALMinorVersion = OS_MINOR_VERSION; - CFE_ES_TaskData.HkPacket.Payload.OSALRevision = OS_REVISION; - CFE_ES_TaskData.HkPacket.Payload.OSALMissionRevision = OS_MISSION_REV; + CFE_ES_TaskData.HkPacket.Payload.CFEMajorVersion = CFE_MAJOR_VERSION; + CFE_ES_TaskData.HkPacket.Payload.CFEMinorVersion = CFE_MINOR_VERSION; + CFE_ES_TaskData.HkPacket.Payload.CFERevision = CFE_REVISION; + CFE_ES_TaskData.HkPacket.Payload.CFEMissionRevision = CFE_MISSION_REV; + + OS_GetVersionNumber(VersionNumber); + CFE_ES_TaskData.HkPacket.Payload.OSALMajorVersion = VersionNumber[0]; + CFE_ES_TaskData.HkPacket.Payload.OSALMinorVersion = VersionNumber[1]; + CFE_ES_TaskData.HkPacket.Payload.OSALRevision = VersionNumber[2]; + CFE_ES_TaskData.HkPacket.Payload.OSALMissionRevision = VersionNumber[3]; + + CFE_PSP_GetVersionNumber(VersionNumber); + CFE_ES_TaskData.HkPacket.Payload.PSPMajorVersion = VersionNumber[0]; + CFE_ES_TaskData.HkPacket.Payload.PSPMinorVersion = VersionNumber[1]; + CFE_ES_TaskData.HkPacket.Payload.PSPRevision = VersionNumber[2]; + CFE_ES_TaskData.HkPacket.Payload.PSPMissionRevision = VersionNumber[3]; /* ** Task startup event message.