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++:


Prerequisuites

To successfully use a RXF, the following knowledge by the user is required:

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.