@flux-control/effect-modbus-rs
    Preparing search index...

    Interface WriteDebouncerOptions

    Options for createWriteDebouncer.

    interface WriteDebouncerOptions {
        flushFullRuns?: boolean;
        maxHold?: Input;
        maxRegistersPerWrite?: number;
        window: Input;
        flush(batch: readonly DebouncedWrite[]): Effect<void, ModbusError>;
    }
    Index
    flushFullRuns?: boolean

    Flushes a run of contiguous addresses early when it reaches maxRegistersPerWrite.

    A full run cannot gain more registers in its transaction, so more waiting only adds delay. Only complete runs leave the batch. The debouncer counts held addresses. It does not know which writes a cache removes later. Other held writes stay for the window, so repeated writes to them can still replace each other.

    false
    
    maxHold?: Input

    Longest total hold, measured from the arrival that opened the batch.

    Without a ceiling, a register that updates faster than the window never reaches the wire at all, because every arrival restarts the wait.

    four times window

    maxRegistersPerWrite?: number

    Registers one write transaction can carry. A run with this many contiguous addresses is full. Use the same value as the planner. The planner rejects a value out of range when the batch is flushed.

    MODBUS_MAX_WRITE_REGISTERS (123)

    window: Input

    How long a write is held before it reaches the wire. Each new arrival restarts this window.

    A window of zero disables the debouncer: every write is flushed on its own, with no timer and no batch. That is the escape hatch for a harness that settles by yielding rather than by advancing a clock, which would otherwise never reach a flush that runs on a forked fiber.