Hi,
I'm trying to read (on the server application) the value of a property variable; e.g Definition or ValuePrecision, defined for a AnalogItemType variable.
I see the right values on UaExpert (respectively, a string and a double).
I'm using uaserver_read_internal() function to read attributes of the variable and it seems to work: e.g., if I read the UA_ATTRIBUTEID_DATATYPE (14) attribute, I get the result value as a ua_variant with type UA_VT_NODEID (17) and value equal to the node id for the proper type.
If i read the UA_ATTRIBUTEID_VALUE (13) attribute, I get the result value as a ua_variant with type UA_VT_ENCODED_BINARY (26) and I don't know how to use the value.
Is there some information n the documentation, which I overlooked?
Someone could suggest how to get the effective value of the attribute from the result obtained?
Thanks
Reading Value attribute
Moderator: uasdkhpc
-
- Full Member
- Posts: 7
- Joined: 22 Sep 2017, 14:23
Re: Reading Value attribute
The value can be read as a bytestring, with the byte array containing the type of the value followed by the binary encoded value (the byte array is similar to a compacted variant data structure; i.e. without padding bytes).