nasa / CF

The Core Flight System (cFS) CFDP application.
Apache License 2.0
78 stars 45 forks source link

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

Closed jphickey closed 9 months ago

jphickey commented 2 years ago

Checklist (Please check before submitting)

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.:

https://github.com/nasa/CF/blob/557c1327e3452e961e6a4781cd4a957463b11cdd/fsw/platform_inc/cf_msgids.h#L33

This presents some challenges for the user:

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.

skliper commented 2 years ago

In theory you could just override as documented in https://github.com/nasa/cFS/discussions/403