|
|
|
@ -3,11 +3,12 @@
|
|
|
|
|
## Structure
|
|
|
|
|
|
|
|
|
|
The general structure is driven by the usage of interfaces provided by objects.
|
|
|
|
|
The FSFW uses C++11 as baseline. The intention behind this is that this C++ Standard should be widely available, even with older compilers.
|
|
|
|
|
The FSFW uses C++11 as baseline. The intention behind this is that this C++ Standard should be
|
|
|
|
|
widely available, even with older compilers.
|
|
|
|
|
The FSFW uses dynamic allocation during the initialization but provides static containers during runtime.
|
|
|
|
|
This simplifies the instantiation of objects and allows the usage of some standard containers.
|
|
|
|
|
Dynamic Allocation after initialization is discouraged and different solutions are provided in the FSFW to achieve that.
|
|
|
|
|
The fsfw uses run-time type information but exceptions are not allowed.
|
|
|
|
|
Dynamic Allocation after initialization is discouraged and different solutions are provided in the
|
|
|
|
|
FSFW to achieve that. The fsfw uses run-time type information but exceptions are not allowed.
|
|
|
|
|
|
|
|
|
|
### Failure Handling
|
|
|
|
|
|
|
|
|
@ -41,10 +42,11 @@ An example setup of ids can be found in the example config in "defaultcft/fsfwco
|
|
|
|
|
|
|
|
|
|
### Events
|
|
|
|
|
|
|
|
|
|
Events are tied to objects. EventIds can be generated by calling the Macro MAKE_EVENT. This works analog to the returnvalues.
|
|
|
|
|
Every object that needs own EventIds has to get a unique SUBSYSTEM_ID.
|
|
|
|
|
Every SystemObject can call triggerEvent from the parent class.
|
|
|
|
|
Therefore, event messages contain the specific EventId and the objectId of the object that has triggered.
|
|
|
|
|
Events are tied to objects. EventIds can be generated by calling the Macro MAKE_EVENT.
|
|
|
|
|
This works analog to the returnvalues. Every object that needs own EventIds has to get a
|
|
|
|
|
unique SUBSYSTEM_ID. Every SystemObject can call triggerEvent from the parent class.
|
|
|
|
|
Therefore, event messages contain the specific EventId and the objectId of the object that
|
|
|
|
|
has triggered.
|
|
|
|
|
|
|
|
|
|
### Internal Communication
|
|
|
|
|
|
|
|
|
@ -59,17 +61,19 @@ The services can be seen as a conversion from a TC to a message based communicat
|
|
|
|
|
|
|
|
|
|
#### CCSDS Frames, CCSDS Space Packets and PUS
|
|
|
|
|
|
|
|
|
|
If the communication is based on CCSDS Frames and Space Packets, several classes can be used to distributed the packets to the corresponding services. Those can be found in tcdistribution.
|
|
|
|
|
If Space Packets are used, a timestamper must be created.
|
|
|
|
|
An example can be found in the timemanager folder, this uses CCSDSTime::CDS_short.
|
|
|
|
|
If the communication is based on CCSDS Frames and Space Packets, several classes can be used to
|
|
|
|
|
distributed the packets to the corresponding services. Those can be found in `tcdistribution`.
|
|
|
|
|
If Space Packets are used, a timestamper has to be provided by the user.
|
|
|
|
|
An example can be found in the `timemanager` folder, which uses `CCSDSTime::CDS_short`.
|
|
|
|
|
|
|
|
|
|
#### Device Handlers
|
|
|
|
|
|
|
|
|
|
DeviceHandlers are another important component of the FSFW.
|
|
|
|
|
The idea is, to have a software counterpart of every physical device to provide a simple mode, health and commanding interface.
|
|
|
|
|
By separating the underlying Communication Interface with DeviceCommunicationIF, a device handler (DH) can be tested on different hardware.
|
|
|
|
|
The DH has mechanisms to monitor the communication with the physical device which allow for FDIR reaction.
|
|
|
|
|
Device Handlers can be created by overriding `DeviceHandlerBase`.
|
|
|
|
|
The idea is, to have a software counterpart of every physical device to provide a simple mode,
|
|
|
|
|
health and commanding interface. By separating the underlying Communication Interface with
|
|
|
|
|
`DeviceCommunicationIF`, a device handler (DH) can be tested on different hardware.
|
|
|
|
|
The DH has mechanisms to monitor the communication with the physical device which allow
|
|
|
|
|
for FDIR reaction. Device Handlers can be created by implementing `DeviceHandlerBase`.
|
|
|
|
|
A standard FDIR component for the DH will be created automatically but can be overwritten by the user.
|
|
|
|
|
More information on DeviceHandlers can be found in the related [documentation section](doc/README-devicehandlers.md#top).
|
|
|
|
|
|
|
|
|
@ -81,13 +85,17 @@ DeviceHandlers and Controllers are the lowest part of the hierarchy.
|
|
|
|
|
The next layer are Assemblies. Those assemblies act as a component which handle redundancies of handlers.
|
|
|
|
|
Assemblies share a common core with the next level which are the Subsystems.
|
|
|
|
|
|
|
|
|
|
Those Assemblies are intended to act as auto-generated components from a database which describes the subsystem modes.
|
|
|
|
|
The definitions contain transition and target tables which contain the DH, Assembly and Controller Modes to be commanded.
|
|
|
|
|
Transition tables contain as many steps as needed to reach the mode from any other mode, e.g. a switch into any higher AOCS mode might first turn on the sensors, than the actuators and the controller as last component.
|
|
|
|
|
Those Assemblies are intended to act as auto-generated components from a database which describes
|
|
|
|
|
the subsystem modes. The definitions contain transition and target tables which contain the DH,
|
|
|
|
|
Assembly and Controller Modes to be commanded.
|
|
|
|
|
Transition tables contain as many steps as needed to reach the mode from any other mode, e.g. a
|
|
|
|
|
switch into any higher AOCS mode might first turn on the sensors, than the actuators and the
|
|
|
|
|
controller as last component.
|
|
|
|
|
The target table is used to describe the state that is checked continuously by the subsystem.
|
|
|
|
|
All of this allows System Modes to be generated as Subsystem object as well from the same database.
|
|
|
|
|
This System contains list of subsystem modes in the transition and target tables.
|
|
|
|
|
Therefore, it allows a modular system to create system modes and easy commanding of those, because only the highest components must be commanded.
|
|
|
|
|
Therefore, it allows a modular system to create system modes and easy commanding of those, because
|
|
|
|
|
only the highest components must be commanded.
|
|
|
|
|
|
|
|
|
|
The health state represents if the component is able to perform its tasks.
|
|
|
|
|
This can be used to signal the system to avoid using this component instead of a redundant one.
|
|
|
|
@ -95,5 +103,6 @@ The on-board FDIR uses the health state for isolation and recovery.
|
|
|
|
|
|
|
|
|
|
## Unit Tests
|
|
|
|
|
|
|
|
|
|
Unit Tests are provided in the unittest folder. Those use the catch2 framework but do not include catch2 itself. More information on how to run these tests can be found in the separate
|
|
|
|
|
Unit Tests are provided in the unittest folder. Those use the catch2 framework but do not include
|
|
|
|
|
catch2 itself. More information on how to run these tests can be found in the separate
|
|
|
|
|
[`fsfw_tests` reposoitory](https://egit.irs.uni-stuttgart.de/fsfw/fsfw_tests)
|
|
|
|
|