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 12.
Table 12 – 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:HasProperty |
Variable |
AssetEndpoint |
0:String |
0:PropertyType |
O |
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. The namespace used is server-specific.
The AssetEndpoint Property contains the endpoint where the asset can be found on the network. The syntax of the endpoint is vendor-specific.
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 13 – 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] |
Additional JSON key-value-pairs containing the uav prefix are instructions on how to map the WoT Property to an OPC UA ComplexType and contain the ExpandedNodeId of the OPC UA type definition, the field path within the OPC UA ComplexType, as well as the OPC UA NodeId to assign to the OPC UA ComplexType. This is aligned with the WoT-Binding Companion Specification. E.g.:
"uav:mapToType": "nsu=http://opcfoundation.org/UA/PNEM/;i=3005",
"uav:mapByFieldPath": "A",
"uav:mapToNodeId": "s=VoltageL-N",