fsfw/doc/README-localpools.md

30 lines
1.4 KiB
Markdown
Raw Normal View History

2021-01-13 11:39:19 +01:00
## Local Data Pools
The local data pools can be used to store data like sensor values so they can be used
by other software objects like controllers as well. If a class should have a local pool which
can be used by other software objects as well, following steps have to be performed:
2021-01-13 11:39:19 +01:00
1. Create a `LocalDataPoolManager` member class
2. Implement the `HasLocalDataPoolIF`
The local data pool manager is also able to process housekeeping service requests in form
of messages, generate periodic housekeeping packet, generate notification and snapshots of changed
variables and datasets and process notifications and snapshots coming from other objects.
Two important framework classes already perform the two steps shown above so the steps required
are altered slightly.
### Storing and Accessing pool data
The pool manager is responsible for thread-safe access of the pool data, but the actual
access to the pool data is done via proxy classes like pool variable classes or dataset classes.
Generally, a user will create a dataset class which in turn groups all cohesive pool variables.
The user can then use this set class to `read` the variables and `commit` changed variables
back into the pool.
### Using the local data pools of the `DeviceHandlerBase`
It is very common to store data generated by devices like a sensor into a pool which can
then be used by other objects. Therefore, the `DeviceHandlerBase` already has a
local pool. The