Information
We are currently investigating an issue with the editor of some pages. Please save your work and avoid to create new pages until this banner is gone.
The IDL (Interface Definition Language) file is the component's definition. It contains the functions the component exposes and the interface it must implement, regardless of the language in which is implemented.
In this link you can find details about IDL syntax and definitions.
For any given component we have to follow 3 steps:
So, we create the component's IDL directory and file
In this tutorial we will write and run example ACS modules in Python, Java and C++.. First we must perform some configurations on ACS before coding our components.
Visit ACS Directory Structure#INTROOT for full details.
Code Block | ||
---|---|---|
| ||
export INTROOT=~/workspace/introot
getTemplateForDirectory INTROOT $INTROOT |
First we create the directory for the IDL:
Code Block | ||
---|---|---|
| ||
cd ~/workspace getTemplateForDirectory MODROOT_WS idlHelloComp cd idlHelloComp/src touch ../idl/HelloComponent.idl sudo nanovim ../idl/HelloComponent.idl |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#ifndef _HELLOCOMPONENT_IDL_ #define _HELLOCOMPONENT_IDL_ #pragma prefix "acsws" #include <acscomponent.idl> module workshop { interface HelloComponent : ACS::ACSComponent { string printHello(); }; }; #endif |
We modify add our component's IDL to the Makefile:
Code Block | ||
---|---|---|
| ||
vim ~/workspace/idlHelloComp/src/Makefile |
Code Block | ||
---|---|---|
| ||
... IDL_FILES = HelloComponent HelloComponentStubs_LIBS = acscomponentStubs ... COMPONENT_HELPERS=on ... |
...
Code Block | ||
---|---|---|
| ||
make -j all install |