In some cases it would be much more performant to use primitive arrays (int[], double[], etc.) instead of object arrays (Integer[], etc.) in Variant. Currently Variant does not accept primitive types even for arrays, to keep things simple, but this optimisation would be possible. The main question is what should BinaryDecoder do with these: which ones should it decode by default?
The confusion may arise, if Variant.compositeClass() gives Integer.class for scalar values, but int.class for the respective arrays, even though the UA DataType for the variables is the same (Int32).
Probably best would be to keep this optional, especially the BinaryDecoder part, so that the application developer can choose which array alternatives are provided by the stack.
In some cases it would be much more performant to use primitive arrays (int[], double[], etc.) instead of object arrays (Integer[], etc.) in Variant. Currently Variant does not accept primitive types even for arrays, to keep things simple, but this optimisation would be possible. The main question is what should BinaryDecoder do with these: which ones should it decode by default?
The confusion may arise, if Variant.compositeClass() gives Integer.class for scalar values, but int.class for the respective arrays, even though the UA DataType for the variables is the same (Int32).