The following BNF format shows the structure of an URI of the OPC UA Client / Server protocol that have to be followed in a WoT Thing Description:

opc.tcp://<address>:<port>[/<resourcePath>]/?id=<nodeId>

Where is:

  • {address} OPC UA server endpoint (IP) address
  • {port} OPC UA server port number
  • {resourcePath} If used by the OPC UA server, an added resource path at the endpoint address.
  • {nodeId} OPC UA nodeId which should apply the following requirements: To prevent conflicts with reserved characters and to allow for deconstruction as specified by RFC 3986, two specific characters in the nodeId must be percent-encoded when used
  • any hash character (#) shall be percent-encoded (%23)
  • any ampersand character (&) shall be percent-encoded (%26)
  • If this URI is extracted from the Thing Description and is transmitted (e.g., via a network), all non-ASCII characters must first be encoded into bytes using the UTF-8 character encoding, and then each resulting byte must be percent-encoded in accordance with RFC 3986.

    Note that the URL can be used as a whole in href within a forms definition or divided into the global base term (for sever location only) and href term (relative to the base that provides only the nodeId information).

    Examples:

    • "href": "/?id=nsu=http://example.nsu.com/demo/pump;s=PumpSpeed"
    • "href":"/?id=nsu=http://example.com/hello%23;s=temperature"
    • "href":"opc.tcp://192.168.120.237:4840/?id=nsu=http://widgets.com/schemas/hello;s=水 World"

    If the namespace is resolved in the @context (see 6.5.5), its index value can be used in the nodeId:

    • "href":"/?id=ns=10;i=12345"
    • "href":"opc.tcp://192.168.120.237:4840/UA/Factory/?id=ns=10;i=12345"
    • "href":"opc.tcp://192.168.120.237:4840/?id=ns=10;i=12345"