FakeBleRadio class

Implemented types

Properties

hashCode → int
The hash code for this object.
no setterinherited
incoming → Stream<BleLink>
Links that nearby centrals opened to this device.
no setteroverride
Number of links that this radio has open, in both roles.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sightings → Stream<BleSighting>
no setteroverride

Methods

connect(String token, {Duration? timeout}) → Future<BleLink>
Opens a link, as central, to the device that advertises token.
override
dispose() → Future<void>
Stops scanning and advertising and closes all links.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readIdentity(String token, {Duration? timeout}) → Future<Uint8List>
Reads the identity characteristic (the peer ID bytes) of the device that advertises token. The GATT connection this opens is kept for a short time, so that a connect right after it does not connect again.
override
startAdvertising(String token, Uint8List identity) → Future<void>
Serves the libp2p GATT service with identity (the local peer ID bytes) in its identity characteristic, and advertises token.
override
startScan() → Future<void>
Starts scanning for the libp2p BLE service. Sightings arrive on sightings, one or more per device.
override
stopAdvertising() → Future<void>
Stops advertising and serving. Open links stay open.
override
stopScan() → Future<void>
override
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited