HCL SW Blogs
Select Page

It’s time again for a new release of HCL RTist: 11.1 2021.40. Let’s look at the highlights of this release.

Capsule Constructors


You can now create constructors for capsules in the same way as for passive classes using the Add UML – Special Operation – Constructor command. A capsule constructor lets you pass initialization data which can be used by a capsule instance already at the time of its creation. For example, it allows you to have attributes of reference type in a capsule.

Capsule Factories


A capsule factory defines how to create and destroy an instance of a capsule. It allows, for example, to invoke a capsule constructor that you have defined. Capsule factories can be specified for individual capsule parts or globally in a TC. It can also be provided when incarnating an optional capsule part using the Frame service of the TargetRTS. Check this article for more information on how to customize capsule creation.

Dependency Injection


A new TargetRTS service for dependency injection is now available. It’s implemented in the RTInjector class and allows you to dynamically assign a create function to be used when incarnating a certain capsule part. A capsule factory can then delegate the creation of capsule instances to RTInjector to make sure the correct type of capsule instance gets created. You can even change the registered create functions dynamically at run-time if you need to.

Model References in TCs


Two new preferences were introduced in RealTime Development – Transformation Configuration Editor – Model References. By enabling them, references to model elements from a TC can become more “portable” by using file paths that are relative to the TC file rather than the workspace. Also, the unique ID that normally is used for identifying the element in a model file can be replaced with a qualified name instead. This improves the readability of a TC file.

Code Compliance

The preference RealTime Development – Build/Transformations – C++ – Code compliance – Clang-Tidy now also handles warnings for unused parameters. If the preference is set, all functions generated by the model compiler will get comments that suppress Clang-Tidy warnings about unused parameters. By not getting warnings from the generated code, it becomes more practical to use Clang-Tidy to find problems in your handwritten code snippets.

Learn more about the new features in this release by watching the videos in our Sprint Demo YouTube Playlist.


Comment wrap
Further Reading
RTist header
Secure DevOps | September 2, 2022
RTist 11.2 2022.34
HCL RTist is a rule-based code translator for C/C++. The main feature of RTist is to produce readable, maintainable, and portable code.
What’s new in HCL RTist 11.1 2021.46
Secure DevOps | November 29, 2021
What’s new in HCL RTist 11.1 2021.46
HCL release of HCL RTist: 11.1 2021.46. As usual, there are several new features and a few bug fixes. Read more to know some highlights.
HCL Compass Rest APIs In Action
Secure DevOps | November 9, 2021
Writing a generic type descriptor with HCL RTist
Type descriptor provides Metadata about a user-defined type in the model, such as a class, typedef, or type alias. Read to know more.
Filters result by