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

    Interface ReadDebouncerOptions

    Options for createReadDebouncer.

    interface ReadDebouncerOptions {
        plan?: PlanReadsOptions;
        planSpans?: (addresses: readonly number[]) => ReadPlan;
        window: Input;
        fetch(
            spans: readonly ReadSpan[],
        ): Effect<readonly Uint16Array<ArrayBufferLike>[], ModbusError>;
    }
    Index

    Limits handed to planReads.

    planSpans?: (addresses: readonly number[]) => ReadPlan

    Plans the collected addresses. Replaces planReads and plan.

    Use this for an address space with other transaction limits, such as coils.

    window: Input

    How long addresses are collected before the spans are read.

    The first arrival starts the window. Later arrivals do not restart it. Compare the window with measured transaction time when selecting a value. Device response time adds to the collection delay.

    A window of zero disables the debouncer: every read is issued on its own, with no timer and no batch.

    • Reads the planned spans, in order.

      Must return one response per span, each holding that span's quantity registers. The callback owns the function code: a caller that reads input registers rather than holding registers builds a second debouncer.

      Parameters

      Returns Effect<readonly Uint16Array<ArrayBufferLike>[], ModbusError>