Skip to content

Commit

Permalink
Merge pull request #1983 from jphickey/fix-1982-exthdr-definition
Browse files Browse the repository at this point in the history
Fix #1982, extended header definitions and test updates
  • Loading branch information
astrogeco authored Oct 6, 2021
2 parents dd081cd + 8e24232 commit e8ebaac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
17 changes: 7 additions & 10 deletions modules/msg/option_inc/default_cfe_msg_hdr_priext.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "common_types.h"
#include "ccsds_hdr.h"
#include "cfe_msg_sechdr.h"
#include "cfe_msg_api_typedefs.h"

/*
* Type Definitions
Expand All @@ -60,34 +61,30 @@ typedef struct
/**
* \brief cFS generic base message
*/
typedef union
union CFE_MSG_Message
{
CCSDS_SpacePacket_t CCSDS; /**< \brief CCSDS Header (Pri or Pri + Ext) */
uint8 Byte[sizeof(CCSDS_SpacePacket_t)]; /**< \brief Byte level access */
} CFE_MSG_Message_t;
};

/**
* \brief cFS command header
*/
typedef struct
struct CFE_MSG_CommandHeader
{

CFE_MSG_Message_t Msg; /**< \brief Base message */
CFE_MSG_CommandSecondaryHeader_t Sec; /**< \brief Secondary header */
uint8 Spare[4]; /**< /brief Pad to avoid compiler padding if payload
requires 64 bit alignment */

} CFE_MSG_CommandHeader_t;
};

/**
* \brief cFS telemetry header
*/
typedef struct
struct CFE_MSG_TelemetryHeader
{

CFE_MSG_Message_t Msg; /**< \brief Base message */
CFE_MSG_TelemetrySecondaryHeader_t Sec; /**< \brief Secondary header */

} CFE_MSG_TelemetryHeader_t;
};

#endif /* DEFAULT_CFE_MSG_HDR_PRIEXT_H */
2 changes: 1 addition & 1 deletion modules/msg/ut-coverage/test_cfe_msg_ccsdsext.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void Test_MSG_Init_Ext(void)
is_v1 = !hassec;

/* Set up return */
UT_SetForceFail(UT_KEY(CFE_PSP_GetSpacecraftId), sc_id);
UT_SetDefaultReturnValue(UT_KEY(CFE_PSP_GetSpacecraftId), sc_id);

UtPrintf("Set to all F's, msgid value = 0");
memset(&msg, 0xFF, sizeof(msg));
Expand Down

0 comments on commit e8ebaac

Please sign in to comment.