- class QOpcUaMultiDimensionalArray¶
A container class for multidimensional arrays. More…
Synopsis¶
Methods¶
def
__init__()
def
arrayIndex()
def
isValid()
def
__eq__()
def
setValue()
def
setValueArray()
def
value()
def
valueArray()
def
valueArrayRef()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
This class manages arrays of Qt OPC UA types with associated array dimensions information. It is returned as value when a multidimensional array is received from the server. It can also be used as a write value or as parameter for filters and method calls.
- __init__()¶
Default constructs a multi dimensional array with no parameters set.
- __init__(arrayDimensions)
- Parameters:
arrayDimensions – .list of quint32
Creates a multidimensional array with preallocated data fitting
arrayDimensions
.- __init__(other)
- Parameters:
other –
QOpcUaMultiDimensionalArray
Constructs a multidimensional array from
other
.- __init__(valueArray, arrayDimensions)
- Parameters:
valueArray – .list of QVariant
arrayDimensions – .list of quint32
Constructs a multidimensional array with value
value
and array dimensionsarrayDimensions
.- arrayDimensions()¶
- Return type:
.list of quint32
Returns the dimensions of the multidimensional array. The element at position n contains the length of the n-th dimension.
See also
- arrayIndex(indices)¶
- Parameters:
indices – .list of quint32
- Return type:
int
Returns the array index in
valueArray()
of the element identified byindices
. Ifindices
is invalid for the array or if the array’s dimensions don’t match the size ofvalueArray()
, the invalid index-1
is returned.- isValid()¶
- Return type:
bool
Returns
true
if the multidimensional array is valid- __eq__(other)¶
- Parameters:
other –
QOpcUaMultiDimensionalArray
- Return type:
bool
Returns
true
if this multidimensional array has the same value asother
.- setArrayDimensions(arrayDimensions)¶
- Parameters:
arrayDimensions – .list of quint32
Sets the dimensions of the multidimensional array to
arrayDimensions
.See also
- setValue(indices, value)¶
- Parameters:
indices – .list of quint32
value – object
- Return type:
bool
Sets the value at position
indices
tovalue
. Returnstrue
if the value has been successfully set.See also
- setValueArray(valueArray)¶
- Parameters:
valueArray – .list of QVariant
Sets the value array of the multidimensional array to
value
.See also
- value(indices)¶
- Parameters:
indices – .list of quint32
- Return type:
object
Returns the value of the element identified by
indices
. If the indices are invalid for the array, an empty QVariant is returned.See also
- valueArray()¶
- Return type:
.list of QVariant
Returns the value array of the multidimensional array.
See also
- valueArrayRef()¶
- Return type:
.list of QVariant
Returns a reference to the value array of the multidimensional array.