AFBeacon

class AFBeacon(var id: String, var name: String? = null, var uuid: String? = null, var major: Int? = null, var minor: Int? = null, var rssi: Int? = null, var txPower: Int? = null)

Represents metadata about a BLE beacon or proximity device.

This data class encapsulates common attributes associated with Bluetooth Low Energy (BLE) beacons. It is designed to be flexible and accommodate various beacon types and identification methods.

Constructors

Link copied to clipboard
constructor(id: String, name: String? = null, uuid: String? = null, major: Int? = null, minor: Int? = null, rssi: Int? = null, txPower: Int? = null)

Properties

Link copied to clipboard
var id: String

A unique identifier for the beacon. This could be a UUID, MAC address, or any other string that uniquely identifies the beacon. This field is mandatory.

Link copied to clipboard
var major: Int?

The major value of the beacon, often used in conjunction with UUID for iBeacons to identify a group of beacons.

Link copied to clipboard
var minor: Int?

The minor value of the beacon, often used in conjunction with UUID and major for iBeacons to identify a specific beacon within a group.

Link copied to clipboard
var name: String?

An optional human-readable name for the beacon.

Link copied to clipboard
var rssi: Int?

The Received Signal Strength Indicator, which indicates the strength of the beacon's signal as received by the scanning device. Measured in dBm.

Link copied to clipboard
var txPower: Int?

The transmission power of the beacon, typically measured at a distance of 1 meter. This value can be used in conjunction with RSSI to estimate the distance to the beacon. Measured in dBm.

Link copied to clipboard
var uuid: String?

The Universally Unique Identifier (UUID) of the beacon, typically used for iBeacons.

Functions

Link copied to clipboard
open override fun toString(): String