QOpcUaWriteItem#
This class stores the options for a write operation. More…
Synopsis#
Functions#
- def - attribute()
- def - hasStatusCode()
- def - indexRange()
- def - nodeId()
- def - serverTimestamp()
- def - setAttribute(attribute)
- def - setIndexRange(indexRange)
- def - setNodeId(nodeId)
- def - setServerTimestamp(serverTimestamp)
- def - setSourceTimestamp(sourceTimestamp)
- def - setStatusCode(statusCode)
- def - setType(type)
- def - setValue(value)
- def - setValue(value, type)
- def - sourceTimestamp()
- def - statusCode()
- def - type()
- def - value()
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.
See also
- class PySide6.QtOpcUa.QOpcUaWriteItem#
- PySide6.QtOpcUa.QOpcUaWriteItem(other) - PySide6.QtOpcUa.QOpcUaWriteItem(nodeId, attribute, value[, type=QOpcUa.Types.Undefined[, indexRange=””]]) - Parameters:
- nodeId – str 
- attribute – - NodeAttribute
- indexRange – str 
- other – - PySide6.QtOpcUa.QOpcUaWriteItem
- type – - Types
- value – object 
 
 
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:
 
Returns the attribute of the write item.
See also
- 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
- PySide6.QtOpcUa.QOpcUaWriteItem.nodeId()#
- Return type:
- str 
 
Returns the node id of the write item.
See also
- PySide6.QtOpcUa.QOpcUaWriteItem.serverTimestamp()#
- Return type:
 
Returns the server timestamp for the value to write.
See also
- PySide6.QtOpcUa.QOpcUaWriteItem.setAttribute(attribute)#
- Parameters:
- attribute – - NodeAttribute
 
Sets the attribute of the write item to attribute.
See also
- PySide6.QtOpcUa.QOpcUaWriteItem.setIndexRange(indexRange)#
- Parameters:
- indexRange – str 
 
Sets the index range of the write item to indexRange.
See also
- PySide6.QtOpcUa.QOpcUaWriteItem.setNodeId(nodeId)#
- Parameters:
- nodeId – str 
 
Sets the node id of the write item to nodeId.
See also
- PySide6.QtOpcUa.QOpcUaWriteItem.setServerTimestamp(serverTimestamp)#
- Parameters:
- serverTimestamp – - PySide6.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 .
See also
- PySide6.QtOpcUa.QOpcUaWriteItem.setSourceTimestamp(sourceTimestamp)#
- Parameters:
- sourceTimestamp – - PySide6.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 .
See also
- PySide6.QtOpcUa.QOpcUaWriteItem.setStatusCode(statusCode)#
- Parameters:
- statusCode – - UaStatusCode
 
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
Sets the type of the value of the write item to type.
See also
- 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.
- PySide6.QtOpcUa.QOpcUaWriteItem.setValue(value, type)
- Parameters:
- value – object 
- type – - Types
 
 
Sets the value of the write item to
and
the type of the value to
type.
- PySide6.QtOpcUa.QOpcUaWriteItem.sourceTimestamp()#
- Return type:
 
Returns the source timestamp for the value to write.
See also
- PySide6.QtOpcUa.QOpcUaWriteItem.statusCode()#
- Return type:
 
Returns the status code for the value to write.
See also
Returns the type of the value of the write item.
See also
- PySide6.QtOpcUa.QOpcUaWriteItem.value()#
- Return type:
- object 
 
Returns the value of the write item.
See also