Generates code necessary to allocate, send, receive, and print user-defined data types.
rtiddsgen [-help] [-autoGenFiles <arch>] [-convertToIdl | -convertToXml] [-corba [client header file] [-orb]] [-create <typefiles, examplefiles,makefiles>] [-D <name>[=<value>]] [-d <outdir>] [-dataReaderSuffix ] [-dataWriterSuffix ] [-dllExportMacroSuffix <suffix>] [-enableEscapeChar] [-example <arch>] [-I <directory>] [[-inputIdl] <IDLInputFile.idl> | [-inputXml] <XMLInputFile.xml>] | [-language <C|C++|C++03|C++11|Java|C++/CLI|C#|Ada|microC|microC++>] [-metp] [-micro] [-namespace] [-noCopyable] [-notypecode] [-obfuscate] [-package <packagePrefix>] [-platform <arch>] [-ppDisable] [-ppPath <path to the preprocessor>] [-ppOption <option>] [-reader] [-replace] [-sequenceSize <Unbounded sequences size>] [-sharedLib] [-stringSize <Unbounded strings size>] [-typeSequenceSuffix ] [-U <name>] [-unboundedSupport] [-update <typefiles, examplefiles,makefiles>] [-use42eAlignment] [-V <name>[=<value>]] [-verbosity [1-3]] [-version] [-writer]
-help: Prints this message
-autoGenFiles <arch>: Updates the autogenerated files, i.e, typefiles and makefile/project files shortcut for: -update <typefiles> -update<makefiles> -platform <arch>
-convertToIdl: Convert the input XML file into an equivalent IDL file
-convertToXml: Convert the input IDL file into an equivalent XML file
-corba [client header file] [-orb -create <typefiles|examplefiles|makefiles>: creates the files indicated if not exists. Warns and does not modify if already exists. There can be multiple -create options. If used -crate<makefiles> the -platform <arch> option is required If both -create and -update are specified for the same file type, the -update one will be applied. -D <name>[=<value>]: Define preprocessor macros -d <outdir>: Generate output in the specified file (default: IDL input file's directory) -dataReaderSuffix -dataWriterSuffix -enableEscapeChar: Enables the usage of the escape character '_' in IDL indetifiers. -example <arch>: Generate type files, example files and makefile shortcut for: -create <typefiles> -create<examplefiles> -create<makefiles> -platform <arch> Valid <arch> arguments are: For all languages: universal (Generate compatible publisher/subscriber code for all supported platforms. It won't generate makefiles/project files) For language C/C++: i86Sol2.9gcc3.3.2, sparc64Sol2.10gcc3.4.2, sparcSol2.10gcc3.4.2, sparcSol2.9cc5.4, sparcSol2.9gcc3.2, armv7aAndroid2.3gcc4.8, armv6vfphLinux3.xgcc4.7.2, cell64Linux2.6gcc4.5.1, i86Linux2.6gcc3.4.3, i86Linux2.6gcc4.1.1, i86Linux2.6gcc4.1.2, i86Linux2.6gcc4.4.5, i86Linux3.xgcc4.6.3, i86Linux3gcc4.8.2, i86Linux3gcc4.3.4, x64Linux2.6gcc3.4.5, x64Linux2.6gcc4.1.1, x64Linux2.6gcc4.1.2, x64Linux2.6gcc4.3.4, x64Linux2.6gcc4.4.4, x64Linux2.6gcc4.4.5, x64Linux2.6gcc4.5.1, x64Linux3gcc4.8.2, x64Linux3.xgcc4.6.3, x64WRLinux2.6gcc4.4.1, ppc4xxFPLinux2.6gcc4.5.1, ppc7400Linux2.6gcc3.3.3, ppc85xxLinux2.6gcc4.3.2, ppc85xxWRLinux2.6gcc4.3.2, i86Win32VS2008, x64Win64VS2008, i86Win32VS2010, x64Win64VS2010, i86Win32VS2012, x64Win64VS2012, i86Win32VS2013, x64Win64VS2013, x64Darwin12clang4.1, x64Darwin14clang6.0, i86Lynx4.0.0gcc3.2.2, ppc7400Lynx4.0.0gcc3.2.2, ppc7400Lynx4.2.0gcc3.2.2, ppc7400Lynx5.0.0gcc3.4.3, ppc750Lynx4.0.0gcc3.2.2, i86QNX6.4.1qcc_gpp, i86QNX6.5qcc_gpp4.4.2, armv7aQNX6.5.0SP1qcc_cpp4.4.2, armv6Vx6.8gcc4.1.2, armv6Vx6.8gcc4.1.2_rtp, ppc604Vx5.5gcc, ppc603Vx5.5gcc, ppc604Vx6.3gcc3.4.4, ppc604Vx6.3gcc3.4.4_rtp, ppc604Vx6.5gcc3.4.4, ppc604Vx6.5gcc3.4.4_rtp, ppc405Vx6.6gcc4.1.2, ppc405Vx6.6gcc4.1.2_rtp, pentiumVx6.6gcc4.1.2, pentiumVx6.6gcc4.1.2_rtp, ppc604Vx6.6gcc4.1.2, ppc604Vx6.6gcc4.1.2_rtp, ppc604Vx6.7gcc4.1.2, ppc604Vx6.7gcc4.1.2_smp, ppc604Vx6.7gcc4.1.2_rtp, pentiumVx6.7gcc4.1.2, pentiumVx6.7gcc4.1.2_rtp, pentiumVx6.8gcc4.1.2, pentiumVx6.8gcc4.1.2_rtp, ppc604Vx6.8gcc4.1.2, ppc604Vx6.8gcc4.1.2_rtp, ppc604Vx6.9gcc4.3.3, ppc604Vx6.9gcc4.3.3_rtp, ppce500v2Vx6.9gcc4.3.3, ppce500v2Vx6.9gcc4.3.3_rtp, mips32r2sfbeVx6.9gcc4.3.3, mips32r2sfbeVx6.9gcc4.3.3_rtp, pentiumVx6.9gcc4.3.3, pentiumVx6.9gcc4.3.3_rtp, pentium64Vx6.9gcc4.3.3, pentium64Vx6.9gcc4.3.3_rtp, pentiumVx7.0gcc4.3.3, pentiumVx7.0gcc4.3.3_rtp, sbc8641Vx653-2.3gcc3.3.2, simpcVx653-2.3gcc3.3.2, ppc85xxVxT2.2.3gcc3.3.2, p5AIX5.3xlc9.0, 64p5AIX5.3xlc9.0, p7AIX7.1xlc12.1, 64p7AIX7.1xlc12.1, ppc85xxInty5.0.11.xes-p2020, pentiumInty10.0.2.pcx86, p4080Inty10.0.2.xes-p4080-smp, p4080Inty11.devtree-fsl-e500mc.comp2012.1, p4080Inty11.devtree-fsl-e500mc.comp2013.5.4, pentiumInty11.pcx86-smp For language C++/CLI or C#: i86Win32VS2008, x64Win64VS2008, i86Win32VS2010, x64Win64VS2010, i86Win32VS2012, x64Win64VS2012, i86Win32VS2013, x64Win64VS2013 For language Java: i86Sol2.9gcc3.3.2, sparc64Sol2.10gcc3.4.2, sparcSol2.10gcc3.4.2, sparcSol2.9cc5.4, sparcSol2.9gcc3.2, armv7aAndroid2.3gcc4.8, armv6vfphLinux3.xgcc4.7.2, cell64Linux2.6gcc4.5.1, i86Linux2.6gcc3.4.3, i86Linux2.6gcc4.1.1, i86Linux2.6gcc4.1.2, i86Linux2.6gcc4.4.5, i86Linux3.xgcc4.6.3, i86Linux3gcc4.8.2, i86Linux3gcc4.3.4, x64Linux2.6gcc3.4.5, x64Linux2.6gcc4.1.1, x64Linux2.6gcc4.1.2, x64Linux2.6gcc4.3.4, x64Linux2.6gcc4.4.4, x64Linux2.6gcc4.4.5, x64Linux2.6gcc4.5.1, x64Linux3gcc4.8.2, x64Linux3.xgcc4.6.3, x64WRLinux2.6gcc4.4.1, ppc4xxFPLinux2.6gcc4.5.1, ppc7400Linux2.6gcc3.3.3, ppc85xxLinux2.6gcc4.3.2, ppc85xxWRLinux2.6gcc4.3.2, i86Win32VS2008, x64Win64VS2008, i86Win32VS2010, x64Win64VS2010, i86Win32VS2012, x64Win64VS2012, i86Win32VS2013, x64Win64VS2013, x64Darwin12clang4.1, x64Darwin14clang6.0, i86Lynx4.0.0gcc3.2.2, ppc7400Lynx4.0.0gcc3.2.2, ppc7400Lynx4.2.0gcc3.2.2, ppc7400Lynx5.0.0gcc3.4.3, ppc750Lynx4.0.0gcc3.2.2, i86QNX6.4.1qcc_gpp, i86QNX6.5qcc_gpp4.4.2, armv7aQNX6.5.0SP1qcc_cpp4.4.2, armv6Vx6.8gcc4.1.2, armv6Vx6.8gcc4.1.2_rtp, ppc604Vx5.5gcc, ppc603Vx5.5gcc, ppc604Vx6.3gcc3.4.4, ppc604Vx6.3gcc3.4.4_rtp, ppc604Vx6.5gcc3.4.4, ppc604Vx6.5gcc3.4.4_rtp, ppc405Vx6.6gcc4.1.2, ppc405Vx6.6gcc4.1.2_rtp, pentiumVx6.6gcc4.1.2, pentiumVx6.6gcc4.1.2_rtp, ppc604Vx6.6gcc4.1.2, ppc604Vx6.6gcc4.1.2_rtp, ppc604Vx6.7gcc4.1.2, ppc604Vx6.7gcc4.1.2_smp, ppc604Vx6.7gcc4.1.2_rtp, pentiumVx6.7gcc4.1.2, pentiumVx6.7gcc4.1.2_rtp, pentiumVx6.8gcc4.1.2, pentiumVx6.8gcc4.1.2_rtp, ppc604Vx6.8gcc4.1.2, ppc604Vx6.8gcc4.1.2_rtp, ppc604Vx6.9gcc4.3.3, ppc604Vx6.9gcc4.3.3_rtp, ppce500v2Vx6.9gcc4.3.3, ppce500v2Vx6.9gcc4.3.3_rtp, mips32r2sfbeVx6.9gcc4.3.3, mips32r2sfbeVx6.9gcc4.3.3_rtp, pentiumVx6.9gcc4.3.3, pentiumVx6.9gcc4.3.3_rtp, pentium64Vx6.9gcc4.3.3, pentium64Vx6.9gcc4.3.3_rtp, sbc8641Vx653-2.3gcc3.3.2, simpcVx653-2.3gcc3.3.2, ppc85xxVxT2.2.3gcc3.3.2, p5AIX5.3xlc9.0, 64p5AIX5.3xlc9.0, p7AIX7.1xlc12.1, 64p7AIX7.1xlc12.1, ppc85xxInty5.0.11.xes-p2020, pentiumInty10.0.2.pcx86, p4080Inty10.0.2.xes-p4080-smp, p4080Inty11.devtree-fsl-e500mc.comp2012.1, p4080Inty11.devtree-fsl-e500mc.comp2013.5.4, pentiumInty11.pcx86-smp For language C++/CLI or C#: i86Win32VS2008, x64Win64VS2008, i86Win32VS2010, x64Win64VS2010, i86Win32VS2012, x64Win64VS2012, i86Win32VS2013, x64Win64VS2013 For language Java: i86Sol2.9gcc3.3.2, sparc64Sol2.10gcc3.4.2, sparcSol2.10gcc3.4.2, sparcSol2.9cc5.4, sparcSol2.9gcc3.2, armv7aAndroid2.3gcc4.8, armv6vfphLinux3.xgcc4.7.2, i86Linux2.6gcc3.4.3, i86Linux2.6gcc4.1.1, i86Linux2.6gcc4.1.2, i86Linux2.6gcc4.4.5, i86Linux3.xgcc4.6.3, i86Linux3gcc4.8.2, i86Linux3gcc4.3.4, x64Linux2.6gcc3.4.5, x64Linux2.6gcc4.1.1, x64Linux2.6gcc4.1.2, x64Linux2.6gcc4.3.4, x64Linux2.6gcc4.4.5, x64Linux3gcc4.8.2, x64Linux3.xgcc4.6.3, i86Win32VS2008, x64Win64VS2008, i86Win32VS2010, x64Win64VS2010, i86Win32VS2012, x64Win64VS2012, i86Win32VS2013, x64Win64VS2013 x64Darwin12clang4.1, x64Darwin14clang6.0, i86Lynx4.0.0gcc3.2.2, ppc7400Lynx4.0.0gcc3.2.2, ppc7400Lynx5.0.0gcc3.4.3, ppc750Lynx4.0.0gcc3.2.2, ppc604Vx6.7gcc4.1.2, ppc604Vx6.8gcc4.1.2, p5AIX5.3xlc9.0, 64p5AIX5.3xlc9.0, p7AIX7.1xlc12.1, 64p7AIX7.1xlc12.1 For language C++/CLI or C#: i86Win32VS2008, x64Win64VS2008, i86Win32VS2010, x64Win64VS2010, i86Win32VS2012, x64Win64VS2012, i86Win32VS2013, x64Win64VS2013 For language Java: armv7aAndroid2.3gcc4.8, armv6vfphLinux3.xgcc4.7.2, i86Linux2.6gcc3.4.3, i86Linux2.6gcc4.1.1, i86Linux2.6gcc4.1.2, i86Linux2.6gcc4.4.5, i86Linux3.xgcc4.6.3, i86Linux3gcc4.8.2, i86Linux3gcc4.3.4, i86Lynx4.0.0gcc3.2.2, i86Sol2.9gcc3.3.2, ppc7400Lynx4.0.0gcc3.2.2, ppc7400Lynx5.0.0gcc3.4.3, ppc750Lynx4.0.0gcc3.2.2, sparc64Sol2.10gcc3.4.2, sparcSol2.10gcc3.4.2, sparcSol2.9cc5.4, sparcSol2.9gcc3.2, x64Linux2.6gcc3.4.5, x64Linux2.6gcc4.1.1, x64Linux2.6gcc4.1.2, x64Linux2.6gcc4.3.4, x64Linux2.6gcc4.4.5, x64Linux3gcc4.8.2, x64Linux3.xgcc4.6.3, ppc604Vx6.7gcc4.1.2, ppc604Vx6.8gcc4.1.2, x64Darwin12clang4.1, x64Darwin14clang6.0, p5AIX5.3xlc9.0, 64p5AIX5.3xlc9.0, p7AIX7.1xlc12.1, 64p7AIX7.1xlc12.1, i86Win32VS2008, x64Win64VS2008, i86Win32VS2010, x64Win64VS2010, i86Win32VS2012, x64Win64VS2012, i86Win32VS2013, x64Win64VS2013 For language Ada: x64Linux2.6gcc4.4.5 -I <directory>: Add the directory to the list of directories to be searched for header files -inputIdl <IDL file>: Indicate that the input file is an IDL file independently of the file extension -inputXml <XML file>: Indicate that the input file is a XML file independently of the file extension -language <C|C++|C++03|C++11|Java|C++/CLI|C#|Ada|microC|microC++>: Generate output for one of: C (Connext or Connext Micro), C++ (default or Connext Micro), C++03, C++11, C++/CLI, C#, Java or Ada. Use of generated Ada code requires installation of RTI Ada Language Support. Please contact support@rti.com for more information. Languages microC and microC++ are supported for backwards compatibility. -metp Generates code for the Multi-Encapsulation Type Support (METP) library -micro: Generate code and support files for RTI Connext Micro, instead of RTI Connext. Use "-micro -help" to list command line arguments supported by rtiddsgen when targeting RTI Connext Micro. -namespace: This parameter should be included to use C++ namespaces when the language option is C++ -noCopyable: Force rtiddsgen to put copy logic into the corresponding TypeSupport class rather than the type itself. This option is only used for Java code generation. This option is not compatible with the use of ndds_standalone_type.jar -notypecode: Do not generate type code information -obfuscate: obfuscate the input IDL file -package <packagePrefix>: Use <packagePrefix> as the root package (Java only) -platform <arch>: Required if the -create makefiles or -update makefiles are used Valid <arch> arguments are the same that in the -example <arch> (See above) -ppDisable: Option to not run the preprocessor -ppPath <path to the preprocessor>: Preprocessor path The default value is "cpp" for non Windows architectures and "cl.exe" for Windows architectures. -ppOption <option>: Preprocessor option -reader: Generate support for DataReader (only with -micro). -replace: Deprecated option. Please use -update for the proper files (typefiles, examplefiles, makefiles). This option is maintened for backwards compatibility. It allows rtiddsgen to overwrite any existing generated files. If it is not present and existing files are found, rtiddsgen will print a warning but will not overwriten them -sequenceSize <Unbounded sequences size>: Size assigned to unbounded sequences. The default value is 100 -sharedLib: generates makefile compiling with the dynamic libraries -stringSize <Unbounded strings size>: Size assigned to unbounded strings The default value is 255 -typeSequenceSuffix -U <name>: Cancel any previous definition of name -unboundedSupport Generates code that supports unbounded sequences and strings. This option is only supported with C++/CLI and C# languages. When the option is used the command-line options sequenceSize and stringSize are ignored. This option also affects the way unbounded sequences are deserialized. When a sequence is being received into a sample from the DataReader's cache, the old memory for the sequence will be deallocated and memory of sufficient size to hold the deserialized data will be allocated. When initially constructed, sequences will not preallocate any elements having a maximum of zero elements. -update <typeFiles|exampleFiles|makefiles>: create the files indicated if not exists. Overwites file without warning if already exists. There can be multiple -update options If both -create and -update are specified for the same file type, the -update one will be applied. If used -update<makefiles> the -platform <arch> option is required -use42eAlignment: The generated code uses RTI Data Distribution Service 4.2e alignment. This option should be used when compatibility with 4.2e is required and the topic data types contain double , long long, or long double members. -V <name>[=<value>]: Define an user variable that can be used in the templates as $userVarList.name or $userVarList.name.equals(value) -verbosity [1-3]: rtiddsgen verbosity 1: exceptions 2: exceptions + warnings 3: exceptions + warnings + information The default value is 3 -version: Prints the version -writer: Generate support for DataWriter (only with -micro). To use rtiddsgen, you must first write a description of your data types in IDL or XML format. <p> IDL notation XML notation Assuming the name of the idl file is myFileName.(idl|xml) then all you need to do is type: rtiddsgen myFileName.(idl|xml) This generates myFileName.cxx, myFileName.h, myFileNamePlugin.cxx, myFileNamePlugin.h, myFileNameSupport.cxx and myFileNameSupport.h. By default, rtiddsgen will not overwrite these files. You must use the -replace argument to do that. rtiddsgen does not support the full IDL language. For detailed information about the IDL support in User's Manual Service see Chapter 3 of the user manual. The supported IDL types are: The following non-IDL types are also supported: Use of Unsupported Types in an IDL File You may include unsupported data types in the IDL file. rtiddsgen does not consider this an error. This allows you to use types that are defined in non-IDL languages with either hand-written or non-rtiddsgen written plug-ins. For example, the following is allowable: In the above case, Bar is defined externally by the user. Multiple Types in a Single File You can specify multiple types in a single IDL file. This can simplify management of files in your distributed program. Use of Directives in an IDL File The following directives can be used in your IDL file: Note: Do not put a space between the slashes and the @ sign. Note: Directives are case-sensitive (for example: use key, not Key). RTI Connext provides DTD and XSD files that describe the XML format. The DTD definition of the XML elements can be found in
ef_url_rti_dds_topic_types_dtd under <NDDSHOME>/resource/app/app_support/rtiddsgen/schema. The XSD definition of the XML elements can be found in
ef_url_rti_dds_topic_types_xsd under <NDDSHOME>/resource/app/app_support/rtiddsgen/schema. The XML validation performed by rtiddsgen always uses the DTD definition. If the tag is not present in the XML file, rtiddsgen will look for the DTD document under <NDDSHOME>/resource/app/app_support/rtiddsgen/schema. Otherwise, it will use the location specified in . For detailed information about the mapping between IDL and XML, see Chapter 3 in the
ef_url_manual User Manual. The directory <NDDSHOME>resource/app/app_support/rtiddsgen/standalone/include contains the helper files required to work in standalone mode: Using Standalone Types in C The generated files that can be used standalone are: You cannot use the type plug-in (<idl file>Plugin.c <idl file>Plugin.h) or the type support (<idl file>Support.c <idl file>Support.h) code standalone. To use the rtiddsgen-generated types in a standalone manner: Using Standalone Types in C++ The generated files that can be used standalone are: You cannot use the type plugin (<idl file>Plugin.cxx <idl file>Plugin.h) or the type support (<idl file>Support.cxx <idl file>Support.h) code standalone. To use the generated types in a standalone manner: Standalone Types in Java The generated files that can be used standalone are: You cannot use the type code (<idl file>TypeCode.java), the type support (<idl type>TypeSupport.java), the data reader (<idl file>DataReader.java) or the data writer code (<idl file>DataWriter.java) standalone. To use the generated types in a standalone manner: Description
rtiddsgen takes a language-independent specification of the data (in IDL or XML notation) and generates supporting classes and code to distribute instances of the data over
dds. C++ Example
The following is an example generating the RTI Connext type myDataType: struct myDataType { long value; };
<?xml version="1.0" encoding="UTF-8"?>
<types xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="rti_dds_topic_types.xsd">
<struct name="myDataType">
<member name="value" type="long"/>
</struct>
</types>
IDL Language
In the IDL language, data types are described in a fashion almost identical to structures in "C." The complete description of the language can be found at the OMG website. //@copy #include "Bar.h" //@copy #include "BarHandGeneratedPlugin.h" struct Foo { short height; Bar barMember; };
XML Language
The data types can be described using XML. Using Generated Types Without RTI Connext (Standalone)
You can use the generated type-specific source and header files without linking the RTI Connext libraries or even including the RTI Connext header files. That is, the generated files for your data types can be used standalone.