You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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: