5.3. What’s New in 4.1.0

5.3.1. New Command-Line Option for Generating Included Files

This release adds the command-line option -generateIncludeFiles. With this option, Code Generator generates code for any included file in the inputs.

For example:

rtiddsgen -language python Foo.idl -generateIncludeFiles

Imagine you have the following two files:

// File Foo.idl
#include "Bar.idl"

struct Foo {
    Bar b;
};

This example will produce the following files:

  • Foo.py

  • Bar.py

5.3.2. Ability to Generate Code for Multiple IDL/XML/XSD Files at the Same Time

Code Generator can now receive multiple input files for code generation. For example:

rtiddsgen -language C -create typefiles hello_world1.idl hello_world2.idl

This new feature also allows passing one or more directories as input. To use folders as inputs, use one of the following command-line options: -inputIDL, -inputXML, or -inputXSD. Code Generator will scan the folder and generate code for the files with the extension indicated by the input flag.

rtiddsgen -language C -create typefiles -inputIDL folder folder2

The new command-line option -r will activate the recursive scan of all the input folders. See Specifying Multiple Input Files in the Code Generator User’s Manual.

5.3.3. Added Support for Generated Types Without Connext in Modern C++ (Standalone Mode)

The type code generated for C++11 can now be used without linking with Connext libraries. Standalone code for C++11 works in a similar way as C or C++98.

5.3.4. Added Support for @topic and @default_nested Annotations

The annotations @topic and @default_nested have been added to Code Generator. See Using Builtin Annotations in the Core Libraries User’s Manual for more information.

5.3.5. Added Support for Unbounded Sequences and Strings in Ada

Code Generator now allows the use of the flag -unboundedSupport with the Ada language. This flag activates unbounded support for strings and sequences.

5.3.6. Added Support to Generate Examples in C# for .Net 7

Code Generator can now generate example C# files for .Net 7. To do so, run rtiddsgen with the command-line argument -platform net7.

5.3.7. Create Advanced Examples in Python

Previously, you could use the command-line argument -exampleTemplate advanced to create advanced examples for all languages except C and Python. Now you can use the -exampleTemplate advanced argument for Python, too. The advanced example uses an asynchronous generator to read over samples as they are received and monitors status updates in the DataWriter and DataReader. See Advanced Example in the Code Generator User’s Manual for more information.

5.3.8. Added Support to Code Generator for Loading Templates Containing Macros

You can now define and load macros for use by Code Generator templates. To add these templates to a specific language (<lang>), create the following folder:

<NDDSHOME>/resource/app/app_support/rtiddsgen/templates/<lang>/macros/

All the templates that end in .vm that you add to the macros folder will be loaded. You can then call these macros from any template in <NDDSHOME>/resource/app/app_support/rtiddsgen/templates/<lang>/, such as type.vm. See Customizing the Generated Code in the Code Generator User’s Manual for more information.

Note

This feature is supported by both Connext Professional and Connext Micro.

5.3.9. New Way to Initialize Arrays in C++11 Generated Code

Previously, Code Generator initialized the arrays in the constructor using rti::core::fill_array. Now, Code Generator initializes them using aggregate initialization in the member’s declaration instead of using rti::core::fill_array in the constructor.