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

Improve API consistency for functions accepting a software bus message #440

Closed
jphickey opened this issue Dec 20, 2019 · 1 comment · Fixed by #998
Closed

Improve API consistency for functions accepting a software bus message #440

jphickey opened this issue Dec 20, 2019 · 1 comment · Fixed by #998
Milestone

Comments

@jphickey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The data types accepted by the SB API are not entirely consistent. Most API functions that operate on software bus message buffers accept a CFE_SB_MsgPtr_t.

There are some exceptions, most notably the CFE_SB_InitMsg() function accepts a void*.

Describe the solution you'd like
All SB API functions that operate on message buffers should use the CFE_SB_MsgPtr_t type (or CFE_SB_Msg_t *)

Additional context
Making the interface type-correct helps the compiler's type checking do its intended job, helping to catch/avoid the possibility of passing a data buffer which is not actually an SB message buffer. Using void* permits anything to be passed in, effectively disabling all checking.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@skliper
Copy link
Contributor

skliper commented Jan 7, 2021

CFE_SB_InitMsg was deprecated in #998, no remaining instances found of using void * with msg.

@skliper skliper linked a pull request Jan 7, 2021 that will close this issue
@skliper skliper closed this as completed Jan 7, 2021
@skliper skliper added this to the 7.0.0 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants