StaticfromCreates a Layer providing SerialTransportService backed by an ASCII transport.
ASCII transport and optional resilience settings.
A layer that opens the transport on first use and closes it when its scope ends.
StaticfromCreates a Layer providing SerialTransportService backed by an RTU transport.
RTU transport and optional resilience settings.
A layer that opens the transport on first use and closes it when its scope ends.
StaticmakeCreates a mock Layer that provides SerialTransportService for tests or development.
The devices parameter is an array of SlaveDeviceDefinition. Each
definition gives the coil map and the register map of one simulated slave.
The option set is the same as the option set of the concrete tags. Thus a
test that keeps the framing abstract can also set retry, reconnect,
fault, and reconnectFault.
The slave device definitions for the mock.
A factory that accepts either framing's transport options, resilience settings, and mock-fault settings, then provides a scoped mock layer.
Abstract serial Modbus transport service tag.
Represents a serial (RS-232/485) Modbus transport backed by either ASCII or RTU framing. Use this tag when you need a serial transport but don't care about the specific framing protocol.
Consumers
yield* SerialTransportServiceto obtain a TransportServiceApi and satisfy the tag via one of the static provider methods: