- class QOpcUaWriteItem#
This class stores the options for a write operation. More…
Synopsis#
Methods#
def
__init__()
def
attribute()
def
hasStatusCode()
def
indexRange()
def
nodeId()
def
setAttribute()
def
setIndexRange()
def
setNodeId()
def
setStatusCode()
def
setType()
def
setValue()
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
- __init__(other)#
- Parameters:
other –
QOpcUaWriteItem
Creates a new write item from
other
.- __init__(nodeId, attribute, value[, type=QOpcUa.Types.Undefined[, indexRange=""]])
- Parameters:
nodeId – str
attribute –
NodeAttribute
value – object
type –
Types
indexRange – str
Creates a write item for the attribute
attribute
from nodenodeId
. The valuevalue
of typetype
will be written at positionindexRange
ofattribute
.- __init__()
Default constructs a write item with no parameters set.
- attribute()#
- Return type:
Returns the attribute of the write item.
See also
- hasStatusCode()#
- Return type:
bool
Returns true if a status code for the value to write has been set.
- indexRange()#
- Return type:
str
Returns the index range of the write item.
See also
- nodeId()#
- Return type:
str
Returns the node id of the write item.
See also
Returns the server timestamp for the value to write.
See also
- setAttribute(attribute)#
- Parameters:
attribute –
NodeAttribute
Sets the attribute of the write item to
attribute
.See also
- setIndexRange(indexRange)#
- Parameters:
indexRange – str
Sets the index range of the write item to
indexRange
.See also
- setNodeId(nodeId)#
- Parameters:
nodeId – str
Sets the node id of the write item to
nodeId
.See also
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 codeBadWriteNotSupported
.See also
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 codeBadWriteNotSupported
.See also
- 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
- setValue(value)#
- Parameters:
value – object
Sets the value of the write item to
value
. If given, the type information fromsetType()
will be used in converting the value to a SDK specific data type.- setValue(value, type)
- Parameters:
value – object
type –
Types
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.
See also
- 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
- value()#
- Return type:
object
Returns the value of the write item.
See also