eive-obsw/mission/system/DualLanePowerStateMachine.h

30 lines
940 B
C
Raw Normal View History

#ifndef MISSION_SYSTEM_DUALLANEPOWERSTATEMACHINE_H_
#define MISSION_SYSTEM_DUALLANEPOWERSTATEMACHINE_H_
#include <devices/powerSwitcherList.h>
#include <fsfw/modes/HasModesIF.h>
#include "definitions.h"
class AssemblyBase;
class PowerSwitchIF;
class DualLanePowerStateMachine : public HasReturnvaluesIF {
public:
DualLanePowerStateMachine(pcduSwitches::Switches switchA, pcduSwitches::Switches switchB,
PowerSwitchIF* pwrSwitcher, duallane::PwrStates& state,
dur_millis_t checkTimeout = 3000);
void setCheckTimeout(dur_millis_t timeout);
void reset();
duallane::OpCodes powerStateMachine(Mode_t mode, Submode_t submode);
const pcduSwitches::Switches SWITCH_A;
const pcduSwitches::Switches SWITCH_B;
private:
duallane::PwrStates& state;
PowerSwitchIF* pwrSwitcher = nullptr;
Countdown checkTimeout;
};
#endif /* MISSION_SYSTEM_DUALLANEPOWERSTATEMACHINE_H_ */