QOpcUaReadItem Class

This class stores the options for a read operation. 更多...

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

公共函数

QOpcUaReadItem (const QString & nodeId , QOpcUa::NodeAttribute attr = QOpcUa::NodeAttribute::Value, const QString & indexRange = QString())
QOpcUaReadItem (const QOpcUaReadItem & other )
QOpcUa::NodeAttribute 属性 () const
QString indexRange () const
QString nodeId () const
void setAttribute (QOpcUa::NodeAttribute 属性 )
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 )

详细描述

A read operation on an OPC UA server returns the entire value or a certain index range of the value of an attribute of a node on the server. This class contains the necessary information for the backend to make a read request to the server.

One or multiple objects of this class make up the request of a QOpcUaClient::readNodeAttributes () operation.

另请参阅 QOpcUaClient::readNodeAttributes () 和 QOpcUaReadResult .

成员函数文档编制

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

Constructs a read item for the index range indexRange of the attribute attr of node nodeId .

QOpcUaReadItem:: QOpcUaReadItem (const QOpcUaReadItem & other )

Constructs a read item from other .

QOpcUa::NodeAttribute QOpcUaReadItem:: 属性 () const

Returns the node attribute id.

另请参阅 setAttribute ().

QString QOpcUaReadItem:: indexRange () const

Returns the index range.

另请参阅 setIndexRange ().

QString QOpcUaReadItem:: nodeId () const

Returns the node id.

另请参阅 setNodeId ().

void QOpcUaReadItem:: setAttribute ( QOpcUa::NodeAttribute 属性 )

Sets the node attribute id to attribute .

另请参阅 属性 ().

void QOpcUaReadItem:: setIndexRange (const QString & indexRange )

Sets the index range to indexRange .

另请参阅 indexRange ().

void QOpcUaReadItem:: setNodeId (const QString & nodeId )

Sets the node id to nodeId .

另请参阅 nodeId ().

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

设置值从 rhs in this read item.

相关非成员

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

返回 true if lhs 不等于 rhs ;否则返回 false .

Two read items are considered not equal if their nodeId , 属性 or indexRange are not equal.

bool operator== (const QOpcUaReadItem & lhs , const QOpcUaReadItem & rhs )

返回 true if lhs 等于 rhs ;否则返回 false .

Two read items are considered equal if their nodeId , 属性 ,和 indexRange 相等。