Issues with browsenames

Questions regarding the use of the High Perfomance SDK for Server development

Moderator: uasdkhpc

Post Reply
AlexU
Jr. Member
Jr. Member
Posts: 2
Joined: 28 Aug 2025, 18:05

Issues with browsenames

Post by AlexU »

Hello everyone,

I have some issues getting started with the High Performance OPC UA PubSub SDK. For the first step my aim is to create an OPC UA Server under linux containing all types and objects from following standard OPC companion spec nodesets from https://reference.opcfoundation.org/nodesets:
  • UA
  • DI
  • IA
  • AMB
  • Machinery
  • Machinery/Result
  • IJT
  • IJT/Tightening
To accomplish this I did the following steps:
  1. imported the required Nodesets into the UaModeler
  2. generated Code via UaModeler for HP SDK (under windows via hosttools, since my UaModeler license does not work in WSL)
  3. Copied generated code and the SDK sourcefiles to Ubuntu (WSL)
  4. Built the SDK for a full profile via ./build.sh -p full
  5. Built the files generated files by modeler via output/build.sh
Build process worked fine and the compiled server is starting, but for some reasons there are issues with browsenames.

Code: Select all

N|12|Aug 29 11:59:26.821824|522364|  Registering dynamic address space: http://opcfoundation.org/UA/IJT/Base/
E|04|Aug 29 11:59:26.826342|522364|    ua_node_set_browsename_ex: the qualified name 'MachineryBuildingBlocks' does not exist in namespace 7.
E|04|Aug 29 11:59:26.826360|522364|    ua_node_set_browsename_ex: the qualified name 'OperationCounters' does not exist in namespace 3.
E|04|Aug 29 11:59:26.826366|522364|    ua_node_set_browsename_ex: the qualified name 'Maintenance' does not exist in namespace 3.
E|04|Aug 29 11:59:26.826641|522364|    ua_node_set_browsename_ex: the qualified name 'MachineryBuildingBlocks' does not exist in namespace 7.
After looking into the generated code my assumption is that some information regarding browsenames is not properly written into the string table by the xml2bin tool. The xml2c tool seems to do it right, therefore I tried to compile the default OPC namespaces statically into the server to confirm my assumption.

Sadly I am failing on configuring the CMake build in a way that lets me do that. It always ends up copying the .bin files and load them dynamically regardless of what CMake Options I try to activate when I use the profiles full and full-static on the HP SDK.

Is there a documentation on how to properly modify the buildscripts?
And if im off the mark with my assumption, what else could cause the depicted errors?

Thank you!

Kind Regards
Alex

User avatar
Support Team
Hero Member
Hero Member
Posts: 3325
Joined: 18 Mar 2011, 15:09

Re: Issues with browsenames

Post by Support Team »

Hi,

from a quick view on the given information, it seems that the chain of referenced models is buggy, in the sense that it can not resolve some browse names (that one model has used, but are defined in a different/previous one). This can have multiple reasons:
1) models loaded in wrong order
2) the referenced version of the model do not match
3) referenced namespace index (ns table inside model) is wrong

In your case the IJT claims that the MachineBuildingBlocks are present in namesace 7, but they do not exist in ns7. If you open up the IJT model, and search for the MachineBuildingBlock, and check against the internal namespace table (at the top of the file) you can see that is referencing the Machinery being the source/root of that browse name. However, not exist in Machinery. This is an error inside the Companion Specification, we can not resolve. Must be fixed in the Companion Specification. It seems to be copied from the Machinery Examples, where it is wrong as well.

Please contact OPC Foundation chairperson of the specific Companion Model and create bug-ticket (Mantis) for the issue.
Best regards
Unified Automation Support Team

AlexU
Jr. Member
Jr. Member
Posts: 2
Joined: 28 Aug 2025, 18:05

Re: Issues with browsenames

Post by AlexU »

Thank you for the fast response.

In the meantime i found out a bit more about the issue and have another question out of curiosity.

The "Opc.Ua.Machinery.NodeSet2.xml" has a Browsename "2:OperationCounters". The Namespace Index "2" is the Namespace "Opc.Ua.Di.NodeSet2.xml".

Here the Except from "Opc.Ua.Machinery.NodeSet2.xml" with the Browsename "2:OperationCounters"

Code: Select all

<Model PublicationDate="2025-07-01T00:00:00Z" ModelUri="http://opcfoundation.org/UA/Machinery/" Version="1.04.0">

 <UAVariable NodeId="ns=1;i=6082" DataType="QualifiedName" BrowseName="DefaultInstanceBrowseName" AccessLevel="3" ParentNodeId="ns=1;i=1009">
<DisplayName>DefaultInstanceBrowseName</DisplayName>
<Description>The default BrowseName for instances of the type</Description>
<References>
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
<Reference IsForward="false" ReferenceType="HasProperty">ns=1;i=1009</Reference>
</References>
<Value>
<uax:QualifiedName>
<uax:NamespaceIndex>2</uax:NamespaceIndex>
<uax:Name>OperationCounters</uax:Name>
</uax:QualifiedName>
</Value>
</UAVariable>
The UaModeler generates a "Opc.Ua.Di.NodeSet2.xml" but the "2:OperationCounters" is missing in there.

Therefore, the "xml2bin" execution in the generated "gen.sh"

Code: Select all

./xml2bin $XML2BIN_OPTIONS \
-W 1003 \
-i2 \
-o $OUTPUTDIR/Opc.Ua.Di.NodeSet2.bin $MODELSDIR/Opc.Ua.NodeSet2.xml $MODELSDIR/Opc.Ua.Di.NodeSet2.xml

builds a "di.bin" without the browsename "2:OperationCounters" in the stringtable.

Because of that, when the OPC UA server loads all .bin files the "ua_node_set_browsename_ex: the qualified name 'OperationCounters' does not exist in namespace 2." appears, because it ist rfeferenced by "Opc.Ua.Machinery.NodeSet2.xml" but not found in the stringtable of "di.bin".

But if i look at the "xml2c" generated files, then the Browsename "2:OperationCounters" appears in the static generated string table.
Do you have an idea why the browsename is included in tha static generated "ns2.c" but not in the `"di.bin" ?

Thanks in advance!

Kind Regards
Alex

User avatar
Support Team
Hero Member
Hero Member
Posts: 3325
Joined: 18 Mar 2011, 15:09

Re: Issues with browsenames

Post by Support Team »

Hi,

it is technically wrong that the Machinery NodeSet references 2:OperationCount (2=DI) as well, because this requires a modification of the existing DI namespace. The reason why it works with xml2c is that when generating C code we load all namespaces at once and generate all the C code.
This is necessary to create correct cross-references between the namespaces.

It is just a unwanted side-effect, that the Machinary model can extend the DI string table this way.

With xml2bin this is different. Each nodeset is converted individually, and thus the OperationCount string does not exit in di.bin. Binary files are loaded
at runtime into RAM and cross-references can be created between the models as needed.
Best regards
Unified Automation Support Team

Post Reply