IotDevice

data class IotDevice(id: String, name: String, deviceType: IotDeviceType, containedUnit: SmartspaceUnit, proximity: Proximity, position: Int, properties: List<Property>) : Parcelable

Represents an IotDevice. The base object for control and monitoring data in a Smartspace

Constructors

IotDevice
Link copied to clipboard
fun IotDevice(id: String, name: String, deviceType: IotDeviceType, containedUnit: SmartspaceUnit, proximity: Proximity, position: Int, properties: List<Property>)

Functions

describeContents
Link copied to clipboard
abstract fun describeContents(): Int
newRequest
Link copied to clipboard
fun newRequest(): StateChangeRequest.Builder

Creates a StateChangeRequest.Builder used to change the state of this device properties (e.g.: power on; intensity 80%). The StateChangeRequest is then passed to IotDeviceController.execute

writeToParcel
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

containedUnit
Link copied to clipboard
val containedUnit: SmartspaceUnit

The unit this Iotdevice is inside.

deviceType
Link copied to clipboard
val deviceType: IotDeviceType

The type of this device (e.g. light, smoke-alarm, door)

id
Link copied to clipboard
val id: String

The ID of this device

name
Link copied to clipboard
val name: String

The user friendly name of this device

position
Link copied to clipboard
val position: Int

Position parameter as supplied by backend. Used for ordering of elements on the UI

properties
Link copied to clipboard
val properties: List<Property>

Properties exposed by this IotDevice

proximity
Link copied to clipboard
val proximity: Proximity

Approximation of distance from this IotDevice ble-source to the user