PySide6.QtOpcUa.QOpcUaWriteItem¶
- class QOpcUaWriteItem¶
此类存储写操作的选项。更多…
概要¶
方法¶
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()
注意
本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。
详细描述¶
在OPC UA服务器上的写操作会覆盖服务器上节点属性的整个值或某个索引范围的值。此类包含后端向服务器发出写请求所需的信息。
一个或多个此类的对象组成了
writeNodeAttributes()操作的请求。- __init__()¶
默认构造一个没有设置参数的写入项。
- __init__(other)
- Parameters:
其他 –
QOpcUaWriteItem
从
other创建一个新的写入项。- __init__(nodeId, attribute, value[, type=QOpcUa.Types.Undefined[, indexRange=""]])
- Parameters:
nodeId – str
属性 –
NodeAttributevalue – 对象
type –
类型indexRange – str
为节点
nodeId的属性attribute创建一个写入项。类型为type的值value将被写入到attribute的indexRange位置。- attribute()¶
- Return type:
返回写入项的属性。
另请参阅
- hasStatusCode()¶
- Return type:
布尔
如果已设置要写入值的状态码,则返回true。
- indexRange()¶
- Return type:
字符串
返回写入项的索引范围。
另请参阅
- nodeId()¶
- Return type:
字符串
返回写入项的节点ID。
另请参阅
返回要写入的值的服务器时间戳。
另请参阅
- setAttribute(attribute)¶
- Parameters:
属性 –
NodeAttribute
将写入项的属性设置为
attribute。另请参阅
- setIndexRange(indexRange)¶
- Parameters:
indexRange – str
将写入项的索引范围设置为
indexRange。另请参阅
- setNodeId(nodeId)¶
- Parameters:
nodeId – str
将写入项的节点ID设置为
nodeId。另请参阅
设置要写入
serverTimestamp的服务器时间戳。如果服务器时间戳无效,客户端将忽略它并且不会发送到服务器。如果服务器不支持写入时间戳,此项目的写入操作将失败,状态码为BadWriteNotSupported。另请参阅
设置要写入
sourceTimestamp的值的源时间戳。如果源时间戳无效,客户端将忽略它并且不会发送到服务器。如果服务器不支持写入时间戳,此项目的写入操作将失败,状态码为BadWriteNotSupported。另请参阅
- setStatusCode(statusCode)¶
- Parameters:
statusCode –
UaStatusCode
设置要写入
statusCode的状态码。如果未设置状态码,则不会向服务器发送状态码。另请参阅
将写入项的值类型设置为
type。另请参阅
- setValue(value)¶
- Parameters:
值 – 对象
将写入项的值设置为
value。如果提供了类型信息,setType()将用于将值转换为SDK特定的数据类型。- setValue(value, type)
- Parameters:
value – 对象
type –
类型
设置写入项的值为
和
值的类型为
type。
返回要写入值的源时间戳。
另请参阅
- statusCode()¶
- Return type:
返回要写入值的状态码。
另请参阅
返回写入项值的类型。
另请参阅
- value()¶
- Return type:
对象
返回写入项的值。
另请参阅