QOpcUaEUInformation Class

OPC UA EURange 类型。更多

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

公共函数

QOpcUaEUInformation()
QOpcUaEUInformation(const QString &namespaceUri, qint32 unitId, const QOpcUaLocalizedText &displayName, const QOpcUaLocalizedText &description)
QOpcUaEUInformation(const QOpcUaEUInformation &rhs)
QOpcUaLocalizedText description() const
QOpcUaLocalizedText displayName() const
QString namespaceUri() const
void setDescription(const QOpcUaLocalizedText &description)
void setDisplayName(const QOpcUaLocalizedText &displayName)
void setNamespaceUri(const QString &namespaceUri)
void setUnitId(qint32 unitId)
qint32 unitId() const
QVariant operator QVariant() const
QOpcUaEUInformation &operator=(const QOpcUaEUInformation &rhs)
bool operator==(const QOpcUaEUInformation &rhs) const

详细说明

这是 OPC UA 1.05 第 8 部分 5.6.3 中定义的 OPC UA EUInformation 类型的Qt OPC UA 表示法。EUInformation 值包含有关单位的信息,主要用作具有数值属性的节点的属性。这些信息可用于为 GUI 元素添加文本和工具提示。

成员函数文档

QOpcUaEUInformation::QOpcUaEUInformation()

默认情况下构建一个未设置参数的 EU 信息。

QOpcUaEUInformation::QOpcUaEUInformation(const QString &namespaceUri, qint32 unitId, const QOpcUaLocalizedText &displayName, const QOpcUaLocalizedText &description)

构建一个 EUinformation,其命名空间 URI 为namespaceUri ,单元 id 为unitId ,显示名称为displayName ,描述为description

QOpcUaEUInformation::QOpcUaEUInformation(const QOpcUaEUInformation &rhs)

rhs 构建一个 EUinformation。

QOpcUaLocalizedText QOpcUaEUInformation::description() const

返回单位描述,例如摄氏度

另请参阅 setDescription()。

QOpcUaLocalizedText QOpcUaEUInformation::displayName() const

返回单位的显示名称,例如°C

另请参阅 setDisplayName()。

QString QOpcUaEUInformation::namespaceUri() const

返回单元的命名空间 URI。

另请参见 setNamespaceUri()。

void QOpcUaEUInformation::setDescription(const QOpcUaLocalizedText &description)

将单位描述设置为description

另请参阅 description() 。

void QOpcUaEUInformation::setDisplayName(const QOpcUaLocalizedText &displayName)

将设备的显示名称设置为displayName

另请参阅 displayName() 。

void QOpcUaEUInformation::setNamespaceUri(const QString &namespaceUri)

将单元的命名空间 URI 设置为namespaceUri

另请参阅 namespaceUri() 。

void QOpcUaEUInformation::setUnitId(qint32 unitId)

将单位的机器可读标识符设置为unitId

另请参阅 unitId() 。

qint32 QOpcUaEUInformation::unitId() const

返回单位的机器可读标识符。

另请参阅 setUnitId()。

QVariant QOpcUaEUInformation::operator QVariant() const

将此欧盟信息转换为QVariant

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

在此 EUinformation 中设置rhs 的值。

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

如果此 EUinformation 的值与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.