EtherCAT network-config codegen¶
This page captures the requirements for the EtherCAT network-config
codegen toolchain: a layered set of build-host crates that translate
an integrator-authored network.yaml describing one bus’s topology
and application channel wiring into the &'static tables
(SubDeviceMap, EthercatRouting, channel-name constants) that
taktora-connector-ethercat consumers hand-write today.
It is the network/topology peer of the device-internal codegen toolchains:
Device-driver codegen toolc... (FEAT_0050) (
ethercat-esi) translates a vendor ESI XML file into a typed driver for one device’s object dictionary / PDO catalog.CANopen device-driver codeg... (FEAT_0060) (
canopen-eds) does the same for CANopen EDS.This umbrella (EtherCAT network-config cod... (FEAT_0080)) describes how this integrator wires these devices into one bus’s process image, and which executor channels bind to which process-data slices.
ESI/EDS describe what a device can do (vendor-supplied); this toolchain describes how the integrator wires devices together (integrator-authored). They compose: a device entry in the YAML may reference an ESI file to inherit its PDO catalog and identity.
The design rationale and the full grilling trail live in
docs/superpowers/specs/2026-05-31-ethercat-netcfg-codegen-design.md.
The decomposition mirrors the convention established in
Device-driver codegen: a top-level umbrella feature, capability-cluster
sub-features that :satisfies: it, and concrete shall-clauses under
each cluster.
This round covers EtherCAT only and one bus per file. Multi-bus documents / distribution over multiple files are explicitly deferred (see One file, one bus; multi-bu... (ADR_0096)).
Top-level umbrella¶
A layered set of build-host Rust crates that consume an
integrator-authored
The generated code names |
Capability clusters¶
The umbrella decomposes into five capability clusters. Each cluster is a
sub-feature :satisfies: EtherCAT network-config cod... (FEAT_0080), with concrete
shall-clauses underneath.
Requirements at a glance¶
ID |
Title |
Status |
Satisfies |
|---|---|---|---|
EtherCAT network-config codegen toolchain |
open |
||
Network-config parser and IR |
open |
||
Network-config codegen |
open |
||
Build-script glue |
open |
||
CLI and ESI vendoring |
open |
||
Validation and bring-up assertions |
open |
||
YAML parse to typed network IR |
open |
||
IR carries bus config, device instances, and channel bindings |
open |
||
One file describes exactly one bus |
open |
||
Devices referenced by stable label, not address |
open |
||
Parser depends on ethercat-esi, never on the connector runtime |
open |
||
Emit static SubDeviceMap PDO tables |
open |
||
Emit named routing and channel-name constants |
open |
||
Configured addresses assigned by bus position |
open |
||
Working-counter expectation derived, never overridden |
open |
||
Generated output is byte-deterministic |
open |
||
Generate into OUT_DIR for include |
open |
||
Rebuild on config or ESI change |
open |
||
Expand subcommand prints generated module |
open |
||
Fetch subcommand vendors and pins remote ESI |
open |
||
Build resolves ESI from local files only |
open |
||
ESI references pinned by content hash and revision |
open |
||
Hard build errors for derivable faults |
open |
||
Warn on unmapped process-image gaps |
open |
||
Emit bring-up assertions for physical-bus facts |
open |
||
No runtime parsing, no connector-runtime modification |
open |
||
Resolve and emit each output device's SM-watchdog registers |
implemented |
||
Validate the SM-watchdog bound and enable at config time |
implemented |