Nesta página

QOpcUaReadItem Class

Esta classe armazena as opções para uma operação de leitura. Mais...

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

Funções 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)

Descrição detalhada

Uma operação de leitura em um servidor OPC UA retorna o valor completo ou um determinado intervalo de índices do valor de um atributo de um nó no servidor. Esta classe contém as informações necessárias para que o backend faça uma solicitação de leitura ao servidor.

Um ou mais objetos desta classe compõem a solicitação de uma operação QOpcUaClient::readNodeAttributes().

Veja também ` QOpcUaClient::readNodeAttributes()` e ` QOpcUaReadResult`.

Documentação das funções-membro

QOpcUaReadItem::QOpcUaReadItem()

O `default` cria um item de leitura sem parâmetros definidos.

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

Cria um item de leitura para o intervalo de índice indexRange do atributo attr do nó nodeId.

QOpcUaReadItem::QOpcUaReadItem(const QOpcUaReadItem &other)

Cria um item de leitura a partir de ` other`.

QOpcUa::NodeAttribute QOpcUaReadItem::attribute() const

Retorna o atributo id do nó.

Veja também setAttribute().

QString QOpcUaReadItem::indexRange() const

Retorna o intervalo de índices.

Veja também setIndexRange().

QString QOpcUaReadItem::nodeId() const

Retorna o ID do nó.

Veja também setNodeId().

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

Define o atributo id do nó como attribute.

Veja também attribute().

void QOpcUaReadItem::setIndexRange(const QString &indexRange)

Define o intervalo de índices como indexRange.

Veja também indexRange().

void QOpcUaReadItem::setNodeId(const QString &nodeId)

Define o ID do nó como nodeId.

Veja também nodeId().

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

Define os valores de rhs neste item de leitura.

Não-membros relacionados

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

Retorna ` true ` se ` lhs ` não for igual a ` rhs`; caso contrário, retorna ` false`.

Dois itens lidos são considerados diferentes se seus valores de nodeId, attribute ou indexRange não forem iguais.

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

Retorna ` true ` se ` lhs ` for igual a ` rhs`; caso contrário, retorna ` false`.

Dois itens lidos são considerados iguais se seus valores de nodeId, attribute e indexRange forem iguais.

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