UNPKG

@robotical/ricjs

Version:

Javascript/TS library for Robotical RIC

27 lines (26 loc) 1.08 kB
import RICChannel from "./RICChannel"; import RICMsgHandler from "./RICMsgHandler"; import { RICConnEventFn } from "./RICConnEvents"; export default class RICChannelWebSocket implements RICChannel { private _ricMsgHandler; private _webSocket; private _isConnected; private _onConnEvent; private _requestedBatchAckSize; private _requestedFileBlockSize; fhBatchAckSize(): number; fhFileBlockSize(): number; isConnected(): boolean; setMsgHandler(ricMsgHandler: RICMsgHandler): void; requiresSubscription(): boolean; setOnConnEvent(connEventFn: RICConnEventFn): void; getConnectedLocator(): string | object; connect(locator: string | object): Promise<boolean>; disconnect(): Promise<void>; pauseConnection(pause: boolean): void; _onMsgRx(msg: Uint8Array | null): void; sendTxMsg(msg: Uint8Array, sendWithResponse: boolean): Promise<boolean>; sendTxMsgNoAwait(msg: Uint8Array, sendWithResponse: boolean): Promise<boolean>; _wsConnect(locator: string | object): Promise<boolean>; private _webSocketOpen; }