本页内容

QOpcUaQualifiedName Class

OPC UA 的 QualifiedName 类型。更多内容...

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

公共函数

QOpcUaQualifiedName()
QOpcUaQualifiedName(quint16 namespaceIndex, const QString &name)
QOpcUaQualifiedName(const QOpcUaQualifiedName &rhs)
QString name() const
quint16 namespaceIndex() const
void setName(const QString &name)
void setNamespaceIndex(quint16 namespaceIndex)
operator QVariant() const
QOpcUaQualifiedName &operator=(const QOpcUaQualifiedName &rhs)
bool operator==(const QOpcUaQualifiedName &rhs) const
(since 6.3) QDebug operator<<(QDebug debug, const QOpcUaQualifiedName &name)

详细说明

这是对 OPC UA 1.05 第 3 部分 8.3 中定义的 OPC UA QualifiedName 类型的Qt OPC UA 表示形式。QualifiedName 是一个由命名空间索引修饰的名称。该命名空间索引对应于服务器命名空间数组中的一个条目。 QualifiedName 主要用于表示节点的 BrowseName 属性。

成员函数文档

QOpcUaQualifiedName::QOpcUaQualifiedName()

Default 会构建一个未设置任何参数的限定名。

QOpcUaQualifiedName::QOpcUaQualifiedName(quint16 namespaceIndex, const QString &name)

构建一个全限定名,其命名空间索引为namespaceIndex ,名称为name 。

QOpcUaQualifiedName::QOpcUaQualifiedName(const QOpcUaQualifiedName &rhs)

根据rhs 构建一个限定名。

QString QOpcUaQualifiedName::name() const

返回名称。

另请参阅 ` setName()`。

quint16 QOpcUaQualifiedName::namespaceIndex() const

返回命名空间索引。

另请参阅 setNamespaceIndex()。

void QOpcUaQualifiedName::setName(const QString &name)

将名称设置为name 。

另请参阅 name()。

void QOpcUaQualifiedName::setNamespaceIndex(quint16 namespaceIndex)

将命名空间索引设置为namespaceIndex 。

另请参阅 namespaceIndex()。

QOpcUaQualifiedName::operator QVariant() const

将此限定名转换为QVariant 。

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

将rhs 中的值设置到此限定名中。

bool QOpcUaQualifiedName::operator==(const QOpcUaQualifiedName &rhs) const

如果该限定名称的值与 `rhs` 相同,则返回 `true `。

相关的非成员

[since 6.3] QDebug operator<<(QDebug debug, const QOpcUaQualifiedName &name)

将符合条件的name 写入debug 输出。

该函数在 Qt 6.3 中引入。

另请参阅 QDebug 。

© 2026 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.