83 lines
3.1 KiB
C++
83 lines
3.1 KiB
C++
#ifndef MISSION_CONTROLLER_THERMALCONTROLLER_H_
|
|
#define MISSION_CONTROLLER_THERMALCONTROLLER_H_
|
|
|
|
#include <fsfw/action/HasActionsIF.h>
|
|
#include <fsfw/action/SimpleActionHelper.h>
|
|
#include <fsfw/events/EventReportingProxyIF.h>
|
|
#include <fsfw/parameters/ParameterHelper.h>
|
|
#include <fsfw/controller/ControllerBase.h>
|
|
#include <fsfw/datapool/ControllerSet.h>
|
|
#include <fsfw/datapool/DataSet.h>
|
|
#include <fsfw/datapool/PoolVariable.h>
|
|
#include <fsfw/datapool/PoolVector.h>
|
|
#include <fsfw/health/HealthTableIF.h>
|
|
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
|
#include <mission/Controller/ArduinoTCSTemperatureSensor.h>
|
|
#include <mission/Controller/TCS_ThermalComponent.h>
|
|
#include <mission/Controller/TCS_Heater.h>
|
|
#include <bsp_linux/fsfwconfig/objects/systemObjectList.h>
|
|
#include <bsp_linux/fsfwconfig/datapool/dataPoolInit.h>
|
|
|
|
|
|
class ThermalController: public ControllerBase {
|
|
public:
|
|
|
|
static const Submode_t NO_REDUNDANCY = 1;
|
|
static const Submode_t HEATER_REDUNDANCY = 2;
|
|
static const uint8_t COMPONENT_DOMAIN_ID = 1; //!< First number n of component domain IDs
|
|
|
|
ThermalController(object_id_t objectId, object_id_t powerSwitcher, size_t commandQueueDepth);
|
|
virtual~ ThermalController();
|
|
|
|
ReturnValue_t initialize() override;
|
|
ReturnValue_t performOperation(uint8_t opCode) override;
|
|
|
|
private:
|
|
|
|
//ThermalModule::Strategy strategy;
|
|
//SimpleActionHelper actionHelper;
|
|
//ParameterHelper parameterHelper;
|
|
object_id_t powerSwitcherId;
|
|
|
|
// definition of dataset
|
|
DataSet SensorData;
|
|
DataSet ComponentData;
|
|
|
|
// definition of dataset variables from datapool
|
|
PoolVector <float, 36> TempValueVec;
|
|
|
|
// definition of objects
|
|
ArduinoTCSTemperatureSensor TEMPERATURE_SENSOR_CH1;
|
|
ArduinoTCSTemperatureSensor TEMPERATURE_SENSOR_CH2;
|
|
std::list<ArduinoTCSTemperatureSensor> sensors;
|
|
|
|
TCS_ThermalComponent TEMPERATURE_COMPONENT_1;
|
|
TCS_ThermalComponent TEMPERATURE_COMPONENT_2;
|
|
std::list<TCS_ThermalComponent> components;
|
|
|
|
TCS_Heater HEATER_1;
|
|
TCS_Heater REDUNDANT_HEATER_1;
|
|
TCS_Heater HEATER_2;
|
|
TCS_Heater REDUNDANT_HEATER_2;
|
|
std::list<TCS_Heater> heaters;
|
|
std::list<TCS_Heater> redundant_heaters;
|
|
|
|
protected:
|
|
|
|
/* Extended Controller Base overrides */
|
|
ReturnValue_t handleCommandMessage(CommandMessage *message) override;
|
|
void performControlOperation() override;
|
|
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode, uint32_t *msToReachTheMode) override;
|
|
void startTransition(Mode_t mode, Submode_t submode) override;
|
|
//void calculateStrategy(bool announce, bool redundancy);
|
|
//void modeChanged(Mode_t mode, Submode_t submode) override;
|
|
//void getMode(Mode_t *mode, Submode_t *submode) override;
|
|
//void changeHK(Mode_t mode, Submode_t submode, bool enable) override;
|
|
//void setToExternalControl() override;
|
|
//virtual ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy, const uint8_t* data, uint32_t size) override;
|
|
//virtual void announceMode(bool recursive);
|
|
};
|
|
|
|
|
|
#endif /* MISSION_CONTROLLER_THERMALCONTROLLER_H_ */
|