BeaconData
The nearby beacons found in a monitored beacon region.
Collected by BeaconProbe for the ConnectivitySamplingPackage.BEACON measure. Each beacon appears only once, keyed by its BeaconDevice.uuid.
- Inheritance
-
- Object
- Serializable
- Data
- BeaconData
- Annotations
-
- @JsonSerializable(includeIfNull: false, explicitToJson: true)
Constructors
BeaconData.fromJson
BeaconData.fromRegionAndBeacons
Creates a BeaconData instance from a region and a list of beacons.
BeaconData
- required String region,
Creates a BeaconData instance with the specified region.
Properties
fromJsonFunction
The function which can convert a JSON string to an object of this type.
jsonType
Return the __type to be used for JSON serialization of this class. Default is runtimeType. Only specify this if you need another type.
region
The unique identifier of the region that this beacon belongs to.
scanResult
The list of BeaconDevice found in a scan.
Setting it adds the devices to the existing result.
Methods
addBeaconDevice
- BeaconDevice device
Adds device, replacing any device with the same UUID.
addBeaconDevicesFromRangingResults
- RangingResult result
Sets region and adds all beacons from a beacon plugin RangingResult.
toJson
Return a JSON encoding of this object.
toString
A string representation of this object.
Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.
Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.