moddef.transport module

Transport abstraction (spec §32.3): async register-level access.

offset is the zero-based data-model offset within the given address space (spec §7.2); implementations apply any unit/base-address mapping. One in-flight request per transport is the caller’s responsibility (Modbus is a serial request/response channel).

class moddef.transport.Transport(*args, **kwargs)[source]

Bases: Protocol

async read_coils(offset: int, count: int) Sequence[bool][source]
async read_discrete(offset: int, count: int) Sequence[bool][source]
async read_holding(offset: int, count: int) Sequence[int][source]
async read_input(offset: int, count: int) Sequence[int][source]
async write_coil(offset: int, on: bool) None[source]
async write_holding(offset: int, words: Sequence[int]) None[source]