This tutorial introduces and describes the namespaces used by WS OPC UA.
The OPC UA namespace and general information about namespaces in OPC UA
In WS OPC UA, as usual in OPC UA, several namespaces are used. These are introduced and described in more detail in this tutorial. An introduction to namespaces can be found in the OPC UA Online Reference:
In every OPC UA information model the Uniform Resource Identifier (URI) for the OPC UA namespace http://opcfoundation.org/UA/ is always present.
Namespaces of the used Companion Specifications (CS)
The layer model of WS OPC UA shows that the Companion Specification (CS) OPC UA for Weihenstephan Standards is already built on top of other Companion Specifications.
Thus, the CS OPC UA for Machinery, which itself is based on the CS OPC UA for DI, and the CS OPC UA for PackML are required. This means that the following three namespaces of the Companion Specification are used:
Compared to other CS, the CS OPC UA for Weihenstephan Standards describes a generic metamodel and type model. In the namespace http://opcfoundation.org/UA/Weihenstephan/ are primarily all types, which are defined in the CS OPC UA for Weihenstephan Standards. Specific WS DataPoint, such as WS_Cur_State, are not defined in the CS OPC UA for Weihenstephan Standards.
Namespace of the Weihenstephan Standards Data Points.
The following three fields are defined in the WS Templates:
- WS DataPoints (for definition see: https://www.weihenstephan-standards.com/about/)
- WS MachineClasses
- WS MachineProfiles, a permutation table of WS DataPoints over WS MachineClasses.
Each WS DataPoint has a unique WS BrowseName, which corresponds to the BrowseName in OPC UA. A BrowseName in OPC UA consists of a NamespaceIndex and a QualifiedName. More about this can be found at:
An OPC UA BrowseName for a WS DataPoint looks simplified like this:
In a communication between OPC UA server and client the URI is mapped via a NamespaceIndex. Thus, the URI http://weihenstephan-standards.com/WS/ is replaced by the NamespaceIndex in OPC UA.
Thus, depending on the concrete information model, the namespace http://weihenstephan-standards.com/WS/ could be assigned the NamespaceIndex 5, for example, and would consequently look like this: 5:WS_Cur_State. For the explanation, however, it is easier to show the URIs instead of the NamespaceIndexes. The QualifiedName of a WS DataPoint is always prefixed with WS_. The prefix for WS DataPoints has already been introduced for WS Protocol and is still used for WS OPC UA. For WS OPC UA, the namespace http://weihenstephan-standards.com/WS/ would be sufficient for a unique definition of a WS DataPoint without the use of the prefix WS_. For compatibility reasons with WS Protocol, the prefix will also be used for WS DataPoints in the future. In summary, a WS DataPoint is uniquely defined in the namespace http://weihenstephan-standards.com/WS/.
Namespace for vendor or project specific data points
Within the Weihenstephan Standards it is possible to create own vendor or project specific data points. A WS BrowseName for a data point is generally defined like this:
A list of registered namespaces and prefixes can be found here. Depending on which vendor or project specific data points are used within an information model, wide namespaces following the pattern http://weihenstephan-standards.com/<vendor-name>/ can be added.
Namespace of the instances
All namespaces described so far are static and will not be changed when creating an OPC UA Server for a concrete WS Machine. All WS DataPoints (more precisely all nodes) of an instance are located in another namespace. This namespace is defined in the WS Modeler in the section for the configuration of WS OPC UA. This namespace can be e.g. the URI of an operator company of the WS Machine.
Interaction of namespaces by means of an example
In a small demo of the Weihenstephan Standards the following namespaces are used:
This demo machine has the WS DataPoint WS_Cur_State, which reflects the operating states of a machine according to the Weihenstephan Standards.
The instance of the WS DataPoint resides in NamespaceIndex 6 and thus in the namespace http://TUM.de/WS/Demo/. The BrowseName of the data point shows that it is a data point defined by the Weihenstephan Standards. This is to be recognized on the one hand by the NamespaceIndex 5 and thus the Namespace http://weihenstephan-standards.com/WS/ on the other hand from the redundant information of the prefix WS_.
The type definition of the data point WS_Cur_State points to the object type WSBaseStateMachineType, which is defined in NamespaceIndex 4 and thus in the namespace http://opcfoundation.org/UA/Weihenstephan/.
Summary of all namespaces used
Namespace for NodeIds and BrowseNames defined in the OPC UA specification. This namespace shall have namespace index 0.
Local Server URI
Namespace for nodes defined in the local server. This namespace shall have namespace index 1.
Namespace for NodeIds and BrowseNames defined in OPC 10000-100. The namespace index is Server specific.
Namespace for NodeIds and BrowseNames defined in OPC 40001-1. The namespace index is Server specific.
Namespace for NodeIds and BrowseNames defined in OPC 30050. The namespace index is Server specific.
Namespace for NodeIds and BrowseNames defined in this document. The namespace index is Server specific.
Namespace for BrowseNames of the WS DataPoints.
Namespace for BrowseNames of the vendor-specific data points.
Was this Implementation Guide article helpful?
Please give us feedback if the Implementation Guide article was helpful for you or if you need more information. This is the best way for us to improve the Implementation Guide.
Find all articles from the Implementation Guide.