OpenCCM - Home Page

Table of contents

  1. Extracting the contents of archive
  2. Contents of archive
  3. Development environment and Prerequesite
  4. Installation
  5. Details on the generator
  6. Building the deployment binaries
  7. Building the tools binaries

Extracting contents of archive

The archive has the following form: "microccm-version.tar.gz", so the user has to uncompress this file by using the command: tar -xvzf microccm-version.tar.gz.

Contents of archive

After deflating, the user obtain a directory called "microccm-version". Inside it, we can find some directories:

DirectoryDescription
binContains all binaries and script for the generators.
generatorsContains the code of the generator.
mpc_configContains the configuration files for MPC tool.
docContains documentation of the generator
examplesContains examples showing how to build a simple component and CCM events.
testsContains tests on some features.
includesContains cpp headers and included IDL files.
libContains all links to shared libraries.
etcContains all configuration files (event temporary one).
servicesContains services (Event etc.) needed by some component features.
toolsContains all the external tools (bzip2, XML tool, TFTP ...)
deploymentContains code to deploy and install component.

Development environment and prerequisite

For the microCCM component framework, the following configuration has been used:

The main configuration used by the generator

  • Operating system: Linux - kernel 2.6 (Fedora Core 3)
  • Platform: intel x86.
  • Compiler: gcc-3.4 or gcc-3.2
  • In order to use the generator, one of the following Interface Repository shall be used:
    • Either, the OpenCCM IFR (with Jacorb ORB)
    • Or, the TAO IFR: ACE 5.4.3 and TAO 1.4.3. The TAO Naming and Event service have to be installed.
  • All Unix commands proposed are tested with Bourne Again SHell (bash).

The resulting code (run-time) is generated for the following configurations:

  • Operating system: Linux - kernel 2.6 (Fedora Core 3)
  • Platform: intel x86.
  • Compiler: gcc-3.4 or gcc-3.2
  • CORBA orb: ACE 5.4.3 and TAO 1.4.3. (shall be already installed)
  • All Unix commands proposed are tested in Bourne Again SHell (bash).

Quick installation process

Introduction

Three steps are necessary to install the framework:

  1. Configuring environment variables,
  2. generating makefiles
  3. finally, compiling the application.

Variables configuration

Before installing the application, the user must configure some environment variables. There are two possibilities: Either the user can type in $microCCM_DIR directory:

        $. ./set_environment.sh
        	

Or, one can execute the following shell commands:

Configuring environment variables for TAO:

	$ export ACE_ROOT=/install/dir/of/TAO/ACE_wrappers
	$ export TAO_ROOT=$ACE_ROOT/TAO
	$ export LD_LIBRARY_PATH=$ACE_ROOT/lib
	$ export PATH=$TAO_ROOT/TAO_IDL:$ACE_ROOT/bin:$PATH
	

Configuring some variables for OpenCCM:

	$ cd  $OPENCCM_INSTALL_DIR/JacORB-2.1/bin
	$ . ./envi.OpenCCM.sh
	

Configuring some variables for microCCM component framework

	$ export microCCM_DIR=$PWD
	$ export PATH=$microCCM_DIR/bin:$PATH
	$ export LD_LIBRARY_PATH=$microCCM_DIR/lib:$LD_LIBRARY_PATH
	

Installing microccm component Framework

In order to create all the executables and libraries the user can proceed this way: in the $microCCM_DIR directory, the user can type

	$ generateMakefiles.sh MCCMGenerator.mwc
	$ make
	

Installing deployment

In $microCCM_DIR/deployment directory you can type:

	
        $ generateMakefiles MCCMDeployment.mwc
        $ make 
        

Installing tests

The events test:

	$ cd $microCCM_DIR/tests/unit/events
	$ generateMakefiles.sh events.mwc
	$ make
	

The components_connection test:

	$ cd $microCCM_DIR/tests/unit/components_connection
	$ generateMakefiles.sh components_connection.mwc
	$ make
	

Generator description

Overview

In this section, we attempt to describe how to generate all the executable files used for the code generation: it takes an idl3 file as parameters. For example "component1.idl3" and generates 3 kinds of files, one for the executors, anbother one for the Component Implementation Framework (CORBA) and finally, a file containing all the interfaces.

The directory generators contains all the source code for the MicroCCM generator.

In order to build the generator, the user has to install TAO and/or OpenCCM before. The generator send CORBA Interface Repository requests to an IR3 server (those one can be provided either from TAO or from OpenCCM), in order to obtain all data defined in the component IDL3 file. Then, thanks to these data, it generates for instance, two types of files: IDL files, and C++ files (containing the executor and CORBA code).

The result of compilation will produce some binaries written in the directory $microCCM_DIR/bin:

  • "idl3_to_idl2.exe": to compile IDL3 files into IDL files.
  • "idl3_to_CORBA.exe": which produces c++ CORBA Component Implementation Framework (CIF) from IDL3 file.
  • "idl3_to_cpp_executors.exe": generates c++ executors used by the component implementation thanks to IDL3 file.

