2020-09-05 21:59:17 +02:00
|
|
|
#ifndef FSFW_DATAPOOLLOCAL_STATICLOCALDATASET_H_
|
|
|
|
#define FSFW_DATAPOOLLOCAL_STATICLOCALDATASET_H_
|
|
|
|
|
2020-08-23 20:27:00 +02:00
|
|
|
#include "LocalPoolDataSetBase.h"
|
|
|
|
#include "../objectmanager/SystemObjectIF.h"
|
2020-07-14 15:45:03 +02:00
|
|
|
#include <array>
|
2020-07-02 16:54:53 +02:00
|
|
|
|
2020-07-14 15:45:03 +02:00
|
|
|
/**
|
|
|
|
* @brief This local dataset type is created on the stack.
|
|
|
|
* @details
|
2020-09-28 21:28:03 +02:00
|
|
|
* This will is the primary data structure to organize pool variables into
|
|
|
|
* sets which can be accessed via the housekeeping service interface or
|
|
|
|
* which can be sent to other software objects.
|
|
|
|
*
|
|
|
|
* It is recommended to read the documentation of the LocalPoolDataSetBase
|
|
|
|
* class for more information on how this class works and how to use it.
|
|
|
|
* @tparam capacity Capacity of the static dataset, which is usually known
|
|
|
|
* beforehand.
|
2020-07-14 15:45:03 +02:00
|
|
|
*/
|
2020-07-16 11:45:23 +02:00
|
|
|
template <uint8_t NUM_VARIABLES>
|
2020-08-08 12:51:31 +02:00
|
|
|
class StaticLocalDataSet: public LocalPoolDataSetBase {
|
2020-07-16 11:45:23 +02:00
|
|
|
public:
|
2020-09-19 15:58:34 +02:00
|
|
|
/**
|
|
|
|
* Constructor used by data owner and creator like device handlers.
|
|
|
|
* This constructor also initialized the components required for
|
|
|
|
* periodic handling.
|
|
|
|
* @param hkOwner
|
|
|
|
* @param setId
|
|
|
|
*/
|
|
|
|
StaticLocalDataSet(HasLocalDataPoolIF* hkOwner,
|
|
|
|
uint32_t setId): LocalPoolDataSetBase(hkOwner, setId, nullptr,
|
|
|
|
NUM_VARIABLES) {
|
|
|
|
this->setContainer(poolVarList.data());
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructor used by data users like controllers.
|
|
|
|
* @param hkOwner
|
|
|
|
* @param setId
|
|
|
|
*/
|
2020-09-05 21:59:17 +02:00
|
|
|
StaticLocalDataSet(sid_t sid): LocalPoolDataSetBase(sid, nullptr,
|
|
|
|
NUM_VARIABLES) {
|
|
|
|
this->setContainer(poolVarList.data());
|
2020-07-16 11:45:23 +02:00
|
|
|
}
|
|
|
|
|
2020-07-14 15:45:03 +02:00
|
|
|
private:
|
2020-07-16 11:45:23 +02:00
|
|
|
std::array<PoolVariableIF*, NUM_VARIABLES> poolVarList;
|
2020-07-02 16:54:53 +02:00
|
|
|
};
|
|
|
|
|
2020-09-05 21:59:17 +02:00
|
|
|
#endif /* FSFW_DATAPOOLLOCAL_STATICLOCALDATASET_H_ */
|