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

Document/implement naming pattern for created elements #1412

Open
skliper opened this issue Apr 22, 2021 · 2 comments
Open

Document/implement naming pattern for created elements #1412

skliper opened this issue Apr 22, 2021 · 2 comments

Comments

@skliper
Copy link
Contributor

skliper commented Apr 22, 2021

Is your feature request related to a problem? Please describe.
Inconsistent on namespacing of created elements (see #1401).

Describe the solution you'd like
Scrub "names" of created elements and how they are defined (configurable, #define, locally) and document/implement a common pattern. Really don't need to be configurable, if only used once they don't really need to be a separate define (only required when ID is not available and need to be looked up which is rare sharing case), some prefix with CFE, etc.

Describe alternatives you've considered
None

Additional context
Code review

Requester Info
Jacob Hageman - NASA/GSFC

@jphickey
Copy link
Contributor

As noted in #1401 (comment) there is a definite advantage to qualifying internal resource names with the owning app, as it helps avoid collisions.

The key thing that needs to be documented, if we are to do this, is to make it clear that the name passed into the initial "create" API (whatever resource type it is) might not match the final assigned/fully-qualified name. One needs to create the resource, get the ID back, then call the "Get Name" on that ID to get the fully-qualified/real resource name. Programmers should not assume that the name they pass to the initial create call will be the final/complete name of that resource, that's all.

We should have a separate "Get Name" function for every resource type, so this shouldn't be an issue.

@jphickey
Copy link
Contributor

I would also recommend that whatever pattern is settled upon for namespaces/qualifiers of resource names should also be applied to other internal resources, such as Semaphores/Mutexes/Queues that the core apps create, to make everything consistent in this regard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants