PySide6.QtOpcUa.QOpcUaWriteResult

class QOpcUaWriteResult

此类存储写操作的结果。更多

概要

方法

注意

本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。

详细描述

在OPC UA服务器上的写操作会返回一个状态码,该状态码描述了值是否可以被写入,如果不能,则说明写入失败的原因。

除了服务器返回的状态码外,此类还包含节点ID、属性以及请求中的索引范围,以便客户端能够将结果与请求匹配。

此类的对象在writeNodeAttributesFinished()信号中返回,并包含作为writeNodeAttributes()请求一部分的写入操作的结果。

__init__()

默认构造一个没有设置参数的写入结果。

__init__(other)
Parameters:

其他QOpcUaWriteResult

other构造一个写入结果。

attribute()
Return type:

NodeAttribute

返回写入结果的属性。

另请参阅

setAttribute()

indexRange()
Return type:

字符串

返回写入结果的索引范围。

另请参阅

setIndexRange()

nodeId()
Return type:

字符串

返回写入结果的节点ID。

另请参阅

setNodeId()

setAttribute(attribute)
Parameters:

属性NodeAttribute

将写入结果的属性设置为 attribute

另请参阅

attribute()

setIndexRange(indexRange)
Parameters:

indexRange – str

将写入结果的索引范围设置为indexRange

另请参阅

indexRange()

setNodeId(nodeId)
Parameters:

nodeId – str

将写入结果的节点ID设置为nodeId

另请参阅

nodeId()

setStatusCode(statusCode)
Parameters:

statusCodeUaStatusCode

将写入结果的状态码设置为 statusCode

另请参阅

statusCode()

statusCode()
Return type:

UaStatusCode

返回写入结果的状态码。

另请参阅

setStatusCode()