The WoT specification defines both a TD and a Protocol Binding.

The WoT TD is defined here:

https://www.w3.org/TR/wot-thing-description/#introduction-td

The WoT Protocol Binding is defined here:

https://www.w3.org/TR/wot-binding-templates/#binding-overview

The goal of this Companion Specification is to create a thin interface for configuring industrial connectivity software in a standardized way. By keeping the interface to a minimum, the chances of adoption by the industry are increased.

An example WoT TD is provided below:

{

"@context": [

"https://www.w3.org/2022/wot/td/v1.1"

],

"id": "urn:pac4200",

"securityDefinitions": {

"nosec_sc": {

"scheme": "nosec"

}

},

"security": [

"nosec_sc"

],

"@type": [

"Thing"

],

"name": "modbus-pac4200-sn324",

"base": "modbus+tcp://192.168.178.94:502/1",

"title": "Siemens SENTRON PAC4200",

"properties": {

"Voltage": {

"type": "number",

"readOnly": true,

"observable": true,

"forms": [

{

"href": "7?quantity=2",

"op": [

"readproperty",

"observeproperty"

],

"modv:type": "xsd:float",

"modv:entity": "holdingRegister",

"modv:pollingTime": 2000

}

]

}

}

}

Open-source WoT Thing Description parsers are available at: https://www.w3.org/WoT/developers/#runtime-consume.

The entry point of this specification in a Server’s object hierarchy is called “WoTAssetConnectionManagement” it is an instance of WoTAssetConnectionManagementType which is defined in 6.3.1

The AddressSpace for the entry point is shown in Figure 6.

image009.png

Figure 6 – WoTAssetConnectionManagement Address Space

The WoTAssetConnectionManagement Node is formally defined in Table 4.

Table 4 – WoTAssetConnectionManagement definition

Attribute

Value

BrowseName

WoTAssetConnectionManagement

References

NodeClass

BrowseName

OrganizedBy by the 0:Objects Folder defined in OPC 10000-5

0:HasTypeDefinition

ObjectType

WoTAssetConnectionManagementType

Conformance Units

WoT Connectivity Base Functionality

The WoTAssetConnectionManagementType ObjectType represents a set of WoTAssets that may be managed by a Server. It is defined in Table 5.

Table 5 – WoTAssetConnectionManagementType Definition

Attribute

Value

BrowseName

WoTAssetConnectionManagementType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

Other

Subtype of the 0:BaseObjectType defined in OPC 10000-5.

0:Organizes

Object

<WoTAssetName>

BaseObjectType

OP

0:HasComponent

Method

CreateAsset

Defined in 6.3.2

M

0:HasComponent

Method

DeleteAsset

Defined in 6.3.1.3.

M

Conformance Units

WoT Connectivity Base Functionality

Any instance of the <WoTAssetName> Object shall implement the IWoTAssetType Interface.

The CreateAsset Method creates a new Object that implements the IWoTAssetType Interface organized by the WoTAssetConnectionManagement Object.

The DeleteAsset Method shall remove the Organizes Reference from the WoTAssetConnectionManagement Object and may delete the IWoTAssetType instance.

The components of the WoTAssetConnectionManagementType have additional references which are defined in Table 6.

Table 6 – WoTAssetConnectionManagementType Additional References

SourceBrowsePath

Reference Type

Is Forward

TargetBrowsePath

<WoTAssetName>

0:HasInterface

True

IWoTAssetType

CreateAsset creates a new Object that implements the IWoTAssetType Interface that can be used to upload the WoT TD file to the server. Once the upload is complete, the industrial asset becomes reachable via the OPC UA server. The WoT TD file uploaded fully defines the endpoint, protocol, and all asset tags to be mapped to OPC UA.

CreateAsset, when successful, returns the NodeId of the newly created Object and adds an Organizes Reference from the WoTAssetConnectionManagement Object.

Signature

CreateAsset(

[in] 0:String AssetName,

[out] 0:NodeId AssetId);

Table 7 – CreateAsset Method Arguments

Argument

Description

AssetName

A unique name for the asset.

AssetId

The NodeId of the WoTAsset Object, if call was successful.

Method Result Codes

Result Code Symbolic Id

Description

Bad_BrowseNameDuplicated

The AssetName is already used.

Bad_UserAccessDenied

The session does not have the permissions required.

