5#include <nlohmann/json_fwd.hpp>
42 std::optional<int>
bit;
71 std::vector<OperationModeInfo>
modes;
89 uint16_t slavePosition);
Owns the fieldbus driver and node collection, and drives PDO exchange.
Definition device_manager.h:287
Represents a single node on the fieldbus.
Definition device.h:116
Definition bus_health_source.h:7
std::expected< OperationModes, std::string > operationModes(DeviceManager &deviceManager, uint16_t slavePosition)
Borrow-and-delegate wrapper over deviceOperationModes, for a caller holding a bus position rather tha...
Definition operation_modes.cc:110
OperationModeKind
Where a mode is defined, which is also how much can be said about it.
Definition operation_modes.h:28
@ kManufacturer
Defined by the vendor; 0x6502 has no bit this code can read for it.
@ kStandard
Defined by CiA402; its support is advertised by a bit of 0x6502.
void to_json(nlohmann::json &j, const Cia402Status &s)
Serialises a Cia402Status. Emits state/modeName as human-readable strings alongside the numeric statu...
Definition cia402_drive.cc:13
std::expected< OperationModes, std::string > deviceOperationModes(Device &device)
Builds the operation-mode table for device.
Definition operation_modes.cc:55
One operation mode of one device.
Definition operation_modes.h:34
std::string name
PascalCase identifier, as toString spells it.
Definition operation_modes.h:36
int value
The 0x6060 / 0x6061 value.
Definition operation_modes.h:35
std::string abbreviation
The profile's short form ("csp", "hm", …); empty for manufacturer modes and NoMode.
Definition operation_modes.h:45
bool deprecated
Whether the firmware marks the mode deprecated. Only a manufacturer mode carries this.
Definition operation_modes.h:54
std::string label
The profile's or the vendor's own wording.
Definition operation_modes.h:37
std::optional< int > bit
Definition operation_modes.h:42
std::optional< bool > supported
Definition operation_modes.h:51
OperationModeKind kind
Definition operation_modes.h:38
Every operation mode of one device, with what the drive says about each.
Definition operation_modes.h:58
uint32_t supportedDriveModes
0x6502 verbatim, for a client that wants the raw field.
Definition operation_modes.h:59
std::vector< int > manufacturerBits
Definition operation_modes.h:67
std::vector< OperationModeInfo > modes
Definition operation_modes.h:71