gpt4 book ai didi

opc - "ns=2;s="在 OPC 节点路径中的意义是什么?

转载 作者:行者123 更新时间:2023-12-03 23:08:51 27 4
gpt4 key购买 nike

我注意到所有 OPC 标记 ID 都以 ns=2;s= 为前缀.
可能的 NodeId 值的一些示例是:

  • ns=2;s=AcquisitionTimeRemaining
  • ns=2;s=Status
  • ns=2;s=Time

  • 我想知道这个前缀的意义是什么。

    研究:
    别人 asked this question在一个论坛上。给出的答案是 ns prefix 指定 NodeId 所属的命名空间索引。回答者继续说:

    For weird historical reasons, we assume ns=1 if it’s not explicitly present. Kepware’s Nodes are all in ns=2, so, it must be specified.


    我没有使用“Kepware 的节点”,并且我的命名空间仍设置为 2……这是否总是 2?我找不到任何关于 的信息小号 在前缀代表。

    最佳答案

    ns=2表示命名空间索引 2。
    s=foo表示它是值为“foo”的字符串类型 NodeId。
    NodeId有4种类型:

  • 数字(值为 UI 整数)
  • 字符串(值为字符串)
  • Guid(值是 Guid/UUID)
  • 不透明(值为 ByteString)

  • 此语法借用了用于在 OPC UA XML 编码中对 NodeId 进行编码的语法:
    ns=<namespaceindex>;<type>=<value>
    出现哪些命名空间节点以及有多少命名空间取决于您连接到的服务器。

    关于opc - "ns=2;s="在 OPC 节点路径中的意义是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57562971/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com