-
Notifications
You must be signed in to change notification settings - Fork 232
Description
Currently, most of the functions in cfe_sb_util.c and a few others are like:
{{{
void CFE_SB_InitMsg(void *MsgPtr,
CFE_SB_MsgId_t MsgId,
uint16 Length,
boolean Clear )
{
#ifdef MESSAGE_FORMAT_IS_CCSDS
CCSDS_InitPkt ((CCSDS_PriHdr_t *)MsgPtr,(uint16)MsgId,Length,Clear);
#endif
} /* end CFE_SB_InitMsg */
}}}
It's confusing what else would be done in these functions (and nothing else is done.) As Joe said, if someone implemented a wholly different SB message format, they're likely to write their own set of functions and having a bunch of #if/elseif/elseif/elseif/endif blocks would be confusing and difficult to maintain.
The suggestion from the CCB today was to remove these #ifdefs. It might be worthwhile to put in a check at the top of the file that generates a compiler warning/error if it's not defined...