image010.pngimage011.pngThe OPC UA Binding for WoT provides a standard guideline on how to design a WoT TD to describe an OPC UA interface. The example below illustrates a basic TD instance outlining an interface of an OPC UA Server, which provides access to a single datapoint (UA Variable) pumpSpeed.

This example shows a minimal version of metadata that would be enough that a client can initiate a connection to an OPC UA server (opc.tcp://opcuademo.com:4840), selects a preferred security mode that the OPC UA server offers (auto_sc), and is able to execute a read or monitor service of the pumpSpeed datapoint via the provided NodeId in href (nsu=http://example.nsu.com/demo/pump;s=PumpSpeed).

As an alternative a Thing Description can provide additional semantic metadata as specified in the specification to give a richer context of information. The following example extends the previous TD with potential terms:

image012.pngimage013.png

The @context includes all namespaces that are used in the Thing Description. The http://opcfoundation.org/UA/WoT-Binding/ namespace points to the OPC UA WoT Binding ontology and http://example.namespace.com/demo/pump to an application class that is used in the OPC UA server. Terms such as uav:browseName specify the origin browse name (1:Pump and 1:PumpSpeed) of a corresponding UA Object marked with uav:object or of a UA Attribute marked with uav:variable in the Thing Description @type. The uav:browsePath provides the origin browse path in the OPC UA tree to the UA Variable that is associated with this property.