import { IDeviceConnection } from '../interfaces/IDeviceConnection'; import { IDeviceConfiguration } from '../interfaces/IDeviceConfiguration'; import { IDeviceCommandParams } from '../interfaces/IDeviceCommandParams'; export type TelnetConnectionParams = { host: string; port: number; shellPrompt: string; timeout: number; sendTimeout: number; username?: string; password?: string; terminalWidth: number; pageSeparator?: string; }; /*** * Telnet connection */ export declare class TelnetConnection implements IDeviceConnection { private deviceConfiguration; private debug; private telnet; private params; private _isConnected; get isConnected(): boolean; private set isConnected(value); private _isLogged; get isLogged(): boolean; private set isLogged(value); private _isInitialized; get isInitialized(): boolean; private set isInitialized(value); constructor(deviceConfiguration: IDeviceConfiguration); login(messageAuthFailed?: string, messageLoginPrompt?: string): Promise; logout(): Promise; /*** * Initialize connection * @param params connection parameters */ initialize(params: TelnetConnectionParams): boolean; /*** * Connect to the device */ connect(): Promise; /*** * Disconnect from the device */ disconnect(): Promise; /*** * Execute command * @param command command to execute * @param params command parameters * @param retryCount number of retries. Optional, default 3 */ execute(command: string, params: IDeviceCommandParams, retryCount?: number): Promise; onError(error: Error): void; onTimeout(): void; onLoginFailed(): void; }