BleAdvertisement class

Constructors

BleAdvertisement({required String macAddress, required DateTime timestamp, double? latitude, double? longitude, double? altitude, required int rssi, int? txPower, required String model, List<BleManufacturerData> manufacturerData = const [], List<BleServiceData> serviceData = const [], String? deviceName})

Properties

altitude double?
altitude is the closest altitude of the device. Defined by the device that is detecting. This value is optional
final
deviceName String?
deviceName is the name of the device. This name is optional.
final
hashCode int
The hash code for this object.
no setterinherited
latitude double?
latitude is the closest latitude of the device. Defined by the device that is detecting. This value is optional
final
longitude double?
longitude is the closest longitude of the device. Defined by the device that is detecting. This value is optional
final
macAddress String
macAddress is the detected Mac Address. This Mac Adress came from the detected device, not the device that is detecting.
final
manufacturerData List<BleManufacturerData>
manufacturerData is the list of manufacturer data advertised by the device.
getter/setter pair
model String
model is the model of the detected device. This model should be equals to the model of the device and the model defined by Layrz.
final
rssi int
rssi is the signal strength of the detected device.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serviceData List<BleServiceData>
serviceData is the list of service data advertised by the device.
getter/setter pair
timestamp DateTime
timestamp is when the device was detected.
final
txPower int?
txPower is the transmission power of the detected device. This value is optional
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toPacket() String
toPacket converts the BleAdvertisement to a raw message following this structure: MAC_ADDRESS;UNIX;LAT;LNG;ALT;MODEL;RSSI;MANUFACTURER+DATA;SERVICE+DATA;CRC16
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromPacket(String raw) List<BleAdvertisement>
fromPacket creates a List<BleAdvertisement> from a raw message following this structure: MAC_ADDRESS;UNIX;LAT;LNG;ALT;MODEL;RSSI;MANUFACTURER+DATA;SERVICE+DATA;CRC16