The Flight Software Framework code for the EIVE project.
Go to file
2020-12-01 18:55:53 +01:00
action updates taken over 2020-10-29 16:52:06 +01:00
container fsfw container taken over 2020-11-02 15:53:08 +01:00
contrib/sgp4 renormalized line endings 2020-08-28 18:33:29 +02:00
controller get command queue override 2020-10-10 20:11:20 +02:00
coordinates taken over coordinates from upstream 2020-08-28 17:40:21 +02:00
datalinklayer updated map packet extraction 2020-08-28 17:58:36 +02:00
datapool important bugfixes 2020-09-28 22:38:36 +02:00
datapoolglob some more bugfixes 2020-10-19 15:38:22 +02:00
datapoollocal added explicit type conversion operator 2020-11-30 17:03:14 +01:00
defaultcfg better name for preproc define 2020-12-01 13:36:30 +01:00
devicehandlers using new device handler thermal set 2020-12-01 18:55:53 +01:00
events include improvements /factory improvement 2020-11-08 15:20:51 +01:00
fdir some stuff renamed 2020-10-18 23:50:02 +02:00
globalfunctions bool is mapped to uint8 now for pod type conversion 2020-10-19 00:25:03 +02:00
health health changes taken over 2020-11-02 15:47:09 +01:00
housekeeping amazing size checks 2020-11-03 23:29:03 +01:00
internalError it doesnt work? comment it ! 2020-11-30 14:13:52 +01:00
ipc include improvements /factory improvement 2020-11-08 15:20:51 +01:00
logo readme and logo update 2020-12-01 17:19:26 +01:00
memory comment added 2020-12-01 17:14:44 +01:00
modes taken over convergence changes 2020-09-26 14:59:40 +02:00
monitoring compiling again 2020-11-30 16:06:59 +01:00
objectmanager timer stamper in fsfw now 2020-11-03 22:25:14 +01:00
osal some improvements taken over from master 2020-11-30 13:09:56 +01:00
parameters parameter small stuff 2020-11-10 11:16:56 +01:00
power thermal module replacements 2020-11-30 16:25:09 +01:00
pus message queue depth configurable 2020-11-05 13:12:42 +01:00
returnvalues include guard update 2020-10-29 17:46:44 +01:00
rmap renormalized line endings 2020-08-28 18:33:29 +02:00
serialize renormalize files 2020-09-18 13:14:01 +02:00
serviceinterface some bugfixes 2020-11-03 16:54:56 +01:00
storagemanager better name for preproc define 2020-12-01 13:36:30 +01:00
subsystem form and doc comments 2020-11-29 13:01:37 +01:00
tasks took over changed for fixed slot sequence 2020-09-04 14:28:43 +02:00
tcdistribution very important bugfix 2020-10-03 03:45:29 +02:00
thermal added explicit type conversion operator 2020-11-30 17:03:14 +01:00
timemanager sizet changes and indentation 2020-11-03 17:07:48 +01:00
tmstorage size_t changes 2020-11-03 17:08:40 +01:00
tmtcpacket size t changes 2020-11-03 17:09:33 +01:00
tmtcservices includes reordered 2020-10-14 23:53:50 +02:00
unittest better name for preproc define 2020-12-01 13:36:30 +01:00
.gitignore Added .gitignore for eclipse project files 2018-07-12 17:13:04 +02:00
CHANGELOG added changelog from upstream 2020-12-01 17:19:00 +01:00
fsfw.mk some config adaptions 2020-10-29 11:59:50 +01:00
FSFWVersion.h static keyword removed 2020-10-29 15:15:08 +01:00
LICENSE updating code from Flying Laptop 2018-07-12 16:29:32 +02:00
NOTICE updating code from Flying Laptop 2018-07-12 16:29:32 +02:00
README.md readme and logo update 2020-12-01 17:19:26 +01:00

FSFW Logo

Flight Software Framework (FSFW)

The Flight Software Framework is a C++ Object Oriented Framework for unmanned, automated systems like Satellites.

