Display example README

  • To download the code of this example please refer to the SVN repository at $CIAO_ROOT/examples/Display.

  • Example Description

    This example is an imaginary car (software) instrument assembly which updates the display of current coordination of the airplane periodically. It consists of the following three components:

    The files you will find.

  • 1. The interfaces, data types and exceptions used by the components of this application are specified in the Display_Base.idl file, placed in this example root directory ($CIAO_ROOT/examples/Display_Base). This is a IDL file and uses the familiar CORBA data types. The lib generated from Display_Base.idl is linked to all the components of this example.

  • 2. mpc files for each of the components are available in the components directories. We use the MPC to generate makefiles and Visual C++ project/solutions files for all ACE, TAO and CIAO libraries.
  • 3. idl files for each component are placed in components directory.
  • 4. The _exec.h and _exec.cpp files are the actual implementation of the components.
  • 5. The NavDisplayGUI_exec directory: The NavDisplayGUI_exec.cpp is just an executor version for NavDisplay. In NavDisplayGUI_exec directory you'll find only the the NavDisplayGUI_exec (and files for the GUI), which can be deployed with the NavDisplay stub and servant. So, if you deploy the NavDisplay component using NavDisplay_exec you'll be able to see the application running in the shell you triggered the NodeDaemon, and if you deploy the NavDisplay component using NavDisplayGUI_exec a graphical interface will show you a red dot moving over a map according to the location being generated by GPS component when you start the application. Notice that the NavDisplayGUI.mpc file includes qt, used for graphical interface. You must give the right location of qt libraries in your mpc file. For windows also set QT_CFG=4.
  • 6. The controller: The RateGencomponent is started and stopped by the controller, a CORBA client application. The controller source is in RateGen directory, so the RateGen.mpc file also include instructions for the controller build.

  • Make

  • Go to the directory $CIAO_ROOT/examples/Display and do:
    $ACE_ROOT/bin/mwc.pl (use -type option if you are using a compiler/IDE other than gnuace -which by default generates GNU makefiles)

  • For example, using %ACE_ROOT%/bin/mwc.pl -type vc9 if you are using Visual C++ 2008 IDE.

    Assemble

    Now we can step forward to build the assembly.
  • In the descriptor subdirectory, you'll find XML descriptor files that describes your deployment plan, the *deploymentplan*.cdp's:
    This file declaratively specifies how the component assembly is constructed. Specifically, it specifies the component types, component instances, component connections and implementation artifact descriptions.

  • Please make sure that the Modified_Deployment.xsd and XMI.xsd files are in the Display/descriptors directory. The former file could be found in $CIAO_ROOT/docs/schema directory.
  •  


    Run

    Finally you are ready to test the application you have made. From different shells in $CIAO_ROOT/examples/Display/descriptors/ directory:

    To run in console mode:
    To run in GUI mode with one GPS component:
    To run in GUI mode with three GPS and RateGen components:
    To experience in GUI mode (or console mode) with a different number of GPS and RateGen components:

    Email:
    ciao-users@list.isis.vanderbilt.edu