8 Thing Description Examples

8.1 Full Object to Thing Description Transformation

An OPC UA example server reflects the following UA node tree:

The namespace for ns=1 is "". A corresponding Thing Description can be generated for the Object NodeId "ns=1;s=IndustrialMotor" (IndustrialMotor):

8.2 Auto Data Model Mapping with UA Binding Terms

The ontology of the OPC UA binding will allow mapping features that can be used also in Thing Description that are not directly related to a OPC UA binding.

The example below shows a Thing Description of a Modbus-based energy meter that offers 3 voltages of each phase as properties with the name VoltageL1-N, VoltageL2-N, and VoltageL3-N. Each property uses the uav:mapToType and uav:mapByFieldPath terms to make clear, that the corresponding property can be mapped to a AcPeDataType from the http://opcfoundation.org/UA/PNEM/ namespace. If an OPC UA server uses this namespace and has a node of this type, as shown on the right, then a processor can read the properties from the Modbus device and assign the runtime value to the OPC UA model.

Figure 6 - Example usage of the data model mapping

Hint: The uav:mapToNodeId can also be used to specify the exact target node to which the runtime data should be mapped.