Device
.See: Description
Interface | Description |
---|---|
Device |
Device representation.
|
DeviceInventory |
The main interface to the Device Inventory service.
|
Feature |
Feature representation.
|
Gateway |
A gateway representation.
|
Class | Description |
---|---|
Attribute<T> |
Represents a device attribute.
|
DefinitionFilter |
Used to select a particular
Feature . |
DefinitionIdentifier |
This interface represents a single fully qualified identifier of a FeatureDefinition.
|
Identifier |
Encapsulates information which uniquely identifies an entity.
|
Property<T> |
Represents a feature property.
|
Selector |
Represents device search criteria providing filtering and sorting utilities.
|
Device
. These "target" objects are available when scripts are executed in Device Scope
(not System Scope, please check manual for details). In Device Scope, the script is run once for every device in the scope
and the "target" binding holds representation of that Device.
target.deviceId()
,target.deviceId()
,target.exec('myFeature', 'someCommand', args)
,target.feature('myFeature').exec('someCommand', args)
,DeviceInventory
that can be accessed with the following aliases: "di" and "deviceInventory".
di.device('myDeviceId')
,deviceInventory.devices(new Selector())
,Feature
in two ways - generic and dynamic.
def myFeature = target.feature('MyFeature') // first access the feature, this is common for all examples
Generic Way | Dynamic Way | |
---|---|---|
Access Property |
def value = myFeature.property('sensorValue')
|
myFeature.sensorValue
|
Invoke Operation |
def value = myFeature.exec('switchOn', someArgs)
|
myFeature.switchOn(someArgs)
|