class QOpcUaMultiDimensionalArray

A container class for multidimensional arrays. More

Synopsis

Methods

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:

otherQOpcUaMultiDimensionalArray

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 dimensions arrayDimensions.

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.

arrayIndex(indices)
Parameters:

indices – .list of quint32

Return type:

int

Returns the array index in valueArray() of the element identified by indices. If indices is invalid for the array or if the array’s dimensions don’t match the size of valueArray() , the invalid index -1 is returned.

isValid()
Return type:

bool

Returns true if the multidimensional array is valid

__eq__(other)
Parameters:

otherQOpcUaMultiDimensionalArray

Return type:

bool

Returns true if this multidimensional array has the same value as other.

setArrayDimensions(arrayDimensions)
Parameters:

arrayDimensions – .list of quint32

Sets the dimensions of the multidimensional array to arrayDimensions.

setValue(indices, value)
Parameters:
  • indices – .list of quint32

  • value – object

Return type:

bool

Sets the value at position indices to value. Returns true if the value has been successfully set.

See also

value()

setValueArray(valueArray)
Parameters:

valueArray – .list of QVariant

Sets the value array of the multidimensional array to value.

See also

valueArray()

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

setValue()

valueArray()
Return type:

.list of QVariant

Returns the value array of the multidimensional array.

See also

setValueArray()

valueArrayRef()
Return type:

.list of QVariant

Returns a reference to the value array of the multidimensional array.