Skip to main content

Module transport

Module transport 

Source
Expand description

Transport abstraction (spec §32.2). Implementations wrap a Modbus client (see moddef-tokio-modbus) or an in-memory register map for tests.

Design notes:

  • Native async-fn-in-trait; no async_trait box. no_std-compatible.
  • &mut self on every method: a Modbus connection is a serial request/response channel, so the borrow checker enforces one in-flight request per transport.
  • Reads fill caller buffers (&mut [u16] / &mut [bool]) so the core never allocates; the requested count is out.len().

Traits§

Transport
Async register-level transport. offset is the zero-based data-model offset within the given address space (spec §7.2); implementations apply any unit/base-address mapping.