The crate shall define an object-safe (dyn-compatible)
EsiDevice trait with fn identity(&self) -> Identity,
fn input_len(&self) -> usize, fn output_len(&self) ->
usize, fn decode_inputs(&mut self, bits: &BitSlice<u8, Lsb0>)
-> Result<(), EsiError>, and fn encode_outputs(&self, bits:
&mut BitSlice<u8, Lsb0>) -> Result<(), EsiError>. input_len
/ output_len are in bytes (the sync-manager-mapped
process-image size, rounded up to a byte boundary).
Identity is exposed as a method, not an associated
const — an associated const would make the trait
dyn-incompatible and break the Box<dyn EsiDevice> registry
factories of Generated module root expos... (REQ_0525). The static identity value is the
standalone const emitted by Identity const emitted per ... (REQ_0522); the generated
identity() returns it. Identity is the shared
taktora-fieldbus-od-core type (Lift OD IR to fieldbus-od-c... (ADR_0078)). The
EsiError here is a runtime decode/encode error owned by
ethercat-esi-rt (e.g. PDI bit-slice too short), distinct from
the parser’s parse-time EsiError (Parse errors carry line and... (REQ_0506)). The trait
shall add no async methods — the cyclic hot path stays
synchronous. See Object-safe EsiDevice, iden... (ADR_0098).
|