diff --git a/modules/core_api/fsw/inc/cfe_sb_api_typedefs.h b/modules/core_api/fsw/inc/cfe_sb_api_typedefs.h index 5669924fd..fa5a7f2d0 100644 --- a/modules/core_api/fsw/inc/cfe_sb_api_typedefs.h +++ b/modules/core_api/fsw/inc/cfe_sb_api_typedefs.h @@ -63,7 +63,10 @@ * * \sa CFE_SB_ValueToMsgId() */ -#define CFE_SB_MSGID_WRAP_VALUE(val) (val) +#define CFE_SB_MSGID_WRAP_VALUE(val) \ + { \ + val \ + } /** * \brief Translation macro to convert to MsgId integer values from a literal @@ -88,7 +91,7 @@ * * \sa CFE_SB_MsgIdToValue() */ -#define CFE_SB_MSGID_UNWRAP_VALUE(mid) ((CFE_SB_MsgId_Atom_t)(mid)) +#define CFE_SB_MSGID_UNWRAP_VALUE(mid) ((mid).Value) /** * \brief Reserved value for CFE_SB_MsgId_t that will not match any valid MsgId diff --git a/modules/core_api/fsw/inc/cfe_sb_extern_typedefs.h b/modules/core_api/fsw/inc/cfe_sb_extern_typedefs.h index 3ccf2f8f9..bc58e23e9 100644 --- a/modules/core_api/fsw/inc/cfe_sb_extern_typedefs.h +++ b/modules/core_api/fsw/inc/cfe_sb_extern_typedefs.h @@ -115,7 +115,10 @@ typedef uint32 CFE_SB_MsgId_Atom_t; * @note In a future version it could become a type-safe wrapper similar to the route index, * to avoid message IDs getting mixed between other integer values. */ -typedef CFE_SB_MsgId_Atom_t CFE_SB_MsgId_t; +typedef struct +{ + CFE_SB_MsgId_Atom_t Value; +} CFE_SB_MsgId_t; /** \brief CFE_SB_PipeId_t to primitive type definition *