QOpcUaWriteItem#

This class stores the options for a write operation. More

Inheritance diagram of PySide6.QtOpcUa.QOpcUaWriteItem

Synopsis#

Functions#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

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 writeNodeAttributes() operation.

class PySide6.QtOpcUa.QOpcUaWriteItem#

PySide6.QtOpcUa.QOpcUaWriteItem(other)

PySide6.QtOpcUa.QOpcUaWriteItem(nodeId, attribute, value[, type=QOpcUa.Types.Undefined[, indexRange=””]])

Parameters:

Creates a new write item from other.

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.

PySide6.QtOpcUa.QOpcUaWriteItem.attribute()#
Return type:

NodeAttribute

Returns the attribute of the write item.

See also

setAttribute()

PySide6.QtOpcUa.QOpcUaWriteItem.hasStatusCode()#
Return type:

bool

Returns true if a status code for the value to write has been set.

PySide6.QtOpcUa.QOpcUaWriteItem.indexRange()#
Return type:

str

Returns the index range of the write item.

See also

setIndexRange()

PySide6.QtOpcUa.QOpcUaWriteItem.nodeId()#
Return type:

str

Returns the node id of the write item.

See also

setNodeId()

PySide6.QtOpcUa.QOpcUaWriteItem.serverTimestamp()#
Return type:

PySide6.QtCore.QDateTime

Returns the server timestamp for the value to write.

PySide6.QtOpcUa.QOpcUaWriteItem.setAttribute(attribute)#
Parameters:

attributeNodeAttribute

Sets the attribute of the write item to attribute.

See also

attribute()

PySide6.QtOpcUa.QOpcUaWriteItem.setIndexRange(indexRange)#
Parameters:

indexRange – str

Sets the index range of the write item to indexRange.

See also

indexRange()

PySide6.QtOpcUa.QOpcUaWriteItem.setNodeId(nodeId)#
Parameters:

nodeId – str

Sets the node id of the write item to nodeId.

See also

nodeId()

PySide6.QtOpcUa.QOpcUaWriteItem.setServerTimestamp(serverTimestamp)#
Parameters:

serverTimestampPySide6.QtCore.QDateTime

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 .

PySide6.QtOpcUa.QOpcUaWriteItem.setSourceTimestamp(sourceTimestamp)#
Parameters:

sourceTimestampPySide6.QtCore.QDateTime

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 .

PySide6.QtOpcUa.QOpcUaWriteItem.setStatusCode(statusCode)#
Parameters:

statusCodeUaStatusCode

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()

PySide6.QtOpcUa.QOpcUaWriteItem.setType(type)#
Parameters:

typeTypes

Sets the type of the value of the write item to type.

See also

type()

PySide6.QtOpcUa.QOpcUaWriteItem.setValue(value)#
Parameters:

value – object

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() setType()

PySide6.QtOpcUa.QOpcUaWriteItem.setValue(value, type)
Parameters:
  • value – object

  • typeTypes

Sets the value of the write item to

  • and

  • the type of the value to type.

PySide6.QtOpcUa.QOpcUaWriteItem.sourceTimestamp()#
Return type:

PySide6.QtCore.QDateTime

Returns the source timestamp for the value to write.

PySide6.QtOpcUa.QOpcUaWriteItem.statusCode()#
Return type:

UaStatusCode

Returns the status code for the value to write.

See also

setStatusCode()

PySide6.QtOpcUa.QOpcUaWriteItem.type()#
Return type:

Types

Returns the type of the value of the write item.

See also

setType()

PySide6.QtOpcUa.QOpcUaWriteItem.value()#
Return type:

object

Returns the value of the write item.

See also

setValue()