本页内容

QOpcUaXValue Class

OPC UA XVType。更多内容...

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

公共函数

QOpcUaXValue()
QOpcUaXValue(double x, float value)
QOpcUaXValue(const QOpcUaXValue &rhs)
void setValue(float value)
void setX(double x)
float value() const
double x() const
operator QVariant() const
QOpcUaXValue &operator=(const QOpcUaXValue &rhs)
bool operator==(const QOpcUaXValue &rhs) const

详细说明

这是对OPC UA 1.05第8部分5.6.8节中定义的OPC UA XVType类型的Qt OPC UA 表示形式。该类型用于在双精度轴上定位浮点精度的值。

成员函数文档

QOpcUaXValue::QOpcUaXValue()

默认情况下,会构建一个未设置任何参数的 XValue 对象。

QOpcUaXValue::QOpcUaXValue(double x, float value)

根据位置x 和值value 构建一个 XValue 对象。

QOpcUaXValue::QOpcUaXValue(const QOpcUaXValue &rhs)

根据rhs 构建一个XValue。

void QOpcUaXValue::setValue(float value)

将位置 x 的值设置为value 。

另请参阅 value()。

void QOpcUaXValue::setX(double x)

将该值在坐标轴上的位置设置为x 。

另请参阅 x()。

float QOpcUaXValue::value() const

返回位置 x 处的值。

另请参阅 setValue()。

double QOpcUaXValue::x() const

返回该值在坐标轴上的位置。

另请参阅 setX()。

QOpcUaXValue::operator QVariant() const

将此 XValue 转换为QVariant 。

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

将rhs 中的值设置到此XValue中。

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

如果该 XValue 的值与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.