C++ Based OPC UA Client/Server/PubSub SDK
OPC UA Namespaces

The following page describes the concepts for OPC UA namespaces.

Namespace Introduction

Namespaces are used by OPC UA to create unique identifiers across different naming authorities defining OPC UA information models.

The Attributes NodeId and BrowseName are identifiers of a node. A node in the OPC UA address space is unambiguously identified using a NodeId. Unlike NodeIds, the BrowseName cannot be used to unambiguously identify a Node. Different Nodes may have the same BrowseName. They are used to build a browse path between two nodes or to define a standard Property.

A namespace is identified by a namespace URI. The URI is the identifier for an OPC UA information model developed by a working group acting as naming authority. The URI for the base OPC UA namespace defined by the OPC UA working group is 'http://opcfoundation.org/UA/'.

So called standard information models (namespaces) are defined in OPC UA specifications. The nodes in a namespace are provided as machine readable UANodeSet XML file together with a specification. A specification is managed by a working group. Typically, each working group and specification has it's own namespace. Standard namespaces typically define only type nodes like ObjectTypes, DataTypes, VariableTypes or ReferenceTypes and related instance declaration nodes. Such namespaces are also called type namespaces or static namespaces since the nodes defined in these namespaces have the same attribute values in all OPC UA servers.

Standard namespaces have a version and a publication date (see also Namespace Metadata). Newer versions may add additional nodes but a new version can only extend already defined types with optional features or can add new types but it is not allowed to change types. Breaking changes to existing types require the definition of a new namespace URI.

One or more instance namespaces are used to provide the server specific instances of standard or vendor specific ObjectTypes. Object instances should not be mixed with type nodes in one namespace as long as these type nodes are re-used in different servers.

Namespace Index and Namespace Table

Both the NodeId and the QualifiedName (DataType used for BrowseName) contain a NamespaceIndex and an Identifier. The NamespaceIndex is the index into a namespace table managed by the OPC UA server. The namespace table is a Property where the value is an array of strings. Each string is a namespace URI used by the server. The index into this array is the NamespaceIndex used in NodeId and QualifiedName. See also OPC UA NodeId Concepts.

Server Namespace Table and related NamespaceIndex used in NodeIds

The following table provides a list of typical namespace entries and their index.

Namespace Index Namespace URI Description
0 http://opcfoundation.org/UA/ The URI for the main OPC UA namespace. This URI is always the first entry into the namespace table on index 0. The namespace contains all nodes defined by the OPC UA core specifications. It is not allowed to add application specific nodes to this namespace.
1 Server URI The Server URI also called Application Instance URI. This URI is the unique identifier for the server application. It is also part of the server discovery information and the server certificate. This namespace contains typically server specific diagnostic nodes.
N Standard namespace URI If a server is using types from other standard namespaces, these namespaces are added to the namespace table.
N Vendor specific type namespace URI If a vendor has types that are used in different products or different instances of the same product, these types should be provided in a separate namespace.
N Instance namespace URI Namespace used for server specific object instances for the underlying system represented by the OPC UA server.

The namespaces for index 0 (OPC UA) and 1 (local server) are implemented and handled by OPC UA server SDKs. Additional namespaces are handled by application specific implementations in the OPC UA server.

Static (standard) Namespaces

For standard namespaces it is expected that the nodes in such a namespace are identical (static) in all OPC UA servers implementing the namespace. The only exception is that some servers have only a partial set of nodes for the namespace or a newer version with more nodes.

Static nodes are identical for all Attributes in all servers, including the Value Attribute.

The Namespace Metadata indicates if the nodes in the namespace are static, the version and the the publication date of the namespace and if all nodes exist or if the server exposes a partial namespace.

Typically, all nodes of a standard namespace are static. But a namespace can also indicate only a subset as static. In this case only the static nodes are identical in all servers implementing the namespace. All other nodes can have different values or other modified attributes in different servers.

The following table provides a list of standard namespaces and information models defined by the OPC UA specification parts.

Namespace URI Description
http://opcfoundation.org/UA/ Base OPC UA namespace. The type nodes are static but the namespace contains also capability and diagnostic nodes that do not have static values.
http://opcfoundation.org/UA/GDS/ Namespace for OPC UA Global Discovery Server defined by OPC UA Part 12.
http://opcfoundation.org/UA/Dictionary/IRDI OPC UA defined namespace for nodes representing IRDI based dictionary entries. The namespace and related functionality is defined by OPC UA Part 19.
http://opcfoundation.org/UA/Dictionary/URI OPC UA defined namespace for nodes representing URI based dictionary entries. The namespace and related functionality is defined by OPC UA Part 19.
http://opcfoundation.org/UA/DI/ OPC UA information model for devices defined by OPC UA Part 100.
http://opcfoundation.org/UA/IA/ OPC UA information model for industrial automation defined by OPC UA Part 200.

Namespace Metadata

A server should expose additional namespace metadata information for standard namespaces and also for other type namespaces used as static namespaces in all instances of this server.

If possible, this information should be provided for all namespaces.

OPC UA defines the ObjectTpe NamespaceMetadataType for this information. Objects of this type are provided below the Server object for each namespace that has this information available.

The NamespaceMetadataType object for a namespace is part of the UANodeSet XML file for a namespace. If the namespace if created with UaModeler, the namespace metadata can be created or modified with 'Publish Model...' option with a right mouse-click on the model in the UaModel project tree.

The following information is part of the NamespaceMetadataType.

Information Description
NamespaceUri URI of the namespace.
NamespaceVersion A display string for the version number of the namespace.
NamespacePublicationDate Publication date of the namespace. This information can be used by clients to determine the latest version if different versions are provided by different Servers.
IsNamespaceSubset Flag that defines whether all nodes of the namespace are accessible in the Server or only a subset.
StaticNodeIdTypes List of IdTypes used for static Nodes. Typically, the static nodes have numeric identifiers.
StaticNumericNodeIdRange If only a subset of the numeric identifiers is static, this Property contains the ranges of static numeric identifiers.

The next chapter describes the OPC UA Node Classes.