-
Notifications
You must be signed in to change notification settings - Fork 227
Description
Describe the bug
In Caelum when setting set(MISSION_INCLUDE_CCSDSEXT_HEADER TRUE) to use extended headers, I get a build error due to duplicate typedef of the MSG types:
cfe/modules/msg/option_inc/default_cfe_msg_hdr_priext.h:83:3: error: conflicting types for ‘CFE_MSG_Message_t’
83 | } CFE_MSG_Message_t;
| ^~~~~~~~~~~~~~~~~
cfe/modules/core_api/fsw/inc/cfe_msg_api_typedefs.h:104:31: note: previous declaration of ‘CFE_MSG_Message_t’ was here
104 | typedef union CFE_MSG_Message CFE_MSG_Message_t;
| ^~~~~~~~~~~~~~~~~
To Reproduce
Enable extended headers in Caelum config, and build.
Expected behavior
Build should succeed.
Code snips
This is because the "typedef" cannot be in both places. In contrast, the standard header (non-extended) defines only the union/struct, not typedef'ed:
cFE/modules/msg/option_inc/default_cfe_msg_hdr_pri.h
Lines 65 to 69 in 98f78e8
| 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 */ | |
| }; |
Whereas the extended header version has a typedef:
cFE/modules/msg/option_inc/default_cfe_msg_hdr_priext.h
Lines 63 to 67 in 98f78e8
| typedef union | |
| { | |
| 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; |
System observed on:
Ubuntu
Reporter Info
Joseph Hickey, Vantage Systems, Inc.