Nested Arrays

Questions regarding the use of the High Perfomance SDK for Server development

Moderator: uasdkhpc

Post Reply
fczech
Full Member
Full Member
Posts: 6
Joined: 19 Feb 2018, 11:52

Nested Arrays

Post by fczech »

Hi,

lets say we have an array of an array of ints.
For example.:
Nested_IntArray <-- Array(Array(Int))
- NestedIntArray[0] <-- Array(Int)
--- NestedIntArray[0][0] <-- Int
--- NestedIntArray[0][1] <-- Int
- NestedIntArray[1] <-- Array(Int)
.....

And a user wants to read the Nested_IntArray element.

Is it possible to create an ua_variant with arrays that contains this structure?
So that I would use ua_variant_set_array(ua_variant * v, ua_variant_type type, void * values, size_t num) with variant_type = UA_VT_IS_ARRAY (or UA_VT_ARRAYMASK) and num = number of arrays.

Or do I have to add a new datatype (Integerarray) for this and then use this datatype in the ua_variant?

Thanks in advance.

Post Reply