testArduino/bsp_linux/fsfwconfig/datapool/dataPoolInit.cpp

63 lines
2.6 KiB
C++

/*
* dataPoolInit.cpp
*
* brief: Initialization function for all variables in the data pool.
*/
#include "../../../bsp_linux/fsfwconfig/datapool/dataPoolInit.h"
void dataPoolInit(std::map<uint32_t, PoolEntryIF*>* pool_map) {
//Here the pool map entries of the DH and CONTROLLER are defined.
float Temperature_value[36] = {0};
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::Temperature_value,
new PoolEntry<float>(Temperature_value, 36)));
unsigned int Temperature_Timestamp[36] = {0};
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::Temperature_Timestamp,
new PoolEntry<unsigned int>(Temperature_Timestamp, 36)));
uint8_t TempValidity_SENSOR_CH1[1] = {0};
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::TempValidity_SENSOR_CH1,
new PoolEntry<uint8_t>(TempValidity_SENSOR_CH1, 1)));
uint8_t TempValidity_SENSOR_CH2[1] = {0};
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::TempValidity_SENSOR_CH2,
new PoolEntry<uint8_t>(TempValidity_SENSOR_CH2, 1)));
float Temperature_COMPONENT_1[1] = {0};
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::Temperature_COMPONENT_1,
new PoolEntry<float>(Temperature_COMPONENT_1, 1)));
int8_t TargetState_COMPONENT_1[1] = {0};
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::TargetState_COMPONENT_1,
new PoolEntry<int8_t>(TargetState_COMPONENT_1, 1)));
int8_t CurrentState_COMPONENT_1[1] = {0};
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::CurrentState_COMPONENT_1,
new PoolEntry<int8_t>(CurrentState_COMPONENT_1, 1)));
uint8_t HeaterRequest_COMPONENT_1[1] = {0};
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::HeaterRequest_COMPONENT_1,
new PoolEntry<uint8_t>(HeaterRequest_COMPONENT_1, 1)));
float Temperature_COMPONENT_2[1] = {0};
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::Temperature_COMPONENT_2,
new PoolEntry<float>(Temperature_COMPONENT_2, 1)));
int8_t TargetState_COMPONENT_2[1] = {0};
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::TargetState_COMPONENT_2,
new PoolEntry<int8_t>(TargetState_COMPONENT_2, 1)));
int8_t CurrentState_COMPONENT_2[1] = {0};
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::CurrentState_COMPONENT_2,
new PoolEntry<int8_t>(CurrentState_COMPONENT_2, 1)));
uint8_t HeaterRequest_COMPONENT_2[1] = {0};
pool_map->insert(
std::pair<uint32_t, PoolEntryIF*>(datapool::HeaterRequest_COMPONENT_2,
new PoolEntry<uint8_t>(HeaterRequest_COMPONENT_2, 1)));
}