fsfw/src/fsfw/devicehandlers/DeviceHandlerThermalSet.h

28 lines
1.1 KiB
C
Raw Normal View History

2020-12-11 23:50:00 +01:00
#ifndef FSFW_DEVICEHANDLERS_DEVICEHANDLERTHERMALSET_H_
#define FSFW_DEVICEHANDLERS_DEVICEHANDLERTHERMALSET_H_
#include "../datapoollocal/LocalPoolVariable.h"
2022-02-02 10:29:30 +01:00
#include "../datapoollocal/StaticLocalDataSet.h"
#include "DeviceHandlerIF.h"
2020-12-11 23:50:00 +01:00
2022-02-02 10:29:30 +01:00
class DeviceHandlerThermalSet : public StaticLocalDataSet<2> {
public:
2023-02-09 17:17:42 +01:00
DeviceHandlerThermalSet(HasLocalDataPoolIF* hkOwner, ThermalStateCfg cfg)
: DeviceHandlerThermalSet(hkOwner->getObjectId(), cfg) {}
2022-02-02 10:29:30 +01:00
2023-02-09 17:17:42 +01:00
DeviceHandlerThermalSet(object_id_t deviceHandler, ThermalStateCfg cfg)
: StaticLocalDataSet(sid_t(deviceHandler, cfg.thermalSetId)),
thermalStatePoolId(cfg.thermalStatePoolId),
heaterRequestPoolId(cfg.thermalRequestPoolId) {}
2022-02-02 10:29:30 +01:00
const lp_id_t thermalStatePoolId;
const lp_id_t heaterRequestPoolId;
lp_var_t<DeviceHandlerIF::dh_thermal_state_t> thermalState =
2023-02-09 17:17:42 +01:00
lp_var_t<DeviceHandlerIF::dh_thermal_state_t>(sid.objectId, thermalStatePoolId, this);
2022-02-02 10:29:30 +01:00
lp_var_t<DeviceHandlerIF::dh_heater_request_t> heaterRequest =
2023-02-09 17:17:42 +01:00
lp_var_t<DeviceHandlerIF::dh_heater_request_t>(sid.objectId, heaterRequestPoolId, this);
2020-12-11 23:50:00 +01:00
};
#endif /* FSFW_DEVICEHANDLERS_DEVICEHANDLERTHERMALSET_H_ */