All the objects file concerning this platform, this orb, and this compiler will be written in the directory where the files are compiled.

MPC files in generator's directory

In the directory $microCCM_DIR/generators, the file MCCMGenerator.mpc contains all the configurations to generate the corresponding "Makefile" files. It will generate one Makefile per project. There are five projects:

  • One of them called: libMCCMGenerator, aims to create a library. It generates "Makefile.libMCCMGenerator", which in turn produces a shared library (libMCCMGenerator.so) of the generator’s code itself.
  • The idl3_to_idl2 mpc project generates a makefile (Makefile.idl3_to_ild2), which permits to create idl3_to_idl2.exe binary.
  • the idl3_to_corba project, aims to produce a makefile (Makefile.idl3_to_corba) which permits to create the file idl3_to_corba.exe
  • idl3_to_cpp_executors project, aims to produce a makefile (Makefile.idl3_to_cpp_executors) which permits to create the file idl3_to_cpp_executors.exe
  • idl3_to_idl2_for_intf project, aims to produce a makefile (Makefile.idl3_to_idl2_for_intf) which permits to create the file idl3_to_idl2_for_intf.exe

In order to generate the makefile for the library libMCCMGenerator.so, the mpc project inherits from some base projects: taolib.mpb, mccm_taodefaults.mpb which contains all paths, libaries and includes data, needed to compile a project containing references to TAO libraries such as: PortableServer, libTAO, etc. Among other things, this project use lib_TAO_IFR_Client.so, the TAO shared library, that permits to send IFR requests to the chosen IFR server. Therefore, some specific configurations, dedicated to this project, have been added: library's name, installation directory etc.

MPC files in includes directory

In the directory $microCCM_DIR/includes, the MPC file contains all the configurations to generate the corresponding "Makefile" files. It will generate one Makefile per project. The project "libComponentStubsTAO" produces "Makefile.libComponentStubsTAO". In turn, it creates stubs and skeleton from the LightWeight component IDL2 file (Lw_component.idl) for TAO, and creates the shared library "libComponentStubsTAO.so".

MWC file and Makefile generation for MicroCCM generator

The user launches the "Makefile" generation, using perl scripts mpc.pl and mwc.pl (those located in the $microCCM_DIR/bin directory). The user doesn't need to invoke them directly, mwc.pl perl program is invoked by a script called generateMakefiles.sh (in $microCCM_DIR/bin directory) with all the needed parameters. Here is the detail:

	$ $microCCM_DIR/bin/mwc.pl -type make \
	-template mccm_make \
	-value_template soext=so -include $microCCM_DIR/config_mpc/templates \
	-include $microCCM_DIR/config_mpc/base_projects
	

In the $microCCM_DIR directory, the workspace file, MCCMGenerator.mwc contains all the needed projects allowing to generate the right makefiles, which in turn creates all MicroCCM code generator libraries and executables, i.e. those located in includes and generators directories. Hence, all Makefiles can be generated by executing the following command:

	$ generateMakefiles.sh MCCMGenerator.mwc

Compilation process

Once the makefiles (Makefile and Makefile.MCCMGenerator) has been generated in the $microCCM_DIR directory, the user can simply type the following command:

	$ make

Then all the needed libraries will be installed in the $microCCM_DIR/lib directory, and the binaries will be installed in the $microCCM_DIR/bin directory.

Building the deployment binaries

Overview

All the files directly involved in the creation of deployment binaries are located in $microCCM_DIR/deployment.

  • $microCCM_DIR/deployment/HomeFinder contains the needed files to create HomeFinder executable, which permits to register and retrieve all the components Homes via CORBA calls. It has been installed in $microCCM_Dir/bin directory.
  • $microCCM_DIR/deployment/Component_Loader contains the needed files to create Component_Loader.exe executable, which permits to register all the components Home via Homefinder and load all components and services shared libraries. It is installed in $microCCM_Dir/bin directory.
  • $microCCM_DIR/deployment/doc which contains all the doc files.

Compiling process

In $microCCM_DIR/deployment directory you can type:

	
        $ generateMakefiles MCCMDeployment.mwc
        $ make 
        

Building the tool libraries

Overview

Inside the $microCCM_DIR/tools directory, the user can find three subdirectories:

  • TinyXML: this is a tool used by deployment in order to parse XML files.
  • Bzip2: this is a tool used by deployment in order to compress/uncompress shared object files.
  • Tftp: This is a tool which implements client and server running with Trivial FTP protocol. This is used when deployment phase is transferring data.

Compilation process

Inside the directory $microCCM_DIR/tools type:

        $ generateMakefiles.sh MakeLibTools.mwc
        $ make
 

Copyright Thales 2003-2005.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster | Last modified at 2005-07-07 02:04 PM