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

Fix #1108, split resource id functions into module #1136

Merged

Conversation

jphickey
Copy link
Contributor

Describe the contribution
Move all functions, macros, types, and other definitions related to resource IDs and generic resource management into
a separate module, like CFE MSG and SBR, etc.

Notably this allows a mission to elect "strict" implementations of these objects, where every ID type is unique, and assigning
between them (or uint32) results in a compiler error.

Fixes #1108
Fixes #913

Testing performed
Build and sanity test CFE, run all unit tests

Expected behavior changes
API now has separate types for each resource type (Apps, Tasks, Libs, Counters, etc).

System(s) tested on
Ubuntu 20.04

Additional context
The user can elect at the mission level whether this is a simple typedef (all uint32, all interchangeable) or a wrapper type (separate/strict type, cannot be interchanged). The former is backward compatible but the latter is not - must use proper types.

Default if nothing is indicated is to use the backward compatible types, of course - so this doesn't break anyone's build.

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

Move all functions, macros, types, and other definitions
related to resource IDs and generic resource management into
a separate module, like CFE MSG and SBR, etc.

Notably this allows a mission to elect "strict" implementations
of these objects, where every ID type is unique, and assigning
between them (or uint32) results in a compiler error.
@jphickey jphickey added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Jan 27, 2021
@astrogeco astrogeco added CCB:2021-01-27 and removed CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels Jan 27, 2021
@astrogeco
Copy link
Contributor

astrogeco commented Jan 27, 2021

CCB 2021-01-27 APPROVED

Doesn't change the API but now uses the correct type.
Made a separate type-specific "undefined" for convenience
All the IDs are just uint32 under the wrappers

@astrogeco astrogeco changed the base branch from main to integration-candidate January 27, 2021 21:38
Remove code blocks that were commented out, not needed.
@jphickey
Copy link
Contributor Author

jphickey commented Feb 1, 2021

FYI - just added another commit here to remove some ifdef'd out blocks of code within this PR, as this hasn't been merged yet.

@astrogeco
Copy link
Contributor

@jphickey check conflicts

@jphickey jphickey merged commit 2edfc87 into nasa:integration-candidate Feb 8, 2021
jphickey added a commit that referenced this pull request Feb 8, 2021
Fix #1108, split resource id functions into module
jphickey added a commit to nasa/cFS that referenced this pull request Feb 8, 2021
jphickey added a commit that referenced this pull request Feb 8, 2021
Corrects warnings/errors in doxygen userguide
@jphickey jphickey deleted the fix-1108-resourceid-module branch March 10, 2021 14:43
@skliper skliper added this to the 7.0.0 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split "ResourceId" type into a separate module Provide separate type for each resource category
3 participants