Device
public class Device
A Device lists the characteristics of a device.
-
The
See moreFieldenum defines the characteristics of a device.Declaration
Swift
public class Field : Hashable -
Get the list of device models supported by this device.
Declaration
Swift
public func getDeviceModels() -> [String]Return Value
A list of device model URN.
-
Get the value of the specified
fieldor an empty String if the value is unknown.Declaration
Swift
public func getValue(field: Device.Field) -> StringParameters
fieldThe field to look for
Return Value
The field value or an empty String.
-
Return whether the device is directly connected to the server or is connected through a gateway.
Declaration
Swift
public func isDirectlyConnected() -> BoolReturn Value
trueif the device is directly connected,falseotherwise. -
Get the device identifier.
Declaration
Swift
public func getId() -> StringReturn Value
The device identifier.
-
Return the device metadata. Might be empty.
Declaration
Swift
public func getMetadata() -> [String : String]Return Value
A map of device metadata
-
Return the value of the metadata field
key.Declaration
Swift
public func getMetadata(key: String) -> String?Parameters
keyThe metadata key to return.
Return Value
Value for metadata
keyornilif not found. -
Return the device’s location.
Declaration
Swift
public func getLocation() -> Location?Return Value
The device’s location.
-
The
See moreDevice.Locationclass describing the location of a device.Declaration
Swift
public class Location
Device Class Reference