#include "TcsSubsystem.h" #include TcsSubsystem::TcsSubsystem(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher, power::Switch_t theSwitch, TcsBoardHelper helper) : AssemblyBase(objectId, parentId, 24), switcher(pwrSwitcher, theSwitch), helper(helper) {} void TcsSubsystem::performChildOperation() { switcher.doStateMachine(); if (not switcher.active()) { AssemblyBase::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(); }