Skip to main content

Crate taktora_ethercat_netcfg

Crate taktora_ethercat_netcfg 

Source
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.
ChannelBinding
A binding from a named channel to a slice of a device’s process data.
DeviceInstance
A single device instance declared on the bus.
Identity
The vendor / product / revision triple identifying a fieldbus device.
NetworkConfig
The fully parsed network configuration — the IR root.
PdoEntry
A single PDO entry within an inline device description.
SmWatchdogRegisters
Resolved ESC SM-watchdog register values for one output device.
StartupSdoSpec
One operator-declared startup SDO, written in PRE-OP before PDO assignment.

Enums§

DeviceSource
The origin of a device’s PDO description.
ElementType
Primitive inline element types for a channel.
NetcfgError
Errors that can occur while parse-ing a network config.
PdoDirection
Direction of a process-data channel.
SdoValueSpec
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 NetworkConfig IR.
sm_watchdog_intervals
Quantize a timeout in microseconds to a whole number of 100 µs watchdog ticks: intervals = ceil(timeout_us / 100), clamped to 1..=u16::MAX.