QOpcUaRelativePathElement Class

OPC UA RelativePathElement(OPC UA 相对路径元素)。更多

头文件: #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) QVariant 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 ,引用类型节点 idrefType ,两个标志均设置为false

QOpcUaRelativePathElement::QOpcUaRelativePathElement(const QOpcUaRelativePathElement &rhs)

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

bool QOpcUaRelativePathElement::includeSubtypes() const

返回 includeSubtypes 标志的值。

另请参见 setIncludeSubtypes()。

bool QOpcUaRelativePathElement::isInverse() const

返回 isInverse 标志的值。

另请参见 setIsInverse()。

QString QOpcUaRelativePathElement::referenceTypeId() const

返回连接此节点和前一个节点的引用的类型 ID。

另请参见 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, "DataType")。

另请参阅 targetName() 。

QOpcUaQualifiedName QOpcUaRelativePathElement::targetName() const

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

另请参阅 setTargetName()。

[since 6.7] QVariant 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

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