|
Assets |
Top Previous Next |
|
Some device drivers support assets to provide a hierarchical logical grouping of settings, operations and events. Some examples of asset usage:
Implementing Asset Support in Driver Drivers that support assets must return TRUE from isUsesAssets() method. If certain driver declares asset support, AggreGate 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 an unique ID, human-readable description, and a list of nested definitions (sub-assets). AggreGate 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, AggreGate Server calls the following methods to obtain device metadata:
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 AggreGate. |