B2G/Bluetooth/WebBluetooth-v2/BluetoothLeDeviceEvent

From MozillaWiki
< B2G‎ | Bluetooth‎ | WebBluetooth-v2
Revision as of 10:17, 21 August 2014 by Btian (talk | contribs) (Created page with "== Overview == '''BluetoothLeDeviceEvent''' is carried as the parameter of remote LE device found event handler ([[B2G/Bluetooth/WebBluetooth-v2/BluetoothDiscoveryHandle#ondev...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

BluetoothLeDeviceEvent is carried as the parameter of remote LE device found event handler (discoveryHandle.ondevicefound). Applications can get the BluetoothDevice object, RSSI value, and advertisement record of the found remote LE device.

Interface

[CheckPermissions="bluetooth"]
interface BluetoothLeDeviceEvent : Event
{
  readonly attribute BluetoothDevice? device;
  readonly attribute short rssi;
  readonly attribute ArrayBuffer scanRecord;
};

Properties

device

Description
The found remote LE device.
Value type
BluetoothDevice

rssi

Description
The RSSI value for the remote LE device as reported by the bluetooth hardware. 0 if no RSSI value is available.
Value type
short

scanRecord

Description
The content of the advertisement record offered by the remote LE device.
Value type
ArrayBuffer