the namespace alias table
The Namespace Alias Table is a crucial component in the OPC UA Address Space, allowing for efficient referencing of namespaces.
It provides a mapping between namespace indices and their corresponding URIs, also enabling the use of shorter identifiers to identity namespaces.
The short namespace alias is particularly convenient when you are interacting with a OPCUA server that is under developments. In such circumstances, the namespace index may change frequently, and using a short alias allows you to avoid having to update your NodeId references every time the namespace index changes.
Namespace aliases are also convenient as a mnemonic to remember the namespace index of a given namespace. For instance it is easier to remember di
for the Device Information namespace than ns=3
.
Benefits of Namespace Aliases
Namespace aliases are used to simplify the representation of NodeIds and BrowsePaths in OPC UA. They provide several benefits:
-
Aliased namespaced NodeIds:
na=di;i=5001
is equivalent tonsu=http://opcofundation.org/UA/DI;i=5001
orns=3;i=5001
(assuming that the Device Information namespace is at index 3). -
Aliased BrowsePaths:
/di:DeviceSet/dt1:MyDevice/dt1:Temperature
is equivalent to/3:DeviceSet/1:MyDevice/1:Temperature
(assuming that the Device Information namespace is at index 3, and the DT1 namespace is at index 1).
Namespace Alias Table
The Namespace Alias table is avaiable in the third tab of the OPC UA Endpoint
node configuration dialog.
The table provide a [Extract] button that you can use to extract the namespace aliases from the server's Namespace Array.
By default, standard namespace aliases are provided for common well known OPC UA namespaces, such as di
for Device Information, machinery
for Machinery , adi
for Analyze Device Integration, autoId
etc...`
Custom namespace aliases will be affected namespace in the form ns1
, ns2
, etc..
You can override these aliases by providing your own custom namespace aliases.
You can press the Extract
button to extract the namespace aliases mutliple times.
Even if the server namespace has been scrambled, the Extract
button will always keep the current alias table intact, and will update the namespace index appropriately.