Expand description
Parser and in-memory IR for the EtherCAT network-config YAML.
This crate is the parse layer of the taktora-ethercat-netcfg codegen
toolchain (a build-host tool — std is fine). It turns a
network.yaml document into the NetworkConfig IR via the single
public entry point parse.
It performs parsing only. Validation, address assignment, multi-bus handling, and code generation are deliberately out of scope here — they are handled by later layers of the toolchain.
Structs§
- BusConfig
- Bus-wide configuration.
- Channel
Binding - A binding from a named channel to a slice of a device’s process data.
- Device
Instance - A single device instance declared on the bus.
- Identity
- The vendor / product / revision triple identifying a fieldbus device.
- Network
Config - The fully parsed network configuration — the IR root.
- PdoEntry
- A single PDO entry within an inline device description.
- SmWatchdog
Registers - Resolved ESC SM-watchdog register values for one output device.
- Startup
SdoSpec - One operator-declared startup SDO, written in PRE-OP before PDO assignment.
Enums§
- Device
Source - The origin of a device’s PDO description.
- Element
Type - Primitive inline element types for a channel.
- Netcfg
Error - Errors that can occur while
parse-ing a network config. - PdoDirection
- Direction of a process-data channel.
- SdoValue
Spec - A typed startup-SDO value. Mirrors
taktora_connector_ethercat::SdoValue; codegen emits the matching connector variant as text.
Constants§
- DEFAULT_
WATCHDOG_ DIVIDER - Watchdog divider that yields a 100 µs tick:
40 ns × (2498 + 2) = 100 µs.
Functions§
- parse
- Parse a network-config YAML document into the
NetworkConfigIR. - sm_
watchdog_ intervals - Quantize a timeout in microseconds to a whole number of 100 µs watchdog
ticks:
intervals = ceil(timeout_us / 100), clamped to1..=u16::MAX.