2021-01-08 09:34:43 +01:00
|
|
|
#ifndef MISSION_CONTROLLER_THERMALCONTROLLER_H_
|
|
|
|
#define MISSION_CONTROLLER_THERMALCONTROLLER_H_
|
|
|
|
|
|
|
|
#include <fsfw/controller/ExtendedControllerBase.h>
|
2022-02-14 13:49:12 +01:00
|
|
|
#include <mission/controller/controllerdefinitions/ThermalControllerDefinitions.h>
|
2022-05-19 23:08:54 +02:00
|
|
|
#include <mission/devices/devicedefinitions/Max31865Definitions.h>
|
2022-05-24 16:52:21 +02:00
|
|
|
#include <mission/devices/devicedefinitions/SusDefinitions.h>
|
2022-05-23 00:37:49 +02:00
|
|
|
#include <mission/devices/devicedefinitions/Tmp1075Definitions.h>
|
2022-02-10 18:29:28 +01:00
|
|
|
|
2022-02-10 18:54:09 +01:00
|
|
|
class ThermalController : public ExtendedControllerBase {
|
2022-01-17 15:58:27 +01:00
|
|
|
public:
|
2022-05-23 00:37:49 +02:00
|
|
|
static const uint16_t INVALID_TEMPERATURE = 999;
|
|
|
|
|
2022-02-11 16:20:26 +01:00
|
|
|
ThermalController(object_id_t objectId, object_id_t parentId);
|
2021-01-08 09:34:43 +01:00
|
|
|
|
2022-02-17 16:29:22 +01:00
|
|
|
ReturnValue_t initialize() override;
|
2022-02-10 18:54:09 +01:00
|
|
|
|
2022-02-14 13:49:12 +01:00
|
|
|
protected:
|
2022-02-10 18:54:09 +01:00
|
|
|
virtual ReturnValue_t handleCommandMessage(CommandMessage* message) override;
|
|
|
|
virtual void performControlOperation() override;
|
|
|
|
virtual ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
|
|
|
LocalDataPoolManager& poolManager) override;
|
|
|
|
virtual LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
|
|
|
|
|
|
|
// Mode abstract functions
|
|
|
|
virtual ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
|
|
|
|
uint32_t* msToReachTheMode) override;
|
2022-02-14 13:49:12 +01:00
|
|
|
|
2022-05-19 23:08:54 +02:00
|
|
|
private:
|
2022-02-14 13:49:12 +01:00
|
|
|
thermalControllerDefinitions::SensorTemperatures sensorTemperatures;
|
2022-05-24 16:52:21 +02:00
|
|
|
thermalControllerDefinitions::SusTemperatures susTemperatures;
|
2022-05-23 00:37:49 +02:00
|
|
|
thermalControllerDefinitions::DeviceTemperatures deviceTemperatures;
|
2022-02-14 13:49:12 +01:00
|
|
|
thermalControllerDefinitions::ComponentTemperatures componentTemperatures;
|
2022-05-19 23:08:54 +02:00
|
|
|
|
2022-05-24 16:52:21 +02:00
|
|
|
// Temperature Sensors
|
2022-05-30 14:32:50 +02:00
|
|
|
MAX31865::Max31865Set max31865Set0;
|
|
|
|
MAX31865::Max31865Set max31865Set1;
|
|
|
|
MAX31865::Max31865Set max31865Set2;
|
|
|
|
MAX31865::Max31865Set max31865Set3;
|
|
|
|
MAX31865::Max31865Set max31865Set4;
|
|
|
|
MAX31865::Max31865Set max31865Set5;
|
|
|
|
MAX31865::Max31865Set max31865Set6;
|
|
|
|
MAX31865::Max31865Set max31865Set7;
|
|
|
|
MAX31865::Max31865Set max31865Set8;
|
|
|
|
MAX31865::Max31865Set max31865Set9;
|
|
|
|
MAX31865::Max31865Set max31865Set10;
|
|
|
|
MAX31865::Max31865Set max31865Set11;
|
|
|
|
MAX31865::Max31865Set max31865Set12;
|
|
|
|
MAX31865::Max31865Set max31865Set13;
|
|
|
|
MAX31865::Max31865Set max31865Set14;
|
|
|
|
MAX31865::Max31865Set max31865Set15;
|
2022-05-23 00:37:49 +02:00
|
|
|
TMP1075::Tmp1075Dataset tmp1075Set1;
|
|
|
|
TMP1075::Tmp1075Dataset tmp1075Set2;
|
2022-05-19 23:08:54 +02:00
|
|
|
|
2022-05-24 16:52:21 +02:00
|
|
|
// SUS
|
|
|
|
SUS::SusDataset susSet0;
|
|
|
|
SUS::SusDataset susSet1;
|
|
|
|
SUS::SusDataset susSet2;
|
|
|
|
SUS::SusDataset susSet3;
|
|
|
|
SUS::SusDataset susSet4;
|
|
|
|
SUS::SusDataset susSet5;
|
|
|
|
SUS::SusDataset susSet6;
|
|
|
|
SUS::SusDataset susSet7;
|
|
|
|
SUS::SusDataset susSet8;
|
|
|
|
SUS::SusDataset susSet9;
|
|
|
|
SUS::SusDataset susSet10;
|
|
|
|
SUS::SusDataset susSet11;
|
2022-05-23 00:37:49 +02:00
|
|
|
|
2022-05-24 16:52:21 +02:00
|
|
|
void copySensors();
|
|
|
|
void copySus();
|
2022-05-23 00:37:49 +02:00
|
|
|
void copyDevices();
|
2021-01-08 09:34:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* MISSION_CONTROLLER_THERMALCONTROLLER_H_ */
|