Topic RSS15:26, EEST
August 2, 2019
OfflineWhen querying an attribute like `Description` the server responds with a a DataValue that has it’s variant type id set to 0x00 (which is invalid).
See github issue: https://github.com/gopcua/opcu…..issues/283
// jonathan
16:24, EEST
April 3, 2012
OfflineHi,
Correct if I misunderstood.
0x00 is valid, see specification 1.04 Part 6 section 5.2.2.16 Variant and Table 15, it mentions for the EncodingMask the following:
“EncodingMask Byte The type of data encoded in the stream.
A value of 0 specifies a NULL and that no other fields are encoded. …”
I think that was added in 1.04, previously it was sort of assumed.
To my understanding there is at least 3 different ways to encode e.g. a null String. 1) DataValue’s EncodingMask defines no Variant in stream 2) Variant EncodingMask 0 3) The actual null-encoding of a String type (-1 length for the UTF-8 byte array). Yes it is a pain. Basically client applications will have to deal with all of them. Additionally apparently a combination of Null value and Status Good should not be combined, but this is not mentioned in the specification (we’ll fix this at some point, but would like errata or future version to clarify this).
We could maybe improve this in a future version of our Java SDK, which is used to make the Simulation Server (currently SDK is at 4.1.2 and SimulationServer is at 4.0.0), as it is sort of unneeded bytes transmitted, but those code logics are quite old and have been interop tested in IOP workshops.
P.S. There is more than one way to interpret DataValue’s EncodingMask. One way is that a false bit -> not encoded in stream and has this default value, but that is just an option. Second is that if the value would be null, then the bit has to be false
1 Guest(s)

Log In
Register