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: 36
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: 684
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: 36
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!

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 267

Currently Online: AnttiMatik
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 111

pramanj: 86

ibrahim: 74

kapsl: 57

gjevremovic: 49

TimK: 41

fred: 41

Xavier: 40

Fransua33: 39

rocket science: 36

Member Stats:

Guest Posters: 0

Members: 1458

Moderators: 17

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1178

Posts: 4983

Newest Members:

ThomasM, louiecrews, wyattcutler005, kristin3354, augustawalpole3, everettpulver, arron51869, roseannagoldschm, moosm, islamaddox

Moderators: Jouni Aro: 906, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 684, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 24, Teppo Uimonen: 21, Markus Johansson: 36, Niklas Nurminen: 0, Matti Siponen: 151, Lusetti: 0

Administrators: admin: 1