gopcua / opcua

Native Go OPC-UA library
MIT License
829 stars 253 forks source link

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

Open michelseiler opened 2 months ago

michelseiler commented 2 months ago

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