Architecture decisions¶
arc42 §9 — the accepted decisions behind the EtherCAT network-config
codegen toolchain (EtherCAT network-config cod... (FEAT_0080)). Each arch-decision
:refines: the parent requirement or feature it serves.
Context. “Configure the EtherCAT network with a YAML file” admits
two architectures: parse the YAML at startup into owned, heap-allocated
config, or compile it at build time into the Decision. The YAML is resolved at build time. A Consequences. Allocation is known at init, the |
Context. A device on an EtherCAT bus can be named three ways: by
configured station address ( Decision. The YAML declares devices in bus order; codegen
assigns the configured address as Consequences. Integrators never hand-type |
Context. A device entry may reference a vendor ESI file by local
path or web URL. A live web fetch inside Decision. The build resolves ESI references from local files
only. A web URL is an input to a deliberate Consequences. Builds stay hermetic, reproducible, and
air-gappable, mirroring how |
Context. Decision. Consequences. One source of truth; the value cannot drift from the
mapping that produced it. A bus whose real working counter diverges
from the derived expectation is caught at runtime via the existing
|
Context. A config could describe one bus or many. Each bus maps to
one connector, one NIC, and one process image, and carries its own
compile-time const-generic bounds ( Decision. One Consequences. The schema and the const-generic bounds stay simple and per-bus, matching the one-NIC-per-example reality. The cost is that a large multi-bus installation maintains several files — accepted for v1, revisited if a real multi-bus need appears. |
Architecture Decision: Codegen is the default EtherCAT path; manual routing is the escape hatch ADR_0137
|
Context. The connector exposes manual PDI bit-slice routing —
callers supply bit offsets, Decision. Documentation presents the ESI + netcfg build-time codegen toolchain as the default EtherCAT integration path (EtherCAT codegen documented... (REQ_1006)); manual PDI routing is framed as the escape hatch for mock/loopback and ESI-less devices. This is docs-only positioning — the manual routing API is retained unchanged. Considered and rejected:
Consequences. ✅ Newcomers meet the typed, zero-parse codegen path first; bit-level routing detail stops being the default teaching surface. ❌ The only hardware-free EtherCAT example still uses the manual API, so “codegen is the default” is not yet demonstrable without real silicon — tracked as a deferred non-goal on Onboarding golden path + as... (FEAT_0121). |