/** * Retry configuration and utilities for Modbus transport operations */ /** Maximum number of retry attempts for failed operations */ export declare const MAX_RETRIES = 3; /** Delay between retry attempts in milliseconds */ export declare const RETRY_DELAY_MS = 100; /** * Logger function to track retry attempts * * @param attempt - The attempt number (1-indexed) * @param error - The error that caused the retry */ export type RetryLogger = (attempt: number, error: Error) => void; /** * Retry a function with fixed delay between attempts * * @param fn - The async function to retry * @param maxRetries - Maximum number of attempts (default: MAX_RETRIES) * @param logger - Optional callback to log retry attempts * @returns Promise resolving to the function's return value * @throws The last error encountered if all retries are exhausted */ export declare function withRetry(fn: () => Promise, maxRetries?: number, logger?: RetryLogger): Promise; //# sourceMappingURL=retry.d.ts.map