Optional ReadonlybasePolicy-level delay before the first retry. Default 100 millis.
Optional ReadonlyerrorsWhich ModbusError variants are retryable, with optional per-error backoff overrides.
Defaults retry the errors that a healthy bus recovers from on its own — ModbusTimeoutError, ModbusTransportError, ModbusConnectionClosedError, and the transient exception codes in retryableExceptionCodes — and never retry ModbusInvalidArgumentError, ModbusNotConnectedError, or ModbusInternalError.
Optional ReadonlyfactorPolicy-level backoff multiplier. Default 2.
Optional ReadonlyjitterRandomness applied to each delay, as a multiplier range.
true (default) uses Effect's 0.8 – 1.2 range; false disables jitter;
an object customises the range. Jitter keeps a fleet of pollers from
re-hitting a recovering device in lockstep.
Optional ReadonlymaxPolicy-level delay ceiling. Default 5 seconds.
Optional ReadonlymaxWall-clock budget for the whole retry sequence. Unbounded by default.
Optional ReadonlymaxMaximum number of retries (attempts = maxRetries + 1). Default 3.
Optional ReadonlyretryableModbus exception codes worth retrying when the device answers with an exception response. Default retryableExceptionCodes.
Only consulted when ModbusExceptionError is retryable at all.
Options accepted by makeRetryPolicy and by every preset in RetryPolicies.
Nothing here is applied automatically — a policy only takes effect once it is attached to a transport, to a client, or piped over an effect with retryModbus. Library defaults stay single-shot so that timing is predictable unless retries are explicitly opted into.
These are application-level retries, and the only ones in play: the transport-level knobs
modbus-rsoffers are withheld from every transport constructor in this package, so the two layers cannot be combined by accident. SeeUpstreamRetryOptionKeyinsrc/shared-transport.ts.