28 lines
956 B
C++
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_ */
|