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.
...
First we create the directory for the IDL:
Code Block | ||
---|---|---|
| ||
> getTemplateForDirectory MODROOT_WS idlHelloComp > cd idlHelloComp/src > touch ../idl/HelloComponent.idl |
...
We then compile and install the IDL definitions:
Code Block | ||||
---|---|---|---|---|
| ||||
make -j> make all install |
The following image depicts the deployment configuration needed:
...
Code Block | ||||
---|---|---|---|---|
| ||||
> getTemplateForDirectory MODROOT_WS pyHelloComp > cd pyHelloComp/src > mkdir ws > touch ws/__init__.py > touch ws/HelloComponentImpl.py |
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
#Client stubs and definitions, such as structs, enums, etc. import workshop #Skeleton infrastructure for server implementation import workshop__POA #Base component implementation from Acspy.Servants.ACSComponent import ACSComponent #Services provided by the container to the component from Acspy.Servants.ContainerServices import ContainerServices #Basic component lifecycle (initialize, execute, cleanUp and aboutToAbort methods) from Acspy.Servants.ComponentLifecycle import ComponentLifecycle class HelloComponentImpl(workshop__POA.HelloComponent, ACSComponent, ContainerServices, ComponentLifecycle): def __init__(self): ACSComponent.__init__(self) ContainerServices.__init__(self) self._logger = self.getLogger() def printHello(self): print("Just printing 'Hello World!'") return "Hello World!" |
Code Block | ||||
---|---|---|---|---|
| ||||
> getTemplateForDirectory MODROOT_WS jHelloComp > cd jHelloComp/src > mkdir -p acsws/workshop/HelloComponentImpl > touch acsws/workshop/HelloComponentImpl/HelloComponentImpl.java > cp ../../idlHelloComp/src/acsws/workshop/HelloComponentImpl/HelloComponentComponentHelper.java.tpl acsws/workshop/HelloComponentImpl/HelloComponentComponentHelper.java |
...
We create the needed directories:
Code Block | ||||
---|---|---|---|---|
| ||||
> getTemplateForDirectory MODROOT_WS cppHelloComp > cd cppHelloComp/src > touch HelloComponentImpl.cpp > touch ../include/HelloComponentImpl.h |
...