QOpcUaMultiDimensionalArray Class

A container class for multidimensional arrays. 更多...

头: #include <QOpcUaMultiDimensionalArray>
qmake: QT += opcua

公共函数

QOpcUaMultiDimensionalArray (const QVector<quint32> & arrayDimensions )
QOpcUaMultiDimensionalArray (const QVariantList & value , const QVector<quint32> & arrayDimensions )
QOpcUaMultiDimensionalArray (const QOpcUaMultiDimensionalArray & other )
QOpcUaMultiDimensionalArray & operator= (const QOpcUaMultiDimensionalArray & rhs )
QVector<quint32> arrayDimensions () const
int arrayIndex (const QVector<quint32> & indices ) const
bool isValid () const
void setArrayDimensions (const QVector<quint32> & arrayDimensions )
bool setValue (const QVector<quint32> & indices , const QVariant & value )
void setValueArray (const QVariantList & value )
QVariant value (const QVector<quint32> & indices ) const
QVariantList valueArray () const
QVariantList & valueArrayRef ()
QVariant operator QVariant () const
bool operator== (const QOpcUaMultiDimensionalArray & other ) const

详细描述

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.

成员函数文档编制

QOpcUaMultiDimensionalArray:: QOpcUaMultiDimensionalArray (const QVector < quint32 > & arrayDimensions )

Creates a multidimensional array with preallocated data fitting arrayDimensions .

QOpcUaMultiDimensionalArray:: QOpcUaMultiDimensionalArray (const QVariantList & value , const QVector < quint32 > & arrayDimensions )

Constructs a multidimensional array with value value and array dimensions arrayDimensions .

QOpcUaMultiDimensionalArray:: QOpcUaMultiDimensionalArray (const QOpcUaMultiDimensionalArray & other )

Constructs a multidimensional array from other .

QOpcUaMultiDimensionalArray &QOpcUaMultiDimensionalArray:: operator= (const QOpcUaMultiDimensionalArray & rhs )

设置值从 rhs in the multidimensional array.

QVector < quint32 > QOpcUaMultiDimensionalArray:: arrayDimensions () const

Returns the dimensions of the multidimensional array. The element at position n contains the length of the n-th dimension.

另请参阅 setArrayDimensions ().

int QOpcUaMultiDimensionalArray:: arrayIndex (const QVector < quint32 > & indices ) const

Returns the array index in valueArray () of the element identified by indices 。若 indices is invalid for the array or if the array's dimensions don't match the size of valueArray (), the invalid index -1 被返回。

bool QOpcUaMultiDimensionalArray:: isValid () const

返回 true if the multidimensional array is valid

void QOpcUaMultiDimensionalArray:: setArrayDimensions (const QVector < quint32 > & arrayDimensions )

Sets the dimensions of the multidimensional array to arrayDimensions .

另请参阅 arrayDimensions ().

bool QOpcUaMultiDimensionalArray:: setValue (const QVector < quint32 > & indices , const QVariant & value )

Sets the value at position indices to value 。返回 true if the value has been successfully set.

另请参阅 value ().

void QOpcUaMultiDimensionalArray:: setValueArray (const QVariantList & value )

Sets the value array of the multidimensional array to value .

另请参阅 valueArray ().

QVariant QOpcUaMultiDimensionalArray:: value (const QVector < quint32 > & indices ) const

Returns the value of the element identified by indices . If the indices are invalid for the array, an empty QVariant 被返回。

另请参阅 setValue ().

QVariantList QOpcUaMultiDimensionalArray:: valueArray () const

Returns the value array of the multidimensional array.

另请参阅 setValueArray ().

QVariantList &QOpcUaMultiDimensionalArray:: valueArrayRef ()

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

QVariant QOpcUaMultiDimensionalArray:: operator QVariant () const

Converts this multidimensional array to QVariant .

bool QOpcUaMultiDimensionalArray:: operator== (const QOpcUaMultiDimensionalArray & other ) const

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