Skip to content

Commit

Permalink
Fix #1708, Align padding explicitly in cfe_tbl_msg.h
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Apr 3, 2023
1 parent 7af467e commit 9e43957
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 25 deletions.
4 changes: 2 additions & 2 deletions docs/src/mnem_maps/cfe_tbl_tlm_mnem_map
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TBL_VALSUCCESSCTR=$sc_$cpu_TBL_ValSuccessCtr \
TBL_VALFAILEDCTR=$sc_$cpu_TBL_ValFailedCtr \
TBL_VALREQCTR=$sc_$cpu_TBL_ValReqCtr \
TBL_NUMFREESHRBUF=$sc_$cpu_TBL_NumFreeShrBuf \
TBL_BYTEALIGNPAD1=$sc_$cpu_TBL_ByteAlignPad1 \
TBL_HKPADDING=$sc_$cpu_TBL_HkPadding \
TBL_MEMPOOLHANDLE=$sc_$cpu_TBL_MemPoolHandle \
TBL_LASTUPDTIME="$sc_$cpu_TBL_LastUpdTime, $sc_$cpu_TBL_SECONDS, $sc_$cpu_TBL_SUBSECONDS" \
TBL_LASTUPDTBLNAME=$sc_$cpu_TBL_LastUpdTblName[CFE_TB_MAX_FULL_NAME_LEN] \
Expand All @@ -51,4 +51,4 @@ TBL_NAME=$sc_$cpu_TBL_Name[CFE_TB_MAX_FULL_NAME_LEN] \
TBL_LASTFILEUPD=$sc_$cpu_TBL_LastFileUpd[OS_MAX_PATH_LEN] \
TBL_OWNERAPP=$sc_$cpu_TBL_OwnerApp[OS_MAX_API_NAME] \
TBL_CRITICAL=$sc_$cpu_TBL_Spare3 \
TBL_SPARE4=$sc_$cpu_TBL_Spare4
TBL_REGPADDING=$sc_$cpu_TBL_RegPadding
47 changes: 24 additions & 23 deletions modules/tbl/fsw/inc/cfe_tbl_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ typedef struct CFE_TBL_ActivateCmd
typedef struct CFE_TBL_DumpRegistryCmd_Payload
{
char DumpFilename[CFE_MISSION_MAX_PATH_LEN]; /**< \brief Full Filename where dumped data is to be
written */
written */
/**< ASCII string containing full path of filename
where registry is to be dumped */
} CFE_TBL_DumpRegistryCmd_Payload_t;
Expand All @@ -629,7 +629,7 @@ typedef struct CFE_TBL_DumpRegistryCmd
typedef struct CFE_TBL_SendRegistryCmd_Payload
{
char TableName[CFE_MISSION_TBL_MAX_FULL_NAME_LEN]; /**< \brief Full Name of Table whose registry entry
is to be telemetered */
is to be telemetered */
/**< ASCII string containing full table name
identifier of table whose registry entry is
to be telemetered via #CFE_TBL_TableRegistryTlm_t */
Expand All @@ -652,7 +652,7 @@ typedef struct CFE_TBL_SendRegistryCmd
typedef struct CFE_TBL_DelCDSCmd_Payload
{
char TableName[CFE_MISSION_TBL_MAX_FULL_NAME_LEN]; /**< \brief Full Name of Table whose CDS is
to be deleted */
to be deleted */
/**< ASCII string containing full table name
identifier of a critical table whose
CDS is to be deleted */
Expand Down Expand Up @@ -728,9 +728,9 @@ typedef struct CFE_TBL_HousekeepingTlm_Payload
** Task command interface counters...
*/
uint8 CommandCounter; /**< \cfetlmmnemonic \TBL_CMDPC
\brief Count of valid commands received */
\brief Count of valid commands received */
uint8 CommandErrorCounter; /**< \cfetlmmnemonic \TBL_CMDEC
\brief Count of invalid commands received */
\brief Count of invalid commands received */

/*
** Table Registry Statistics
Expand All @@ -744,41 +744,42 @@ typedef struct CFE_TBL_HousekeepingTlm_Payload
** Last Table Validation Results
*/
uint16 ValidationCounter; /**< \cfetlmmnemonic \TBL_VALCOMPLTDCTR
\brief Number of completed table validations */
\brief Number of completed table validations */
uint32 LastValCrc; /**< \cfetlmmnemonic \TBL_LASTVALCRC
\brief Data Integrity Value computed for last table validated */
int32 LastValStatus; /**< \cfetlmmnemonic \TBL_LASTVALS
\brief Returned status from validation function for last table validated */
bool ActiveBuffer; /**< \cfetlmmnemonic \TBL_LASTVALBUF
\brief Indicator of whether table buffer validated was 0=Inactive, 1=Active */
char LastValTableName[CFE_MISSION_TBL_MAX_FULL_NAME_LEN]; /**< \cfetlmmnemonic \TBL_LASTVALTBLNAME
\brief Name of last table validated */
\brief Name of last table validated */
uint8 SuccessValCounter; /**< \cfetlmmnemonic \TBL_VALSUCCESSCTR
\brief Total number of successful table validations */
\brief Total number of successful table validations */
uint8 FailedValCounter; /**< \cfetlmmnemonic \TBL_VALFAILEDCTR
\brief Total number of unsuccessful table validations */
\brief Total number of unsuccessful table validations */
uint8 NumValRequests; /**< \cfetlmmnemonic \TBL_VALREQCTR
\brief Number of times Table Services has requested validations from Apps */

/*
** Ground system interface information
*/
uint8 NumFreeSharedBufs; /**< \cfetlmmnemonic \TBL_NUMFREESHRBUF
\brief Number of free Shared Working Buffers */
uint8 ByteAlignPad1; /**< \cfetlmmnemonic \TBL_BYTEALIGNPAD1
\brief Spare byte to ensure longword alignment */
uint8 NumFreeSharedBufs; /**< \cfetlmmnemonic \TBL_NUMFREESHRBUF
\brief Number of free Shared Working Buffers */
uint8 HkPadding[3]; /**< \cfetlmmnemonic \TBL_HKPADDING
\brief Structure Padding to align to 32-bit boundaries */

CFE_ES_MemHandle_t MemPoolHandle; /**< \cfetlmmnemonic \TBL_MEMPOOLHANDLE
\brief Handle to TBL's memory pool */
CFE_TIME_SysTime_t LastUpdateTime; /**< \cfetlmmnemonic \TBL_LASTUPDTIME
\brief Time of last table update */
char LastUpdatedTable[CFE_MISSION_TBL_MAX_FULL_NAME_LEN]; /**< \cfetlmmnemonic \TBL_LASTUPDTBLNAME
\brief Name of the last table updated */
\brief Name of the last table updated */
char LastFileLoaded[CFE_MISSION_MAX_PATH_LEN]; /**< \cfetlmmnemonic \TBL_LASTFILELOADED
\brief Path and Name of last table image file loaded */
\brief Path and Name of last table image file loaded */
char LastFileDumped[CFE_MISSION_MAX_PATH_LEN]; /**< \cfetlmmnemonic \TBL_LASTFILEDUMPED
\brief Path and Name of last file dumped to */
\brief Path and Name of last file dumped to */
char LastTableLoaded[CFE_MISSION_TBL_MAX_FULL_NAME_LEN]; /**< \cfetlmmnemonic \TBL_LASTTABLELOADED
\brief Name of the last table loaded */
\brief Name of the last table loaded */
} CFE_TBL_HousekeepingTlm_Payload_t;

typedef struct CFE_TBL_HousekeepingTlm
Expand Down Expand Up @@ -815,17 +816,17 @@ typedef struct CFE_TBL_TblRegPacket_Payload
bool DumpOnly; /**< \cfetlmmnemonic \TBL_DUMPONLY
\brief Flag indicating Table is NOT to be loaded */
bool DoubleBuffered; /**< \cfetlmmnemonic \TBL_DBLBUFFERED
\brief Flag indicating Table has a dedicated inactive buffer */
\brief Flag indicating Table has a dedicated inactive buffer */
char Name[CFE_MISSION_TBL_MAX_FULL_NAME_LEN]; /**< \cfetlmmnemonic \TBL_NAME
\brief Processor specific table name */
\brief Processor specific table name */
char LastFileLoaded[CFE_MISSION_MAX_PATH_LEN]; /**< \cfetlmmnemonic \TBL_LASTFILEUPD
\brief Filename of last file loaded into table */
\brief Filename of last file loaded into table */
char OwnerAppName[CFE_MISSION_MAX_API_LEN]; /**< \cfetlmmnemonic \TBL_OWNERAPP
\brief Name of owning application */
\brief Name of owning application */
bool Critical; /**< \cfetlmmnemonic \TBL_CRITICAL
\brief Indicates whether table is Critical or not */
uint8 ByteAlign4; /**< \cfetlmmnemonic \TBL_SPARE4
\brief Spare byte to maintain byte alignment */
uint8 RegPadding[3]; /**< \cfetlmmnemonic \TBL_REGPADDING
\brief Structure Padding to align to 32-bit boundaries */
} CFE_TBL_TblRegPacket_Payload_t;

typedef struct CFE_TBL_TableRegistryTlm
Expand Down

0 comments on commit 9e43957

Please sign in to comment.