eive-obsw/mission/controller/controllerdefinitions/ThermalControllerDefinitions.h
Ulrich Mohr 90a92feee1
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
some thermal controller code to test TM chain
2022-05-19 00:40:42 +02:00

75 lines
3.3 KiB
C++

#ifndef MISSION_CONTROLLER_CONTROLLERDEFINITIONS_THERMALCONTROLLERDEFINITIONS_H_
#define MISSION_CONTROLLER_CONTROLLERDEFINITIONS_THERMALCONTROLLERDEFINITIONS_H_
#include <fsfw/datapoollocal/LocalPoolVariable.h>
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
namespace thermalControllerDefinitions {
enum SetIds : uint32_t { SENSOR_TEMPERATURES, COMPONENT_TEMPERATURES };
enum PoolIds : lp_id_t {
SENSOR_PLOC_HEATSPREADER,
SENSOR_PLOC_MISSIONBOARD,
SENSOR_4K_CAMERA,
SENSOR_DAC_HEATSPREADER,
SENSOR_STARTRACKER,
SENSOR_RW1,
SENSOR_DRO,
SENSOR_SCEX,
SENSOR_X8,
SENSOR_HPA,
SENSOR_TX_MODUL,
SENSOR_MPA,
SENSOR_ACU,
SENSOR_PLPCDU_HEATSPREADER,
SENSOR_TCS_BOARD,
SENSOR_MAGNETTORQUER,
COMPONENT_RW
};
/**
* @brief This dataset can be used to store the collected temperatures of all temperature sensors
*/
class SensorTemperatures : public StaticLocalDataSet<16> {
public:
SensorTemperatures(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, SENSOR_TEMPERATURES) {}
SensorTemperatures(object_id_t objectId)
: StaticLocalDataSet(sid_t(objectId, SENSOR_TEMPERATURES)) {}
lp_var_t<float> sensor_ploc_heatspreader = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_PLOC_HEATSPREADER, this);
lp_var_t<float> sensor_ploc_missionboard = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_PLOC_MISSIONBOARD, this);
lp_var_t<float> sensor_4k_camera = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_4K_CAMERA, this);
lp_var_t<float> sensor_dac_heatspreader = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_DAC_HEATSPREADER, this);
lp_var_t<float> sensor_startracker = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_STARTRACKER, this);
lp_var_t<float> sensor_rw1 = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_RW1, this);
lp_var_t<float> sensor_dro = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_DRO, this);
lp_var_t<float> sensor_scex = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_SCEX, this);
lp_var_t<float> sensor_x8 = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_X8, this);
lp_var_t<float> sensor_hpa = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_HPA, this);
lp_var_t<float> sensor_tx_modul = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_TX_MODUL, this);
lp_var_t<float> sensor_mpa = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_MPA, this);
lp_var_t<float> sensor_acu = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_ACU, this);
lp_var_t<float> sensor_plpcdu_heatspreader = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_PLPCDU_HEATSPREADER, this);
lp_var_t<float> sensor_tcs_board = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_TCS_BOARD, this);
lp_var_t<float> sensor_magnettorquer = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_MAGNETTORQUER, this);
};
/**
* @brief This dataset can be used to store the collected temperatures of all components
*/
class ComponentTemperatures : public StaticLocalDataSet<2> {
public:
ComponentTemperatures(HasLocalDataPoolIF* owner)
: StaticLocalDataSet(owner, COMPONENT_TEMPERATURES) {}
ComponentTemperatures(object_id_t objectId)
: StaticLocalDataSet(sid_t(objectId, COMPONENT_TEMPERATURES)) {}
lp_var_t<float> rw = lp_var_t<float>(sid.objectId, PoolIds::COMPONENT_RW, this);
};
} // namespace thermalControllerDefinitions
#endif /* MISSION_CONTROLLER_CONTROLLERDEFINITIONS_THERMALCONTROLLERDEFINITIONS_H_ */