Working with Device Assets

Some device drivers support assets to provide a hierarchical logical grouping of settings, operations and events.

Some examples of asset usage:

  • JMX device driver returns one asset per every MBean class. Each asset has one sub-asset per MBean instance.

  • OPC device driver provides asset tree that matches hierarchy of OPC server branches.

  • BACnet device driver provides an asset for every BACnet object type. Each asset has one sub-asset for every BACnet object instance.

  • Similarly, WMI device driver creates an asset for every WMI object type.

Implementing Asset Support in a Driver

Drivers that support assets must return TRUE from isUsesAssets() method.

If certain driver declares asset support, Iotellect Server core calls its readAssetDefinitions() method right after establishing or confirming device connection. This method should return a list of DeviceAssetDefinition objects. Each asset definition has a unique ID, human-readable description, and a list of nested definitions (sub-assets).

Iotellect Server reads asset definitions from the driver just once at the device creation stage and caches them the database. To force server to re-read asset definitions from the driver, use Reset Device Driver operation.

Every asset may be enabled/disabled by system operators using Edit Device Properties action.

If driver supports assets, Iotellect Server calls the following methods to obtain device metadata:

  • readVariableDefinitions(List<DeviceAssetDefinition>)

  • readFunctionDefinitions(List<DeviceAssetDefinition>)

  • readEventDefinitions(List<DeviceAssetDefinition>)

The driver must return only definitions that belong to enabled assets (i.e. DeviceAssetDefinition.isEnabled() returns true). Definitions of settings, operations and events that belong to disabled assets won't be available within Iotellect.

Was this page helpful?