本页内容

WriteItem QML Type

指定要写入服务器的项目。更多...

Import Statement: import QtOpcUa
Since: QtOpcUa 5.13
Status: Deprecated since 6.9

自 QtOpcUa 6.9 起,此类型已被废弃。我们强烈建议不要在新代码中使用它。

属性

详细说明

此类型用于指定将使用Connection::writeNodeAttributes 函数写入服务器的项目。

属性文档

attribute : Constants.NodeAttribute

确定要写入的节点的属性。

indexRange : string

确定要写入的属性的索引范围。如果不需要,请将此属性留空。

nodeId : string

确定要写入的节点的节点 ID。

ns : variant

确定要写入的节点的命名空间。命名空间可以通过名称或索引指定。如果指定了此属性,则节点 ID 中包含的任何命名空间都将被忽略。

serverTimestamp : datetime

为待写入的值设置服务器时间戳。如果服务器时间戳无效,客户端将忽略该时间戳,且不会将其发送至服务器。如果服务器不支持写入时间戳,则该项的写入操作将失败。

sourceTimestamp : datetime

设置要写入的值的源时间戳。如果源时间戳无效,客户端会忽略它,且不会将其发送给服务器。如果服务器不支持写入时间戳,则该项的写入操作将失败。

statusCode : OpcUaStatus

设置要写入的值的状态码。如果未设置状态码,则不会向服务器发送状态码。

value : variant

需要写入的实际数据。

valueType : variant

如果提供了类型信息,则会在将该值转换为 SDK 特定的数据类型时使用该信息。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.