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

App should treat CFE_SB_MsgId_t values as opaque #53

Closed
jphickey opened this issue Apr 6, 2020 · 1 comment · Fixed by #54 or #63
Closed

App should treat CFE_SB_MsgId_t values as opaque #53

jphickey opened this issue Apr 6, 2020 · 1 comment · Fixed by #54 or #63
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jphickey
Copy link
Contributor

jphickey commented Apr 6, 2020

Is your feature request related to a problem? Please describe.
For compatibility going forward, code should not assume that CFE_SB_MsgId_t is an integer.

Describe the solution you'd like
When dealing with an integer, such as when printing in events/messages or for backward compatibility with MID #define's, the code may use CFE_SB_ValueToMsgId() and CFE_SB_MsgIdToValue() conversion routines.

Additional context
Architecturally, the CFE_SB_MsgId_t is supposed to be an opaque/abstract value that identifies an endpoint on the software bus routing domain. The specific meaning of integer values is already different in an "extended header" (CCSDS v2) build vs. the standard header build. Therefore apps should never make assumptions regarding the specific integer values, and all introspection of CFE_SB_MsgId_t values should be through the CFE SB API only.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

jphickey added a commit to jphickey/sample_app that referenced this issue Apr 6, 2020
Do not assume CFE_SB_MsgId_t is implicitly integral in nature.
When an integer value is required for printing or backward
compatibility, use the explicit conversion routine to
get this.
@jphickey jphickey self-assigned this Apr 6, 2020
@jphickey jphickey added the enhancement New feature or request label Apr 6, 2020
jphickey added a commit to jphickey/sample_app that referenced this issue Apr 8, 2020
Do not assume CFE_SB_MsgId_t is implicitly integral in nature.
When an integer value is required for printing or backward
compatibility, use the explicit conversion routine to
get this.
jphickey added a commit to jphickey/sample_app that referenced this issue May 5, 2020
Do not assume CFE_SB_MsgId_t is implicitly integral in nature.
When an integer value is required for printing or backward
compatibility, use the explicit conversion routine to
get this.
@jphickey jphickey added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label May 5, 2020
@jphickey
Copy link
Contributor Author

jphickey commented May 5, 2020

Rebased and pared back changeset to only the parts accepted in CFE.

This actually causes a compile failure on RTEMS when CFE_SB_MsgId_t changes type (extended headers and it goes from uint16 to uint32) so its not just cosmetic.

@astrogeco astrogeco removed the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label May 6, 2020
astrogeco added a commit that referenced this issue May 8, 2020
@astrogeco astrogeco added this to the 1.2.0 milestone Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants