DeviceInfoImpl

data class DeviceInfoImpl(val deviceName: String?, val identifier: Identifier, val rssi: RSSI, val advertisementData: BaseAdvertisementData) : DeviceInfo

An implementation of DeviceInfo

Parameters

deviceName

the name reported by the DeviceWrapper, used as a fallback when the advertisementData does not contain a name

Constructors

Link copied to clipboard
constructor(deviceName: String?, identifier: Identifier, rssi: RSSI, advertisementData: BaseAdvertisementData)
constructor(wrapper: DeviceWrapper, rssi: RSSI, advertisementData: BaseAdvertisementData)

Constructor

Properties

Link copied to clipboard

Current BaseAdvertisementData of the Bluetooth device

Link copied to clipboard
Link copied to clipboard
open override val identifier: Identifier

Identifier of the Bluetooth device

Link copied to clipboard
open override val name: String?

Name of the Bluetooth device

Link copied to clipboard
open override val rssi: RSSI

RSSI value of the Bluetooth device

Link copied to clipboard
open override val updatedAt: KalugaDate

The KalugaDate at which the device last advertised an update

Functions

Link copied to clipboard
open fun distance(environmentalFactor: Double = 2.0): Double

Calculates the distance to the device in meters