QOpcUaQualifiedName Class

OPC UA 限定名称类型。更多

头文件: #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)
QVariant 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()

默认情况下构建一个不带参数的限定名称。

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() 。

QVariant 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

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