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

nil pointer when reading data with ua-datatype TypeIDNull #722

Closed
michelseiler opened this issue Apr 25, 2024 · 0 comments · Fixed by #756
Closed

nil pointer when reading data with ua-datatype TypeIDNull #722

michelseiler opened this issue Apr 25, 2024 · 0 comments · Fixed by #756
Milestone

Comments

@michelseiler
Copy link

Steps to reproduce:

  1. Connect to opc.tcp://milo.digitalpetri.com:62541/milo (Anonymous, no security)
  2. Read NodeId ns=2;s=NullValues/Int16
  3. The Result of this Node, ua.DataValue.Value of type *ua.Variant, will be nil

Expected behaviour:

Instead of a nil pointer I expect a pointer to a Variant with the ua-datatype TypeIDNull. It should be the same as when I create the Variant with ua.NewVariant(nil).
Thanks

magiconair added a commit that referenced this issue Dec 9, 2024
This patch ensures that DataValue.Value contains a Variant(nil) if there
is no value.

Closes #722
magiconair added a commit that referenced this issue Dec 9, 2024
This patch ensures that DataValue.Value contains a Variant(nil) if there
is no value.

Closes #722
@magiconair magiconair added this to the v0.6.1 milestone Dec 9, 2024
magiconair added a commit that referenced this issue Dec 10, 2024
Issue #722: Set DataValue.Value to Variant(nil) for no value
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

Successfully merging a pull request may close this issue.

2 participants