Skip to the main content.

Did you know?

 

RTI is the world’s largest DDS supplier and Connext is the most trusted software framework for critical systems.

Success-Plan-Services-DSSuccess-Plan Services

Our Professional Services and Customer Success teams bring extensive experience to train, problem-solve, mentor, and accelerate customer success.

Learn more

Developers

From downloads to Hello World, we've got you covered. Find all of the tutorials, documentation, peer conversations and inspiration you need to get started using Connext today.

Try the Connectivity Selection Tool ⇢

Resources

RTI provides a broad range of technical and high-level resources designed to assist in understanding industry applications, the RTI Connext product line and its underlying data-centric technology.

Company

RTI is the infrastructure software company for smart-world systems. The company’s RTI Connext product is the world's leading software framework for intelligent distributed systems.

Contact Us

News & Events
Cooperation

1 min read

Code Generator 2: Generate Code Faster

Code Generator 2: Generate Code Faster

Are you tired of waiting for all your code to be generated? Would you like to customize the generated output? Code Generator 2 is your solution. This new code generator is already available in your RTI Connext DDS 5.1.0 installation as an Early Access Release (EAR).

Code Generator 2 is written completely in Java and uses Apache Velocity (VLT) templates to define the generated output. This allows you to customize the generated code for different languages by modifying those templates. Check the predefined set of variables available in RTI_rtiddsgen_template_variables.xlsx, located in the Code Generator 2 documentation.

This new design also improves performance compared to the current code generator. The VLT templates are parsed faster than the XSLT ones (used by the current code generator). When generating code for a large IDL, Code Generator 2 is up to 10 times faster than the current code generator.

If you want to invoke the code generator multiples times with different parameters or IDL files, Code Generator 2 provides a server mode that further improves its performance. When used in server mode, Code Generator 2 runs as a native executable that connects through TCP with a server instance of the code generator. The server instance is initiated automatically the first time that the code generator is invoked and it is automatically stopped after an inactivity period. As a result, the JVM is only loaded once when the server is started, the VLT templates are compiled once and the following invocations to Code Generator 2 are resolved faster.

Do you want to try Code Generator 2? Just run the rtiddsgen2 or the rtiddsgen2_server (for running in server mode) scripts with the usual parameters. If you need more information about supported and new features available in Code Generator 2, check out its Getting Started Guide.