Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicit padding in CFE_TBL_HousekeepingTlm_Payload_t #1708

Open
skliper opened this issue Jul 26, 2021 · 0 comments · May be fixed by #2278
Open

Implicit padding in CFE_TBL_HousekeepingTlm_Payload_t #1708

skliper opened this issue Jul 26, 2021 · 0 comments · May be fixed by #2278

Comments

@skliper
Copy link
Contributor

skliper commented Jul 26, 2021

Is your feature request related to a problem? Please describe.
Implicit padding, as well as the issues detailed in #664 (configurable sized elements early in the packet) in CFE_TBL_HousekeepingTlm_Payload_t. There's 2 bytes being added after ByteAlignPad1.

typedef struct CFE_TBL_HousekeepingTlm_Payload
{
/*
** Task command interface counters...
*/
uint8 CommandCounter; /**< \cfetlmmnemonic \TBL_CMDPC
\brief Count of valid commands received */
uint8 CommandErrorCounter; /**< \cfetlmmnemonic \TBL_CMDEC
\brief Count of invalid commands received */
/*
** Table Registry Statistics
*/
uint16 NumTables; /**< \cfetlmmnemonic \TBL_NUMTABLES
\brief Number of Tables Registered */
uint16 NumLoadPending; /**< \cfetlmmnemonic \TBL_NUMUPDATESPEND
\brief Number of Tables pending on Applications for their update */
/*
** Last Table Validation Results
*/
uint16 ValidationCounter; /**< \cfetlmmnemonic \TBL_VALCOMPLTDCTR
\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 */
uint8 SuccessValCounter; /**< \cfetlmmnemonic \TBL_VALSUCCESSCTR
\brief Total number of successful table validations */
uint8 FailedValCounter; /**< \cfetlmmnemonic \TBL_VALFAILEDCTR
\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 */
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 */
char LastFileLoaded[CFE_MISSION_MAX_PATH_LEN]; /**< \cfetlmmnemonic \TBL_LASTFILELOADED
\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 */
char LastTableLoaded[CFE_MISSION_TBL_MAX_FULL_NAME_LEN]; /**< \cfetlmmnemonic \TBL_LASTTABLELOADED
\brief Name of the last table loaded */
} CFE_TBL_HousekeepingTlm_Payload_t;

Noticed when debugging memory handle info reporting commands in ES. Discovered the table pool handle was being interpreted incorrectly in cFS-GroundSystem due to the implicit padding.

Describe the solution you'd like
Likely addressed as part of the transition to the cmd/tlm structures being generated/delivered from a more complete data description.

Describe alternatives you've considered
Could quick fix.

Additional context
#664

Requester Info
Jacob Hageman - NASA/GSFC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant