FakeBleNetwork class
Radios that reach each other in memory, for tests without Bluetooth.
Every pair of radios is in range unless setInRange says otherwise, so a test can build a partial mesh (A-B-C where A and C cannot hear each other).
Constructors
- FakeBleNetwork({int maxValueLength = 512, Duration latency = Duration.zero})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- latency → Duration
-
Delay of each value on a link.
final
- maxValueLength → int
-
Largest GATT value of every link (iOS gives 512 with a large MTU).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
inRange(
FakeBleRadio a, FakeBleRadio b) → bool -
newRadio(
) → FakeBleRadio - A new radio on this network.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setInRange(
FakeBleRadio a, FakeBleRadio b, bool inRange) → void -
Puts
aandbin or out of range of each other. Out of range, they do not see each other and cannot connect; open links between them stay. -
setRssi(
FakeBleRadio a, FakeBleRadio b, int rssi) → void -
Sets the signal strength (dBm) that
aandbhear each other at (-50 unless set). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited