En esta página

QOpcUaReadItem Class

Esta clase almacena las opciones de una operación de lectura. Más...

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

Funciones públicas

QOpcUaReadItem()
QOpcUaReadItem(const QString &nodeId, QOpcUa::NodeAttribute attr = QOpcUa::NodeAttribute::Value, const QString &indexRange = QString())
QOpcUaReadItem(const QOpcUaReadItem &other)
QOpcUa::NodeAttribute attribute() const
QString indexRange() const
QString nodeId() const
void setAttribute(QOpcUa::NodeAttribute attribute)
void setIndexRange(const QString &indexRange)
void setNodeId(const QString &nodeId)
QOpcUaReadItem &operator=(const QOpcUaReadItem &rhs)
bool operator!=(const QOpcUaReadItem &lhs, const QOpcUaReadItem &rhs)
bool operator==(const QOpcUaReadItem &lhs, const QOpcUaReadItem &rhs)

Descripción detallada

Una operación de lectura en un servidor OPC UA devuelve el valor completo o un determinado rango de índices del valor de un atributo de un nodo del servidor. Esta clase contiene la información necesaria para que el backend realice una petición de lectura al servidor.

Uno o varios objetos de esta clase componen la petición de una operación QOpcUaClient::readNodeAttributes().

Véase también QOpcUaClient::readNodeAttributes() y QOpcUaReadResult.

Documentación de funciones miembro

QOpcUaReadItem::QOpcUaReadItem()

Por defecto construye un elemento de lectura sin parámetros establecidos.

QOpcUaReadItem::QOpcUaReadItem(const QString &nodeId, QOpcUa::NodeAttribute attr = QOpcUa::NodeAttribute::Value, const QString &indexRange = QString())

Construye un elemento de lectura para el rango de índices indexRange del atributo attr del nodo nodeId.

QOpcUaReadItem::QOpcUaReadItem(const QOpcUaReadItem &other)

Construye un elemento de lectura a partir de other.

QOpcUa::NodeAttribute QOpcUaReadItem::attribute() const

Devuelve el id del atributo del nodo.

Véase también setAttribute().

QString QOpcUaReadItem::indexRange() const

Devuelve el rango de índices.

Véase también setIndexRange().

QString QOpcUaReadItem::nodeId() const

Devuelve el id del nodo.

Véase también setNodeId().

void QOpcUaReadItem::setAttribute(QOpcUa::NodeAttribute attribute)

Establece el atributo id del nodo en attribute.

Véase también attribute().

void QOpcUaReadItem::setIndexRange(const QString &indexRange)

Establece el rango del índice en indexRange.

Véase también indexRange().

void QOpcUaReadItem::setNodeId(const QString &nodeId)

Establece el id del nodo en nodeId.

Véase también nodeId().

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

Establece los valores de rhs en este elemento de lectura.

Relacionados No miembros

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

Devuelve true si lhs no es igual a rhs; en caso contrario devuelve false.

Se considera que dos elementos leídos no son iguales si sus nodeId, attribute o indexRange no son iguales.

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

Devuelve true si lhs es igual a rhs; en caso contrario devuelve false.

Dos elementos leídos se consideran iguales si sus nodeId, attribute, y indexRange son iguales.

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