Equivalent WoT TD definition

Interaction Name

Description

The BrowseName is used as interaction name of a property or action.

It is important to ensure that the interaction names within the properties and actions are unique within the TD.

If the uniqueness is not guaranteed by a given BrowseName (same value is used at a different place in a UA tree), different strategies can be realized. In the following, two strategies are presented; others are also possible as long as uniqueness is guaranteed.Lets assume, we have following UA tree and both nodes 1:Pressure should be transformed into a WoT TD:

2:Root|_1:Data1 |_1:Pressure|_1:Date2 |_1:Pressure

E.g., the interaction name can be augmented with additional characters such as with a separator character (e.g., "_", "-") and an ascending number or alphabet character.

Example: "1:Pressure_1" for "1:Pressure" in "1:Data1". ""1:Pressure_2" for "1:Pressure" in "1:Data2".

Alternatively, the browse path to the UA node can be sketched (e.g., without namespace prefixes) as unique interaction name:

Example: "Root_Data2_Pressure"

In the case the original BrowseName is not used, it is recommended to add the term "uav:browseName" within the interaction affordance to provide the origin browse name.

Snippet example in OPC UA (e.g., as nodeset)

<UAVariable NodeId="ns=1;i=428" BrowseName="1:Pressure" ParentNodeId="ns=1;i=20" DataType="Double"> …

Transformed usage in a TD definition (as snippet)

"properties": {

"1:Pressure_1":

{

Alternative:

"properties": {

"Root_Data1_Pressure": { "uav:browseName":"1:Pressure"

Equivalent WoT TD definition

title At the root and property / action level

Description

DisplayName and title represent a human-readable name of an OPC UA node or a WoT Thing or an interaction affordance (property / action).

Snippet example in OPC UA (e.g., as nodeset)

<DisplayName>Product serial number</DisplayName> …

Transformed usage in a TD definition (as snippet)

"title" : "Product serial number "…

Equivalent WoT TD definition

description At the root and property / action level

Description

Description and description provides a human-readable description of an OPC UA node or a WoT Thing or an interaction affordance (property / action).

Snippet example in OPC UA (e.g., as nodeset)

<Description>This attribute provides the position oft the robot arm.</ Description> …

Transformed usage in a TD definition (as snippet)

"description" : " This attribute provides the position oft the robot arm."…

Equivalent WoT TD definition

type

Description

It represents the dataType of the data provided or consumed by an OPC UA node or a WoT interaction affordance (property/action).

If data type values are from XSD Schema types or NodeIds to link, e.g., to BaseDataTypes, then those data type values shall be resolved and mapped to the corresponding JSON types and assigned to the type term in the TD.

The mapping from OPC UA datatype to JSON types is specified in Chapter 5.4 OPC UA JSON in “OPC 10000-6: UA Part 6: Mappings” (5.4.2 Built-in Types).

Snippet example in OPC UA (e.g., as nodeset)

<UAVariable NodeId="ns=1;i=2" BrowseName="1:ProductSerialNumber" ParentNodeId="ns=1;i=1" DataType="UInt64"> …

Transformed usage in a TD definition (as snippet)

"properties": {

"1:ProductSerialNumber": { "type ": "number", ……

Equivalent WoT TD definition

readOnly writeOnlyobservableop

Description

It represents the permitted accesslevel for a client to a property affordance.

Relevant bitfields in OPC UA are currentread (bit 0) and currentwrite (bit 1).

Thing Description provides indicators of the data model level about accessibility by the terms readOnly and writeOnly. The term observable gives an hint if the property is observable.

At the forms level the op term is used with the potential values readproperty, writeproperty, and observeproperty.

Note: per default, UA Variables are observable.

Snippet example in OPC UA (e.g., as nodeset)

<UAVariable NodeId="ns=1;i=35" BrowseName="1:IdealCycleTime" ParentNodeId="ns=1;i=20" DataType="UInt64" AccessLevel="3"> …

Transformed usage in a TD definition (as snippet)

"properties": {

"1:IdealCycleTime": {

"readOnly": true,

"writeOnly": false,

"observable": true,

"forms" : [{

"op": ["readproperty","observeproperty"]

Equivalent WoT TD definition

href

Description

The NodeID of a UA Variable or Method is encoded as href in forms of a property or actions definition. Detail addressing mapping is specified in Section 6.2

Snippet example in OPC UA (e.g., as nodeset)

<NamespaceUris>

<Uri>http://opcfoundation.org/UA/DI/</Uri>

<Uri>http://example.namespace.com/demo/</Uri>

</NamespaceUris>…

<UAVariable NodeId="ns=1;i=35" BrowseName="1:IdealCycleTime" ParentNodeId="ns=1;i=20" DataType="UInt64" AccessLevel="3"> …

Transformed usage in a TD definition (as snippet)

"properties": {

"1:IdealCycleTime": {

"forms" : [{

"href":"/?id=ns=1;i=35"

Alternative:

"properties": {

"1:IdealCycleTime": {

"forms" : [{

"href":"/?id=nsu= http://example.namespace.com/demo/;i=35"