Code RealTime Integration

DevOps Code RealTime is just like DevOps Model RealTime a development environment for creating stateful and event-driven realtime applications in C++. The main differences between the products are:

Applications created with Model RealTime and Code RealTime use the same TargetRTS, and it's therefore possible to use the two products together. This article describes how you can use Code RealTime for creating some parts of your application, build them into a library, and then use that library from Model RealTime.

The integration between Model RealTime and Code RealTime is available starting from version 12.0.3 as an EXPERIMENTAL feature, with limited support for the Art language. Future versions will extend the support to cover the whole Art language.

Motivation

There can be several reasons and benefits with developing parts of your application with Code RealTime:

Workflow

Follow the steps below for using a library created with Code RealTime in Model RealTime:

  1. Develop the library in Code RealTime and build it with a library TC that uses the same target configuration as you use for building your Model RealTime application. The picture below shows what you see in Code RealTime for a simple library.

  1. Import the Code RealTime workspace folder into your Model RealTime workspace. Use the command File - Import - General - Projects from Folder or Archive.

  1. Set the imported library TC as a prerequisite of your executable TC.

  1. Make sure your executable TC is active, and also that you have enabled the preference Experimental Features - Support Art files from Code RealTime. You should then see the elements defined in the library in the Project Explorer as an imported package:

There will be one imported package for each Art file that is built by the library TC.

  1. Now you can use the library elements in your Model RealTime model in the same way as if they were defined in the model itself. For example, you can show protocols from the library on diagrams, create ports typed by those protocols and create transitions that trigger on events in the protocols.
  2. When you build your executable TC in Model RealTime, the generated application will automatically link with the Code RealTime library.

Art Language Support

In this first EXPERIMENTAL version Model RealTime does not support everything that can be written in an Art file. The following subset is currently supported:

Changing Art Files

If you make a change in the library Art files in Code RealTime you need to rebuild the library there (it does not happen automatically when building in Model RealTime). To see the updated library elements in Model RealTime you need to close and reopen the model project. You may of course also need to update your model, depending on what changes you did, and how the changed elements are used.

Current Limitations

In the current EXPERIMENTAL version of the Code RealTime integration, the following limitations apply: