#ifndef MISSION_CONTROLLER_POWERCONTROLLER_H_ #define MISSION_CONTROLLER_POWERCONTROLLER_H_ #include #include #include #include class PowerController : public ExtendedControllerBase, public ReceivesParameterMessagesIF { public: static constexpr dur_millis_t INIT_DELAY = 500; PowerController(object_id_t objectId, bool enableHkSets); MessageQueueId_t getCommandQueue() const; ReturnValue_t getParameter(uint8_t domainId, uint8_t parameterId, ParameterWrapper* parameterWrapper, const ParameterWrapper* newValues, uint16_t startAtIndex) override; private: bool enableHkSets = false; ParameterHelper parameterHelper; enum class InternalState { STARTUP, INITIAL_DELAY, READY }; InternalState internalState = InternalState::STARTUP; // Initial delay to make sure all pool variables have been initialized their owners Countdown initialCountdown = Countdown(INIT_DELAY); ReturnValue_t initialize() override; ReturnValue_t handleCommandMessage(CommandMessage* message) override; ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap, LocalDataPoolManager& poolManager) override; LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override; ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode, uint32_t* msToReachTheMode) override; void performControlOperation() override; }; #endif /* MISSION_CONTROLLER_POWERCONTROLLER_H_ */