Datamodel description

<< 点击显示目录 >>

主页  exOS使用助手 > exOS Automation Help > Development > Programming > Data communication >

Datamodel description

exOS使用IECTYPE描述文件作为IDL(接口描述语言),为数据报文路由器和应用程序接口生成所需的信息模型。这与ApacheThrift、WSDL或Google协议缓冲区类似。

Thrift或protobuf使用代码生成的函数来访问报文数据,而exOS则访问本地C结构

因此,通信数据模型可以直接作为一致的结构体转发。

在自动化运行时,数据可以作为过程变量公开。

BasicPrinciple

数据模型由IEC.typ文件生成,该文件描述了流程公开的所有成员和子结构。API使用预处理器生成包含所有数据类型和exos_datamodel_connect_函数的C开头。有关详细信息,请参阅exOS 构建链


exOS uses an IEC TYPE description file as IDL (interface description language) to generate the needed information model on the Data Message Router and for the API. This is similar to Apache Thrift, WSDL or Google protocol buffers.

Whereas Thrift or protobuf use code-generated functions to access the data of a telegram, exOS accesses native C-structures.

The communicated data model can therefore be forwarded directly as consistent structs.

In Automation Runtime, the data can be exposed as Process Variables.

BasicPrinciple

The datamodel is generated from an IEC .typ file which describes all members and substructures that the process exposes. The API uses a pre-processor to generate a C-header with all datatypes and an exos_datamodel_connect_ function. Please see the exOS build-chain for more information on that.