updated documentation
This commit is contained in:
parent
c07672f9b4
commit
e2ae9756f3
@ -1,10 +1,27 @@
|
|||||||
|
|
||||||
## Configuring the FSFW
|
## Configuring the FSFW
|
||||||
|
|
||||||
The FSFW can be configured via the `fsfwconfig` folder. A template folder has
|
The FSFW can be configured via the `fsfwconfig` folder. A template folder has
|
||||||
been provided to have a starting point for this. The folder should be added
|
been provided to have a starting point for this. The folder should be added
|
||||||
to the include path.
|
to the include path. The primary configuration file is the `FSFWConfig.h` folder. Some
|
||||||
|
of the available options will be explained in more detail here.
|
||||||
|
|
||||||
|
## Auto-Translation of Events
|
||||||
|
|
||||||
|
The FSFW allows the automatic translation of events, which allows developers to track triggered
|
||||||
|
events directly via consoke output. Using this feature requires:
|
||||||
|
|
||||||
|
1. `FSFW_OBJ_EVENT_TRANSLATION` set to 1 in the configuration file.
|
||||||
|
2. Special auto-generated translation files which translate event IDs and object IDs into
|
||||||
|
human readable strings. These files can be generated using the
|
||||||
|
[modgen Python scripts](https://git.ksat-stuttgart.de/source/modgen.git).
|
||||||
|
3. The generated translation files for the object IDs should be named `translatesObjects.cpp`
|
||||||
|
and `translateObjects.h` and should be copied to the `fsfwconfig/objects` folder
|
||||||
|
4. The generated translation files for the event IDs should be named `translateEvents.cpp` and
|
||||||
|
`translateEvents.h` and should be copied to the `fsfwconfig/events` folder
|
||||||
|
|
||||||
|
An example implementations of these translation file generators can be found as part
|
||||||
|
of the [SOURCE project here](https://git.ksat-stuttgart.de/source/sourceobsw/-/tree/development/generators)
|
||||||
|
or the [FSFW example](https://egit.irs.uni-stuttgart.de/fsfw/fsfw_example_public/src/branch/master/generators)
|
||||||
|
|
||||||
### Configuring the Event Manager
|
### Configuring the Event Manager
|
||||||
|
|
||||||
@ -18,4 +35,5 @@ static constexpr size_t FSFW_EVENTMGMR_MATCHTREE_NODES = 240;
|
|||||||
static constexpr size_t FSFW_EVENTMGMT_EVENTIDMATCHERS = 120;
|
static constexpr size_t FSFW_EVENTMGMT_EVENTIDMATCHERS = 120;
|
||||||
static constexpr size_t FSFW_EVENTMGMR_RANGEMATCHERS = 120;
|
static constexpr size_t FSFW_EVENTMGMR_RANGEMATCHERS = 120;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -19,8 +19,9 @@ A nullptr check of the returning Pointer must be done. This function is based on
|
|||||||
```cpp
|
```cpp
|
||||||
template <typename T> T* ObjectManagerIF::get( object_id_t id )
|
template <typename T> T* ObjectManagerIF::get( object_id_t id )
|
||||||
```
|
```
|
||||||
* A typical way to create all objects on startup is a handing a static produce function to the ObjectManager on creation.
|
* A typical way to create all objects on startup is a handing a static produce function to the
|
||||||
By calling objectManager->initialize() the produce function will be called and all SystemObjects will be initialized afterwards.
|
ObjectManager on creation. By calling objectManager->initialize() the produce function will be
|
||||||
|
called and all SystemObjects will be initialized afterwards.
|
||||||
|
|
||||||
### Event Manager
|
### Event Manager
|
||||||
|
|
||||||
@ -36,14 +37,19 @@ By calling objectManager->initialize() the produce function will be called and a
|
|||||||
|
|
||||||
### Stores
|
### Stores
|
||||||
|
|
||||||
* The message based communication can only exchange a few bytes of information inside the message itself. Therefore, additional information can
|
* The message based communication can only exchange a few bytes of information inside the message
|
||||||
be exchanged with Stores. With this, only the store address must be exchanged in the message.
|
itself. Therefore, additional information can be exchanged with Stores. With this, only the
|
||||||
* Internally, the FSFW uses an IPC Store to exchange data between processes. For incoming TCs a TC Store is used. For outgoing TM a TM store is used.
|
store address must be exchanged in the message.
|
||||||
|
* Internally, the FSFW uses an IPC Store to exchange data between processes. For incoming TCs a TC
|
||||||
|
Store is used. For outgoing TM a TM store is used.
|
||||||
* All of them should use the Thread Safe Class storagemanager/PoolManager
|
* All of them should use the Thread Safe Class storagemanager/PoolManager
|
||||||
|
|
||||||
### Tasks
|
### Tasks
|
||||||
|
|
||||||
There are two different types of tasks:
|
There are two different types of tasks:
|
||||||
* The PeriodicTask just executes objects that are of type ExecutableObjectIF in the order of the insertion to the Tasks.
|
* The PeriodicTask just executes objects that are of type ExecutableObjectIF in the order of the
|
||||||
* FixedTimeslotTask executes a list of calls in the order of the given list. This is intended for DeviceHandlers, where polling should be in a defined order. An example can be found in defaultcfg/fsfwconfig/pollingSequence
|
insertion to the Tasks.
|
||||||
|
* FixedTimeslotTask executes a list of calls in the order of the given list. This is intended for
|
||||||
|
DeviceHandlers, where polling should be in a defined order. An example can be found in
|
||||||
|
`defaultcfg/fsfwconfig/pollingSequence` folder
|
||||||
|
|
||||||
|
@ -3,11 +3,12 @@
|
|||||||
## Structure
|
## Structure
|
||||||
|
|
||||||
The general structure is driven by the usage of interfaces provided by objects.
|
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.
|
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.
|
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.
|
Dynamic Allocation after initialization is discouraged and different solutions are provided in the
|
||||||
The fsfw uses run-time type information but exceptions are not allowed.
|
FSFW to achieve that. The fsfw uses run-time type information but exceptions are not allowed.
|
||||||
|
|
||||||
### Failure Handling
|
### Failure Handling
|
||||||
|
|
||||||
@ -41,10 +42,11 @@ An example setup of ids can be found in the example config in "defaultcft/fsfwco
|
|||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
Events are tied to objects. EventIds can be generated by calling the Macro MAKE_EVENT. This works analog to the returnvalues.
|
Events are tied to objects. EventIds can be generated by calling the Macro MAKE_EVENT.
|
||||||
Every object that needs own EventIds has to get a unique SUBSYSTEM_ID.
|
This works analog to the returnvalues. Every object that needs own EventIds has to get a
|
||||||
Every SystemObject can call triggerEvent from the parent class.
|
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.
|
Therefore, event messages contain the specific EventId and the objectId of the object that
|
||||||
|
has triggered.
|
||||||
|
|
||||||
### Internal Communication
|
### 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
|
#### 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 the communication is based on CCSDS Frames and Space Packets, several classes can be used to
|
||||||
If Space Packets are used, a timestamper must be created.
|
distributed the packets to the corresponding services. Those can be found in `tcdistribution`.
|
||||||
An example can be found in the timemanager folder, this uses CCSDSTime::CDS_short.
|
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
|
#### Device Handlers
|
||||||
|
|
||||||
DeviceHandlers are another important component of the FSFW.
|
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.
|
The idea is, to have a software counterpart of every physical device to provide a simple mode,
|
||||||
By separating the underlying Communication Interface with DeviceCommunicationIF, a device handler (DH) can be tested on different hardware.
|
health and commanding interface. By separating the underlying Communication Interface with
|
||||||
The DH has mechanisms to monitor the communication with the physical device which allow for FDIR reaction.
|
`DeviceCommunicationIF`, a device handler (DH) can be tested on different hardware.
|
||||||
Device Handlers can be created by overriding `DeviceHandlerBase`.
|
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.
|
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).
|
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.
|
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.
|
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.
|
Those Assemblies are intended to act as auto-generated components from a database which describes
|
||||||
The definitions contain transition and target tables which contain the DH, Assembly and Controller Modes to be commanded.
|
the subsystem modes. The definitions contain transition and target tables which contain the DH,
|
||||||
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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
|
||||||
|
|
||||||
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)
|
[`fsfw_tests` reposoitory](https://egit.irs.uni-stuttgart.de/fsfw/fsfw_tests)
|
||||||
|
Loading…
Reference in New Issue
Block a user