-
Notifications
You must be signed in to change notification settings - Fork 224
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
Add OS_QueueGetName() #358
Comments
This function should be generic and not queue-specific. Propose the following API:
This should be able to get the name of any resource (queue, task, semaphore, file, etc). |
Agreed, in fact should this ticket be to generalize all of the OSAL functions that interact with queues, tasks, etc.? Of course the "depricated" calls would just be simple wrappers for the generic calls. |
I think the only other item which is common to all resources is the "creator" (i.e. the task ID of the calling context when the resource was allocated/opened). But unless there is a good reason to expose that individually, I think we should just do the name for now. |
Hmm, so I'm considering this but it seems that all of the code underpinning these functions is expecting type information (such as OS_ObjectIdToArrayIndex(uint32 idtype...)). This would either necessitate re-writing all of these functions to allow for passing in a "any type" parameter or making parallel functions that do not require type. Thoughts? |
As you noted, most current OSAL code uses the "idtype" in an enforcing mode, that is it knows what type the object is supposed to be, and it enforces that the passed-in id matches the expected type. All the existing use-cases are in that mode, because last-gen OSAL used a zero-based ID for all object types, and you had to know what type of object you were dealing with first. The notion of a generic function that works on all types is only possible now that the last-gen OSAL is retired, and the external id values are all uniquely identifiable. There are two options to implement this: Quick and dirty: just do More complete/thorough: Add a new helper function to get the object type from the |
Removed milestone since this is not critical to certification. Still fine to work it, just at a lower priority. |
FYI - This was implemented a while ago - the function is This can be used to get the name of any object, including queues. Closing this ticket, please reopen if there is something else we need. |
Just open/close so I can link to PR. |
This adds the native_osconfig.h which is included after the default_osconfig.h if SIMULATION=native is set.
Fix nasa#358, Add native permissive mode configuration
Is your feature request related to a problem? Please describe.
cFE will have a function to get a pipe's name given its id, which will call down to OSAL to get the name from the queue. Currently this is accomplished with OS_QueueGetInfo() but that requires a pointer to a struct buffer.
Describe the solution you'd like
A convenience function should be added to retrieve a queue's name given its id without the need to pass in a struct buffer (instead passing in a string buffer.)
Describe alternatives you've considered
Could maintain the status quo, this is a convenience function.
Additional context
Add any other context about the feature request here.
Requester Info
[email protected]
The text was updated successfully, but these errors were encountered: