How to install Ada Language Support and run DDS Ada examples

Note: Applies to RTI Connext DDS 5.2.0 and above.

For the purposes of this article we will assume that:

To install RTI Ada Language Support, you must first install RTI Connext DDS, which consists of the host files and target packages files. In other words, you must install: 

  • 5.3.0 64-bit Linux host files 
    • For instance - rti_connext_dds-5.3.0-pro-host-x64Linux.run
  • 5.3.0 x64Linux2.6gcc4.4.5 target libraries
    • For instance - rti_connext_dds-5.3.0-pro-target-x64Linux2.6gcc4.4.5

Afterwards, you can install rti_ada_language_support-5.3.0-x64Linux2.6gcc4.4.5.rtipkg.

RTI Connext DDS comes with 4 Ada examples located in /home/<user>/rti_workspace/5.3.0/examples/connext_dds_ada. They are:

  • Hello_builtin
  • Hello_idl
  • Hello_simple
  • News

Note: If you do not see the rti_workspace directory, you need to run RTI Launcher for the first time, which will create the rti_workspace directory if it does not already exist.

  • $ /home/<user>/rti_connext_dds-5.3.0/bin/rtilauncher

Before you can compile the examples, you need ensure that your environment is set up correctly.

  • Add the GNAT Pro 17.1 Ada installation to your path. This compiler is required by RTI Ada Language Support 5.3.0:
    • $ export PATH=$PATH:<dir_containing_gnat_installation>/gnat-17.1/bin 
    • Note: RTI Ada Language Support 5.2.0 and 5.2.3 require GNAT Pro 7.3.1
  • Set NDDSHOME to point the Connext DDS installation:
    • $ export NDDSHOME=/home/<user>/rti_connext_dds-5.3.0/
  • Set ADA_PROJECT_PATH to point to the directory containing Ada project files needed to build the examples:
    • $ export ADA_PROJECT_PATH=$NDDSHOME/lib/gnat
  • [For hello_idl only in 5.3.0] - Add RTI Code Generator (rtiddsgen) to your path as well:
    • $ export PATH=$PATH:$NDDSHOME/bin

Each example can be compiled by:

  • Navigating to the example directory:
    • $ cd /home/<user>/rti_workspace/5.3.0/examples/connext_dds_ada/<example>
  • Invoking the make command to compile the examples:
    • $ gmake -f make/Makefile.x64Linux2.6gcc4.4.5

See the README (located each example directory) for instructions on where and how to run the executables.

Platform:
Programming Language:
Keywords: