Class: Toybox.BluetoothLowEnergy.ScanResult
- Inherits:
-
Toybox.Lang.Object
Overview
Encapsulates an Advertisement seen during scanning. Cannot be instantiated.
Used as an argument to pairDevice() to add a new device to the System's Paired Devices list
Instance Method Summary collapse
-
equals(other as Lang.Object or Null) as Lang.Boolean
Compares the ScanResult to another object for equality.
-
getAppearance() as Lang.Number
Gets the Advertised Appearance of the sensor.
-
getDeviceName() as Lang.String or Null
Gets the advertised device name If no device name is advertised this function will return
null
. -
getManufacturerSpecificData(manufacturerId as Lang.Number) as Lang.ByteArray
Gets Manufacturer Specific Data for a given Manufacturer Manufacturer Specific Data is decoded according to the BLE Core Specification V4.0 Volume 3 Part C Section 18.11.
-
getManufacturerSpecificDataIterator() as BluetoothLowEnergy.Iterator
Gets an iterator over all of the Manufacturer Specific Data AD Entries in the advertising packet Manufacturer Specific Data is decoded according to the BLE Core Specification V4.0 Volume 3 Part C Section 18.11.
-
getRawData() as Lang.ByteArray
Gets the Raw Data that was retrieved in the advertising packet.
-
getRssi() as Lang.Number
Gets the received signal strength indication (RSSI) value of the received advertisement.
-
getServiceData(uuid as BluetoothLowEnergy.Uuid) as Lang.ByteArray
Gets Service Data for a specific UUID Service data is decoded according to the BLE Core Specification V4.0 Volume 3 Part C Section 18.10.
-
getServiceUuids() as BluetoothLowEnergy.Iterator
Gets service UUIDs advertised by the device If the advertising data contains any service UUID values.
-
hasAddress(address as Lang.ByteArray or Lang.String) as Lang.Boolean
Check that advertised device BLE address matches.
-
isSameDevice(other as BluetoothLowEnergy.ScanResult) as Lang.Boolean
Determines if another scan result represents the same device as another.
Instance Method Details
equals(other as Lang.Object or Null) as Lang.Boolean
Compares the ScanResult to another object for equality
getAppearance() as Lang.Number
Gets the Advertised Appearance of the sensor
getDeviceName() as Lang.String or Null
Gets the advertised device name
If no device name is advertised this function will return null
getManufacturerSpecificData(manufacturerId as Lang.Number) as Lang.ByteArray
Gets Manufacturer Specific Data for a given Manufacturer
Manufacturer Specific Data is decoded according to the BLE Core Specification V4.0 Volume 3 Part C Section 18.11
getManufacturerSpecificDataIterator() as BluetoothLowEnergy.Iterator
Gets an iterator over all of the Manufacturer Specific Data AD Entries in the advertising packet
Manufacturer Specific Data is decoded according to the BLE Core Specification V4.0 Volume 3 Part C Section 18.11
getRawData() as Lang.ByteArray
Gets the Raw Data that was retrieved in the advertising packet
getRssi() as Lang.Number
Gets the received signal strength indication (RSSI) value of the received advertisement.
getServiceData(uuid as BluetoothLowEnergy.Uuid) as Lang.ByteArray
Gets Service Data for a specific UUID
Service data is decoded according to the BLE Core Specification V4.0 Volume 3 Part C Section 18.10
getServiceUuids() as BluetoothLowEnergy.Iterator
Gets service UUIDs advertised by the device
If the advertising data contains any service UUID values. They can be accessed through this iterator. If there are no advertised UUIDs this function will return an empty iterator.
hasAddress(address as Lang.ByteArray or Lang.String) as Lang.Boolean
Check that advertised device BLE address matches
isSameDevice(other as BluetoothLowEnergy.ScanResult) as Lang.Boolean
Determines if another scan result represents the same device as another.