-
Notifications
You must be signed in to change notification settings - Fork 201
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
Add runtime TopicID -> MsgID conversions #2519
Labels
Comments
jphickey
added a commit
to jphickey/cFE
that referenced
this issue
Feb 27, 2024
Adds the following APIs to convert TopicID to MsgID values at runtime: - CFE_SB_CmdTopicIdToMsgId() - CFE_SB_TlmTopicIdToMsgId() - CFE_SB_GlobalCmdTopicIdToMsgId() - CFE_SB_GlobalTlmTopicIdToMsgId() - CFE_SB_LocalCmdTopicIdToMsgId() - CFE_SB_LocalTlmTopicIdToMsgId() This includes coverage tests and stubs. If the config does not define the conversions, then these return the invalid msgID value.
2 tasks
dzbaker
added a commit
that referenced
this issue
Feb 29, 2024
Fix #2519, Add runtime TopicId conversion routines to SB
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
All CFS apps are now defining their respective CMD/TLM messages in terms of Topic ID, which is an integer value that refers to the general type of data, rather than a specific instance of the stream like MsgID.
The conversion from Topic ID to Msg ID is implemented as a compile-time macro in the default msgid definitions.
However it can also be very useful for apps to do the same conversion/mapping at runtime.
Describe the solution you'd like
Add runtime APIs to SB to convert topic IDs to msg IDs.
Describe alternatives you've considered
N/A
Additional context
In order to make this backward compatible with configurations that declare all msgIDs directly, it should handle the case where the conversion macro is not defined. The APIs can simply return the invalid MsgID value in that case (thus indicating that runtime conversion is not implemented/supported in this config).
Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: