TCS subsystem continued
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
2022-03-22 15:49:22 +01:00
parent 73e3d29ed0
commit ce8253b940
12 changed files with 167 additions and 127 deletions

View File

@ -3,32 +3,23 @@
#include <devices/powerSwitcherList.h>
#include <fsfw/modes/HasModesIF.h>
#include <mission/system/PowerStateMachineBase.h>
#include "definitions.h"
class AssemblyBase;
class PowerSwitchIF;
class DualLanePowerStateMachine : public HasReturnvaluesIF {
class DualLanePowerStateMachine : public PowerStateMachineBase {
public:
DualLanePowerStateMachine(pcduSwitches::Switches switchA, pcduSwitches::Switches switchB,
PowerSwitchIF* pwrSwitcher, dur_millis_t checkTimeout = 5000);
void setCheckTimeout(dur_millis_t timeout);
void reset();
void start(Mode_t mode, Submode_t submode);
bool active();
duallane::PwrStates getState() const;
duallane::OpCodes powerStateMachine();
power::OpCodes fsm() override;
const pcduSwitches::Switches SWITCH_A;
const pcduSwitches::Switches SWITCH_B;
private:
duallane::OpCodes opResult = duallane::OpCodes::NONE;
duallane::PwrStates state = duallane::PwrStates::IDLE;
PowerSwitchIF* pwrSwitcher = nullptr;
Mode_t targetMode = HasModesIF::MODE_OFF;
Submode_t targetSubmode = 0;
Countdown checkTimeout;
};
#endif /* MISSION_SYSTEM_DUALLANEPOWERSTATEMACHINE_H_ */