ReadonlycacheThe cache this client filters against, or undefined when cache is false.
ReadonlycoilsBatched coil operations, or undefined when the declaration did not set coils.
ReadonlydebounceThe debounce windows this client applies, or undefined when its
declaration had no debounce option.
The values are resolved and frozen when the client is built. An omitted
maxHold shows as four times the write window.
A caller that recovers an existing client with batchingClient did not
choose these windows. Compare them with the windows that the caller expects.
ReadonlyflushIssues everything pending, now. Never fails: the outcome goes to the callers waiting on each batch.
ReadonlyinputsReads over the input registers (FC04). The unqualified reads are holding registers (FC03).
ReadonlyunitThe unit this client addresses.
Registers an action for the calling scope's finalization. Keep the transport open until that scope closes.
The application selects the shutdown value. Use an immediate write method to avoid waiting for a collection window during cleanup.
An unhandled failure is logged and raised as a defect. Other finalizers
still run. Wrap the action in Effect.ignoreLogged to accept its failure.
Shutdown action to run before client teardown.
An effect that registers the action in the calling scope.
Collects an address for the read window, then returns its value.
Register address.
The register value, or a Modbus error.
Collects a group as one reader and returns values in the requested order.
Register addresses, in result order.
Register values in the requested order, or a Modbus error.
Adds a group and flushes collected reads immediately.
Register addresses, in result order.
Register values in the requested order, or a Modbus error.
Adds an address and flushes collected reads immediately.
Register address.
The register value, or a Modbus error.
Holds a write for the write window, then issues it with other pending writes. Completion means the carrying batch succeeded; a cache can suppress its bus write.
Register address and value.
Optionalattributes: ModbusSpanAttributes
Optional span attributes for this caller.
Optionaloptions: WriteOptions
Optional per-call options, such as bypassCache.
Completion after the carrying batch succeeds, or its Modbus error.
Submits the group to the write debouncer as one caller. Completion reports its flush result; cache filtering can suppress physical writes.
Register writes.
Optionalattributes: ModbusSpanAttributes
Optional span attributes for this caller.
Optionaloptions: WriteOptions
Optional per-call options, such as bypassCache.
Completion after the carrying batch succeeds, or its Modbus error.
Adds a group of writes and flushes pending writes immediately. Completion means the carrying batch succeeded; a cache can suppress bus writes.
Register writes.
Optionalattributes: ModbusSpanAttributes
Optional span attributes for this caller.
Optionaloptions: WriteOptions
Optional per-call options, such as bypassCache.
Completion after the carrying batch succeeds, or its Modbus error.
Adds a write and flushes pending writes immediately. The newest value wins. Completion means the carrying batch succeeded; a cache can suppress its bus write.
Register address and value.
Optionalattributes: ModbusSpanAttributes
Optional span attributes for this caller.
Optionaloptions: WriteOptions
Optional per-call options, such as bypassCache.
Completion after the carrying batch succeeds, or its Modbus error.
A client that decides its own transactions.
CAUTION: This is not an EffectModbusClient and does not extend ModbusOperations. There is no
writeSingleRegisterand noreadHoldingRegistershere. A raw write on this object would go around the cache and around the batch, so a value held for an address could reach the device after a newer value written past it. A caller that needs the raw surface as well gets it fromwithClient, which shares the same connection. Once a batching client exists for a unit, that raw client remains available for reads, coils, and the other non-register-write operations, but FC06, FC16, and FC23 fail withModbusInvalidArgumentError. Mixing the two register write paths would bypass the pending batch and its cache.Coils are covered only when the declaration sets
coils. Thencoilsbatches FC01, FC05, and FC15, and raw FC05 and FC15 writes for the unit fail. Otherwise coil operations stay on the raw client.