eive-obsw/mission/system/SharedPowerAssemblyBase.h
Robin Mueller c9cc1d4cfe
Some checks failed
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
done
2023-04-11 22:58:13 +02:00

28 lines
956 B
C++

#ifndef MISSION_SYSTEM_SHAREDPOWERASSEMBLYBASE_H_
#define MISSION_SYSTEM_SHAREDPOWERASSEMBLYBASE_H_
#include <fsfw/devicehandlers/AssemblyBase.h>
#include <fsfw/power/PowerSwitcher.h>
#include <mission/power/defs.h>
/**
* Base class which contains common functions for assemblies where the power line is shared
* among the devices in the assembly.
*/
class SharedPowerAssemblyBase : public AssemblyBase {
public:
SharedPowerAssemblyBase(object_id_t objectId, PowerSwitchIF* pwrSwitcher,
power::Switch_t switchId, uint16_t cmdQueueDepth = 8);
protected:
PowerSwitcher switcher;
power::RecoveryCustomStates customRecoveryStates = power::RecoveryCustomStates::IDLE;
void performChildOperation() override;
void startTransition(Mode_t mode, Submode_t submode) override;
void handleModeReached() override;
virtual bool checkAndHandleRecovery() override;
};
#endif /* MISSION_SYSTEM_SHAREDPOWERASSEMBLYBASE_H_ */