Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Install component's IDL

Note
In case you haven't done this step already, you must Build and install IDL first.

Create component

Code Block
languagebash
cd ~/workspace
getTemplateForDirectory MODROOT_WS cppHelloComp
cd cppHelloComp/src
touch HelloComponentImpl.cpp
touch ../include/HelloComponentImpl.h
vim Makefile

...

Compile component

Code Block
languagebash
export INTROOT=~/workspace/introot
export LD_LIBRARY_PATH=$INTROOT/lib:$LD_LIBRARY_PATH
make all install

Add component to CDB

...

Code Block
languagebash
titleComponents.xml
<e Name="HelloWorldCPP"
   Code="HelloComponentImpl"
                        Type="IDL:acsws/workshop/HelloComponent:1.0"
                        Container="bilboContainer" ImplLang="cpp" />

...

Code Block
languagepy
title~/workspace/client.py
from Acspy.Clients.SimpleClient import PySimpleClient
 
client = PySimpleClient()
 
hc_cppcomponent = client.getComponent("HelloWorldCPP")

print(hc_cppcomponent.printHello())

Run component:

...