Skip to content

Commit

Permalink
Fix nasa#1303, Add struct for cFE/OSAL/PSP Version in ES Tlm Packet
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Oct 26, 2023
1 parent 0316672 commit 1c1a18d
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 103 deletions.
16 changes: 3 additions & 13 deletions docs/src/mnem_maps/cfe_es_tlm_mnem_map
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
36 changes: 9 additions & 27 deletions modules/es/config/default_cfe_es_msgdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,33 +253,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 */
Expand Down
11 changes: 11 additions & 0 deletions modules/es/config/default_cfe_es_msgstruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
**/
Expand Down
57 changes: 6 additions & 51 deletions modules/es/eds/cfe_es.xml
Original file line number Diff line number Diff line change
Expand Up @@ -562,64 +562,19 @@
\cfetlmmnemonic \ES_CKSUM
</LongDescription>
</Entry>
<Entry name="CFEMajorVersion" type="BASE_TYPES/uint8" shortDescription="Major Version Number of cFE">
<Entry name="CFEVersion" type="Version" shortDescription="CFE Version Information">
<LongDescription>
\cfetlmmnemonic \ES_CFEMAJORVER
\cfetlmmnemonic \ES_CFEVERSION
</LongDescription>
</Entry>
<Entry name="CFEMinorVersion" type="BASE_TYPES/uint8" shortDescription="Minor Version Number of cFE">
<Entry name="OSALVersion" type="Version" shortDescription="OSAL Version Information">
<LongDescription>
\cfetlmmnemonic \ES_CFEMINORVER
\cfetlmmnemonic \ES_OSALVERSION
</LongDescription>
</Entry>
<Entry name="CFERevision" type="BASE_TYPES/uint8" shortDescription="Sub-Minor Version Number of cFE">
<Entry name="PSPVersion" type="Version" shortDescription="PSP Version Information">
<LongDescription>
\cfetlmmnemonic \ES_CFEREVISION
</LongDescription>
</Entry>
<Entry name="CFEMissionRevision" type="BASE_TYPES/uint8" shortDescription="Mission Version Number of cFE">
<LongDescription>
\cfetlmmnemonic \ES_CFEMISSIONREV
</LongDescription>
</Entry>
<Entry name="OSALMajorVersion" type="BASE_TYPES/uint8" shortDescription="OS Abstraction Layer Major Version Number">
<LongDescription>
\cfetlmmnemonic \ES_OSMAJORVER
</LongDescription>
</Entry>
<Entry name="OSALMinorVersion" type="BASE_TYPES/uint8" shortDescription="OS Abstraction Layer Minor Version Number">
<LongDescription>
\cfetlmmnemonic \ES_OSMINORVER
</LongDescription>
</Entry>
<Entry name="OSALRevision" type="BASE_TYPES/uint8" shortDescription="OS Abstraction Layer Revision Number">
<LongDescription>
\cfetlmmnemonic \ES_OSREVISION
</LongDescription>
</Entry>
<Entry name="OSALMissionRevision" type="BASE_TYPES/uint8" shortDescription="OS Abstraction Layer MissionRevision Number">
<LongDescription>
\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
\cfetlmmnemonic \ES_PSPVERSION
</LongDescription>
</Entry>
<Entry name="SysLogBytesUsed" type="MemOffset" shortDescription="Total number of bytes used in system log">
Expand Down
24 changes: 12 additions & 12 deletions modules/es/fsw/src/cfe_es_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1c1a18d

Please sign in to comment.