6#include <ethercattype.h>
49 op = EC_STATE_OPERATIONAL,
83 explicit operator bool() =
delete;
94 return "EC_STATE_NONE";
96 return "EC_STATE_INIT";
98 return "EC_STATE_PRE_OP";
100 return "EC_STATE_BOOT";
102 return "EC_STATE_SAFE_OP";
104 return "EC_STATE_OPERATIONAL";
106 return "EC_STATE_SAFE_OP + EC_STATE_ERROR";
108 return "UNKNOWN_STATE";
114 stream << rhs.
c_str();
122 fromUInt16(std::uint16_t state)
128 case EC_STATE_PRE_OP:
132 case EC_STATE_SAFE_OP:
134 case EC_STATE_OPERATIONAL:
136 case EC_STATE_SAFE_OP + EC_STATE_ERROR:
constexpr const char * c_str() const
Value
The EtherCAT state enum.
@ init
Initial state after switch a EtherCAT slave on.
@ preOp
Pre-operational state.
@ safeOp
Safe-operational state.
@ invalid
State is not valid, e.g. if a request for reading the actual bus state failed.
@ safeOpError
Safe-operational state after an error has happend.
constexpr EtherCATState(std::uint16_t state)
Construct a new EtherCATState from a std::uint16_t (e.g.
constexpr EtherCATState(Value state)
Construct a new EtherCATState from another EtherCATState.
friend std::ostream & operator<<(std::ostream &stream, const EtherCATState &rhs)