The initial version of the Flight Software Framework was developed during the Flying Laptop Project by the University of Stuttgart in cooperation with Airbus Defence and Space GmbH.

Intended Use

The framework is designed for systems, which communicate with external devices, perform control loops, receive telecommands and send telemetry, and need to maintain a high level of availability. Therefore, a mode and health system provides control over the states of the software and the controlled devices. In addition, a simple mechanism of event based fault detection, isolation and recovery is implemented as well.

The recommended hardware is a microprocessor with more than 2 MB of RAM and 1 MB of non-volatile Memory. For reference, current Applications use a Cobham Gaisler UT699 (LEON3FT), a ISISPACE IOBC or a Zynq-7020 SoC.

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 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. Exceptions are not allowed.

Failure Handling

Functions should return a defined ReturnValue_t to signal to the caller that something is gone wrong. Returnvalues must be unique. For this the function HasReturnvaluesIF::makeReturnCode or the Macro MAKE_RETURN can be used. The CLASS_ID is a unique id for that type of object. See returnvalues/FwClassIds.

OSAL

The FSFW provides operation system abstraction layers for Linux, FreeRTOS and RTEMS. A independent OSAL called "host" is currently not finished. This aims to be running on windows as well. The OSAL provides periodic tasks, message queues, clocks and Semaphores as well as Mutexes.

Core Components

Clock:

  • This is a class of static functions that can be used at anytime
  • Leap Seconds must be set if any time conversions from UTC to other times is used

ObjectManager (must be created):

  • The component which handles all references. All SystemObjects register at this component.
  • Any SystemObject needs to have a unique ObjectId. Those can be managed like objects::framework_objects.
  • A reference to an object can be get by calling the following function. T must be the specific Interface you want to call. A nullptr check of the returning Pointer must be done. This function is based on Run-time type information.
	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. By calling objectManager->initialize() the produce function will be called and all SystemObjects will be initialized afterwards.

Event Manager:

  • Component which allows routing of events
  • Other objects can subscribe to specific events, ranges of events or all events of an object.
  • Subscriptions can be done during runtime but should be done during initialization
  • Amounts of allowed subscriptions must be configured by setting this parameters:
namespace fsfwconfig {
//! Configure the allocated pool sizes for the event manager.
static constexpr size_t FSFW_EVENTMGMR_MATCHTREE_NODES = 240;
static constexpr size_t FSFW_EVENTMGMT_EVENTIDMATCHERS = 120;
static constexpr size_t FSFW_EVENTMGMR_RANGEMATCHERS   = 120;
}

Health Table:

  • A component which holds every health state
  • Provides a thread safe way to access all health states without the need of message exchanges

Stores

  • The message based communication can only exchange a few bytes of information inside the message itself. Therefore, additional information can be exchanged with Stores. With this, only the 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

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.
  • 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

Static Ids in the framework

Some parts of the framework use a static routing address for communication. An example setup of ids can be found in the example config in "defaultcft/fsfwconfig/objects/Factory::setStaticFrameworkObjectIds()".

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.

Internal Communication

Components communicate mostly over Message through Queues. Those queues are created by calling the singleton QueueFactory::instance()->create().

External Communication

The external communication with the mission control system is mostly up to the user implementation. The FSFW provides PUS Services which can be used to but don't need to be used. The services can be seen as a conversion from a TC to a message based communication and back.

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.

DeviceHandling

DeviceHandlers are a core 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 DH can be tested on different hardware. The DH has mechanisms to monitor the communication with the physical device which allow for FDIR reaction. A standard FDIR component for the DH will be created automatically but can be overwritten by the user.

Modes, Health

The two interfaces HasModesIF and HasHealthIF provide access for commanding and monitoring of components. On-board Mode Management is implement in hierarchy system. 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. 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.

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. The on-board FDIR uses the health state for isolation and recovery.

Example config

A example config can be found in defaultcfg/fsfwconfig.

Unit Tests

Unit Tests are provided in the unittest folder. Those use the catch2 framework but do not include catch2 itself. See README.md in the unittest Folder.