This class stores the options for a write operation. 更多...
头: | #include <QOpcUaWriteItem> |
qmake: | QT += opcua |
QOpcUaWriteItem (const QString & nodeId , QOpcUa::NodeAttribute attribute , const QVariant & value , QOpcUa::Types type = QOpcUa::Types::Undefined, const QString & indexRange = QString()) | |
QOpcUaWriteItem (const QOpcUaWriteItem & other ) | |
QOpcUaWriteItem & | operator= (const QOpcUaWriteItem & rhs ) |
QOpcUa::NodeAttribute | attribute () const |
bool | hasStatusCode () const |
QString | indexRange () const |
QString | nodeId () const |
QDateTime | serverTimestamp () const |
void | setAttribute (QOpcUa::NodeAttribute attribute ) |
void | setIndexRange (const QString & indexRange ) |
void | setNodeId (const QString & nodeId ) |
void | setServerTimestamp (const QDateTime & serverTimestamp ) |
void | setSourceTimestamp (const QDateTime & sourceTimestamp ) |
void | setStatusCode (QOpcUa::UaStatusCode statusCode ) |
void | setType (QOpcUa::Types type ) |
void | setValue (const QVariant & value ) |
void | setValue (const QVariant & value , QOpcUa::Types type ) |
QDateTime | sourceTimestamp () const |
QOpcUa::UaStatusCode | statusCode () const |
QOpcUa::Types | type () const |
QVariant | value () const |
A write operation on an OPC UA server overwrites 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 write request to the server.
One or multiple objects of this class make up the request of a QOpcUaClient::writeNodeAttributes () operation.
另请参阅 QOpcUaClient::writeNodeAttributes () 和 QOpcUaWriteResult .
Creates a write item for the attribute attribute from node nodeId 。值 value 类型 type will be written at position indexRange of attribute .
Creates a new write item from other .
设置值从 rhs in this write item.
Returns the attribute of the write item.
另请参阅 setAttribute ().
Returns true if a status code for the value to write has been set.
Returns the index range of the write item.
另请参阅 setIndexRange ().
Returns the node id of the write item.
另请参阅 setNodeId ().
Returns the server timestamp for the value to write.
另请参阅 setServerTimestamp ().
Sets the attribute of the write item to attribute .
另请参阅 attribute ().
Sets the index range of the write item to indexRange .
另请参阅 indexRange ().
Sets the node id of the write item to nodeId .
另请参阅 nodeId ().
Sets the server timestamp for the value to write to serverTimestamp . If the server timestamp is invalid, it is ignored by the client and not sent to the server. If the server doesn't support writing timestamps, the write operation for this item will fail with status code BadWriteNotSupported .
另请参阅 serverTimestamp ().
Sets the source timestamp for the value to write to sourceTimestamp . If the source timestamp is invalid, it is ignored by the client and not sent to the server. If the server doesn't support writing timestamps, the write operation for this item will fail with status code BadWriteNotSupported .
另请参阅 sourceTimestamp ().
Sets the status code for the value to write to statusCode . If no status code is set, no status code is sent to the server.
另请参阅 statusCode ().
Sets the type of the value of the write item to type .
另请参阅 type ().
Sets the value of the write item to value . If given, the type information from setType () will be used in converting the value to a SDK specific data type.
Sets the value of the write item to
常量 | 描述 |
---|---|
and
|
the type of the value to type . |
Returns the source timestamp for the value to write.
另请参阅 setSourceTimestamp ().
Returns the status code for the value to write.
另请参阅 setStatusCode ().
Returns the type of the value of the write item.
另请参阅 setType ().
Returns the value of the write item.
另请参阅 setValue ().