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

Split typedefs from structure definitions #85

Closed
jphickey opened this issue Feb 5, 2024 · 0 comments · Fixed by #86
Closed

Split typedefs from structure definitions #85

jphickey opened this issue Feb 5, 2024 · 0 comments · Fixed by #86
Labels
enhancement New feature or request

Comments

@jphickey
Copy link
Contributor

jphickey commented Feb 5, 2024

Is your feature request related to a problem? Please describe.
Currently, the struct definitions and the typedefs that go with them are generated into a single header file.

This can cause a backward-compatibility problem, in particular for the "msg" module, which defines an abstract base typedef for its messages here:

https://github.com/nasa/cFE/blob/8cdad66e4eafd11c2ea93d0360867045b77fa981/modules/core_api/fsw/inc/cfe_msg_api_typedefs.h#L107

As the generated EDS file also has a typedef in it, this results in a duplicate/conflicting type definition. (not for the struct, but just the typedef).

Describe the solution you'd like
This could be solved if the EDS-generated defs were in separate files, such that the structs could be defined without the typedefs, or vice versa.

Describe alternatives you've considered
The underlying issue is that this currently requires a bit of a hack to get the EDS-generated definitions to take the place of the traditional definitions. Goal is to remove the hack, so any solution that gets there is worth considering.

Additional context
Ideally the EDS-generated headers should conform to the existing CFE headers, minimizing/avoiding any change on the CFE side where possible to do so.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

jphickey added a commit to jphickey/EdsLib that referenced this issue Feb 29, 2024
Implements a bit of paradigm shift in how names of symbols/types are
generated, relying on prefixes rather than suffixes.  Using suffixes
has an opportunity of name collisions that is not possible when using
prefixes.

A separate typedef file maps to the existing type names and thus keeps
it compatible with existing code, but only if that typedef file is used.
jphickey added a commit to jphickey/EdsLib that referenced this issue Feb 29, 2024
Implements a bit of paradigm shift in how names of symbols/types are
generated, relying on prefixes rather than suffixes.  Using suffixes
has an opportunity of name collisions that is not possible when using
prefixes.

A separate typedef file maps to the existing type names and thus keeps
it compatible with existing code, but only if that typedef file is used.
@chillfig chillfig added the enhancement New feature or request label Feb 29, 2024
jphickey added a commit to jphickey/EdsLib that referenced this issue Mar 4, 2024
dzbaker added a commit that referenced this issue Mar 4, 2024
Fix #85, updates to struct/typedef names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants