Skip to content

Commit

Permalink
Fix #1206, report PSP version in ES HK TLM
Browse files Browse the repository at this point in the history
Add PSP version info to ES Housekeeping TLM messages.
This is equivalent to OSAL version info.

Changes both to use the proper version API.
  • Loading branch information
jphickey committed Mar 23, 2021
1 parent 98bc158 commit 10dbf4a
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 31 deletions.
4 changes: 4 additions & 0 deletions docs/src/mnem_maps/cfe_es_tlm_mnem_map
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
66 changes: 43 additions & 23 deletions modules/es/eds/cfe_es.xml
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,26 @@
\cfetlmmnemonic \ES_OSMISSIONREV
</LongDescription>
</Entry>
<Entry name="PSPMajorVersion" type="BASE_TYPES/uint8" shortDescription="Platform Support Package Major Version Number">
<LongDescription>
\cfetlmmnemonic \ES_PSPMAJORVER
</LongDescription>
</Entry>
<Entry name="PSPMinorVersion" type="BASE_TYPES/uint8" shortDescription="Platform Support Package Minor Version Number">
<LongDescription>
\cfetlmmnemonic \ES_PSPMINORVER
</LongDescription>
</Entry>
<Entry name="PSPRevision" type="BASE_TYPES/uint8" shortDescription="Platform Support Package Revision Number">
<LongDescription>
\cfetlmmnemonic \ES_PSPREVISION
</LongDescription>
</Entry>
<Entry name="PSPMissionRevision" type="BASE_TYPES/uint8" shortDescription="Platform Support Package MissionRevision Number">
<LongDescription>
\cfetlmmnemonic \ES_PSPMISSIONREV
</LongDescription>
</Entry>
<Entry name="SysLogBytesUsed" type="BASE_TYPES/uint32" shortDescription="Total number of bytes used in system log">
<LongDescription>
\cfetlmmnemonic \ES_SYSLOGBYTEUSED
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions modules/es/fsw/inc/cfe_es_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 17 additions & 8 deletions modules/es/fsw/src/cfe_es_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ int32 CFE_ES_TaskInit(void)
int32 Status;
uint32 SizeofCfeSegment;
cpuaddr CfeSegmentAddr;
uint8 VersionNumber[4];

/*
** Register the Application
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 10dbf4a

Please sign in to comment.