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

Getting NodeState for i=68 (PropertyType) returns an object of type BaseDataVariableTypeState #2969

Open
1 of 5 tasks
wbtoms opened this issue Jan 28, 2025 · 0 comments
Open
1 of 5 tasks

Comments

@wbtoms
Copy link

wbtoms commented Jan 28, 2025

Type of issue

  • Bug
  • Enhancement
  • Compliance
  • Question
  • Help wanted

Current Behavior

When getting the NodeState corresponding to the node PropertyType (i=68) using the method FindNodeInAddressSpace of class CustomNodeManager2, the NodeState object returned is BaseDataVariableTypeState instead of a PropertyTypeState.

This seems to be related to the loading of predefined node from the binary file Opc.Ua.Stack.Generated.Opc.Ua.PredefinedNodes.uanodes in the DiagnosticsNodeManager, see attached screenshot.

Image

Expected Behavior

Get PropertyTypeState instead of BaseDataVariableTypeState

Steps To Reproduce

Use a reference server and just call FindNodeInAddressSpace on the node manager using the node ID i=68

Environment

- OS: Windows 11
- Environment: VS 2022
- Runtime: .NET9.0
- Nuget Version:
- Component:1.5.374.158 but same on master
- Server: ReferenceServer or anyother server

Anything else?

It does matter because:

  1. The return C# object type is the wrong type obvioulsy, therefore we cannot rely on the loaded nodes, are there some other cases where the C# object type is invalid?
  2. The test `node is PropertyTypeState' does not work. More generaly, if the stack does not load the object with the correct C# type such simple test cannot be used, then you need to go with attributes, node IDs, etc.
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