|
Motion Master 6.0.0-alpha.86
Next-generation motion control software
|
Pure CiA402 (CANopen drive profile, ETG.6010) vocabulary — object indices, control/status word bit layout, the device state machine, and operation modes. More...
#include <cstdint>#include <optional>#include <string_view>Go to the source code of this file.
Classes | |
| struct | mm::node::cia402::StandardOperationMode |
| One row of the standard operation-mode table — a mode, the 0x6502 bit that advertises it, and the two names the profile gives it. More... | |
| struct | mm::node::cia402::FsaTransition |
| The next step of a walk toward a target state. More... | |
Namespaces | |
| namespace | mm |
| namespace | mm::node |
| namespace | mm::node::cia402 |
Functions | |
| constexpr std::optional< OperationMode > | mm::node::cia402::toOperationMode (int value) |
| Maps a raw mode value (as written to 0x6060 / read from 0x6061) to a known operation mode. Rejects values outside the standard set so an API boundary can 400 an unknown mode. | |
| constexpr State | mm::node::cia402::decodeState (uint16_t statusword) |
| Decodes the CiA402 state machine state from a statusword (0x6041) value. | |
| constexpr bool | mm::node::cia402::isFaulted (uint16_t statusword) |
| Whether the statusword's fault bit (bit 3) is set, gated to the faulted states. | |
| constexpr std::string_view | mm::node::cia402::toString (State state) |
Human-readable name of a state (for logging / JSON). Never returns nullptr. | |
| constexpr std::string_view | mm::node::cia402::toString (OperationMode mode) |
Human-readable name of an operation mode (for logging / JSON). Never nullptr. | |
| constexpr bool | mm::node::cia402::quickStopHolds (int16_t optionCode) |
Whether a quick stop configured with optionCode leaves the drive in Quick Stop Active, or passes through it into Switch On Disabled. | |
| constexpr std::optional< State > | mm::node::cia402::parseState (std::string_view token) |
Parses a state name as toString spells it. std::nullopt for anything else. | |
| constexpr bool | mm::node::cia402::isCommandableState (State state) |
Whether a master can ask a drive to reach state. | |
| constexpr FsaTransition | mm::node::cia402::nextFsaTransition (State from, State target, bool allowQuickStopOverride) |
One step of the walk from from toward target — the CiA402 state machine as a next-hop table. | |
Variables | |
| constexpr uint16_t | mm::node::cia402::kCommandMask = 0x008F |
| Controlword (0x6040) command-bit mask — the state-machine bits a transition touches. | |
| constexpr StandardOperationMode | mm::node::cia402::kStandardOperationModes [] |
| Every standard operation mode, with its 0x6502 bit — ETG.6010 §6.8.1, Figure 15. | |
| constexpr int | mm::node::cia402::kFirstManufacturerDriveModeBit = 16 |
| The first bit of 0x6502 that the profile leaves to the vendor (ETG.6010 Figure 15). | |
Pure CiA402 (CANopen drive profile, ETG.6010) vocabulary — object indices, control/status word bit layout, the device state machine, and operation modes.
This header is deliberately free of any dependency on Device: it is the protocol definition, decoupled from the transport, so the bit-twiddling can be unit-tested in isolation and reused by both Cia402Drive (the borrowed view) and any cyclic task that composes a controlword by hand. The behaviour that actually touches the bus lives in cia402_drive.h.