1
0
forked from fsfw/fsfw
Files
action
container
contrib
controller
coordinates
datalinklayer
datapool
datapoolglob
datapoollocal
devicehandlers
events
fdir
globalfunctions
health
housekeeping
internalError
ipc
memory
modes
monitoring
objectmanager
osal
parameters
power
returnvalues
rmap
serialize
serviceinterface
storagemanager
subsystem
tasks
tcdistribution
thermal
AbstractTemperatureSensor.cpp
AbstractTemperatureSensor.h
AcceptsThermalMessagesIF.h
CoreComponent.cpp
CoreComponent.h
Heater.cpp
Heater.h
RedundantHeater.cpp
RedundantHeater.h
TemperatureSensor.h
ThermalComponent.cpp
ThermalComponent.h
ThermalComponentIF.h
ThermalModule.cpp
ThermalModule.h
ThermalModuleIF.h
ThermalMonitor.cpp
ThermalMonitor.h
tcsDefinitions.h
timemanager
tmstorage
tmtcpacket
tmtcservices
.gitignore
LICENSE
NOTICE
framework.mk
fsfw/thermal/RedundantHeater.cpp
Ulrich Mohr 575f70ba03 updating code from Flying Laptop
This is the framework of Flying Laptop OBSW version A.13.0.
2018-07-12 16:29:32 +02:00

41 lines
1013 B
C++

#include "RedundantHeater.h"
RedundantHeater::~RedundantHeater() {
}
RedundantHeater::RedundantHeater(Parameters parameters) :
heater0(parameters.objectIdHeater0, parameters.switch0Heater0,
parameters.switch1Heater0), heater1(parameters.objectIdHeater1,
parameters.switch0Heater1, parameters.switch1Heater1) {
}
void RedundantHeater::performOperation(uint8_t opCode) {
heater0.performOperation(0);
heater1.performOperation(0);
}
void RedundantHeater::set(bool on, bool both, bool passive) {
if (on) {
ReturnValue_t result = heater0.set();
if (result != HasReturnvaluesIF::RETURN_OK || both) {
heater1.set();
} else {
heater1.clear(passive);
}
} else {
heater0.clear(passive);
heater1.clear(passive);
}
}
void RedundantHeater::triggerHeaterEvent(Event event) {
heater0.triggerEvent(event);
heater1.triggerEvent(event);
}
void RedundantHeater::setPowerSwitcher(PowerSwitchIF* powerSwitch) {
heater0.setPowerSwitcher(powerSwitch);
heater1.setPowerSwitcher(powerSwitch);
}