En esta página

QOpcUaReadItem Class

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

Encabezado: #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 solicitud de lectura al servidor.

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

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

Documentación de las funciones miembro

QOpcUaReadItem::QOpcUaReadItem()

«Default» crea un elemento de lectura sin parámetros definidos.

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

Crea un elemento de lectura para el rango de índice indexRange del atributo attr del nodo nodeId.

QOpcUaReadItem::QOpcUaReadItem(const QOpcUaReadItem &other)

Crea un elemento de lectura a partir de other.

QOpcUa::NodeAttribute QOpcUaReadItem::attribute() const

Devuelve el atributo «id» 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 identificador 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 de índices en indexRange.

Véase también indexRange().

void QOpcUaReadItem::setNodeId(const QString &nodeId)

Establece el identificador 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.

Elementos no miembros relacionados

[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 valores 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 valores de 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.