UNPKG

@robotical/ricjs

Version:

Javascript/TS library for Robotical RIC

37 lines (36 loc) 1.32 kB
import RICChannel from "./RICChannel"; import { RICConnEventFn } from "./RICConnEvents"; import RICMsgHandler from "./RICMsgHandler"; export default class RICChannelWebBLE implements RICChannel { static RICServiceUUID: string; static RICCmdUUID: string; static RICRespUUID: string; private _bleDevice; private _characteristicTx; private _characteristicRx; private _ricMsgHandler; private _onConnEvent; private _msgTxTimeLast; private _msgTxMinTimeBetweenMs; private readonly maxRetries; private _isConnected; private readonly _maxConnRetries; private _eventListenerFn; private _requestedBatchAckSize; private _requestedFileBlockSize; fhBatchAckSize(): number; fhFileBlockSize(): number; setMsgHandler(ricMsgHandler: RICMsgHandler): void; requiresSubscription(): boolean; isEnabled(): boolean; isConnected(): boolean; setOnConnEvent(connEventFn: RICConnEventFn): void; onDisconnected(event: Event): void; getConnectedLocator(): string | object; connect(locator: string | object): Promise<boolean>; disconnect(): Promise<void>; pauseConnection(pause: boolean): void; _onMsgRx(event: Event): void; sendTxMsg(msg: Uint8Array): Promise<boolean>; sendTxMsgNoAwait(msg: Uint8Array): Promise<boolean>; }