Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate_datatypes: namespaceZero for StructMember is not correct set #3618

Closed
4 tasks
matkonnerth opened this issue May 20, 2020 · 1 comment
Closed
4 tasks

Comments

@matkonnerth
Copy link
Contributor

I've called generate_datatypes.py with the following arguments:

~/git/open62541/tools/generate_datatypes.py --no-builtin --namespace 3 --internal -t /pathToeuromapBsd/Opc.Ua.PlasticsRubber.GeneralTypes.NodeSet2.bsd -i UA_TYPES#/pathToNamespace0Bsd/open62541/deps/ua-nodeset/Schema/Opc.Ua.Types.bsd em83

These are the members for the ConfigurationParameterType struct:

/* ConfigurationParameterType /
static UA_DataTypeMember ConfigurationParameterType_members[4] = {
{
UA_TYPENAME("Id") /
.memberName /
UA_TYPES_UINT32, /
.memberTypeIndex /
0, /
.padding /
true, /
.namespaceZero /
false, /
.isArray /
false /
.isOptional /
},
{
UA_TYPENAME("Description") /
.memberName /
UA_TYPES_LOCALIZEDTEXT, /
.memberTypeIndex /
offsetof(UA_ConfigurationParameterType, description) - offsetof(UA_ConfigurationParameterType, id) - sizeof(UA_UInt32), /
.padding /
true, /
.namespaceZero /
false, /
.isArray /
false /
.isOptional /
},
{
UA_TYPENAME("DefaultValue") /
.memberName /
UA_TYPES_VARIANT, /
.memberTypeIndex /
offsetof(UA_ConfigurationParameterType, defaultValue) - offsetof(UA_ConfigurationParameterType, description) - sizeof(UA_LocalizedText), /
.padding /
true, /
.namespaceZero /
false, /
.isArray /
false /
.isOptional /
},
{
UA_TYPENAME("Unit") /
.memberName /
UA_TYPES_EUINFORMATION, /
.memberTypeIndex /
offsetof(UA_ConfigurationParameterType, unit) - offsetof(UA_ConfigurationParameterType, defaultValue) - sizeof(UA_Variant), /
.padding /
false, /
.namespaceZero /
false, /
.isArray /
false /
.isOptional */
},};

The last member has the namespace 0 DataType "EUInformation", but the UA_DataTypeMember says it's not a namespace zero member.

When I add the EUInformation here

builtin_types = ["Boolean", "SByte", "Byte", "Int16", "UInt16", "Int32", "UInt32",
, the EUInformation type is recognized as namespaceZero datatype.

Is there a way to configure the datatype generator in a way, to say that an imported types.bsd is from namespace 0?

path to bsd: https://github.com/matkonnerth/nodesetLoader/blob/client_datatype/nodesets/euromap/Opc.Ua.PlasticsRubber.GeneralTypes.NodeSet2.bsd

  • [x ] open62541 Version (release number or git tag): master
  • Other OPC UA SDKs used (client or server):
  • [ x] Operating system: debian
  • Logs (with UA_LOGLEVEL set as low as necessary) attached
  • Wireshark network dump attached
  • [ x] Self-contained code example attached
  • Critical issue
@matkonnerth
Copy link
Contributor Author

cannot reproduce on master, namespace map was added, maybe this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant