QOpcUaExpandedNodeId Class
OPC UA ExpandedNodeId。更多
头文件: | #include <QOpcUaExpandedNodeId> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
qmake: | QT += opcua |
公共函数
QOpcUaExpandedNodeId() | |
QOpcUaExpandedNodeId(const QString &nodeId) | |
QOpcUaExpandedNodeId(const QString &namespaceUri, const QString &nodeId, quint32 serverIndex = 0) | |
QOpcUaExpandedNodeId(const QOpcUaExpandedNodeId &rhs) | |
QString | namespaceUri() const |
QString | nodeId() const |
quint32 | serverIndex() const |
void | setNamespaceUri(const QString &namespaceUri) |
void | setNodeId(const QString &nodeId) |
void | setServerIndex(quint32 serverIndex) |
QVariant | operator QVariant() const |
QOpcUaExpandedNodeId & | operator=(const QOpcUaExpandedNodeId &rhs) |
bool | operator==(const QOpcUaExpandedNodeId &rhs) const |
详细说明
扩展节点 id 是一个节点 id,其中的命名空间索引可以是索引或字符串 URI。服务器上的命名空间及其索引列表由QOpcUaClient::namespaceArray() 提供。
成员函数文档
QOpcUaExpandedNodeId::QOpcUaExpandedNodeId()
默认构造一个未设置参数的扩展节点 ID。
QOpcUaExpandedNodeId::QOpcUaExpandedNodeId(const QString &nodeId)
根据节点 id 字符串构建扩展节点 idnodeId 。
QOpcUaExpandedNodeId::QOpcUaExpandedNodeId(const QString &namespaceUri, const QString &nodeId, quint32 serverIndex = 0)
根据命名空间 URInamespaceUri 、节点 id 字符串nodeId 和服务器索引serverIndex 构建扩展节点 id。
另请参见 setServerIndex 。
QOpcUaExpandedNodeId::QOpcUaExpandedNodeId(const QOpcUaExpandedNodeId &rhs)
从rhs 构建扩展节点 id。
QString QOpcUaExpandedNodeId::namespaceUri() const
返回节点 id 的命名空间 URI。如果指定了该值,则nodeId 中的命名空间索引为 0,必须忽略。
另请参见 setNamespaceUri()。
QString QOpcUaExpandedNodeId::nodeId() const
返回节点 ID。如果指定了namespaceUri ,则命名空间索引无效。
另请参见 setNodeId().
quint32 QOpcUaExpandedNodeId::serverIndex() const
返回包含节点的服务器索引。该索引映射到服务器的服务器表中的一个条目。本地服务器的索引总是0
。所有远程服务器的索引都大于0
。
另请参阅 setServerIndex()。
void QOpcUaExpandedNodeId::setNamespaceUri(const QString &namespaceUri)
将命名空间 URI 设置为namespaceUri 。
另请参阅 namespaceUri() 。
void QOpcUaExpandedNodeId::setNodeId(const QString &nodeId)
将节点 id 设为nodeId 。
另请参阅 nodeId() 。
void QOpcUaExpandedNodeId::setServerIndex(quint32 serverIndex)
将服务器索引设置为serverIndex 。本地服务器的索引始终为0
。所有远程服务器的索引都大于0
。
另请参阅 serverIndex() 。
QVariant QOpcUaExpandedNodeId::operator QVariant() const
将此扩展节点 id 转换为QVariant 。
QOpcUaExpandedNodeId &QOpcUaExpandedNodeId::operator=(const QOpcUaExpandedNodeId &rhs)
在此扩展节点 id 中设置rhs 中的值。
bool QOpcUaExpandedNodeId::operator==(const QOpcUaExpandedNodeId &rhs) const
如果此扩展节点 id 的值与rhs 相同,则返回true
。
© 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.