23 : m_impl(
std::make_unique<
Impl>())
32 m_impl->activeOpEcho = 0;
37 return m_impl->activeOpEcho;
51 m_impl->activeOpEcho = opModeDisplay;
54 m_impl->activeOpEcho = 0;
90 if (opReq != m_impl->activeOpEcho)
Command update(uint16_t statusword, int8_t opModeDisplay, int8_t opReq, bool hwInhibit)
Computes the next control word and operation mode to send to the drive.
~StateMachine()
Destructor.
void reset()
Resets the internal state machine.
Command faultReset() noexcept
Generates a fault reset command.
int8_t getActiveOpMode() const noexcept
StateMachine()
Constructor.
static constexpr State sw_to_state(uint16_t sw)
static constexpr uint16_t CW_ENABLE_OP
static constexpr uint16_t CW_QUICKSTOP
static constexpr uint16_t CW_SHUTDOWN
static constexpr uint16_t CW_SWITCH_ON
static constexpr uint16_t CW_DISABLE_VOLTAGE
Control‑word constants (CiA‑402 table 46)
int8_t activeOpEcho
latest OpModeDisplay from the drive
static constexpr uint16_t CW_FAULT_RST