There are several ways to represent the mapping between Source Device Item property and Target Device Item property. The different ways depends on the types of the properties.
Source Device Item property. The "targetValue" holds the simple value of the Target Device Item property.
<value-mapping>
<value sourceValue="1" targetValue="true" />
<value sourceValue="0" targetValue="false" />
</value-mapping>
map, collection, reference, script expression, etc. In this situation the corresponding child elements are used: <target-value> and <source-value>. The <target-value> holds the complex object value representation of the Target Device Item property. The <source-value> holds the complex object value representation of the Source Device Item property. These XML elements holds the property representation and have the following XML attributes:Source Device Item property.Target Device Item property.Target Device Item operation.Source Device Item operation.If the property value is map, collection, array, etc, then the representation of the property should use one of the child elements <map-value> or <array-value>. More information about the XML complex object value representation can be found in "Complex Object Value" section of the Mapping XML Value Representation guide.
<read>
<target-value>
<map-value>
<element key="unit">
<map-value>
<element key="symbol" value="°" />
</map-value>
</element>
<element key="value">
<map-value>
<element key="value" script="#{sourceValue} * 2" />
</map-value>
</element>
</map-value>
</target-value>
</read>