简体   繁体   English

Eclipse Milo:如何定义复杂数据类型?

[英]Eclipse Milo: How to define Complex Datatypes?

I am currently implementing a server to emulate a PLC. 我目前正在实现服务器以模拟PLC。 The connection to this PLC is done via OPC-UA. 通过OPC-UA可以连接到该PLC。 The interface is provided by a thrid party and contains several custom datatypes. 该接口由第三方提供,并且包含几种自定义数据类型。

Examples: 例子:

[Point]
Int32 x
Int32 y

[PhysicalObject]
Int32 id
String name
Point location

(both Point and PhysicalObject are datatypes) (Point和PhysicalObject都是数据类型)

Is it possible to define such structures in Milo, both client and server? 是否可以在Milo(客户端和服务器)中定义此类结构? I could not find anything related in the examples. 我在示例中找不到任何相关内容。 I already had a look over the sources, it seems that at least the foundations are there. 我已经查看了消息来源,似乎至少有基金会。 But being new to OPC UA it is not so easy to figure out if how it is supposed to work. 但是,对于OPC UA来说,它并不陌生,因此很难弄清楚它应该如何工作。

With the 0.2 release it's possible to define structures for use when both the client and server know about them ahead of time. 在0.2版本中,可以定义当客户端和服务器都提前知道它们时要使用的结构。 It's not yet possible to define structures that are discoverable by independent clients. 尚无法定义独立客户端可以发现的结构。

The 0.3 release series will focus on the server SDK, and allowing the import of an XML NodeSet is on the TODO list. 0.3版本系列将重点放在服务器SDK上,并且允许在TODO列表上导入XML NodeSet。 This will allow you to use a modeling tool such as UaModeler to define your structured types, export the model to XML, and then import that model into the server. 这将允许您使用诸如UaModeler之类的建模工具来定义结构化类型,将模型导出为XML,然后将该模型导入服务器。 This is important because the modeling tool will generate the content of the DataTypeDictionary that describes your custom types, which is what allows a client without advanced knowledge to discover and decode these custom structures. 这很重要,因为建模工具将生成描述您的自定义类型的DataTypeDictionary的内容,这使没有高级知识的客户端可以发现和解码这些自定义结构。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM