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

Use generic "cf_msgids.h" file that uses offsets from base MID #297

Closed
3 tasks done
jphickey opened this issue Aug 2, 2022 · 1 comment · Fixed by #423
Closed
3 tasks done

Use generic "cf_msgids.h" file that uses offsets from base MID #297

jphickey opened this issue Aug 2, 2022 · 1 comment · Fixed by #423

Comments

@jphickey
Copy link
Contributor

jphickey commented Aug 2, 2022

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I reviewed the CF README.md file to see if the feature is in the major future work.
  • I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.

Is your feature request related to a problem? Please describe.
Currently, the example cf_msgids.h file supplied with CF (under platform_inc) is hardcoded, e.g.:

#define CF_CMD_MID (0x18B3) /**< \brief Message ID for commands */

This presents some challenges for the user:

  • at a minimum the user needs to modify this file in place (because the build script just points to this dir, there is no selection/override currently)
  • it is not really possible to use different MIDs on multiple instances of CF running on a multi-CPU deployment.

Describe the solution you'd like
Use offsets from CFE_PLATFORM_CMD_MID_BASE and CFE_PLATFORM_TLM_MID_BASE like CFE framework does. For example:

https://github.com/nasa/cFE/blob/924b2be20a39f17355861396273856caccc8c89f/cmake/sample_defs/cpu1_msgids.h#L87

Thus the user only needs to specify the offset from the base (aka the "topic ID") in the mission_cfg.h file (which has global scope, not processor scope) and each CPU will automatically get non-overlapping MID numbers.

Describe alternatives you've considered
The alternative is to employ the generate_config_includefile cmake function to allow the user to specify this file per arch, but IMO the topicID/offset approach is simpler and more logical.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

jphickey added a commit to jphickey/CF that referenced this issue Aug 2, 2022
Define the CF msgids as an offset from the CFE_PLATFORM_CMD_MID_BASE or
CFE_PLATFORM_TLM_MID_BASE, which helps simplify configuration.

Users should add MSG offsets to the global mission config header.
@skliper
Copy link
Contributor

skliper commented Aug 31, 2022

In theory you could just override as documented in nasa/cFS#403

jphickey added a commit to jphickey/CF that referenced this issue Dec 13, 2023
Define CF MsgIDs based on TopicID
jphickey added a commit to jphickey/CF that referenced this issue Dec 13, 2023
Define CF MsgIDs based on TopicID
dmknutsen added a commit that referenced this issue Dec 15, 2023
Fix #297, use TopicID for MsgID assignment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants