<< 点击显示目录 >> 主页 exOS使用助手 > exOS Automation Help > Configuration > exOS Component configuration (.exoscomponent) > Simple example |
下面的示例解释了如何在一个简单的二进制软件包中对文件和服务进行参数化。
示例软件包 WaterTank 包含一个 Linux 本地可执行文件、一个相应的 AR 库和一个使用 AR 库的示例 AR 任务。该软件包在描述文件 WaterTank.exospkg 中进行了说明 。
根据描述文件中的设置,引用该软件包新建的 exOS 组件将如下所示:
文件"部分包含一个引用Linux本地可执行文件的文件条目。文件名指向逻辑视图中相对于exOS软件包的可执行文件名。有了这个条目,部署机制就会负责将文件传输到Linux目标机。根据"更改事件"设置,如果文件发生更改,即新传输到目标机,组件将重新启动。
服务 "部分包含两个条目:一个是启动服务,在启动组件时总是首先执行;另一个是运行服务,在启动服务成功执行后启动。
启动服务的目的是设置传输文件的可执行位。这是必需的,因为文件属性在文件部署过程中不会被保留。
这个 exOS 组件既不包含任何安装服务,也不包含任何删除服务。这是一个将 exOS 与本地 Linux 可执行文件结合使用的非常简单的示例。
The following example explains how files and services are parametrized in a simple binary package.
The example package WaterTank contains a Linux native executable, an according AR library, and a sample AR task using the AR library. The package is described in the according description file WaterTank.exospkg.
According to the settings in the description file, a newly created exOS Component referencing this package will look like the following:
The Files section consists of one file entry that references the Linux native executable file. The file name points to the file name of the executable relative to the exOS Package as seen in the Logical View. Due to this entry, the deployment mechanism will take care of transferring the file to the Linux target. According to the Change event setting, the component shall be restarted, if the file is changed, i.e. newly transferred to the target.
The Services section contains two entries: One is a startup service that is always executed first when starting the component, the other one is a runtime service that is started after successful execution of the startup service.
The purpose of the startup service is to set the executable bit on the transferred file. This is required, since file attributes are not kept during deployment of files.
This exOS component does neither contain any installation nor any removal services. It is a very simple example of using exOS with a native Linux executable.