nasa / fprime

F´ - A flight software and embedded systems framework
https://fprime.jpl.nasa.gov
Apache License 2.0
10.05k stars 1.3k forks source link

Split System Resources Into Version and System Reources Component #2604

Closed LeStarch closed 1 month ago

LeStarch commented 6 months ago
F´ Version
Affected Component

Feature Description

The System Resources component internalizes version telemetry, command, and events. We should build a new version component that does the following:

  1. Version events (EVRs) at start-up and upon command
  2. Version telemetry channels (EHA)
  3. Versions to track:
    1. Fprime framework version (git version of F´ repo)
    2. Project version (git version of project repo)
    3. Library versions (git version and name of each fprime-library repo)
thomas-bc commented 6 months ago

Potentially in scope: https://github.com/nasa/fprime/issues/1837 https://github.com/nasa/fprime/issues/1561

Shivaly-Reddy commented 5 months ago

@LeStarch : How do we track version at start-up? What part of the logic kicks of startup from version component?

LeStarch commented 5 months ago

@Shivaly-Reddy F´ Active components allow you to override the preamble function to do something right when their thread starts-up. This component is active, yes?

An example is:

https://github.com/nasa/fprime/blob/7724562530294a91c0bcf347e825220eb6feac03/Svc/ActiveRateGroup/ActiveRateGroup.hpp#L109

https://github.com/nasa/fprime/blob/7724562530294a91c0bcf347e825220eb6feac03/Svc/ActiveRateGroup/ActiveRateGroup.cpp#L55-L57

Note: the task lifecycle looks like this:

  1. Call preamble
  2. Loop on "dispatch message"

Thus the preamble is called once, and then all the messages (commands and port invocations) are dispatched for the duration.

Shivaly-Reddy commented 5 months ago

Thanks @LeStarch. I was looking at FileDownlink preamble calls and was wondering about the component being active. It is currently a passive component, just because SystemResources was and because this is derived from it. I can switch it to an active component but looking into understanding all that entails an active component