This class stores the options for a write operation. More...
Header: | #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.
See also QOpcUaClient::writeNodeAttributes() and QOpcUaWriteResult.
Creates a write item for the attribute attribute from node nodeId. The value value of type type will be written at position indexRange of attribute.
Creates a new write item from other.
Sets the values from rhs in this write item.
Returns the attribute of the write item.
See also setAttribute().
Returns true if a status code for the value to write has been set.
Returns the index range of the write item.
See also setIndexRange().
Returns the node id of the write item.
See also setNodeId().
Returns the server timestamp for the value to write.
See also setServerTimestamp().
Sets the attribute of the write item to attribute.
See also attribute().
Sets the index range of the write item to indexRange.
See also indexRange().
Sets the node id of the write item to nodeId.
See also 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.
See also 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.
See also 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.
See also statusCode().
Sets the type of the value of the write item to type.
See also 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.
See also value() and setType().
Sets the value of the write item to
Constant | Description |
---|---|
and |
the type of the value to type. |
Returns the source timestamp for the value to write.
See also setSourceTimestamp().
Returns the status code for the value to write.
See also setStatusCode().
Returns the type of the value of the write item.
See also setType().
Returns the value of the write item.
See also setValue().
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.2/qopcuawriteitem.html