|
Motion Master 6.0.0-alpha.50
Next-generation motion control software
|
Namespaces | |
| namespace | soem |
Classes | |
| struct | AlStatusCode |
| Metadata for a single AL Status Code entry. More... | |
| struct | DcConfig |
| Distributed-clock configuration for a slave. More... | |
| struct | DcSyncDiagnostics |
| Live distributed-clock synchronisation status for one slave, read from its ESC. More... | |
| struct | EscRegister |
| Metadata for a single ESC register entry. More... | |
| class | FieldbusDriver |
| Abstract interface for an EtherCAT fieldbus driver. More... | |
| struct | FmmuConfig |
| One FMMU's configuration as programmed on a slave's ESC. More... | |
| struct | FoeError |
A structured FoE failure. String-like where a caller only forwards it (operator<<, .message, what()); branchable where a caller must react (kind, retry). More... | |
| struct | FoeErrorCode |
| Metadata for a single FoE error code entry. More... | |
| struct | MailboxConfig |
| Mailbox configuration for a slave (the CoE/FoE/EoE/SoE transport windows). More... | |
| struct | MailboxErrorCode |
| Metadata for a single CoE mailbox error code entry. More... | |
| struct | NetworkAdapter |
| struct | ObjectDataTypeInfo |
| Metadata for a single object dictionary data type. More... | |
| struct | OdEntry |
| Schema of a single object dictionary entry uploaded from a slave. More... | |
| struct | PdoLayout |
Layout of the process-data images, produced by configureProcessData. More... | |
| struct | PortDiagnostics |
| Per-port link state and error counters decoded from a slave's ESC. More... | |
| struct | ProcessDataWatchdogConfig |
| Process-data (sync-manager) watchdog configuration of one slave. More... | |
| class | ScopedQuietSdoLog |
| RAII guard that suppresses per-transfer SDO debug logging for its scope (and restores the previous state on exit, so it nests correctly). More... | |
| struct | SdoAbortCode |
| Metadata for a single CoE SDO abort code entry. More... | |
| struct | SiiCategoryDistributedClockElement |
| One distributed-clock setting from SII category 60 (0x3C). More... | |
| struct | SiiCategoryGeneral |
| General device information (SII category 30 / 0x1E). More... | |
| struct | SiiCategoryPdoElement |
| One default PDO (RxPDO category 51 / 0x33, or TxPDO category 50 / 0x32). More... | |
| struct | SiiCategoryPdoEntryElement |
| One mapped object within a default PDO (SII categories 50/51). More... | |
| struct | SiiCategorySection |
| The decoded category section of an SII image. More... | |
| struct | SiiCategorySyncManagerElement |
| One Sync-Manager default from SII category 41 (0x29). More... | |
| struct | SiiInfo |
| SII (Slave Information Interface) — the structured EEPROM image of an EtherCAT slave. More... | |
| struct | SlaveConfig |
Static ESC configuration snapshot for one slave, captured by configureProcessData. More... | |
| struct | SlaveDiagnostics |
| Decoded health diagnostics for one slave, read live from its ESC registers. More... | |
| struct | SlaveInfo |
| Immutable identity fields read from a slave's EEPROM during configuration. More... | |
| struct | SlaveInformationInterface |
| A fully parsed SII image: fixed header plus decoded categories. More... | |
| struct | SlaveIo |
| One slave's input and output windows within the process-data images. More... | |
| struct | SyncManagerConfig |
| One Sync Manager's configuration as programmed on a slave's ESC. More... | |
Enumerations | |
| enum class | EtherCatState : uint16_t { Init = 0x01 , PreOp = 0x02 , Boot = 0x03 , SafeOp = 0x04 , Op = 0x08 } |
| EtherCAT Application Layer state values. More... | |
| enum class | Retry { Transient , Permanent } |
Retry disposition of a failed operation: whether re-issuing the identical call could plausibly succeed. This is the one axis callers branch on uniformly — a firmware flasher retries Transient failures and aborts on Permanent ones — so it rides alongside the FoE-specific kind rather than being folded into it. More... | |
| enum class | FoeErrorKind { NoResponse , FileNotFound , BufferTooSmall , PacketMismatch , Protocol } |
Specific File-over-EtherCAT failure kind. Transport-agnostic: a SOEM driver decodes it from a negated ec_err_type, a future SPoE driver from its own protocol codes. More... | |
| enum class | ObjectDataType : uint16_t { UNSPECIFIED = 0x0000 , BOOLEAN = 0x0001 , BYTE = 0x001E , WORD = 0x001F , DWORD = 0x0020 , BIT1 = 0x0030 , BIT2 = 0x0031 , BIT3 = 0x0032 , BIT4 = 0x0033 , BIT5 = 0x0034 , BIT6 = 0x0035 , BIT7 = 0x0036 , BIT8 = 0x0037 , BIT9 = 0x0038 , BIT10 = 0x0039 , BIT11 = 0x003A , BIT12 = 0x003B , BIT13 = 0x003C , BIT14 = 0x003D , BIT15 = 0x003E , BIT16 = 0x003F , BITARR8 = 0x002D , BITARR16 = 0x002E , BITARR32 = 0x002F , INTEGER8 = 0x0002 , INTEGER16 = 0x0003 , INTEGER24 = 0x0010 , INTEGER32 = 0x0004 , INTEGER40 = 0x0012 , INTEGER48 = 0x0013 , INTEGER56 = 0x0014 , INTEGER64 = 0x0015 , UNSIGNED8 = 0x0005 , UNSIGNED16 = 0x0006 , UNSIGNED24 = 0x0016 , UNSIGNED32 = 0x0007 , UNSIGNED40 = 0x0018 , UNSIGNED48 = 0x0019 , UNSIGNED56 = 0x001A , UNSIGNED64 = 0x001B , REAL32 = 0x0008 , REAL64 = 0x0011 , GUID = 0x001D , VISIBLE_STRING = 0x0009 , OCTET_STRING = 0x000A , UNICODE_STRING = 0x000B , WSTRING = 0x0268 , TIME_OF_DAY = 0x000C , TIME_DIFFERENCE = 0x000D , DOMAIN = 0x000F , ARRAY_OF_INT = 0x0260 , ARRAY_OF_SINT = 0x0261 , ARRAY_OF_DINT = 0x0262 , ARRAY_OF_UDINT = 0x0263 , ARRAY_OF_BITARR8 = 0x0264 , ARRAY_OF_BITARR16 = 0x0265 , ARRAY_OF_BITARR32 = 0x0266 , ARRAY_OF_USINT = 0x0267 , ARRAY_OF_REAL = 0x0269 , ARRAY_OF_LREAL = 0x026A , PDO_MAPPING = 0x0021 , IDENTITY = 0x0023 , COMMAND_PAR = 0x0025 , PDO_PARAMETER = 0x0027 , ENUM = 0x0028 , SM_SYNCHRONISATION = 0x0029 , RECORD = 0x002A , BACKUP_PARAMETER = 0x002B , MODULAR_DEVICE_PROFILE = 0x002C , ERROR_SETTING = 0x0281 , DIAGNOSIS_HISTORY = 0x0282 , EXTERNAL_SYNC_STATUS = 0x0283 , EXTERNAL_SYNC_SETTINGS = 0x0284 , DEFTYPE_FSOEFRAME = 0x0285 , DEFTYPE_FSOECOMMPAR = 0x0286 , UTYPE_START = 0x0800 , UTYPE_END = 0x0FFF } |
| CoE object dictionary data type codes. More... | |
| enum class | SiiCategoryType : uint16_t { Nop = 0 , DeviceSpecific = 1 , Strings = 10 , DataTypes = 20 , General = 30 , Fmmu = 40 , SyncM = 41 , FmmuX = 42 , SyncUnit = 43 , TxPdo = 50 , RxPdo = 51 , Dc = 60 , Timeouts = 70 , Dictionary = 80 , Hardware = 90 , VendorInformation = 100 , Images = 110 , VendorSpecific = 0x0800 , ApplicationSpecific = 0x2000 , End = 0xFFFF } |
| Recognised SII category type identifiers (ETG.2010 Table 5). More... | |
Functions | |
| void | to_json (nlohmann::json &j, const AlStatusCode &c) |
| Serialises an AlStatusCode to JSON. | |
| constexpr const AlStatusCode * | findAlStatusCode (uint16_t code) |
Looks up code in kAlStatusCodes, or returns nullptr if it is not catalogued. | |
| constexpr bool | isAlStatusCodeTerminal (uint16_t code) |
Returns true if code indicates a state-transition failure that cannot be resolved by retrying the same writestate. | |
| constexpr std::string_view | alStatusCodeName (uint16_t code) |
Returns the short name for code, or an empty view if code is not a known AL Status Code. | |
| void | to_json (nlohmann::json &j, const NetworkAdapter &a) |
| Serialises a NetworkAdapter to JSON. | |
| bool | isMacAddress (const std::string &s) |
Returns true if s is a MAC address in either Linux (:) or Windows (-) separator format. | |
| std::string | normalizeMac (const std::string &raw, char sep) |
| Normalises a MAC address string to uppercase with the given separator. | |
| std::vector< NetworkAdapter > | enumerateNetworkAdapters () |
| Enumerates all network adapters visible to the OS. | |
| std::expected< NetworkAdapter, std::string > | resolveNetworkAdapter (const std::string &input) |
Resolves a network adapter specifier to a fully populated NetworkAdapter. | |
| void | to_json (nlohmann::json &j, const EscRegister &r) |
| Serialises an EscRegister to JSON. | |
| EtherCatState | alState (uint16_t alStatus) |
| Extracts the AL state (bits 3:0) from a raw AL Status register value (0x0130). | |
| bool | alHasError (uint16_t alStatus) |
| Returns whether the AL Status error indicator (bit 4 of register 0x0130) is set. | |
| std::string_view | toString (EtherCatState state) |
| Human-readable name of an AL state, for log and error messages. | |
| int | workingCounterContribution (EtherCatState state, bool hasOutputs, bool hasInputs) |
| Working-counter contribution of one slave for a given AL state and PDO presence. | |
| std::string_view | foeReason (FoeErrorKind kind) |
| Short human-readable reason for a FoE kind (no surrounding punctuation). | |
| Retry | foeRetry (FoeErrorKind kind) |
| Retry disposition implied by a FoE kind. A missing file or an undersized buffer is a fixed condition that will recur identically; a desync or a not-yet-ready slave (the BOOT bootloader warm-up path) is worth another attempt. | |
| std::ostream & | operator<< (std::ostream &os, const FoeError &e) |
Streams the message, so ASSERT_TRUE(r) << r.error() and spdlog {} work unchanged. | |
| FoeError | makeFoeError (FoeErrorKind kind, std::string_view op, uint16_t slave, std::string_view filename) |
Builds a fully-formed FoeError from a decoded kind plus call context. Keeps the message wording identical to the pre-promotion string ("<op> slave N '<file>' failed
(<reason>)") so nothing downstream that logs or displays it changes shape. | |
| void | to_json (nlohmann::json &j, const FoeErrorCode &e) |
| Serialises a FoeErrorCode to JSON. | |
| void | to_json (nlohmann::json &j, const MailboxErrorCode &e) |
| Serialises a MailboxErrorCode to JSON. | |
| constexpr std::string_view | mailboxErrorCodeDescription (uint16_t code) |
Returns the description of code, or an empty view if code is not a known mailbox error code (vendor-specific, or a stale/garbage read). | |
| void | to_json (nlohmann::json &j, const ObjectDataTypeInfo &info) |
| Serialises an ObjectDataTypeInfo to JSON. | |
| constexpr std::string_view | objectDataTypeName (uint16_t code) |
Returns the symbolic name of code, or "UNKNOWN" if it is not in the table. | |
| constexpr uint16_t | objectDataTypeBitSize (uint16_t code) |
Returns the declared bit width of code, or 0 if unknown / variable-length. | |
| void | to_json (nlohmann::json &j, const SdoAbortCode &e) |
| Serialises an SdoAbortCode to JSON. | |
| constexpr std::string_view | sdoAbortCodeDescription (uint32_t code) |
Returns the description of code, or an empty view if code is not a known SDO abort code (vendor-specific, or a stale/garbage read). | |
| std::optional< SiiCategoryType > | resolveSiiCategoryType (uint16_t value) |
Normalises a raw 16-bit category-type word into a SiiCategoryType. | |
| std::expected< SlaveInformationInterface, std::string > | parseSii (std::span< const uint8_t > buffer) |
Parses a raw SII EEPROM image into a SlaveInformationInterface. | |
| void | to_json (nlohmann::json &j, const SiiInfo &v) |
| void | to_json (nlohmann::json &j, const SiiCategoryGeneral &v) |
| void | to_json (nlohmann::json &j, const SiiCategorySyncManagerElement &v) |
| void | to_json (nlohmann::json &j, const SiiCategoryPdoEntryElement &v) |
| void | to_json (nlohmann::json &j, const SiiCategoryPdoElement &v) |
| void | to_json (nlohmann::json &j, const SiiCategoryDistributedClockElement &v) |
| void | to_json (nlohmann::json &j, const SiiCategorySection &v) |
| void | to_json (nlohmann::json &j, const SlaveInformationInterface &v) |
Variables | |
| constexpr auto | kAlStatusCodes |
| Catalogue of AL Status Codes. | |
| constexpr auto | kEscRegisters |
| Catalogue of well-known ESC registers. | |
| constexpr std::size_t | kMaxProcessImageBytes = 32768 |
| Maximum size in bytes of the combined process-data image (all outputs + all inputs). | |
| constexpr auto | kFoeErrorCodes |
| Catalogue of FoE error codes defined in ETG.1000.6 §5.8.5, Table 93. | |
| constexpr auto | kMailboxErrorCodes |
| Catalogue of CoE mailbox error codes. | |
| constexpr auto | kObjectDataTypes |
| Catalogue of ETG.1020 object dictionary data types. | |
| constexpr auto | kSdoAbortCodes |
| Catalogue of CoE SDO abort codes. | |
| thread_local bool | sdoLogQuiet = false |
When true on the calling thread, a driver demotes its per-transfer SDO debug logs to trace. Set it via ScopedQuietSdoLog around background polling so a periodic poller does not flood the log, while direct (user-initiated) reads keep their debug trace. | |
|
strong |
EtherCAT Application Layer state values.
Numeric values match the EtherCAT standard AL control/status register encoding (ETG.1000.6 §6.4.1).
|
strong |
Specific File-over-EtherCAT failure kind. Transport-agnostic: a SOEM driver decodes it from a negated ec_err_type, a future SPoE driver from its own protocol codes.
|
strong |
CoE object dictionary data type codes.
Maps the 16-bit DataType field returned by ecx_readOE to its symbolic name. Base numbering follows SOEM (ec_type.h) / CiA 301 — what the wire actually reports — extended with the record/array/DEFTYPE codes from ETG.1020 v1.6.0 (§26 Base Data Types, Tables 119-121) plus ETG.5001 / ETG.5120 cross-references. Where SOEM and ETG.1020 disagree (notably 0x000B, see below) SOEM's numbering wins.
|
strong |
Retry disposition of a failed operation: whether re-issuing the identical call could plausibly succeed. This is the one axis callers branch on uniformly — a firmware flasher retries Transient failures and aborts on Permanent ones — so it rides alongside the FoE-specific kind rather than being folded into it.
| Enumerator | |
|---|---|
| Transient | A fresh attempt may succeed (protocol desync, slave not yet ready after BOOT). |
| Permanent | The identical call will fail the same way (no such file, undersized buffer). |
|
strong |
Recognised SII category type identifiers (ETG.2010 Table 5).
ETG.2010 is the authoritative SII spec; its Table 5 supersedes ETG.1000.6 Table 19. The base IDs up to Dc (60) are common to both; the extended IDs (FmmuX, SyncUnit, Timeouts, Dictionary, Hardware, VendorInformation, Images, ApplicationSpecific) and the wider vendor/application ranges (see resolveSiiCategoryType) are ETG.2010's. Several spec ranges collapse to a single representative (e.g. all vendor-specific values map to VendorSpecific); the category-type word is a full Unsigned16 (no vendor-specific flag bit).
| Enumerator | |
|---|---|
| Nop | |
| DeviceSpecific | |
| Strings | |
| DataTypes | |
| General | |
| Fmmu | |
| SyncM | |
| FmmuX | |
| SyncUnit | |
| TxPdo | |
| RxPdo | |
| Dc | |
| Timeouts | |
| Dictionary | |
| Hardware | |
| VendorInformation | |
| Images | |
| VendorSpecific | |
| ApplicationSpecific | |
| End | |
|
inline |
Returns whether the AL Status error indicator (bit 4 of register 0x0130) is set.
|
inline |
Extracts the AL state (bits 3:0) from a raw AL Status register value (0x0130).
The single place the AL Status register layout is decoded: the low nibble is the current state, bit 4 is the error indicator (see alHasError). Callers compare the result against EtherCatState rather than re-masking the raw register.
|
constexpr |
Returns the short name for code, or an empty view if code is not a known AL Status Code.
An empty result is the signal that a slave reported a code outside the catalogue — vendor-specific, or a stale/garbage read — which a caller should flag rather than present as a decoded error.
| std::vector< NetworkAdapter > mm::comm::enumerateNetworkAdapters | ( | ) |
Enumerates all network adapters visible to the OS.
Scans every network adapter and returns a fully populated NetworkAdapter per NIC, so callers can select a specific one by its hardware address rather than by its OS-assigned name, which can change across reboots or driver updates. All three representations are populated at enumeration time.
Platform behaviour
ec_find_adapters() and queries each interface with SIOCGIFHWADDR via a temporary SOCK_DGRAM socket. Adapters for which the ioctl call fails are silently skipped.AF_LINK) addresses from getifaddrs().GetAdaptersAddresses() (IPHLPAPI) to enumerate adapters. Interface names are formatted as WinPcap/Npcap NPF paths: "\\Device\\NPF_<AdapterName>".MAC address format — macLinux is uppercase colon-separated hex octets, e.g. "AA:BB:CC:DD:EE:FF"; macWindows is the dash-separated equivalent. Both are consistent across platforms.
Returns an empty vector if adapter enumeration fails (e.g. insufficient privileges or no adapters present).
|
constexpr |
Looks up code in kAlStatusCodes, or returns nullptr if it is not catalogued.
|
inline |
Short human-readable reason for a FoE kind (no surrounding punctuation).
|
inline |
Retry disposition implied by a FoE kind. A missing file or an undersized buffer is a fixed condition that will recur identically; a desync or a not-yet-ready slave (the BOOT bootloader warm-up path) is worth another attempt.
|
constexpr |
Returns true if code indicates a state-transition failure that cannot be resolved by retrying the same writestate.
A terminal code means the polling loop in FieldbusDriver::transitionToState should abandon the slave immediately rather than waiting for the timeout — the master must change something (re-init, reflash, power cycle) before another transition attempt can succeed. Unknown codes are treated as non-terminal.
| bool mm::comm::isMacAddress | ( | const std::string & | s | ) |
Returns true if s is a MAC address in either Linux (:) or Windows (-) separator format.
Accepts exactly 17 characters: six pairs of hex digits separated by consistent colon or dash delimiters, e.g. "AA:BB:CC:DD:EE:FF" or "aa-bb-cc-dd-ee-ff". Mixed separators are rejected.
| s | String to test. |
true when s matches the pattern; false otherwise.
|
constexpr |
Returns the description of code, or an empty view if code is not a known mailbox error code (vendor-specific, or a stale/garbage read).
|
inline |
Builds a fully-formed FoeError from a decoded kind plus call context. Keeps the message wording identical to the pre-promotion string ("<op> slave N '<file>' failed
(<reason>)") so nothing downstream that logs or displays it changes shape.
| std::string mm::comm::normalizeMac | ( | const std::string & | raw, |
| char | sep | ||
| ) |
Normalises a MAC address string to uppercase with the given separator.
Extracts the six hex-octet pairs from raw (which must have passed isMacAddress()) and rebuilds the string in uppercase with sep as the field delimiter.
| raw | Source MAC string (colon- or dash-separated, any case). |
| sep | Output separator character, typically ':' or '-'. |
"XX<sep>XX<sep>…<sep>XX". isMacAddress(raw) == true
|
constexpr |
Returns the declared bit width of code, or 0 if unknown / variable-length.
|
constexpr |
Returns the symbolic name of code, or "UNKNOWN" if it is not in the table.
|
inline |
Streams the message, so ASSERT_TRUE(r) << r.error() and spdlog {} work unchanged.
| std::expected< SlaveInformationInterface, std::string > mm::comm::parseSii | ( | std::span< const uint8_t > | buffer | ) |
Parses a raw SII EEPROM image into a SlaveInformationInterface.
Decodes the fixed 128-byte header, then walks the category section starting at offset 128 (each category is a 16-bit type, a 16-bit word-size, then wordSize × 2 payload bytes), dispatching recognised categories to their decoders and stopping at the End (0xFFFF) or Nop marker. Unrecognised categories are skipped; multiple PDO categories accumulate. The walk is bounds-checked: a category claiming more bytes than remain is clamped, never read past the end.
| buffer | Raw SII bytes (at least 128 for a valid header). |
buffer is shorter than the fixed header. | std::expected< NetworkAdapter, std::string > mm::comm::resolveNetworkAdapter | ( | const std::string & | input | ) |
Resolves a network adapter specifier to a fully populated NetworkAdapter.
input may be any of the three accepted forms:
"AA:BB:CC:DD:EE:FF" "AA-BB-CC-DD-EE-FF" "eth0", "\\Device\\NPF_{GUID}" Calls enumerateNetworkAdapters() once to resolve the form that was not supplied.
| input | User-supplied adapter specifier string. |
NetworkAdapter, or an error string if the adapter cannot be found in the OS adapter map. | std::optional< SiiCategoryType > mm::comm::resolveSiiCategoryType | ( | uint16_t | value | ) |
Normalises a raw 16-bit category-type word into a SiiCategoryType.
Range-based values are folded to a single representative (DeviceSpecific for 0x0001–0x0009, VendorSpecific for 0x0800–0x1FFF and 0x3000–0xFFFE, ApplicationSpecific for 0x2000–0x2FFF); the original numeric value is not preserved. Fixed IDs (Strings, General, …) and the End marker resolve directly. Returns std::nullopt for unrecognised values, which the caller skips.
|
constexpr |
Returns the description of code, or an empty view if code is not a known SDO abort code (vendor-specific, or a stale/garbage read).
| void mm::comm::to_json | ( | nlohmann::json & | j, |
| const AlStatusCode & | c | ||
| ) |
Serialises an AlStatusCode to JSON.
Produces an object with keys code, name, description, terminal. Participates in nlohmann ADL so that nlohmann::json(kAlStatusCodes) works automatically.
| j | Output JSON value. |
| c | AL Status Code entry to serialise. |
| void mm::comm::to_json | ( | nlohmann::json & | j, |
| const EscRegister & | r | ||
| ) |
Serialises an EscRegister to JSON.
Produces an object with keys address, length, name, description. Participates in nlohmann ADL so that nlohmann::json(kEscRegisters) works automatically.
| j | Output JSON value. |
| r | Register entry to serialise. |
| void mm::comm::to_json | ( | nlohmann::json & | j, |
| const FoeErrorCode & | e | ||
| ) |
Serialises a FoeErrorCode to JSON.
Produces an object with keys code, name, description. Participates in nlohmann ADL so that nlohmann::json(kFoeErrorCodes) works automatically.
| j | Output JSON value. |
| e | FoE error code entry to serialise. |
| void mm::comm::to_json | ( | nlohmann::json & | j, |
| const MailboxErrorCode & | e | ||
| ) |
Serialises a MailboxErrorCode to JSON.
Produces an object with keys code, name, description. Participates in nlohmann ADL so that nlohmann::json(kMailboxErrorCodes) works automatically.
| void mm::comm::to_json | ( | nlohmann::json & | j, |
| const NetworkAdapter & | a | ||
| ) |
Serialises a NetworkAdapter to JSON.
Produces an object with keys macLinux, macWindows, name. Participates in nlohmann ADL so that nlohmann::json(adapters) serialises a std::vector<NetworkAdapter> automatically.
| j | Output JSON value. |
| a | Adapter to serialise. |
| void mm::comm::to_json | ( | nlohmann::json & | j, |
| const ObjectDataTypeInfo & | info | ||
| ) |
Serialises an ObjectDataTypeInfo to JSON.
Produces an object with keys code, name, bitSize. Participates in nlohmann ADL so that nlohmann::json(kObjectDataTypes) works automatically.
| void mm::comm::to_json | ( | nlohmann::json & | j, |
| const SdoAbortCode & | e | ||
| ) |
Serialises an SdoAbortCode to JSON.
Produces an object with keys code and description. Participates in nlohmann ADL so that nlohmann::json(kSdoAbortCodes) works automatically.
| void mm::comm::to_json | ( | nlohmann::json & | j, |
| const SiiCategoryDistributedClockElement & | v | ||
| ) |
| void mm::comm::to_json | ( | nlohmann::json & | j, |
| const SiiCategoryGeneral & | v | ||
| ) |
| void mm::comm::to_json | ( | nlohmann::json & | j, |
| const SiiCategoryPdoElement & | v | ||
| ) |
| void mm::comm::to_json | ( | nlohmann::json & | j, |
| const SiiCategoryPdoEntryElement & | v | ||
| ) |
| void mm::comm::to_json | ( | nlohmann::json & | j, |
| const SiiCategorySection & | v | ||
| ) |
| void mm::comm::to_json | ( | nlohmann::json & | j, |
| const SiiCategorySyncManagerElement & | v | ||
| ) |
| void mm::comm::to_json | ( | nlohmann::json & | j, |
| const SiiInfo & | v | ||
| ) |
| void mm::comm::to_json | ( | nlohmann::json & | j, |
| const SlaveInformationInterface & | v | ||
| ) |
|
inline |
Human-readable name of an AL state, for log and error messages.
|
inline |
Working-counter contribution of one slave for a given AL state and PDO presence.
EtherCAT increments the working counter per successful datagram access: a slave exchanging outputs contributes 2 (the process-data LRW both reads and writes its output region) and inputs contribute 1. Process data flows only in SAFE-OP (inputs only) and OP (outputs + inputs); below that a slave does not contribute. Summed across the bus this is the WKC a (possibly partially operational) bus is expected to produce — the figure a health check compares the live working counter against. The protocol rule lives here, with the other AL vocabulary, rather than in the transport-agnostic node layer.
| state | Current AL state of the slave. |
| hasOutputs | Whether the slave has any mapped output (RxPDO) bits. |
| hasInputs | Whether the slave has any mapped input (TxPDO) bits. |
|
inlineconstexpr |
Catalogue of AL Status Codes.
The first block is a faithful transcription of ETG.1000.6 V1.0.4 Table 11 (the latest released revision). The second block adds codes that are not in that table but are reported by real slaves and carried by SOEM's own ec_ALstatuscodelist — most relevantly the firmware/EEPROM/FMMU failures raised during BOOT/FoE flashing and re-mapping. They earn their place here because isAlStatusCodeTerminal must classify them so FieldbusDriver::transitionToState fails fast instead of spinning to timeout.
|
inlineconstexpr |
Catalogue of well-known ESC registers.
Addresses and sizes follow the Beckhoff EtherCAT ESC datasheet (Section II) and ETG.1000.4. FMMU and SyncManager entries list the full block for the first instance; subsequent instances follow at fixed strides (FMMU: 16 bytes, SM: 8 bytes).
|
inlineconstexpr |
Catalogue of FoE error codes defined in ETG.1000.6 §5.8.5, Table 93.
Codes in the 0x8000 range are the standard EtherCAT FoE error codes. The 0x00000000 entry is a catch-all for unspecified or vendor-specific errors, which otherwise fall outside this range.
|
inlineconstexpr |
Catalogue of CoE mailbox error codes.
A faithful transcription of ETG.1000.4 Table 30 ("Error Reply Service Data"). A slave returns one of these in a mailbox error reply when the mailbox layer (below any specific protocol like CoE/FoE) rejects a transfer. SOEM carries the same set in its ec_mbxerrorlist but stops at 0x0008 — this table also lists the spec's 0x0009. The FieldbusDriver surfaces mailbox errors as text embedding the raw 0x... code, so this table lets a caller decode it to a reason.
|
inlineconstexpr |
Maximum size in bytes of the combined process-data image (all outputs + all inputs).
The whole bus is exchanged as one IOmap laid out as [all outputs | all inputs]; on SOEM that is a single buffer of this size, so it is the combined image (outputs + inputs) that both buildProcessImage and configureProcessData() bound against this cap. Each per-direction RT ProcessBuffer scratch is also this size — one direction alone may use the whole budget when the other is empty. A SOMANET drive maps ~100 bytes across both directions, so 50 drives total ~5 KB — under 15% of this cap. This is not a practical limit: on 100 Mbit EtherCAT an image approaching 32 KB already forces a many-millisecond cycle, so the cap sits well clear of any realistic configuration.
|
inlineconstexpr |
Catalogue of ETG.1020 object dictionary data types.
|
inlineconstexpr |
Catalogue of CoE SDO abort codes.
A faithful transcription of ETG.1000.6 §5.6.2.7.2, Table 41 (which reproduces the CANopen CiA 301 SDO abort transfer codes). A slave returns one of these in the Abort SDO Transfer request when a mailbox SDO read/write fails. SOEM carries the identical set in its ec_sdoerrorlist; the FieldbusDriver surfaces SDO failures only as text, embedding the raw 0x... code, so this table lets a caller decode that code to a reason.
|
inline |
When true on the calling thread, a driver demotes its per-transfer SDO debug logs to trace. Set it via ScopedQuietSdoLog around background polling so a periodic poller does not flood the log, while direct (user-initiated) reads keep their debug trace.
Thread-local (the comment, not the name, carries that): the flag is read on the same thread that issues the transfer — SDO reads run synchronously on the caller's thread — so a scope set by the caller reliably covers the driver's logging. Inline so the one instance is shared across translation units.