IotUnit

data class IotUnit(id: String, grouping: String, displayName: String, type: IotUnit.Type, hardwareType: IotUnit.HardwareType, bookable: Boolean, unitId: String, actuatorId: String, backendUnitType: String?, clusterId: String?, bookableParams: BookableParams?, actuatorType: String, action: String, connectors: List<Connector>) : Openable

Class that represents an IotUnit that can be interacted with. e.g. A door or locker box.

Constructors

IotUnit
Link copied to clipboard
fun IotUnit(id: String, grouping: String, displayName: String, type: IotUnit.Type, hardwareType: IotUnit.HardwareType, bookable: Boolean, unitId: String, actuatorId: String, backendUnitType: String?, clusterId: String?, bookableParams: BookableParams?, actuatorType: String, action: String, connectors: List<Connector>)

Types

HardwareType
Link copied to clipboard
enum HardwareType : Enum<IotUnit.HardwareType>
Type
Link copied to clipboard
enum Type : Enum<IotUnit.Type>

Functions

debugGetBlueIdDetails
Link copied to clipboard
fun debugGetBlueIdDetails(callback: (String?, String?, Int?) -> Unit, onFail: (String) -> Unit)

Debug mode only. Do not use this method for normal user operation. The callback parameters are (in order): hardware version, firmware version, battery status

describeContents
Link copied to clipboard
abstract fun describeContents(): Int
findConnector
Link copied to clipboard
fun findConnector(bleScan: BleScan): Connector?
hasConnector
Link copied to clipboard
fun hasConnector(bleScan: BleScan): Boolean
isNearby
Link copied to clipboard
fun isNearby(): Boolean
toString
Link copied to clipboard
open override fun toString(): String
writeToParcel
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

actuatorId
Link copied to clipboard
val actuatorId: String

This device actuator ID as per backend

backendUnitType
Link copied to clipboard
val backendUnitType: String?

The unit type as defined on the backend.

bookable
Link copied to clipboard
val bookable: Boolean

If this unit can be booked

bookableParams
Link copied to clipboard
val bookableParams: BookableParams?

Definition on how bookings can be created in this IotUnit, or null if this IotUnit is not bookable.

clusterId
Link copied to clipboard
val clusterId: String?

The cluster id this IotUnit belongs to If this value is null, grouping is based of the Unit, else, grouping is based of the cluster.

displayName
Link copied to clipboard
val displayName: String

The human-readable display name of this unit. (e.g. Meeting room 2, or #1)

grouping
Link copied to clipboard
val grouping: String

The name of a grouping that this unit is contained (e.g. First Floor, Locker 1)

hardwareType
Link copied to clipboard
val hardwareType: IotUnit.HardwareType

The type of hardware used on this unit. (e.g. Sensorberg gateway or blue-id)

id
Link copied to clipboard
val id: String

The unique ID of this unit

type
Link copied to clipboard
val type: IotUnit.Type

The type of this unit. (e.g; door, or locker box)

unitId
Link copied to clipboard
val unitId: String

This device unit ID as per backend