MockBeacon class

A beacon simulating how beacons would work in the real world. Can be used for testing purposes. Use sendRssiAdvertisement to have the beacon send a value in relation to its position and a given position. The returned value is a randomized value trying to emulate real BLE beacons.

Inheritance

Constructors

MockBeacon(String id, String name, Point position, {BeaconsConfiguration configuration = const BeaconsConfiguration()})
MockBeacon.fromJson(Map<String, dynamic> json)

Properties

configuration BeaconsConfiguration
finalinherited
distanceToUser double
no setterinherited
environmentalFactor int
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
id is the UUID of the beacon. Mostly used to determine which beacon is sending the signals.
finalinherited
interval double
no setterinherited
intervalInMilliseconds double
no setterinherited
isModified bool
Checks if rssi has been changed
no setterinherited
measuredPower int
no setterinherited
name String
Name of the beacon determined by producer.
finalinherited
position Point
position is the Location of the Beacon in the world mapped to a cartesian Point system.
finalinherited
rssi double
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
x double
no setterinherited
y double
no setterinherited

Methods

copy() Beacon
override
getXYDistanceRSSI() List<double>
Similar to toString, but in List
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
This method resets this class' members.
inherited
rssiUpdate(int input) → void
updated the rssi value stored in the class. RSSI stands for Received Signal Strength Indication.
inherited
sendRssiAdvertisement(Point pointForAd) → void
Determines a random value with noise that is sent for this advertisement cycle. Updates RSSI with rssiUpdate of the super class automatically. PointForAd is a assumed position of the devices that the end user is using. The ad is calculated with this position in mind.
toJson() Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

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