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

Fix #1982, extended header definitions and test updates #1983

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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