#ifndef MISSION_SYSTEM_RWASS_H_ #define MISSION_SYSTEM_RWASS_H_ #include #include struct RwHelper { RwHelper(std::array rwIds) : rwIds(rwIds) {} std::array rwIds = {}; }; class RwAssembly : public AssemblyBase { public: RwAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher, power::Switch_t switcher, RwHelper helper); private: static constexpr uint8_t NUMBER_RWS = 4; RwHelper helper; PowerSwitcher switcher; bool warningSwitch = true; bool modeTransitionFailedSwitch = true; FixedArrayList modeTable; ReturnValue_t initialize() override; ReturnValue_t handleNormalOrOnModeCmd(Mode_t mode, Submode_t submode); /** * Check whether it makes sense to send mode commands to the device * @param object * @param mode * @return */ bool isUseable(object_id_t object, Mode_t mode); // AssemblyBase implementation void performChildOperation() override; ReturnValue_t commandChildren(Mode_t mode, Submode_t submode) override; ReturnValue_t checkChildrenStateOn(Mode_t wantedMode, Submode_t wantedSubmode) override; ReturnValue_t isModeCombinationValid(Mode_t mode, Submode_t submode) override; void startTransition(Mode_t mode, Submode_t submode) override; void handleModeReached() override; }; #endif /* MISSION_SYSTEM_RWASS_H_ */