-
Notifications
You must be signed in to change notification settings - Fork 204
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
API for querying libraries (like CFE ES QueryApp) #28
Comments
@jphickey could you look into this one? Mission priority for 7.0. |
Sure, I'll take a look. |
After some initial evaluation it looks like this shouldn't be too hard to add - internally we just need to implement more generic variants of For the TLM interface (output) I would propose to reuse the same command and packet format as the QUERY_ONE command currently uses. I think it can be done with a few simple overrides/extensions.
|
@jphickey would it be worthwhile to adopt the OSAL "object id" model for this? |
By "object id model" - Do you mean the property that they are unique/independent number spaces so that the ID values cannot be confused/interchanged with eachother? If so, then yes - it is definitely worthwhile to adopt the model, because in general it is a big improvement in code safety. BUT - probably not under this ticket. It can be implemented independently. The change I'm proposing here would be fully backward compatible - but the change ID values would not be, in the event that any app used an ES AppId value as an array index. So while I think it's totally worthwhile and a big benefit, it needs its own separate buy-in and agreement from app developers as it is likely to break stuff. |
Yes, and this also would set up the "framework" for other ID's in CFE.
Agreed. |
Update - spent some time exploring implementation on this -- and the net effect the was that the "LibTable" and "AppTable" start to look very similar, differing really in only the presence of TaskInfo data for the app main task and the control requests for exit/reload/etc. I'm somewhat tempted to combine these tables into one, to reduce duplication of logic. It was also have the advantage such that AppIDs and LibIDs cannot get mixed up (they are the same). On the downside it means the table will have to be sized for (CFE_ES_MAX_APPLICATIONS + CFE_ES_MAX_LIBARIES) -- which in turn meaning that you could get an AppID >= CFE_ES_MAX_APPLICATIONS. So it does break the notion of using as an array index. In which case it would make more sense to do what @CDKnightNASA suggested above. Anyone with other thoughts/opinions on this matter? Can I revisit the definition of |
Ping @ejtimmon @acudmore @jwilmot. I don't have strong opinions other than a dislike of duplicated/complicated logic and I feel like if our concept is ID's are supposed to be opaque then eventually we are going to break the use of them as indexes, so why not now? I don't want to break a significant amount of code (maybe @ejtimmon and/or @tngo67 could survey apps?), but if they are looping through AppIDs like indexes they should use the foreach APIs instead anyways. |
I'm leaning in the same direction..... I looked through the cFS open source apps (CS, DS, FM, HK, HS, LC, MD, MM, SBN, SC, SCH) and I don't see any usage of AppID as an array index. For cases where it gets an AppID, they seem to just store the value and use it to invoke another function (e.g. Based on this it looks to me like changing the range of AppID values from At the same time we can also introduce a typedef for |
This has the distinct advantage that all of the existing APIs/command for dealing with apps (query one, query all, telemetry formats, etc) can also work on libraries with only perhaps minor updates - the only real difference being that there is no "main task" on a library - but this seems easy enough to deal with, as it can be zeroed out without changing any data formats. By extension, if we do this, it may mean that commands like "ReloadApp" and "DeleteApp" might actually work on libs too - although we just had a CCB discussion about this and decided not to do it because of the high risk - if it can be done as part of the existing app commands maybe just leave it up to operator discretion as to whether they use it or not. |
Just check with my team, we are using the API to get the AppID. So we are okay with the proposed changes for now. |
Let's discuss at CCB to confirm everyone is OK with proposed solution. |
I checked the internal versions of the open source GSFC apps as well as some other internal apps - I don't see any places where this change would cause a problem. |
CCB 2020-08-05 See notes |
Another (minor?) issue I've come across is that some of the code that gets tripped up from reorganizing the internal tables is actually deprecated, e.g. Now that the 6.8.0 RC1 has been officially branched, can we go ahead and finally remove the deprecated items from the main branch? It would save me from updating those functions.... |
Yes! |
Submitted related issue #797 regarding internal ES table management. Unfortunately ES is currently inconsistent in how it manages internal tables. The more general problem of using an abstract ID and making the internal ES table management more consistent I thought was worthy of a separate review and discussion. Once we have a consistent means/patterns to deal with "id" values and resource tracking in ES, then it shouldn't be too hard to make the application management commands apply to libraries too. |
Allows the existing "CFE_ES_AppInfo_t" structure to be extended to libraries as well as applications by introducing a new value (3) for the Type field. Allows Libraries to be queried via API calls similar to App API. Also extends the Query All/Query One commands to operate on Libraries or Applications.
Status update: Looking to get a PR for this (possibly) submitted for the 2020-10-21 CCB. Proposed/draft changeset can be found in e43ef28 - will need rebase once next "main" branch is finalized, but otherwise should be OK. What this does:
Is there any other command/API that needs to work on both items which is not addressed per above? I think this is it, but please advise if anything is missing. Thoughts - @skliper @ejtimmon @tngo67 @jwilmot or @acudmore ?? Thanks! |
Allows the existing "CFE_ES_AppInfo_t" structure to be extended to libraries as well as applications by introducing a new value (3) for the Type field. Allows Libraries to be queried via API calls similar to App API. Also extends the Query All/Query One commands to operate on Libraries or Applications.
Allows the existing "CFE_ES_AppInfo_t" structure to be extended to libraries as well as applications by introducing a new value (3) for the Type field. Allows Libraries to be queried via API calls similar to App API. Also extends the Query All/Query One commands to operate on Libraries or Applications.
Is your feature request related to a problem? Please describe.
Unable to verify library image integrity (CS cannot scrub library code space)
Describe the solution you'd like
Implement API for querying library information, such that an app could scrub
Describe alternatives you've considered
None
Additional context
None
Requester Info
Jacob Hageman/NASA-GSFC
External request from cfs-community email list on 9/3/2019
The text was updated successfully, but these errors were encountered: