eive-obsw/mission/system/TcsSubsystem.cpp
Robin Mueller ce8253b940
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
TCS subsystem continued
2022-03-22 15:49:22 +01:00

35 lines
1.1 KiB
C++

#include "TcsSubsystem.h"
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
TcsSubsystem::TcsSubsystem(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher,
power::Switch_t theSwitch, TcsBoardHelper helper)
: SubsystemBase(objectId, parentId, MODE_OFF, 24),
switcher(pwrSwitcher, theSwitch),
helper(helper) {}
ReturnValue_t TcsSubsystem::handleCommandMessage(CommandMessage* message) { return RETURN_OK; }
void TcsSubsystem::performChildOperation() {}
ReturnValue_t TcsSubsystem::checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t* msToReachTheMode) {
if (mode == MODE_ON or mode == MODE_OFF or mode == DeviceHandlerIF::MODE_NORMAL) {
return RETURN_OK;
}
return HasModesIF::INVALID_MODE;
}
ReturnValue_t TcsSubsystem::initialize() {
ReturnValue_t result = RETURN_OK;
for (const auto& obj : helper.rtdIds) {
result = registerChild(obj);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
}
return SubsystemBase::initialize();
}
void TcsSubsystem::startTransition(Mode_t mode, Submode_t submode) {}