@iotize/device-com-ble.cordova
Version:
Bluetooth Low Energy (BLE) for IoTize modules Plugin
44 lines (43 loc) • 1.45 kB
TypeScript
import { CharacteristicProperties } from '@iotize/tap/protocol/ble/common';
export interface CordovaBLEScanResult {
name: string;
address: string;
rssi?: number;
txPower?: number;
scanRecord?: number[];
}
/**
* @deprecated
* use CordovaBLEScanResult instead
*/
export declare type DiscoveredDeviceType = CordovaBLEScanResult;
export interface RequestDeviceOptions {
filters: BluetoothLEScanFilter[];
optionalServices?: BluetoothServiceUUID[] | undefined;
optionalManufacturerData?: number[] | undefined;
}
interface BluetoothLEScanFilter {
readonly services?: BluetoothServiceUUID[] | undefined;
}
declare type BluetoothServiceUUID = string;
declare type BluetoothCharacteristicUUID = string;
declare type BluetoothDescriptorUUID = string;
export interface ServiceDescription {
uuid: BluetoothServiceUUID;
characteristics?: CharacteristicList;
[key: string]: any;
}
export declare type ServiceList = ServiceDescription[];
export interface CharacteristicDescription {
uuid: BluetoothCharacteristicUUID;
descriptors?: DescriptorList;
properties: CharacteristicProperties;
[key: string]: any;
}
export declare type CharacteristicList = CharacteristicDescription[];
export interface DescriptorDescription {
uuid: BluetoothDescriptorUUID;
[key: string]: any;
}
export declare type DescriptorList = DescriptorDescription[];
export {};