Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Duplicate namespace name in namespace table?
September 21, 2021
15:49, EEST
Avatar
rocket science
Member
Members
Forum Posts: 88
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

HI,

I’ve seen something strange at an OpcUa server…. in the namespace table there is the same namespace name used for different indexes.

NamespaceTable
[0] http://opcfoundation.org/UA/
[1] urn:com01/OpcUaServer
[2] urn:com01/OpcUaServer

I could not find an answer in the OpcUa reference, but as I know, namespaces should be indentified by it’s name and not by index (because the index can change after a server restart). So in the case above it is impossible to indentify a node using the namespace name, because based on the namespace name I will have two different indexes.

In this particular case there are also two Nodes with the same name but different namespace, which makes it really impossible to identify the node by using the namespace name.

ns=1;s=MyNode
ns=2;s=MyNode

So, the big questions is if it is allowed to have duplicate namespace names in the namespace table and if yes how to deal with it for identifying the nodes using the namespace name and the NodeId?

September 21, 2021
16:55, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1026
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Each entry must be unique, thus that is not a valid OPC UA server. Pretty much a no can do situation. https://reference.opcfoundation.org/v104/Core/docs/Part5/6.3.1/:

“NamespaceArray defines an array of namespace URIs. This Variable is also referred as namespace table. The indexes into the namespace table are referred to as NamespaceIndexes. NamespaceIndexes are used in NodeIds in OPC UA Services, rather than the longer namespace URI. Index 0 is reserved for the OPC UA namespace, and index 1 is reserved for the local Server.”

Though… technically that part doesn’t say unique. But that can be inferred from the usage https://reference.opcfoundation.org/v104/Core/docs/Part3/8.2.2/
“Namespace URIs, like Server names, are identified by numeric values in OPC UA Services to permit more efficient transfer and processing (e.g. table lookups). The numeric values used to identify namespaces correspond to the index into the NamespaceArray. “

Basically the index is just an optimization thing, thus an uri cannot have 2 indexes.

September 21, 2021
17:46, EEST
Avatar
rocket science
Member
Members
Forum Posts: 88
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

Hi Bjarne,

thanks for your answer. I guess it’s a self-made OpcUa-Server were they messed up something. It’s good to hear that the URI shall be unique.

Thanks!

January 13, 2022
14:16, EET
Avatar
rocket science
Member
Members
Forum Posts: 88
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

Just to give here also the information….

Namespace URIs shall be unique. OpcFoundation will add an explicit statement to the specifiaction and will also add it as test case to the complience tests.

see also … https://forum.prosysopc.com/forum/opc-ua/where-to-find-string-notation-of-a-node-in-the-opcua-reference/#p5852

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
63 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 734

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1523

Posts: 6449

Newest Members:

christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16, edgardo3518

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1