import { CloverTransport } from '../transport/CloverTransport'; import { CloverDeviceConfiguration } from './CloverDeviceConfiguration'; import { IImageUtil } from '../../../util/IImageUtil'; import { Logger } from "../util/Logger"; /** * The base for WebSocket device configurations. */ export declare abstract class WebSocketCloverDeviceConfiguration implements CloverDeviceConfiguration { protected logger: Logger; private static DEFAULT_RECONNECT_DELAY; private static DEFAULT_HEARTBEAT_INTERVAL; private static MINIMUM_ALLOWED_HEARTBEAT_INTERVAL; private static DEFAULT_HEARTBEAT_DISCONNECT_TIMEOUT; private heartbeatInterval; private heartbeatDisconnectTimeout; private reconnectDelay; protected maxCharInMessage: number; protected webSocketImplClass: any; protected imageUtil: IImageUtil; private readonly appId; /** * @param {string} applicationId - the applicationId that uniquely identifies the POS. e.g. com.company.MyPOS:2.3.1 * @param {Object} webSocketFactoryFunction - the function that will return an instance of the CloverWebSocketInterface * that will be used when connecting. * @param {IImageUtil} imageUtil - utility to translate images into base64 strings. * @param {number} heartbeatInterval - Frequency at which we will ping the device - millis. Defaults to -1, which means the heartbeat check is disabled. * @param {number} reconnectDelay - upon disconnect, duration to wait until a reconnect is attempted - millis. Defaults to 3000 (millis), minimum value is 3000 millis. To disable the reconnect set to -1. * @param {number} heartbeatDisconnectTimeout - If a response to a heartbeat ping is not received within this time we will call disconnect. */ constructor(applicationId: string, webSocketFactoryFunction: any, imageUtil: IImageUtil, heartbeatInterval?: number, reconnectDelay?: number, heartbeatDisconnectTimeout?: number); getApplicationId(): string; getHeartbeatDisconnectTimeout(): number; setHeartbeatDisconnectTimeout(heartbeatDisconnectTimeout: number): void; getHeartbeatInterval(): number; setHeartbeatInterval(heartbeatInterval: number): void; getReconnectDelay(): number; setReconnectDelay(reconnectDelay: number): void; getCloverDeviceType(): any; getName(): string; /** * @override */ getImageUtil(): IImageUtil; /** * @override */ abstract getMessagePackageName(): string; /** * @override */ abstract getCloverTransport(): CloverTransport; getMaxMessageCharacters(): number; }