The proxy component relies on the Performance.Measurement port that is part of the TAU CCA pacage installed in the directory $TAU_CMPT_ROOT. To enable the use of an externally-defined entity in your project, the SIDL type of this remote entity needs to be added to the bocca-generated build system. This can be done by adding a line of the form
CCA_TYPE_$(ENTITY_NAME) = ENTITY_TYPE
to the file components/make.vars.user in your project, where ENTITY_TYPE can be one of the values interface, port, class, or component.
In this case, we will be making use of the Performance.Measurement port. This means that, using your favorite editor, you will need to add the line
CCA_TYPE_Performance.Measurement = port
to the end of the file components/make.vars.user. You can then use Bocca to create the proxy component for the Integration port using the following command :
$
bocca create component IntegratorProxy
\
--language=cxx
\
--provides=Integration@IntegrationProvide
\
--uses=Integration@IntegrationUse
\
--uses=Performance.Measurement@measurement@/$TAU_CMPT_ROOT/ports/Performance-1.7.3/Performance.sidl
Babel updating the cxx implementation of component demo.IntegratorProxy ...
Build the proxy component library:
$
make
make[1]: Entering directory `/home/livetau/workshop-acts/cca/WORK/tutorial-src/doc/scratch/cxx/demo' # ======================================================================= # Building in external/, languages: cxx # ======================================================================= ## Building external... [c] using Babel to generate cxx client code for Performance.Measurement... [c] creating library: libPerformance.Measurement-cxx.la... [c] installing Performance.sidl [c] building /home/livetau/workshop-acts/cca/WORK/tutorial-src/doc/scratch/cxx/demo/install/share/cca/demo/Performance.Measurement_depl.xml ... 31321 # ======================================================================= # Building in ports/, languages: cxx # ======================================================================= ## Building ports... # ======================================================================= # Building in components/clients/, languages: cxx # ======================================================================= ## Building clients... # ======================================================================= # Building in components/, languages: cxx # ======================================================================= [s] Building class/component demo.Driver: doing nothing -- library is up-to-date. [s] Building class/component demo.Function: doing nothing -- library is up-to-date. [s] Building class/component demo.Integrator: doing nothing -- library is up-to-date. [s] Building class/component demo.IntegratorProxy: [s] using Babel to generate cxx implementation code from demo.IntegratorProxy.sidl... [s] compiling sources... [s] creating class/component library: libdemo.IntegratorProxy.la ... [s] finished libtooling: components/demo.IntegratorProxy/libdemo.IntegratorProxy.la ... [s] building /home/livetau/workshop-acts/cca/WORK/tutorial-src/doc/scratch/cxx/demo/install/share/cca/demo/demo.IntegratorProxy_depl.xml ... [s] creating Ccaffeine test script (components/tests/instantiation.gen.rc)... [s] Building class/component demo.emptyComponent: doing nothing -- library is up-to-date. Build summary: SUCCESS building demo.IntegratorProxy ### To test instantiation of successfully built components, run 'make check' ### ################ Finished building everything ################# ####### You can run some simple tests with 'make check' ####### make[1]: Leaving directory `/home/livetau/workshop-acts/cca/WORK/tutorial-src/doc/scratch/cxx/demo'
This will give us a new component, called IntegratorProxy that implements the Integration .
2010-08-11