Clarification on Software Bus transition of message pointer types from 6.7 to caelum #758
-
Good afternoon, I'm currently working on building a complete cFS software package and am trying to align the various cFS apps to the newer cFS versions. I've been using the opensatkit version update guide here: I wanted to get some clarification on one note in that document if anyone within the group can provide the knowledge. In particular: Change all CFE_SB_MsgPtr_t to CFE_SB_Buffer_t bool CmdFunction(const CFE_SB_Buffer_t* SbBufPtr) const UserMsg_t UserMsg = (const UserMsg_t) SbBufPtr; Is it correct that all pointers which used CFE_MSG_Message_t pointers in function declarations should be changed over to CFE_SB_Buffer_t pointers? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
See sample_app for the latest recommended pattern: Basically cast to the user message type from the "dispatch" function, basically as soon as the message type is identified (via the cmd code), cmd handler can just act on the user message type. |
Beta Was this translation helpful? Give feedback.
See sample_app for the latest recommended pattern:
https://github.com/skliper/sample_app/blob/ceaf7ab5fadc7ac80f9bee6f5a2757593417e461/fsw/src/sample_app_dispatch.c#L74-L88
Basically cast to the user message type from the "dispatch" function, basically as soon as the message type is identified (via the cmd code), cmd handler can just act on the user message type.