Class RemoteScannedDevice

extends Object
A remote device discovered by a scanning.

Class summary


constructor identifier/Object rssi/int data/AdvertisementData --is-connectable/bool --is-scan-response/bool --address-bytes/ByteArray --address-type/int
Constructs a remote device.

Constructors

constructor identifier/Object rssi/int data/AdvertisementData --is-connectable/bool --is-scan-response/bool --address-bytes/ByteArray --address-type/int
Constructs a remote device.

Statics

A globally fixed address that has been registered with IEEE.

A resolvable private address.
A random address that can be resolved to a public or static (ADDRESS-TYPE-RANDOM) address using a pre-shared key.

A random static address.
A random address that is not changed for the lifetime of the device.

A non-resolvable private address.
An address that changes periodically and cannot be resolved to a public or static address.

Methods

address -> any
The BLE address of the remote device.
Deprecated: Use identifier instead.

operator == other/any -> bool
Whether this object is equal to the other.
By default, identical is used for equality.
Inheritance
Classes overwrite this operator to get an equality specific to their needs. Equality operators often compare the type and field contents. For example:

class Pin:
  number/int

  constructor .number:

  operator == other:
    if other is not Pin: return false
    return number == other.number
A class doesn't have to follow the above format, but it must keep the operator in sync with any hash-code method. That is, if a class has a hash-code member, then the equality and hash-code must agree. If two instances are equal (a == b), then their hash codes must also be equal (a.hash-code == b.hash-code).

Fields

The address of the remote device.
Not all platforms support this field.

The type of the address.
Not all platforms support this field.
The type is one of the following:

The advertisement data received from the remote device.

The identifier of the remote device.
The identifier is platform dependent and must be used to Central.connect to the device.
The identifier is guaranteed to have a hash code and can thus be used in a Set or Map.

Whether connections are allowed.

Whether this information was received in a scan response.

The RSSI measured for the remote device.