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 () | |
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 .
Default constructs a read item with no parameters set.
Constructs a read item for the index range indexRange of the attribute attr of node nodeId .
Constructs a read item from other .
Returns the node attribute id.
另请参阅 setAttribute ().
Returns the index range.
另请参阅 setIndexRange ().
Returns the node id.
另请参阅 setNodeId ().
Sets the node attribute id to 属性 .
另请参阅 属性 ().
Sets the index range to indexRange .
另请参阅 indexRange ().
Sets the node id to nodeId .
另请参阅 nodeId ().
设置值从 rhs in this read item.
[noexcept]
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.
[noexcept]
bool
operator==
(const
QOpcUaReadItem
&
lhs
, const
QOpcUaReadItem
&
rhs
)
返回
true
if
lhs
等于
rhs
;否则返回
false
.
Two read items are considered equal if their
nodeId
,
属性
,和
indexRange
相等。