rtiddsgen [-d <outdir>] [-language <C|C++|Java|C++/CLI|C#>] [-namespace] [-package <packagePrefix>] [-example <arch>] [-replace] [-debug] [-corba [client header file] [-orb <CORBA ORB>]] [-optimization <level of optimization>] [-stringSize <Unbounded strings size>] [-sequenceSize <Unbounded sequences size>] [-notypecode] [-ppDisable] [-ppPath <preprocessor executable>] [-ppOption <option>] [-D <name>[=<value>]] [-U <name>] [-I <directory>] [-noCopyable] [-use42eAlignment] [-enableEscapeChar] [-typeSequenceSuffix <Suffix>] [-convertToXml | -convertToXsd | -convertToWsdl | -convertToIdl] [-convertToCcl] [-convertToCcs] [-version] [-help] [-verbosity [1-3]] [[-inputIdl] <IDLInputFile.idl> | [-inputXml] <XMLInputFile.xml> | [-inputXsd] <XSDInputFile.xsd> | [-inputWsdl] <WSDLInputFile.wsdl>]
-d Specifies where to put the generated files. If omitted, the input file's directory is used.
-language Generates output for only the language specified. The default is C++.
-namespace Specifies the use of C++ namespaces (for C++ only).
-package Specifies a packagePrefix to use as the root package (for Java only).
-example Generates example programs and makefiles (for UNIX-based systems) or workspace and project files (for Windows systems) based on the input types description file.
The <arch> parameter specifies the architecture for the example makefiles.
For -language C/C++, valid options for <arch> are:
sparcSol2.8gcc3.2, sparcSol2.8cc5.2, sparcSol2.9gcc3.2, sparcSol2.9gcc3.3, sparcSol2.9cc5.3, sparcSol2.9cc5.4, sparc64Sol2.10cc5.8, sparcSol2.10gcc3.4.2, sparc64Sol2.10gcc3.4.2, i86Sol2.9gcc3.3.2, i86Sol2.10gcc3.4.4, x64Sol2.10gcc3.4.3
i86Linux2.4gcc3.2, i86Linux2.4gcc3.2.2, x64Linux2.4gcc3.2.3, i86Linux2.6gcc3.4.3, x64Linux2.6gcc3.4.5, i86Linux2.6gcc4.1.1, x64Linux2.6gcc4.1.1, i86Linux2.6gcc4.1.2, x64Linux2.6gcc4.1.2, x64Linux2.6gcc4.3.2, i86Linux2.6gcc3.4.6, i86RedHawk5.1gcc4.1.2, i86Suse9.5gcc3.3.3, x64Suse9.5gcc3.3.3, i86Suse10.1gcc4.1.0, x64Suse10.1gcc4.1.0, armv7leLinux2.6gcc4.4.1, ppc64Linux2.6gcc4.1.2, ppc64Linux2.6gcc4.3.0, ppc7400Linux2.6gcc3.3.3
i86Win32VC60, i86Win32VC70, i86Win32VS2003, i86Win32VS2005, x64Win64VS2005, i86Win32VS2008, x64Win64VS2008 armv4WinCE5.0VS2005, i86WinCE5.0eVC40, armv4WinCE6.0VS2005, i86WinCE6.0VS2005
ppc7400Lynx4.0.0gcc3.2.2, ppc7400Lynx4.2.0gcc3.2.2, ppc750Lynx4.0.0gcc3.2.2, ppc750Lynx4.2.0gcc3.2.2, ppc7400Lynx4.2.0gcc3.4.3, ppc7400Lynx5.0.0gcc3.4.3, i86Lynx4.0.0gcc2.95.3, i86Lynx4.0.0gcc3.2.2, i86Lynx4.2.0gcc3.2.2, i86LynxOS_SE3.0.0gcc3.4.3
ppc604Vx5.4gcc, pentiumVx5.5gcc, ppc405Vx5.5gcc, ppc604Vx5.5gcc, ppc603Vx5.5gcc, pentiumVx6.0gcc3.3.2, ppc604Vx6.0gcc3.3.2, pentiumVx6.0gcc3.3.2_rtp, ppc604Vx6.0gcc3.3.2_rtp, pentiumVx6.3gcc3.4.4, ppc604Vx6.3gcc3.4.4, pentiumVx6.3gcc3.4.4_rtp, ppc604Vx6.3gcc3.4.4_rtp, pentiumVx6.5gcc3.4.4, ppc604Vx6.5gcc3.4.4, pentiumVx6.5gcc3.4.4_rtp, ppc604Vx6.5gcc3.4.4_rtp, pentiumVx6.6gcc4.1.2, pentiumVx6.6gcc4.1.2_rtp, ppc405Vx6.6gcc4.1.2, ppc405Vx6.6gcc4.1.2_rtp, ppc604Vx6.6gcc4.1.2, ppc604Vx6.6gcc4.1.2_rtp, ppc604Vx6.7gcc4.1.2, ppc604Vx6.7gcc4.1.2_rtp,
ppc7400Inty5.0.7.mvme5100-7400, ppc7400Inty5.0.7.mvme5100-7400-ipk, ppc7400Inty5.0.9.mvme5100-7400-ghnet2, cellInty5.1.0.ibmpxcab, p5AIX5.3xlc9.0, 64p5AIX5.3xlc9.0
For -language C++/CLI and C#, valid option for <arch> is i86Win32dotnet2.0
For -language java, valid options for <arch> are:
i86Sol2.9jdk, i86Sol2.10jdk, x64Sol2.10jdk, sparcSol2.8jdk, sparcSol2.9jdk, sparcSol2.10jdk, sparc64Sol2.10jdk
i86Linux2.4gcc3.2jdk, i86Linux2.4gcc3.2.2jdk, x64Linux2.4gcc3.2.3jdk, i86Linux2.6gcc3.4.3jdk, x64Linux2.6gcc3.4.5jdk, i86Linux2.6gcc4.1.1jdk, x64Linux2.6gcc4.1.1jdk, i86Linux2.6gcc4.1.2jdk, x64Linux2.6gcc4.1.2jdk, x64Linux2.6gcc4.3.2jdk, i86Linux2.6gcc3.4.6jdk, i86RedHawk5.1gcc4.1.2jdk i86Suse9.5gcc3.3.3jdk, x64Suse9.5gcc3.3.3jdk, i86Suse10.1gcc4.1.0jdk, x64Suse10.1gcc4.1.0jdk
ppc64Linux2.6gcc4.1.2jdk, ppc64Linux2.6gcc4.3.0jdk
i86Win32jdk, x64Win64jdk
ppc7400Lynx4.0.0gcc3.2.2jdk, ppc750Lynx4.0.0gcc3.2.2jdk, ppc7400Lynx4.2.0gcc3.4.3jdk, ppc7400Lynx5.0.0gcc3.4.3jdk, i86Lynx4.0.0gcc2.95.3jdk, i86Lynx4.0.0gcc3.2.2jdk, p5AIX5.3xlc9.0jdk,64p5AIX5.3xlc9.0jdk
-replace Overwrites any existing output files. Warning: This removes any changes you may have made to the original files.
-debug Generates intermediate files for debugging purposes.
-corba [client header file] [-orb <CORBA ORB>] Specifies that you want to produce 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.
client header file: the name of the header file for the IDL types generated by the CORBA IDL compiler. This file will be included in the rtiddsgen type header file instead of generating type definitions.
CORBA support requires the RTI CORBA Compatibility Kit, an add-on product that provides a different version of rtiddsgen. Please contact support@rti.com for more information.
-optimization Sets the optimization level. (Only applies to C/C++)
-typeSequenceSuffix Assigns a suffix to the name of the implicit sequence defined for IDL types. (Only applies to CORBA)
By default, the suffix is 'Seq'. For example, given the type 'Foo' the name of the implicit sequence will be 'FooSeq'.
-stringSize Sets the size for unbounded strings. Default: 255 bytes.
-sequenceSize Sets the size for unbounded sequences. Default: 100 elements.
-notypecode: Disables the generation of type code information.
-ppDisable: Disables the preprocessor.
-ppPath <preprocessor executable>: Specifies the preprocessor path. If you only specify the name of an executable (not a complete path to that executable), the executable must be found in your Path.
The default value is "cpp" for non-Windows architectures, "cl.exe" for Windows architectures.
If the default preprocessor is not found in your Path and you use -ppPath to provide its full path and filename, you must also use -ppOption (described below) to set the following preprocessor options:
-ppOption <option>: Specifies a preprocessor option. This parameter can be used multiple times to provide the command-line options for the specified preprocessor. See -ppPath (above).
-D <name>[=<value>]: Defines preprocessor macros.
-U <name>: Cancels any previous definition of name.
-I <directory>: Adds to the list of directories to be searched for type-definition files (IDL, XML, XSD or WSDL files). Note: A type-definition file in one format cannot include a file in another format.
-noCopyable: Forces rtiddsgen to put copy logic into the corresponding TypeSupport class rather than the type itself (for Java code generation only).
This option is not compatible with the use of ndds_standalone_type.jar.
-use42eAlignment: Generates code compliant with RTI Data Distribution Service 4.2e.
If your RTI Data Distribution Service applications data type uses a 'double','long long','unsigned long long', or 'long double' it will not be backwards compatible with RTI Data Distribution Service 4.2e applications, unless you use the -use42eAlignment flag when generating code with rtiddsgen.
-enableEscapeChar: Enables use of the escape character '_' in IDL identifiers. With CORBA this option is always enabled.
-convertToXml: Converts the input type-description file to XML format.
-convertToIdl: Converts the input type-description file to IDL format.
-convertToXsd: Converts the input type-description file to XSD format.
-convertToWsdl: Converts the input type-description file to WSDL format.
-convertToCcl: Converts the input type-description file to CCL format.
-convertToCcs: Converts the input type-description file to CCS format.
-version: Prints the version.
-help: Prints out this rtiddsgen usage help.
-verbosity: rtiddsgen verbosity.
-inputIdl: Indicates that the input file is an IDL file, regardless of the file extension.
-inputXml: Indicates that the input file is a XML file, regardless of the file extension.
-inputXsd: Indicates that the input file is a XSD file, regardless of the file extension.
-inputWsdl: Indicates that the input file is a WSDL file, regardless of the file extension.
IDLInputFile.idl: File containing IDL descriptions of your data types. If -inputIdl is not used, the file must have an .idl extension.
XMLInputFile.xml: File containing XML descriptions of your data types. If -inputXml is not used, the file must have an .xml extension.
XSDInputFile.xsd: File containing XSD descriptions of your data types. If -inputXsd is not used, the file must have an .xsd extension.
XSDInputFile.wsdl: WSDL file containing XSD descriptions of your data types. If -inputWsdl is not used, the file must have an .wsdl extension.
To use rtiddsgen, you first write a description of your data types in IDL, XML, XSD or WSDL format.
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>
XSD notation
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dds="http://www.omg.org/dds" xmlns:tns="http://www.omg.org/IDL-Mapped/" targetNamespace="http://www.omg.org/IDL-Mapped/"> <xsd:import namespace="http://www.omg.org/dds" schemaLocation="rti_dds_topic_types_common.xsd"/> <xsd:complexType name="myDataType"> <xsd:sequence> <xsd:element name="value" minOccurs="1" maxOccurs="1" type="xsd:int"/> </xsd:sequence> </xsd:complexType> </xsd:schema>
WSDL notation
<?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:dds="http://www.omg.org/dds" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.omg.org/IDL-Mapped/" targetNamespace="http://www.omg.org/IDL-Mapped/"> <types> <xsd:schema targetNamespace="http://www.omg.org/IDL-Mapped/"> <xsd:import namespace="http://www.omg.org/dds" schemaLocation="rti_dds_topic_types_common.xsd"/> <xsd:complexType name="myDataType"> <xsd:sequence> <xsd:element name="value" minOccurs="1" maxOccurs="1" type="xsd:int"/> </xsd:sequence> </xsd:complexType> </xsd:schema> </types> </definitions>
Assuming the name of the idl file is myFileName.(idl|xml|xsd|wsdl) then all you need to do is type:
rtiddsgen myFileName.(idl|xml|xsd|wsdl)
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 RTI Data Distribution Service see Chapter 3 of the user manual.
Below are the IDL types that are currently supported:
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).
RTI Data Distribution Service 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/dtd.
The XSD definition of the XML elements can be found in rti_dds_topic_types.dtd under <NDDSHOME>/resource/xsd.
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/dtd. Otherwise, it will use the location specified in <!DOCTYPE>.
For detailed information about the mapping between IDL and XML see Chapter 3 of the RTI Data Distribution Service User Manual.
For detailed information about the mapping between IDL and XML see Chapter 3 of the RTI Data Distribution Service User Manual.
For detailed information about the mapping between IDL and XML see Chapter 3 of the RTI Data Distribution Service User Manual.
The directory <NDDSHOME>/resource/standalone contains the helper files required to work in standalone mode:
The generated files that can be used standalone are:
To use the rtiddsgen-generated types in a standalone manner:
Using Standalone Types in C++
The generated files that can be used standalone are:
To use the generated types in a standalone manner:
Standalone Types in Java
The generated files that can be used standalone are:
To use the generated types in a standalone manner: