Development

<< 点击显示目录 >>

主页  exOS使用助手 > exOS Automation Help >

Development

本章介绍 exOS软件包的开发。

它介绍了基于exOS的软件的整体概念,描述了为系统间通信提供的编程接口,以及exOS软件包所使用的自动部署机制。

 

exOS 软件包

exOS软件包是混合自动化组件的容器,由AR和Linux两部分组成。每个部分的软件模块都以源代码或二进制形式按目标平台的特定格式提供,并与配置选项一起组装到exOS软件包中。每个部件都会自动部署到相应的目标系统,即PLC(AR系统)或exOS目标系统(Linux系统)。

exOS软件包在AS软件工作室的逻辑视图中进行管理。

 

编程

作为exOS软件包一部分的软件模块需要相互通信。因此,exOS提供了数据通信和日志记录机制。

有关这些机制和相应编程API的更多信息,请参阅编程部分。

 

构建链

exOS允许将外部构建步骤集成到AS软件的项目构建中。这样,Linux程序就有可能在每次构建AS项目时进行编译和打包。要启用此功能,需要通过WSL(Windows Subsystem for Linux)等方式访问Linux构建环境。

 

组件生成器

在使用C语言之外的其他编程语言编写Linux软件模块来创建exOS 软件包时,在 exOS API 和所用数据模型之上编写和维护相应语言的封装代码是非常麻烦的。

exOS 组件生成器 是VsCode的一个扩展功能,可自动生成带有Linux和AR接口的混合组件,从而简化了这一步骤。


This chapter explains the development of exOS Packages.

It introduces the overall concept of exOS-based software and describes the programming interfaces provided for the communication between the systems as well as the automatic deployment mechanism utilized by the exOS Packages.

exOS Package

An exOS Package is a container for a Hybrid Automation Component that consist of both, Automation Runtime and Linux parts. The software modules for each part are provided in the target platform specific format in either source or binary form and assembled together with configuration options into the exOS Package. Each part is automatically deployed to the according target system, i.e. either the PLC (Automation Runtime system) or the exOS target (Linux system).

An exOS Package is managed in the Logical View of Automation Studio.

Programming

Software modules that are part of an exOS Package need to communicate with each other. Therefore, a data communication and a logging mechanism are provided along with exOS.

More on those mechanisms and the according programming APIs can be found in the Programming section.

Build chain

exOS allows to integrate external build steps into the Automation Studio project build. This makes it possible to have Linux programs being compiled and packaged with every AS project build. In order to enable this feature, a Linux build environment needs to be accessible, e.g. via WSL (Windows Subsystem for Linux).

Component Generator

When creating exOS Packages with Linux software modules written in another programming language than C, it is cumbersome to write and maintain wrapper code for the according language on top of the exOS API and the used datamodel.

The exOS Component Generator is a VsCode extension that simplifies this step by auto-generating hybrid components with interfaces for Linux and Automation Runtime.