Package-level declarations

Devices as scanning reports them, the configuration you can read and write, and the diagnostics a device keeps about itself.

The value classes here — addresses, ports, network names — each carry an isValid() that applies the device's own limits, so input can be checked before it is sent.

Types

Link copied to clipboard
sealed interface Apn

Represents APN (Access Point Name) configuration parameters

Link copied to clipboard
value class BluetoothMacAddress(val value: String)

Device bluetooth mac address which is used to validate data received or sent to sensor in scanning/connection.

Link copied to clipboard
typealias Channel = Int

Measurement channel of Efento device. Indexed from 1.

Link copied to clipboard
sealed class Device

Efento device during scanning.

Link copied to clipboard
typealias DeviceID = String

Unique identifier used for establishing connection with a Device

Link copied to clipboard
sealed class DeviceInBootloader : Device

Efento device in bootloader.

Link copied to clipboard
data class Gateway(val id: String, val rssi: Int, val bluetoothMacAddress: BluetoothMacAddress, val name: String, val serialNumber: String, val softwareVersion: SoftwareVersion, val ipAddress: IpAddress, val connectivity: Gateway.Connectivity, val isLegacy: Boolean, val connectionStatus: Gateway.ConnectionStatus?) : Device

Efento gateway device.

Link copied to clipboard
data class GatewayInBootloader(val id: String, val rssi: Int, val name: String, val serialNumber: String, val applicationSoftwareVersion: SoftwareVersion, val updateStatus: GatewayInBootloader.UpdateStatus?, val updateError: GatewayInBootloader.UpdateError?) : DeviceInBootloader

Efento gateway in bootloader.

Link copied to clipboard
value class IpAddress(val value: String)

IPv4 address, e.g. 192.168.1.10.

Link copied to clipboard
value class IpAddressOrHostname(val value: String)

Either an IPv4 address or a hostname, e.g. 192.168.1.10 or nbiot.efento.io.

Link copied to clipboard
data class MeasurementPeriod(val base: Int, val factor: Int = 1)

Measurement period defines how often the measurements are to be taken. Sensors of 'Continuous' type take measurement each base * factor. Sensors of 'Binary' type take measurement each base.

Link copied to clipboard
value class NetMask(val value: String)

IPv4 subnet mask, e.g. 255.255.255.0.

Link copied to clipboard
sealed interface Plmn

Represents PLMN (Public Land Mobile Network) used by modem.

Link copied to clipboard
value class Port(val value: Int)

Network port.

Link copied to clipboard
value class Progress(val value: Int)

Progress as a percent value

Link copied to clipboard
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.

Link copied to clipboard
data class SensorInBootloader(val id: String, val rssi: Int, val name: String, val serialNumber: String, val applicationSoftwareVersion: SoftwareVersion, val updateStatus: SensorInBootloader.UpdateStatus?, val updateError: SensorInBootloader.UpdateError?) : DeviceInBootloader

Efento sensor in bootloader.

Link copied to clipboard
data class SensorInHibernation(val id: String, val rssi: Int, val bluetoothMacAddress: BluetoothMacAddress, val name: String?, val softwareVersion: SoftwareVersion, val features: Set<SensorInHibernation.Feature>, val hibernationMode: SensorInHibernation.HibernationMode, val batteryVoltage: Int?) : Device

Efento sensor in hibernation mode.

Link copied to clipboard
data class SensorLegacyInBootloader(val id: String, val rssi: Int, val name: String) : DeviceInBootloader

Efento legacy sensor in bootloader.

Link copied to clipboard
data class SoftwareVersion(val major: Int, val minor: Int = 0, val lts: Int? = null, val commitID: String? = null) : Comparable<SoftwareVersion>

Software version of the sensor.

Link copied to clipboard
class UUID

Functions

Link copied to clipboard

For sensors with a major version less than 6, the version numbers are formatted differently compared to sensors with a major version of 6 or higher. This method ensures that the version is represented in the appropriate format depending on the major version.