system folder restructuring
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
31
mission/system/objects/PowerStateMachineBase.h
Normal file
31
mission/system/objects/PowerStateMachineBase.h
Normal file
@ -0,0 +1,31 @@
|
||||
#ifndef MISSION_SYSTEM_POWERSTATEMACHINE_H_
|
||||
#define MISSION_SYSTEM_POWERSTATEMACHINE_H_
|
||||
|
||||
#include <fsfw/modes/HasModesIF.h>
|
||||
#include <fsfw/power/PowerSwitchIF.h>
|
||||
#include <fsfw/timemanager/Countdown.h>
|
||||
|
||||
#include "definitions.h"
|
||||
|
||||
class PowerStateMachineBase : public HasReturnvaluesIF {
|
||||
public:
|
||||
PowerStateMachineBase(PowerSwitchIF* pwrSwitcher, dur_millis_t checkTimeout);
|
||||
|
||||
virtual power::OpCodes fsm() = 0;
|
||||
|
||||
void setCheckTimeout(dur_millis_t timeout);
|
||||
void reset();
|
||||
void start(Mode_t mode, Submode_t submode);
|
||||
bool active();
|
||||
power::States getState() const;
|
||||
|
||||
protected:
|
||||
power::OpCodes opResult = power::OpCodes::NONE;
|
||||
power::States state = power::States::IDLE;
|
||||
PowerSwitchIF* pwrSwitcher = nullptr;
|
||||
Mode_t targetMode = HasModesIF::MODE_OFF;
|
||||
Submode_t targetSubmode = 0;
|
||||
Countdown checkTimeout;
|
||||
};
|
||||
|
||||
#endif /* MISSION_SYSTEM_POWERSTATEMACHINE_H_ */
|
Reference in New Issue
Block a user