RTI Connext .Net APIs  Version 5.2.0
 All Classes Namespaces Functions Variables Enumerations Properties Groups Pages
rtiddsgen

Generates source code from data types declared in IDL or XML files. More...

Generates source code from data types declared in IDL or XML files.

Generates code necessary to allocate, send, receive, and print user-defined data types.

Usage

  rtiddsgen [-help]
                 [-autoGenFiles <arch>]
                 [-convertToIdl | -convertToXml]
                 [-corba [client header file] [-orb <CORBA C++ ORB>]]
                 [-create <typefiles, examplefiles,makefiles>]
                 [-D <name>[=<value>]]
                 [-d <outdir>]
                 [-dataReaderSuffix <Suffix>]
                 [-dataWriterSuffix <Suffix>]
                 [-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 <Suffix>]
                 [-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 <CORBA orb>="">]: Produces CORBA-compliant code Use [client header file] and [-orb <CORBA orb>="">] for C++ only. The majority of code generated is independent of the ORB. However, for some IDL features the code generated depends on the ORB. This version of rtiddsgen generates code compatible with ACE-TAO or JacORB. To pick the ACE_TAO version, use the -orb parameter. The default is ACE_TAO1.6

-create <typefiles|examplefiles|makefiles>: Creates the files indicated if they do not exist. Warns and does not modify if they already exist. There can be multiple -create options. If used as -create<makefiles>, the -platform <arch> option is required If both -create and -update are specified for the same file type, -update will be applied.

-D <name>[=<value>]: Defines preprocessor macros

-d <outdir>: Generates output in the specified file (default: IDL input file's directory)

-dataReaderSuffix <Suffix>: Assigns a suffix to the name of the DataReader interface. The option is valid only for CORBA code generation. By default, the suffix is 'DataReader'. For example, given the type 'Foo', the name of the DataReader interface would be 'FooDataReader'

-dataWriterSuffix <Suffix>: Assigns a suffix to the name of the DataWriter interface. The option is valid only for CORBA code generation. By default, the suffix is 'DataWriter'. For example, given the type 'Foo', the name of the DataWriter interface would be 'FooDataWriter'

-enableEscapeChar: Enables use of the escape character '_' in IDL identifiers.

-example <arch>: Generates 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>: Adds the directory to the list of directories to be searched for header files

-inputIdl <IDL file>: Indicates that the input file is an IDL file, regardless of the file extension

-inputXml <XML file>: Indicate that the input file is a XML file, regardless of the file extension

-language <C|C++|C++03|C++11|Java|C++/CLI|C#|Ada|microC|microC++>: Generates output for one of: C (Connext DDS or Connext DDS Micro), C++ (default or Connext DDS Micro), C++03, C++11, C++/CLI, C#, Java or Ada

C++ generates code for the traditional C++ API.

C++03 and C++11 generate code for the modern C++ API. C++03 and C++11 only differ when the option -example is also specified. In that case, using C++11 has the following effects:

Use of generated Ada code requires installation of RTI Ada Language Support. Please contact suppo.nosp@m.rt@r.nosp@m.ti.co.nosp@m.m for more information.

Languages microC and microC++ are supported for backwards compatibility. Users wishing to generate code for RTI Connext Micro should use languages C/C++ along with the -micro option.

-metp Generates code for the Multi-Encapsulation Type Support (METP) library

-micro: Generates code and support files for Connext DDS Micro, instead of Connext DDS. Use "-micro -help" to list command line arguments supported by rtiddsgen when targeting RTI Connext DDS Micro.

-namespace: This parameter should be included to use C++ namespaces when the language option is C++

-noCopyable: Forces 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: obfuscates the input IDL file

-package <packagePrefix>: Uses <packagePrefix> as the root package (Java only)

-platform <arch>: Required if you use -create makefiles or -update makefiles Valid <arch> arguments are the same as for -example <arch> (See above)

-ppDisable: Disables running 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: Generates support for DataReader (only with -micro).

-replace: Deprecated option. Please use -update for the proper files (typefiles, examplefiles, makefiles). This option is maintained 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>: Assigns Size to unbounded sequences. The default value is 100

-sharedLib: Generates makefile compiling with the dynamic libraries

-stringSize <Unbounded strings size>: Assigns size to unbounded strings. The default value is 255

-typeSequenceSuffix <Suffix>: Assigns a suffix to the name of the implicit sequence defined for IDL types. The option is valid only for CORBA code generation. By default, the suffix is 'Seq'. For example, given the type 'Foo' the name of the sequence would be 'FooSeq'

-U <name>: Cancels any previous definition of name

-unboundedSupport Generates code that supports unbounded sequences and strings

This option is only supported with the C, C++, 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>: Creates the files indicated if they don not exist. Overwrites the file without warning if it already exists. There can be multiple -update options If both -create and -update are specified for the same file type, -update will be applied. If used as -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>]: Defines a user variable that can be used in the templates as $userVarList.name or $userVarList.name.equals(value)

-verbosity [1-3]: Sets rtiddsgen verbosity 1: exceptions 2: exceptions + warnings 3: exceptions + warnings + information The default value is 3

-version: Prints the version

-writer: Generates support for DataWriter (only with -micro).

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 RTI Connext.

To use rtiddsgen, you must first write a description of your data types in IDL or XML format.

C++ Example

The following is an example that generates the RTI Connext type myDataType:

IDL notation

struct myDataType {
    long value;
};

XML notation

<?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>

Assuming the name of the IDL file is myFileName.(idl|xml), 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.

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.

rtiddsgen does not support the full IDL language.

For detailed information about IDL support in RTI Connext see Chapter 3 in the User's 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:

//@copy #include "Bar.h"
//@copy #include "BarHandGeneratedPlugin.h"
struct Foo {
short height;
Bar barMember;
};

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).

XML Language

The data types can be described using XML.

RTI Connext provides DTD and XSD files that describe the XML format.

The DTD definition of the XML elements can be found in rti_dds_topic_types.dtd under <NDDSHOME>/resource/app/app_support/rtiddsgen/schema.

The XSD definition of the XML elements can be found in 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 <!DOCTYPE> 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 <!DOCTYPE>.

For detailed information about the mapping between IDL and XML, see Chapter 3 in the User's Manual.

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.

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:


RTI Connext .Net APIs Version 5.2.0 Copyright © Sun Jun 21 2015 Real-Time Innovations, Inc