UNPKG

@robotical/roboticaljs

Version:

Javascript/TS library for Robotical products

30 lines (29 loc) 1.28 kB
import { RaftConnector, RaftEventFn, RaftSystemType } from "@robotical/raftjs"; export default class ConnManager { static RICUUID: string; static COGUUID: string; private static _instance; private _connector; private _onConnectionEvent; static getInstance(): ConnManager; setConnectionEventListener(listener: RaftEventFn): void; isConnected(): boolean; getConnector(): RaftConnector; /** * @brief Like getBleDevice but the names to ignore are passed in as an array * @param namesToIgnore Array of names to ignore * @returns A promise that resolves to a BluetoothDevice or null if no device is found */ getBleDevicesWithGivenNamesToIgnore(namesToIgnore: { name: string; }[]): Promise<BluetoothDevice | null>; private getBleDevice; getSystemType(): RaftSystemType | null; initializeChannel_phoneBLE(): Promise<boolean>; connect(method: string, locator: string | object, uuids: string[]): Promise<boolean>; disconnect(): Promise<void>; static generateServiceFilterUUID(serialNo: string, baseUUID?: string): string; static uuidToByteArray(uuid: string): Uint8Array; static byteArrayToUUID(bytes: Uint8Array): string; static hexStringToBytes(hex: string): Uint8Array; }