QOpcUaWriteResult Class

This class stores the result of a write operation. More...

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

Public Functions

QOpcUaWriteResult(const QOpcUaWriteResult &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)
void setStatusCode(QOpcUa::UaStatusCode statusCode)
QOpcUa::UaStatusCode statusCode() const
QOpcUaWriteResult &operator=(const QOpcUaWriteResult &rhs)

Detailed Description

A write operation on an OPC UA server returns a status code which describes if the value could be written and if not, for what reason the write has failed.

In addition to the status code returned by the server, this class also contains the node id, the attribute and the index range from the request to enable a client to match the result with a request.

Objects of this class are returned in the QOpcUaClient::writeNodeAttributesFinished() signal and contain the result of a write operation that was part of a QOpcUaClient::writeNodeAttributes() request.

See also QOpcUaClient::writeNodeAttributes(), QOpcUaClient::writeNodeAttributesFinished(), and QOpcUaWriteItem.

Member Function Documentation


Default constructs a write result with no parameters set.

QOpcUaWriteResult::QOpcUaWriteResult(const QOpcUaWriteResult &other)

Constructs a write result from other.

QOpcUa::NodeAttribute QOpcUaWriteResult::attribute() const

Returns the attribute of the write result.

See also setAttribute().

QString QOpcUaWriteResult::indexRange() const

Returns the index range of the write result.

See also setIndexRange().

QString QOpcUaWriteResult::nodeId() const

Returns the node id of the write result.

See also setNodeId().

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

Sets the attribute of the write result to attribute.

See also attribute().

void QOpcUaWriteResult::setIndexRange(const QString &indexRange)

Sets the index range of the write result to indexRange.

See also indexRange().

void QOpcUaWriteResult::setNodeId(const QString &nodeId)

Sets the node id of the write result to nodeId.

See also nodeId().

void QOpcUaWriteResult::setStatusCode(QOpcUa::UaStatusCode statusCode)

Sets the status code of the write result to statusCode.

See also statusCode().

QOpcUa::UaStatusCode QOpcUaWriteResult::statusCode() const

Returns the status code of the write result.

See also setStatusCode().

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

Sets the values from rhs in this write result.

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