-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
node-opcua will not instantiate a child variable when it has the same name as its parent objectType #1320
Comments
Found the issue. The optional filter thinks it is already in while it isn't, because the node-opcua/packages/node-opcua-address-space/src/_mandatory_child_or_requested_optional_filter.ts Lines 32 to 47 in 734c0d9
I think the solution is to not check all references, but, instead only check all node-opcua/packages/node-opcua-address-space/src/_mandatory_child_or_requested_optional_filter.ts Line 26 in 734c0d9
|
…ame as parent objectType.
Fixed in node-opcua@2.121.0 |
Current behavior / Describe the bug
If I create an objectType named Test which has a child variable named Test then the child variable will never be instantiated. Other child variables are instantiated because I added an extra one named Test2 that is indeed instantiated.
See:
![image](https://private-user-images.githubusercontent.com/6298455/283383342-0f8d4c99-c42d-4226-8a2b-eda2179d3549.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgzMDc2MDIsIm5iZiI6MTcxODMwNzMwMiwicGF0aCI6Ii82Mjk4NDU1LzI4MzM4MzM0Mi0wZjhkNGM5OS1jNDJkLTQyMjYtOGEyYi1lZGEyMTc5ZDM1NDkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MTNUMTkzNTAyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NzEyNTI4NTljYTU0ZTY2OWVjMzdmYmExNWYwYmU1MDBlMjc5NmE3MjU3MzFjOTlkN2M4MTA0NTc0OWQ2Y2Q0NiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.DXx-b00p18VLn6dWz2SAmgT1f_MEGdNya9WeCv9myGM)
Step by step instruction to reproduce
Steps to reproduce the behavior:
Opc.Ua.NodeSet2.xml
into the folder as wellnpm install
node server.js
Expected behavior
I expect the child variable to be created. It is not good practice to name the variable the same, but I do think this is allowed by the OpcUa specification.
Gist
gist: https://gist.github.com/tetanw/c1c2a92dbe77e20efebba90ad057a195
Context
( ) my request is related to node-opcua acting as an OPCUA CLIENT
(x) my request is related to node-opcua acting as an OPCUA SERVER
( ) I have installed node-opcua from source ( using git clone)
(x) I have installed node-opcua as a package ( using npm install )
( ) I am using an application that uses node-opcua
Device: Lenovo Thinkstation P700
OS version:
Description of the other OPCUA system I am trying to connect to: NA
node-opcua version: 2.115.0
Node: v18.16.0
The text was updated successfully, but these errors were encountered: