The Robot Application Programming Interface Delegate Project

Generating Source from IDL

The core RAPID messages specifications and APIs are written in IDL, an interface definition language, and follow the CORBA IDL format.

To generate language-specific source code for RAPID, follow the instructions on this page. Currently Java and C++ are supported.

  • Establish the required environment
  • Perform the command
For a Single IDL File
These commands will translate an IDL file into a Generated Source File, replacing any file with the same name that already exists in that location.
For Java: rtiddsgen -d ../generated-src -replace -language java filename.idl
For C++: rtiddsgen -d ../generated_src -replace -namespace -language C++ filename.idl
For All IDL Files
Because of the number of IDL files, it is usually more convenient to generate the source code using a batch file that process all the IDL files at once.
For Windows: for %X in (*.idl) do rtiddsgen -d ../generated_src -replace -namespace -language C++ %X
For Mac OS X and Linux

# Generate code from IDL files

setenv NDDSHOME /opt/rti/ndds.4.5d
setenv XALANHOME /Users/dmittman/Development/xalan-j_2_7_1
setenv NDDSJREHOME /Library/Java/Home

pushd src-idl
foreach file (`ls *.idl`)
  $NDDSHOME/scripts/rtiddsgen -d ../generated-src -language Java -package -replace $file

# End
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines