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

The server library exposes some nodes with HasTypeDefinition reference to the same node. #1532

Closed
1 of 5 tasks
mrsuciu opened this issue Oct 4, 2021 · 2 comments · Fixed by #1574 or #1576
Closed
1 of 5 tasks
Assignees

Comments

@mrsuciu
Copy link
Contributor

mrsuciu commented Oct 4, 2021

Type of Issue

  • Bug
  • Enhancement
  • Compliance
  • Question
  • Help wanted

Describe the Issue

The server library exposes some nodes with HasTypeDefinition reference to the same node.
e.g BaseObjectType\FolderType\FileDirectoryType\CreateDirectory

To Reproduce
The issue can be reproduced for any method in the objects from Opc.Ua.Core that has the m_typeDefinitionId = m_nodieId.
In BaseInstanceState.cs - PopulateBrowser method will add the m_typeDefinitionId to the list of refernces regardless of the fact that it is the same with curent node NodeId.
The question is why the methods have the same NodeId as their TypeDefinitionId when they are generated by the model compiler.

Expected behavior
Such circular reference should be avoided since one can enter an endless browse operation

Screenshots
image

@mrsuciu
Copy link
Contributor Author

mrsuciu commented Oct 13, 2021

This happens because the following values in Opc.Ua.PredefinedNodes are as follows

image

@mregen
Copy link
Contributor

mregen commented Nov 2, 2021

The Opc.Ua.Core still needs new nodeset created with the fix

@mregen mregen reopened this Nov 2, 2021
mregen added a commit that referenced this issue Nov 4, 2021
- HasTypeDefinition and TypeDefinitionId should only exist for Object/Variable in .uanodes
- fix binary export for .uanodes
- #1574 missed the binary output case, only fixed xml export
- fixes #1532 
- fixes OPCFoundation/UA-ModelCompiler#94
- fix the default and sample models in this repo

note --> ModelCompiler needs to use the updated core lib to produce the same output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants