Below is described a simple example of Device configuration. It configures all devices that have adapter name "DA Demo" and model "High Precision". As an additional condition these devices should have zero or one device item. The Device Items are filtered by an object class equal to com.prosyst.mbs.services.da.items.TransitionActuator and have tag "temperature". The device configuration adds a new tag "Kitchen" to the existing device tags.
The Device Item that matches the filter, is configured in the following way:
int[] with two elements – 3 and 4;<?xml version="1.0" encoding="UTF-8"?>
<configurations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="config.xsd">
<configuration uid="DA Device Item Configuration With Retry Demo">
<config-retry count="5" interval="20000" shouldResume="true" />
<device-filter> <!-- device matching filter to determine which devices to configure -->
<ldap value="(&(adapter.name=DA Demo)(model=High Precision))" />
</device-filter>
<device-config> <!-- apply device configuration -->
<tags>
<tag value="Kitchen" />
</tags>
</device-config>
<items>
<item>
<item-filter quantifier="?">
<item-properties>
<object-class value="com.prosyst.mbs.services.da.items.TransitionActuator" />
<tags>
<tag value="temperature" />
</tags>
</item-properties>
</item-filter>
<item-config> <!-- apply item configuration -->
<name value="TransitionActuator Demo" />
<attributes>
<attribute name="Int array">
<array-value>
<element value="3" />
<element value="4" />
</array-value>
<class value="[I" />
</attribute>
</attributes>
<operations>
<operation name="start">
<args>
<arg>
<map-value>
<element key="unit">
<map-value>
<element key="symbol" value="℃" />
</map-value>
</element>
<element key="value">
<map-value>
<element key="value" value="25" />
</map-value>
</element>
</map-value>
</arg>
<arg value="50000" />
</args>
</operation>
</operations>
</item-config>
</item>
</items>
</configuration>
</configurations>