|
Motion Master 6.0.0-alpha.86
Next-generation motion control software
|
EtherCAT Slave Information (ESI) — the vendor's XML description of a device family. More...
#include <esi.h>
Public Attributes | |
| std::string | value |
| uint32_t | lcId = 0 |
0 when the LcId attribute is absent (treated as the default locale). | |
EtherCAT Slave Information (ESI) — the vendor's XML description of a device family.
Every EtherCAT device ships with an ESI file: the machine-readable device description a configuration tool reads to know what the device is, how its process data is laid out, and — the part this library exists for — what its CoE object dictionary contains. The CoE SDO-Information service can enumerate that dictionary off a live device, but returns only index/subindex/type/access; everything a human needs (descriptions, enum labels, engineering units, min/max bounds, display names) exists only in the ESI. parseEsi decodes the file into the structures below; buildDeviceEntries (etg/esi_entry.h) flattens one device into the per-(index, subindex) table that is this library's deliverable.
Reference: ETG.2000 (EtherCAT Slave Information Specification) is the prose authority, and the XML Schema 1.19.1 set (EtherCATBase.xsd, EtherCATInfo.xsd) is the exact contract — individual structures below cite their schema type. Two conventions run through the whole format and are handled once, here:
HexDecValue — a number written either as signed decimal ("402") or with a "#x" hex prefix ("#x1A00"). Hex-digit case is not consistent even within one file, so values are compared as parsed integers, never as strings. Decoded with mm::core::parseHexOrDec, which already accepts the #x prefix.xs:hexBinary — a raw byte string ("92010200") that is little-endian: the first byte is the least significant. So "92010200" is 0x00020192 and "FFFFFF7F" is INT32_MAX. Carried as raw bytes throughout; see EsiObject::Info.The parser is a pure, hardware-independent transform over text — it is unit-tested against both hand-written fragments and a real vendor ESI, with no fieldbus present.
A localised text node (ETG.2000 NameType).
Every human-readable string in an ESI is a NameType: element text plus an optional LcId Windows locale identifier. The schema permits one element per locale, so this is always stored as a vector and read through esiText.
| uint32_t mm::etg::Text::lcId = 0 |
0 when the LcId attribute is absent (treated as the default locale).
| std::string mm::etg::Text::value |