DeleteAsset deletes a previously configured industrial asset. It takes the NodeId of a WoTAsset Object input, previously returned by CreateAsset. These NodeIds can also be browsed from the WoTAssetConnectionManagement instance.

Signature

DeleteAsset(

[in] 0:NodeId AssetId);

Table 8 – DeleteAsset Method Arguments

Argument

Description

AssetId

The NodeId of the WoTAsset Object.

Method Result Codes

Result Code Symbolic Id

Description

Bad_NotFound

The asset was not found.

Bad_InvalidArgument

The NodeId provided was invalid.

Bad_UserAccessDenied

The session does not have the permissions required.

The IWoTAssetType is an Interface representing the WoT asset functionality. It has a component representing a File Object that can be used to upload the WoT TD file. It is defined in Table 9.

Table 9 – IWoTAssetType Definition

Attribute

Value

BrowseName

IWoTAssetType

IsAbstract

True

References

NodeClass

BrowseName

DataType

TypeDefinition

Other

Subtype of the 0:BaseInterfaceType defined in OPC 10000-5.

1:HasWoTComponent

Variable

<WoTPropertyName>

0:BaseDataType

0:BaseDataVariableType

OP

0:HasComponent

Object

WoTFile

WoTAssetFileType

M

Conformance Units

WoT Connectivity Base Functionality

When the asset configuration is complete, the Server may update the internal configuration of existing Variable Nodes or it may add new Variable Nodes to represent the asset. Each WoT property in the forms section of the TD shall have exactly one VariableNode associated with it.

The WoTAsset Object must have hierarchical HasWoTComponent references to the newly created Variable Nodes, one for each WoT property.

The BrowseName of the Variable Node shall have a name equal to the WoT property name.

If a mapping to a WoT property cannot be done (e.g. the data cannot be read from the connected asset), the built-in status code Bad_ConfigurationError will be returned when the Value of the Variable is read.

Each WoT property type is mapped to the corresponding OPC UA built-in DataType using the following mapping table:

Table 10 – WoT property type mapping

WoT Property Type

OPC UA Data Type

Boolean

Boolean

Number

Double

Integer

Int64

Object

No mapping

String

String

Null

No mapping

Array[Items]

Array[of one of above defined types]

The WoTAssetFileType ObjectType represents a set of TD File that is used to define an WoTAsset. It is defined in Table 11.

All instances shall support a mode of Write + EraseExisting when Open is called. They may support mode of Read. Other modes are not allowed.

When writing, if Close is called the file is discard and nothing changes. If CloseAndUpdate is called the file is parsed and the variables are updated to match the WoT TD file.

Table 11 – WoTAssetFileType Definition

Attribute

Value

BrowseName

WoTAssetFileType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

Modelling Rule

Subtype of the 0:FileType defined in OPC 10000-5.

0:HasComponent

Method

CloseAndUpdate

Defined in 6.3.3.2

Mandatory

Conformance Units

WoT Connectivity Base Functionality

The CloseAndUpdate Method parses the TD and creates Variables from the TD properties.

CloseAndUpdate Method parses the TD and creates Variables from the TD properties.

Signature

CloseAndUpdate (

[in] 0:UInt32 FileHandle

);

Table 12 – CloseAndUpdate Method Arguments

Argument

Description

FileHandle

The handle for a file opened for writing.

Method Result Codes

Result Code Symbolic Id

Description

Bad_InvalidState

The file was not opened for writing.

Bad_DecodingError

The WoT Thing Description could not be parsed.

Bad_NotSupported

The TD is valid but cannot be mapped to OPC UA.

Bad_NotFound

The asset was not found on the network.

Bad_UserAccessDenied

The session does not have the permissions required.

The HasWoTComponent is a concrete ReferenceType used to link WoT asset Objects to the WoT properties. The source node shall be an instance of an Object implementing the IWoTAssetType Interface. The target Node shall be an instance or a subtype of a BaseDataVariableType.

The HasWoTComponent representation in the AddressSpace is specified in Table 13.

Table 13 – HasWoTComponent ReferenceType

Attributes

Value

BrowseName

HasWoTComponent

InverseName

WoTComponentOf

Symmetric

False

IsAbstract

False

References

NodeClass

BrowseName

Comment

Subtype of 0:HasComponent ReferenceType defined in OPC 10000-5.

Conformance Units

WoT Connectivity Base Functionality