Introduction
Although you will have massive legacy code, it is a good idea to start with a new design from scratch for whatever you are trying to create.
The reason is not that your new application should be Object Oriented to the maximum, but after you have realized an application on a proper design, it is easy to fix problems when referring to the design.
You create your design with Rhapsody. You bring in design patterns, as to translate common problems into a solution. Apart from the design you do yourselves, you will insert your own C code. You can compare this as the body of a function: the skeleton of the function is created by Rhapsody including the proper arguments etc.
When using Rhapsody in C, Rhapsody will translate classes into structures including attributes and methods. Some aspects of C++ are not available as overloading and inheritance, but the advantage is a remarkable small footprint and speed. As the code is being generated, it is easy to call some objects methods, while the UML design will support you in attacking a problem and support you with its many views.
The UML approach brings support for both design as well as analysis, including analysis of a running system.

There is both a similarity as well as a large difference between conventionally setup of an application and a UML approach.
For memory management sake, one can still use static allocated data structures and objects, preventing calls to malloc() on the fly. The advantage of a static approach is that one prevents inefficient use of resources and last but not least the effect of a spurious interrupt in the middle of a malloc(). The downside is that one must pay extra attention to dimensioning the system. This requires careful analysis of actual resources used, comparable with a high water mark on the heap.
The radical difference between a conventional setup application and this UML approach is the way the system operates. Instead of some endless loop which acts as main flow, while calling functional chunks of code consequetive even when handling interrupts, one now uses an event driven state machine.
Although at a first glance one may end up with a system which when driven to its extends may loose interrupts or fail to handle something, the opposite is true: careful designing will result in handling what really needs handling and for example skip less important things like updating a display. In the end, the conventional system will have collapsed way before.
Rhapsody by IBM Rational and RXF by Willert Software Tools
How do Rhapsody in C/C++ by IBM Rational and the Realtime eXecution Framework by Willert Software Tools match? Rhapsody in C/C++ generates C or C++ code from a UML model, and the generated code expects a so-called Operating System Abstraction Layer underneath.
Willert Software Tools has developed a Realtime eXecution Framework which implements this interface in the form of C or C++ code, which is suitable for quite a number of targets and compilers.
The RXF is either based on the OO RTX alone or extended using an RTOS.

The Realtime eXecution Framework by Willert Software Tools differs in many aspects to a Framework by IBM Rational which comes with Rhapsody in C/C++:
- the RXF is suitable for realtime applications and small embedded environments.
Its footprint can be as small as 4 KByte ROM and 500 bytes of RAM, and can be used in an environment where it has to react within 10 µs to 100 ms. On an ARM evaluation board the RXF reached a whopping 25.000 Processed Events Per Second!
- in several non-demo versions of our products, the build process is not carried in inside Rhapsody but the generated C or C++ code is deployed together with the Framework to your IDE environment where you build your applications.
This way, you can use all know-how of your IDE environment, for example to generate startup files or linker/locater settings.
In demo versions of our products, the build process is inside Rhapsody but you are less flexible in toolchain settings.
- the interfaces of the RXF are defined in such way, that it is easy to adapt to virtually any target, compiler, IDE and RTOS.
The demo versions do not come with all RXF sources so you are not able to rebuild these for a different CPU derivate, nor can you use an IDE integration.
- the RXF by Willert Software Tools come with a profile dedicated for the OO RTX, RTOS, and your target and compiler.
- the RXF is released including an example on how to implement a Board Support Package for your hardware.
Prerequisuites
To successfully use a RXF, the following knowledge by the user is required:
- the UML notation
- programming in C or C++
- the working of Rhapsody in C/C++ by IBM Rational.
- knowledge of the embedded tool chain and RTOS (if any) used
- knowledge of the CPU and hardware used knowledge of Object Oriented Realtime architectures
A good understanding and detailed knowledge about the underlying hardware is often underestimated. The startup source and compiler plus linker options must match exactly the hardware platform on which the generated application must run. The startup source and tool options must be adopted by the user, since these are configured for generic available hardware like an evaluation board.
Willert Software Tools GmbH offers trainings which emphasis is how one uses UML in conjunction with embedded systems – opposite to general UML courses.
Copyright (c) Willert Software Tools GmbH. All rights reserved.