QOpcUaStructureField Class

OPC UA 结构字段类型。更多...

头文件: #include <QOpcUaStructureField>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua
Qt 6.7

公共函数

QOpcUaStructureField(qint32 valueRank = -1)
QOpcUaStructureField(const QOpcUaStructureField &other)
QOpcUaStructureField(QOpcUaStructureField &&other)
~QOpcUaStructureField()
QList<quint32> arrayDimensions() const
QString dataType() const
QOpcUaLocalizedText description() const
bool isOptional() const
quint32 maxStringLength() const
QString name() const
void setArrayDimensions(const QList<quint32> &arrayDimensions)
void setDataType(const QString &dataTypeId)
void setDescription(const QOpcUaLocalizedText &description)
void setIsOptional(bool isOptional)
void setMaxStringLength(quint32 maxStringLength)
void setName(const QString &name)
void setValueRank(qint32 valueRank)
void swap(QOpcUaStructureField &other)
qint32 valueRank() const
QVariant operator QVariant() const
QOpcUaStructureField &operator=(QOpcUaStructureField &&other)
QOpcUaStructureField &operator=(const QOpcUaStructureField &other)
bool operator!=(const QOpcUaStructureField &lhs, const QOpcUaStructureField &rhs)
bool operator==(const QOpcUaStructureField &lhs, const QOpcUaStructureField &rhs)

详细说明

Qt OPC UA 表示 OPC UA 第 3 部分中定义的 OPC UA StructureField 类型。它描述了一个结构化类型的字段。

成员函数文档

[explicit] QOpcUaStructureField::QOpcUaStructureField(qint32 valueRank = -1)

valueRank 构建一个结构域。

QOpcUaStructureField::QOpcUaStructureField(const QOpcUaStructureField &other)

other 中构造一个结构域。

[noexcept] QOpcUaStructureField::QOpcUaStructureField(QOpcUaStructureField &&other)

移动--从other 构建一个新的结构域。

注: moved-from 对象other 处于部分形成状态,在这种状态下,唯一有效的操作是销毁和赋新值。

[noexcept] QOpcUaStructureField::~QOpcUaStructureField()

销毁此结构字段对象。

QList<quint32> QOpcUaStructureField::arrayDimensions() const

返回 struct 字段的数组维数。

另请参见 setArrayDimensions()。

QString QOpcUaStructureField::dataType() const

返回 struct 字段的数据类型节点 ID。

另请参见 setDataType()。

QOpcUaLocalizedText QOpcUaStructureField::description() const

返回结构字段的描述。

另请参见 setDescription()。

bool QOpcUaStructureField::isOptional() const

如果 struct 字段为可选字段,则返回true

另请参见 setIsOptional().

quint32 QOpcUaStructureField::maxStringLength() const

返回 struct 字段的最大字符串长度。

另请参见 setMaxStringLength()。

QString QOpcUaStructureField::name() const

返回 struct 字段的名称。

另请参见 setName()。

void QOpcUaStructureField::setArrayDimensions(const QList<quint32> &arrayDimensions)

将 struct 字段的数组维数设置为arrayDimensions

另请参见 arrayDimensions() 。

void QOpcUaStructureField::setDataType(const QString &dataTypeId)

将 struct 字段的数据类型节点 ID 设置为dataTypeId

另请参阅 dataType() 。

void QOpcUaStructureField::setDescription(const QOpcUaLocalizedText &description)

将 struct 字段的描述值设置为description

另请参见 description() 。

void QOpcUaStructureField::setIsOptional(bool isOptional)

将 struct 字段的可选标志设置为isOptional

另请参阅 isOptional() 。

void QOpcUaStructureField::setMaxStringLength(quint32 maxStringLength)

将 struct 字段的最大字符串长度设置为maxStringLength

另请参见 maxStringLength() 。

void QOpcUaStructureField::setName(const QString &name)

将 struct 字段的名称设置为name

另请参见 name() 。

void QOpcUaStructureField::setValueRank(qint32 valueRank)

将 struct 字段的值等级设置为valueRank

另请参见 valueRank() 。

[noexcept] void QOpcUaStructureField::swap(QOpcUaStructureField &other)

将结构字段对象other 与此结构字段对象互换。这种操作速度非常快,而且不会失败。

qint32 QOpcUaStructureField::valueRank() const

返回 struct 字段的值等级。

另请参见 setValueRank().

QVariant QOpcUaStructureField::operator QVariant() const

将此结构字段转换为QVariant

[noexcept] QOpcUaStructureField &QOpcUaStructureField::operator=(QOpcUaStructureField &&other)

移动--将other 赋值给此QOpcUaStructureField 实例。

注意: 从移动对象other 将处于部分形成状态,其中唯一有效的操作是销毁和赋新值。

QOpcUaStructureField &QOpcUaStructureField::operator=(const QOpcUaStructureField &other)

在此结构字段中设置other 的值。

相关非成员

[noexcept] bool operator!=(const QOpcUaStructureField &lhs, const QOpcUaStructureField &rhs)

返回true lhs 不等于rhs

[noexcept] bool operator==(const QOpcUaStructureField &lhs, const QOpcUaStructureField &rhs)

返回true lhs 等于rhs

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.