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

https://rtist.hcldoc.com/help/topic/com.ibm.xtools.rsarte.webdoc/Blogs/images/CapsuleConstructor.png

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

https://rtist.hcldoc.com/help/topic/com.ibm.xtools.rsarte.webdoc/Blogs/images/CapsuleFactory.png

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

https://rtist.hcldoc.com/help/topic/com.ibm.xtools.rsarte.webdoc/Blogs/images/RTInjector.png

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

https://rtist.hcldoc.com/help/topic/com.ibm.xtools.rsarte.webdoc/Blogs/images/ModelReferences.png

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
article-img
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.
article-img
Secure DevOps | November 29, 2021
What’s new in HCL RTist 11.1 2021.46
Today we ship another release of HCL RTist: 11.1 2021.46. As usual, there are several new features and a few bug fixes. Let's look at some of the highlights.
article-img
Secure DevOps | November 9, 2021
Writing a generic type descriptor with HCL RTist
Starting with HCL RTist 11.1 2021.24 it's now possible to write a generic type descriptor that uses the same template parameters as the type. This can save a lot of time and avoid code duplication.
Close
Filters result by
Sort:
|