Page 1 of 1

Initial value of attributes of a BaseDataVariable node

Posted: 25 Jul 2018, 07:50
by AnnieFYWu
Hi,

If I want to create an one dimension array BaseDataVariable node, and the array with 3 items. Do I need to set the "ArrayDimensions" attribute to 3?
How about the initial value of the "Value" attribute(include the timestamp and value)?

Thanks.

Re: Initial value of attributes of a BaseDataVariable node

Posted: 30 Aug 2018, 12:21
by Support Team
For an one dimensional array with length 3 the attributes need to be set like this:
ValueRank=1
ArrayDimensions = [ 3 ]

ArrayDimensions is just the maximum length possible for this variable.
The actual value can always be shorted.
The value itself contains the length of the array data.

> How about the initial value of the "Value" attribute(include the timestamp and value)?
I'm not sure what you mean with that.
If the problem is that you don't have an initial value, you can set the StatusCode
to UA_SCBADWAITINGFORINITIALDATA, value=empty, timestamp=time when you set this information.