Issue with Namespace in Generated DI Data Types

10 views
Skip to first unread message

Mohammad Rahil

unread,
Aug 29, 2025, 7:16:45 AM (8 days ago) Aug 29
to open62541

Hi All,

I’m trying to generate base data types for DI using the generate_datatypes.py script available in the tools directory. However, I’m encountering an issue where the generated data types are not reflecting the correct namespace. For example:

{
    UA_TYPENAME("DeviceHealthEnumeration") /* .typeName */
    {0, UA_NODEIDTYPE_NUMERIC, {6244LU}}, /* .typeId */
    {0, UA_NODEIDTYPE_NUMERIC, {0}}, /* .binaryEncodingId */

    {0, UA_NODE ...

As you can see, the .typeId is using namespace 0, which is the default namespace. This seems incorrect because I explicitly passed namespace 2 in the command.

Here is the command I used:

python3  tools/generate_datatypes.py
--namespaceMap 2:http://opcfoundation.org/UA/DI/
                --type-csv = deps/ua-nodeset/DI/Opc.Ua.Di.NodeIds.csv
                --type-bsd = deps/ua-nodeset/DI/Opc.Ua.Di.Types.bsd --no-builtin
                types_di"

In the above file you can clearly see iam passing 2 as namespace. Am i doing something wrong , is my python command is correct. Can somebody help me with this. 

 Thanks in advance. 

 Regards,

Rahil 

Reply all
Reply to author
Forward
0 new messages