Sensor

data class Sensor(val id: String, val rssi: Int, val bluetoothMacAddress: BluetoothMacAddress, val name: String?, val softwareVersion: SoftwareVersion, val counter: Int, val measurementPeriod: MeasurementPeriod, val measurementsTimestamp: Long, val measurements: Map<Channel, Measurement<*>>, val features: Set<Sensor.Feature>, val calibrationDate: Long?, val connectivityStatus: Sensor.ConnectivityStatus, val encryptionStatus: Sensor.EncryptionStatus, val encryptionKey: String?, val externalPowerSupplyStatus: Sensor.ExternalPowerSupplyStatus?, val batteryStatus: Sensor.BatteryStatus, val operatingStatuses: Set<Sensor.OperatingStatus>, val cellularStatus: Sensor.CellularStatus?, val timeSynchronizationStatus: Sensor.TimeSynchronizationStatus?, val isLegacy: Boolean) : Device

Efento sensor device.

Constructors

Link copied to clipboard
constructor(id: String, rssi: Int, bluetoothMacAddress: BluetoothMacAddress, name: String?, softwareVersion: SoftwareVersion, counter: Int, measurementPeriod: MeasurementPeriod, measurementsTimestamp: Long, measurements: Map<Channel, Measurement<*>>, features: Set<Sensor.Feature>, calibrationDate: Long?, connectivityStatus: Sensor.ConnectivityStatus, encryptionStatus: Sensor.EncryptionStatus, encryptionKey: String?, externalPowerSupplyStatus: Sensor.ExternalPowerSupplyStatus?, batteryStatus: Sensor.BatteryStatus, operatingStatuses: Set<Sensor.OperatingStatus>, cellularStatus: Sensor.CellularStatus?, timeSynchronizationStatus: Sensor.TimeSynchronizationStatus?, isLegacy: Boolean)

Types

Link copied to clipboard

Status of the battery.

Link copied to clipboard

Device cellular status.

Link copied to clipboard

Device connectivity status.

Link copied to clipboard

Device encryption status.

Link copied to clipboard

Device external power supply status.

Link copied to clipboard

Device specific functionality.

Link copied to clipboard

Operating status.

Link copied to clipboard

Device time synchronization status.

Properties

Link copied to clipboard

Current battery status of the device

Link copied to clipboard

Bluetooth mac address of the device

Link copied to clipboard

Date of last calibration in epoch seconds or null if date is not set or is not supported by the device

Link copied to clipboard

Cellular status or null if not supported by the device

Link copied to clipboard

Connectivity status of the device

Link copied to clipboard

Counter which indicates that new measurement occur For sensors with firmware 6.0 and newer, counter value is equal to the measurement timestamp in POSIX format. For older sensors, counter is a value in range 0..255 incremented each time new measurement occur.

Link copied to clipboard

Valid encryption key or null if none was provided

Link copied to clipboard

Current encryption status of the device

Link copied to clipboard

External power supply status or null if not supported by the device

Link copied to clipboard

Features supported by sensor

Link copied to clipboard
open override val id: String

Id of the device that is used when establishing a connection

Link copied to clipboard

legacy device.

Link copied to clipboard

Measurement period of the device. Defines how often measurements are taken. If sensor is in binary mode, only period base is used. For continuous type sensors period is equal to period base multiplied by factor. The measurement in continuous sensor will be taken at random moment in first period base seconds and then the sensor will wait for next period.

Link copied to clipboard

Map of Channel-Measurement pairs that are available for this device. Map only contains values for slots that contain sensors. Each measurement must be validated via Measurement.isValid or Measurement.status to check if its available for current device

Link copied to clipboard

Timestamp in epoch seconds when the measurements were taken. If measurement is type of MeasurementBundle then the timestamp refers to the first (most recent one) sample in bundle.

Link copied to clipboard
val name: String?

Name of the device or null if not available

Link copied to clipboard

Operating statuses reported by the device

Link copied to clipboard
open override val rssi: Int

Bluetooth rssi of the device

Link copied to clipboard

Software version of the device

Link copied to clipboard

Time synchronization status or null if not supported by the device