StaticmakeCreates a Layer providing an in-memory mock WasmAsciiTransportService for testing or development.
Accepts an array of SlaveDeviceDefinition describing the simulated Modbus slaves and their register/coil maps.
Slave device definitions for the mock.
A function that takes WasmAsciiTransportOpenOptions and returns a scoped Layer providing the mock service.
Scoped Effect service wrapping
modbus-rs's browser WasmAsciiTransport for Modbus ASCII over the Web Serial API.The transport connection is opened lazily on the first call to
withClient(unitId)and automatically closed when the consuming Effect.Scope | Scope finalizes.Clients are created per
unitIdvia WasmAsciiTransport.createClient and cached, so repeated requests for the same unit ID reuse the same client.See
modbus-rsbrowser Web Serial ASCII transport.portoption needs.