Programming

<< 点击显示目录 >>

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

Programming

exOS 允许创建一个由自动化运行模块和 Linux 模块组成的软件包。该软件包的每个模块都可以在最适合的系统上执行。

实例化这样一个 exOS 软件包意味着在两个平台上执行软件模块。由多个进程/任务及其特定配置组成的一个实例可视为一个混合自动化组件。因此,这种实例被称为exOS Component.

 

数据通信

属于一个 exOS 软件包  的所有软件模块都使用  exOS 的数据通信机制 。它主要用于在模块之间交换过程数据,此外还提供状态信息和同步等基础服务。

最好的做法是让 exOS 软件包在每一方都以其特定领域的形式表示其全部功能。这意味着,例如,一个 IEC 功能块可能是 IEC 程序员与 Linux 上运行的算法的接口,反之亦然,一个 C++ 类可能是 Linux 程序员与 "运动和 I/O 控制器 "的接口。

这种本地的、特定领域的接口完全独立于各个模块之间的数据通信。

HybridComponent

exOS 通信 API 为数据通信机制提供接口。它与平台无关,对自动化运行时和 Linux 应用程序具有相同的接口。

 

日志记录

此外,exOS 还实现了中央、全 系统日志 机制。它允许 exOS 软件包的所有软件模块(AR 和 Linux 软件)向中央日志记录器发送日志信息,而与模块运行的实际系统无关。

日志机制支持五种日志级别(ERROR、 WARNING、 SUCCESS、 INFO、 DEBUG)和三种日志类型(USER、 SYSTEM、 VERBOSE),以提供精细的粒度。信息过滤在源式(日志记录过程)进行,以防止不必要的流量。

所有配置选项都可以在项目配置中预先设置,也可以在应用程序运行时覆盖。

Logging

exOS 日志 API 为日志机制提供了接口。它与平台无关,对自动化运行时和 Linux 应用程序具有相同的接口。


exOS allows to create one software package that consists of both Automation Runtime and Linux modules. Each module of this software package may be implemented on that system where it fits best.

Instantiating such an exOS Package means to execute the software modules on the two platforms. One instance consisting of several processes/tasks with their specific configuration, can be seen as a single hybrid automation component. Therefore, such an instance is called an exOS Component.

Data communication

All software modules belonging to one exOS Package are using the data communication mechanism of exOS. It mainly allows to exchange process data between the modules, but additionally provides infrastructural services such as status information and synchronization.

Best practice is to let the exOS Package represent its whole functionality on each side in its domain-specific form. That means that e.g. an IEC function block may be the interface of an IEC programmer to an algorithm running on Linux, or - vice-versa - a C++ class may be the interface for a Linux programmer towards a "motion and I/O controller".

This local, domain-specific interface is completely independent of the data communication between the respective modules.

HybridComponent

The exOS Communication API provides the interface to the data communication mechanism. It is platform independent and has the same interface for Automation Runtime and Linux applications.

Logging

Additionally, exOS implements a central, system-wide logging mechanism. It allows all software modules of an exOS Package (AR and Linux software) to send log messages to a central logger independent of the actual system the modules are running on.

The logging mechanism supports five log levels (ERROR, WARNING, SUCCESS, INFO, DEBUG) and three log types (USER, SYSTEM, VERBOSE) in order to provide fine granularity. Filtering of messages takes place at the source (the logging process) to prevent unnecessary traffic.

All configuration options can be pre-set in the project configuration and overridden during the runtime of an application.

Logging

The exOS Log API provides the interface to the logging mechanism. It is platform independent and has the same interface for Automation Runtime and Linux applications.