本页内容

QOpcUaRelativePathElement Class

OPC UA 的 RelativePathElement。更多内容...

标题: #include <QOpcUaRelativePathElement>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua

公共函数

QOpcUaRelativePathElement()
QOpcUaRelativePathElement(const QOpcUaQualifiedName &target, QOpcUa::ReferenceTypeId refType)
QOpcUaRelativePathElement(const QOpcUaQualifiedName &target, const QString &refType)
QOpcUaRelativePathElement(const QOpcUaRelativePathElement &rhs)
bool includeSubtypes() const
bool isInverse() const
QString referenceTypeId() const
void setIncludeSubtypes(bool includeSubtypes)
void setIsInverse(bool isInverse)
void setReferenceTypeId(QOpcUa::ReferenceTypeId referenceTypeId)
void setReferenceTypeId(const QString &referenceTypeId)
void setTargetName(const QOpcUaQualifiedName &targetName)
QOpcUaQualifiedName targetName() const
(since 6.7) operator QVariant() const
QOpcUaRelativePathElement &operator=(const QOpcUaRelativePathElement &rhs)
(since 6.7) bool operator!=(const QOpcUaRelativePathElement &lhs, const QOpcUaRelativePathElement &rhs)
bool operator==(const QOpcUaRelativePathElement &lhs, const QOpcUaRelativePathElement &rhs)

详细说明

QOpcUaRelativePathElement 定义了 OPC UA 服务器上相对路径的一个元素。在调用QOpcUaNode::resolveBrowsePath() 时,此元素用于将浏览路径解析为节点 ID。

成员函数文档

QOpcUaRelativePathElement::QOpcUaRelativePathElement()

构建一个相对路径元素,并将两个标志都设置为false 。

QOpcUaRelativePathElement::QOpcUaRelativePathElement(const QOpcUaQualifiedName &target, QOpcUa::ReferenceTypeId refType)

构建一个相对路径元素,其targetName 为target ,QOpcUa::ReferenceTypeId 为refType ,且这两个标志均设置为false 。

QOpcUaRelativePathElement::QOpcUaRelativePathElement(const QOpcUaQualifiedName &target, const QString &refType)

创建一个相对路径元素,其targetName 为target ,引用类型节点ID为refType ,且两个标志均设置为false 。

QOpcUaRelativePathElement::QOpcUaRelativePathElement(const QOpcUaRelativePathElement &rhs)

根据rhs 构建一个相对路径元素。

bool QOpcUaRelativePathElement::includeSubtypes() const

返回 includeSubtypes 标志的值。

另请参阅 ` setIncludeSubtypes()`。

bool QOpcUaRelativePathElement::isInverse() const

返回 isInverse 标志的值。

另请参阅 ` setIsInverse()`。

QString QOpcUaRelativePathElement::referenceTypeId() const

返回连接该节点与前一个节点的引用所对应的类型标识符。

另请参阅 setReferenceTypeId()。

void QOpcUaRelativePathElement::setIncludeSubtypes(bool includeSubtypes)

将includeSubtypes 标志设置为includeSubtypes 。如果该标志为true ,则查找过程还会追踪具有referenceTypeId()子类型的引用。

另请参阅 includeSubtypes()。

void QOpcUaRelativePathElement::setIsInverse(bool isInverse)

将isInverse 标志设置为isInverse 。如果该标志为true ,则查找将遵循反向引用。

另请参阅 isInverse()。

void QOpcUaRelativePathElement::setReferenceTypeId(QOpcUa::ReferenceTypeId referenceTypeId)

将引用类型 id 设置为referenceTypeId 。

另请参阅 referenceTypeId()。

void QOpcUaRelativePathElement::setReferenceTypeId(const QString &referenceTypeId)

将引用类型 id 设置为referenceTypeId 。

void QOpcUaRelativePathElement::setTargetName(const QOpcUaQualifiedName &targetName)

将目标名称设置为targetName ,例如QOpcUaQualifiedName(0, "DataTypes")。

另请参阅 targetName()。

QOpcUaQualifiedName QOpcUaRelativePathElement::targetName() const

返回引用目标的限定名称。

另请参阅 setTargetName()。

[since 6.7] QOpcUaRelativePathElement::operator QVariant() const

返回一个包含此相对路径元素的QVariant 。

该函数在 Qt 6.7 中引入。

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

设置此相对路径元素中rhs 的值。

相关的非成员

[noexcept, since 6.7] bool operator!=(const QOpcUaRelativePathElement &lhs, const QOpcUaRelativePathElement &rhs)

如果 `lhs ` 的值与 `rhs` 不一致,则返回 `true `。

该函数在 Qt 6.7 中引入。

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

如果 `lhs ` 与 `rhs` 的值相同,则返回 `true `。

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