Rhapsody TechBlog

BLOG about IBM Rhapsody. Contains technical information as well as more private travel stories.

Page 4 of 16

Nashville/Florida/Toronto

I’ve been in the USA for quite some times. But Nashville was new, never been there before. So I increased my State count to 39! 11 to go.
The cheapest flight I could get was from Hannover. Via Amsterdam (which is closer to me, but don’t skip a leg, that’ll cost you….amazing in this time of saving the environment….)
So I got on the plane to AMS early for the stopover to… Toronto! I’ve been there before, twice. Nice city! There I would get on a plane to Nashville.

I was in Nashville for the Kick-off Conference of our beloved USA partner 321-Gang.

After the Kick-Off there was, luckily, some time left to visit Florida, a real must in winter time 😉 After 3 nice warm days I was on the way back ( ;-( ;-( ;-( ) But that was less easy then I thought… Again I would fly via Toronto but the plane coming from Toronto had a delay (Cause: medical Emergency…)
The information on the duration of the delay was very fuzzy. I tried to find out an alternative way to fly home but there was no real alternative.
So I gambled on the original flight that was earlier then expected.
It was, for hours and hours, on the tipping point of “Not going to make it” and “Just in Time”. I hate that.
To cut a long story short: The fact that I had to cross customs in Canada made me miss my plane.
So I had to spend another 24 hours in Canada. With only T-Shirts. And with -13ºC outside…
Luckily KLM was very, extremely good and they shifted my flight (They didn’t have to, i was on the cheap non-refundable flight) WestJet (Canada air-carrier operating for Delta) did not want to reimburse my Hotel costs.. “Use your insurance”…. Yeah I will.

Reverse and Roundtrip

In the last versions of Rhapsody we receive an increasing number of complaints about issues with Reverse and/or Roundtrip Engineering.

Issues

The issues are:

  • Reverse Engineering seems to start but does not give a result.
  • “Populate Diagram” is missing in the “Operation” menu

Rhapsody Version/License

A possibility is that your license is too old. What?? But everything works fine, except….
That is correct. Your old license also works for newer Rhapsody versions, I don’t understand that either, i’d link that to newer versions and support payments but hey, I know nothing about that….
So, exactly right. In some version of Rhapsody there was an entry added in the license file for Reverse/Roundtrip. Adding this solves the problem. You can generate a new license file in the License Key Center. (If you have a support contract with SodiusWillert (or Sodius or Willert or event somewhere else) we’ll help you.

32/64-bit

Most of these problems are related to the 32/64-bit version of Rhapsody. Due to some historic reasons the 64-bit version of Rhapsody lacked a lot of options that the 32-bit version had.
Also because of the way Windows is built, it is not easy to almost impossible to start 32-bit apps from 64-bit apps and vice-versa.

Solution

You can install both the 32-bit and the 64-bit version of Rhapsody even from the same install version. Remember that you then also need both Service Packs if you upgrade!
Then you can start 32-bit if you want to do stuff that involves any roundtrip or reverse engineering and use the 64-bit for everything else. Models are interchangeable.

So. That’s it. Have fun modelling with Rhapsody

Walter van der Heiden (wvdheiden@sodiuswillert.com)

ESE congress

Introduction

Every year, the start of December, it is time for the yearly reunion for Embedded Software Developers. It is called ESE Kongress (yes, in German) and is held in the “Stadthalle Sindelfingen”.
This is near Stuttgart and home of Daimler Benz, the makers of Mercedes.

ESE is organized by Microconsult and Elektronik Praxis, a training company, and a publishing company, for 12 years they started doing that.
I’ve been on all of them and I really like the event.
It is smaller than the Embedded World but that is exactly the charm of it, the noise is limited, there is time to speak in-depth with visitors, the presentations are controlled and contain no or just a really little bit of marketing, the information depth is very good.

Because we have a table there I traveled by car with a booth full of folders, flyers, roll-ups and more.

The highlight of the ESE is, of course, the Table Football Tournament… And the Developer party but in the daytime, it was Johannes Trageser’s presentation “Do you still draw or are you already generating code”.

Rhapsody

Some Rhapsody news. Version 9 is on the way. There is no fixed release date but it will be “any moment now”.

My colleague Wolfgang Sonntag has solved a long year problem…. The Rhapsody #$%^&* Editor that adds whitespace if you do not click on the start of the line.


It turns out that there is an option that prevents that. Just right-click in the editor, open the properties, go to the “misc” tab and tick the option “Confine caret to text” (Don’t ask….)

Questions still stay…. why isn’t that the default? Why does somebody think that “confine caret to text” is something people look for when they want to change the whitespace behavior of the editor?

For the “new” Rhapsody users… here you can also switch on the line numbers. Please choose decimal and “1” as Start at….

These settings are not stored in the model… and also not in Rhapsody.ini. The Editor is an open-source editor that stores its settings in the registry. “HKEY_CURRENT_USER\Software\Telelogic\Rhapsody 8.4\Code Window-Ansi”. “SELBOUNDS” is the key that controls this.

Anyway… this solves it. Better late than never. It works also for fields in the statecharts (Yes! also the guard!!!)

Have fun editing in Rhapsody without extra whitespace!

Walter van der Heiden ( wvdheiden@sodiuswillert.com )

Absolutely Relative in Bordeaux

Bordeaux

This time not Nantes… but Bordeaux. OK, first Nantes, there was some work to be done, but after that there was room for some personal time-off.
A friends 50th birthday was there and had to be celebrated big time.

His wife rented an old castle (France has about a million of these) where the celebration would take place. We celebrated heavily… drank a lot of wie.
We also visited a Safran Farm, of course, a vinyard and an old village wit ha magnificant church (No photo’s allowed, sorry.)

Absolute and relative paths.

Unfortunately the default in Rhapsody is to use absolute paths. And it will use absolute when in doubt.

There are 3 properties that control the switch from Absolute to Relative:

1. General::Model::PathInProjectList, this is the path that models have in a prject list (“Workspace”

2. General::Model::ReferenceUnitPath, this is the path where units are stored. When this is relative paths are stored relative to the model directory.

3. C_ReverseEngineering::Main::useCodeCentricAbsolutePath, is a new property to indicate if reverse engineered sources are stored absolute or relative

Use Rhapsody Workspace

A bit hidden is the posibility to use multiple projects inside one open Rhapsody. It is in the menu under “File”, there is “Insert Project >” and then “New…” or “Existing…”. Selecting a Rhapsody project will shift both the open project and the newly openened project under a “Projects” folder.
One of the projects (The last opened) is writable (or “active”), indicated by the BOLD name and all others are read-only, indicated by the (RO) behind the name.
You can right-click the project and select “Set as Active Project” to switch to another project.

Copy Paste

It is now possible to copy or link elements fro one project in another project. Beware: You can only copy units (Rhapsody elements that are save in their own file, indicated by the small decorator icon in the left lower corner, grey or red)
Just drag and drop will create a reference, indicated with a (REF) behind the name, holding CTRL during the drag and drop will create a real copy.

Absolute vs Relative

This is where property “1” comes into play. This defines how the paths are stored when you have multiple models in one workspace. When you leave Rhapsody with a workspace open, Rhapsody will ask you if the project-list must be saved.
It will save a file in the directory of the first project. The paths to each one of
the projects will be stored according to the setting of the property “1” in that project.
You can edit the project file by hand, you can even move the project file (Take care that you keep the project paths correctly!) but there is a nicer way to do this: just rght-click on the Folder “Projects” then select “Edit Unit”. There you can edit the name of the file and the location. You should then figure out how you want to store the paths to the model. My Tip: only use absolute if you are absolutely sure that the paths will be the same on all computers of all people involved in the project. Otherwise: use relative!

Unit

A unit is, as mentioned, a Rhapsody model element that is stored in a seperate file. My advice is to keep the default settings (That are good, for a change…) and only take packages, components and the project file as a unit ( project.rpy(x), component.cmp(x) and package.sbs(x), the last two are stored in the project_rpy directory )
Property “2” defines how these paths are stored, here also use relative unless you are absolutely sure you can use absolute.

Conclusion

Bordeaux is fantastic, we had a great weekend and we will definitely return there someday.
Use relative unless absolute will work for you, make sure you have the same setting in all projects!
Using multiple projects in a workspace is perfect if you have divided your model in seperate parts that are included in each other.

Remember: Everything is relative, absolutely!

Keep modeling with Rhapsody! wvdheiden@sodiuswillert.com

Walter.

Berlin #100

Intro

It is not only work… After a lot of work and travel it was time for a short break. For some time now I promissed my sons to take them to Berlin and finally we managed to find the time.
First we drove to Bückeburg by car to stay at my appartment, the next day we would leave early to catch the train to Berlin. As I have found out a car is useless in most big cities, there is perfect public transport and parking is nearly impossible and costs a fortune.

100

This is BLOG # 100! Never thought 2 years ago that I would write 100 articles! This year also KLM (my favorite airline) celebrates 100 years, congrats!

Police

First we had to overcome some police activity. As soon as we crossed the border a fast BMW overtook us and a sign came up “Police, Follow”. I thought that would be a border control but it turned out I had forgotten my MOT for 1,5 years… In the Netherlands they send you an email when it is due but in Germany they don’t….
Also my tires were “Formula 1 ready” So I had some explaining to do. Luckily the police man were quite understanding, they soon figured out that I did not do that on purpose and they let me go wit ha small fine and the promiss that I would take care of it.

Train

Trains are cool in germany. If you book on time and stick to a certain train you can travel quite far for a small amount of money. We even had first class seats. It was a nice drive and it went very fast. Impossible to match that with a car.

Hotel

The hotel was right next to the central station, perfect to use as a base to sightsee Berlin. The room had bunk 2 bunk beds but Robbert volunteered to sleep “upstairs”. Further it was not large but we were not there to enjoy the hotel room, but clean and the breakfast was good.

Berlin

Time to hit the city. We did the usual stuff, Parliaments building, Brandenburger gate, Jewish monument, Checkpoint Charly etc.
On Wednesday a friend who was born in East-Berlin, showed us around in the eastern part, very very nice. We had lunch in the TV Tower (207 meters high) Also we saw the largest part of the Wall that is still there.
The next day we took the metro to see some other stiff like the Karl-Marx allee and much more. Berlin is very very nice. After every corner there is a reason to visit the city again. This month also is the celebration of 30 years since breaking the Berlin Wall.

AUTOSAR Workflow

Being without a car still cannot drag me away from AUTOSAR. We now have quite a nice AUTOSAR workflow.
You can start with SysML and then use M2M to create an AUTOSAR model, export that to an AUTOSAR authoring tool, add some more information and even use Rhapsody to implement AUTOSAR compliant SWC’s that contain statemachines.
You can also start with ARXML from a third party, read that in, use M2M to create a SysML model (Or UML) and the create your architecture there.

Back Home

Finally we had to return home, or at least to Bückeburg by train. Really tired (we walked more than 40 kilometer…) we hit our beds. On Friday I kept my promiss to the policeman and went to the TÜV for a checkup. 2 dasy later the Dutch garage would switch my tires to wintertires. All is OK again.

Happy modeling with Rhapsody!

Walter van der Heiden

Berlin #100

Intro

It is not only work… After a lot of work and travel it was time for a short break. For some time now I promissed my sons to take them to Berlin and finally we managed to find the time.
First we drove to Bückeburg by car to stay at my appartment, the next day we would leave early to catch the train to Berlin. As I have found out a car is useless in most big cities, there is perfect public transport and parking is nearly impossible and costs a fortune.

100

This is BLOG # 100! Never thought 2 years ago that I would write 100 articles! This year also KLM (my favorite airline) celebrates 100 years, congrats!

Police

First we had to overcome some police activity. As soon as we crossed the border a fast BMW overtook us and a sign came up “Police, Follow”. I thought that would be a border control but it turned out I had forgotten my MOT for 1,5 years… In the Netherlands they send you an email when it is due but in Germany they don’t….
Also my tires were “Formula 1 ready” So I had some explaining to do. Luckily the police man were quite understanding, they soon figured out that I did not do that on purpose and they let me go wit ha small fine and the promiss that I would take care of it.

Train

Trains are cool in germany. If you book on time and stick to a certain train you can travel quite far for a small amount of money. We even had first class seats. It was a nice drive and it went very fast. Impossible to match that with a car.

Hotel

The hotel was right next to the central station, perfect to use as a base to sightsee Berlin. The room had bunk 2 bunk beds but Robbert volunteered to sleep “upstairs”. Further it was not large but we were not there to enjoy the hotel room, but clean and the breakfast was good.

Berlin

Time to hit the city. We did the usual stuff, Parliaments building, Brandenburger gate, Jewish monument, Checkpoint Charly etc.
On Wednesday a friend who was born in East-Berlin, showed us around in the eastern part, very very nice. We had lunch in the TV Tower (207 meters high) Also we saw the largest part of the Wall that is still there.
The next day we took the metro to see some other stiff like the Karl-Marx allee and much more. Berlin is very very nice. After every corner there is a reason to visit the city again. This month also is the celebration of 30 years since breaking the Berlin Wall.

AUTOSAR Workflow

Being without a car still cannot drag me away from AUTOSAR. We now have quite a nice AUTOSAR workflow.
You can start with SysML and then use M2M to create an AUTOSAR model, export that to an AUTOSAR authoring tool, add some more information and even use Rhapsody to implement AUTOSAR compliant SWC’s that contain statemachines.
You can also start with ARXML from a third party, read that in, use M2M to create a SysML model (Or UML) and the create your architecture there.

Back Home

Finally we had to return home, or at least to Bückeburg by train. Really tired (we walked more than 40 kilometer…) we hit our beds. On Friday I kept my promiss to the policeman and went to the TÜV for a checkup. 2 dasy later the Dutch garage would switch my tires to wintertires. All is OK again.

Happy modeling with Rhapsody!

Walter van der Heiden

Paris Code Generation.

Introduction

Lately I do a lot of my travel to France or via France. Of course we are now, as SodiusWillert, located in Bückeburg but also in Nantes (and in Detroit)
But that is not all France… I prefer flying by KLM and that comes automatically with Air France and the occasional stop-over in Paris CdG.
Not my favorite airport as my regular readers know.
But sometimes the flight is just more convenient or just cheaper via CdG.

Not this time, I actually had to be in Paris. Closer to Orly than to CdG so I decided to fly there. The KLM-Air France “El Cheapo” airline “Transavia” flies to Orly and it was really quite cheap. The reason for that became clear when I was sitting in the train to Schiphol: I received a text message that my flight was cancelled. 15 Minutes later an email arrived with my options:

  • fly on another day
  • fly to a different place
  • ask my money back.

neither of these options was what I wanted, so I called the Transavia Hotline. After 15 minutes of waiting (“It will come in time” – Billy Preston and Syreeta on repeat…) the call was answered and the train entered a tunnel… so after 15 more minutes I was again in contact.
“We are currently busy checking all passengers out”, “please call back in half an hour” she said. After some pressure she promised to call me back as soon as she knew more. Apparently she is not much smarter because she still hasn’t called me.

I already expected that and started calling after 15 minutes. The next call center person was not able to do anything for me, she said. I had to do that in Schiphol at the rebook desk in terminal 2.
In the meantime I arrived and went to the desk. I already figured out there were 2 flights with KLM-Air France to Paris. One in 45 minutes (do-able since I had only carry-on luggage) and one on 21:30 in the evening.

To cut a long story short, I had to visit 2 more desks to finally buy a new ticket (€ 600) to Paris because nobody could rebook my flight. Of course I had the late flight, missed the early one due to the slow response and the lack of information. And I was at CdG so the Uber took an hour instead of 10 minutes. Thanks Transavia!

Code Generation

But I arrived in Paris and had to speak the next day about Code Generation. I got the usual questions like:

  • “Why Code generation”
    because it’s the only way. Everywhere you look companies are already very low on staff, programming takes longer and longer, offshore programmers do not really help since we have to increase the effort for specification. Having code generated from a good spec dramatically decreases the time needed to deliver good quality software.
  • If that is so then why doesn’t everybody uses CG?
    We started selling Rhapsody with CG about 20 years ago. At that time there was no other tools that had CG. So sales people from all competitors would claim that CG was something nobody needed. A really annoying statement that is still haunting us (
  • We can just start by drawing pictures and then when we have learned UML we can try CG..
    Sounds like a cool idea. But it isn’t. think 25-30 years back. The time where ‘C’ came up. People were all using assembler and considered ‘C’ as being difficult, ‘C’-compilers were “eating memory” and everybody thought that this ‘C’ thing would go over because it wasn’t useful. Maybe only for documentation (Sounds familiar?)
    Now if you are using ‘C’ to document your code and you’d be programming assembler, what is the chance that you have learned ‘C’ after a few months? I can tell you: zero.
    You learn ‘C’ by developing in it and observe the compiler telling you what you did wrong. And after that the debugging of your programming. Then you learn ‘C’.
    Same thing with UML. You will learn that when you’ve seen and debugged the code. Not by just drawing pictures.
  • But UML is better for documentation isn’t it?
    Depends. As said before, just using UML without checking if you have don it right only increases the work you spend. Don’t forget that UML is a language with a lot of redundancy in it. You have to do a lot of work to create seamless documentation. Then why not generate code from it?

So what does a good UML Code generator needs?

We have tried to create an external code generator before (For EA, maybe you remember) This was not very successful, partly because there was no real integration.
Also many people thought they could take their existing models and then generate code from them, which is, of course, never going to work since you can do a lot in a UML Tool that does not make sense for Code Generation.
You can generate code from the following Diagrams:

  • Class Diagrams
    – Classes -> .cpp/.h (or .c/.h)
    – pointers or embedded classes for relations,
    – code for ports
  • State Diagrams
    – State machine that is connected to a class. All instantiated objects have this state-machine
  • Activity Diagrams
    – code for a Class, you can use a limited version to describe code for functions
  • Sequence Diagrams/Interaction Overview Diagrams
    – Lifelines are classes (Instances but they have to be classes first)
    – messages are events or operations. In theory it would be possible to generate behavior from Interaction Overview Diagrams.
  • Object Diagrams
    – Objects are Objects/instances
    – Links are assignments of object pointers to attributes
  • Package/Profile Diagrams
    – packages can have code, they need to bring the “glue” code for instantiating and connecting objects. Profiles influence the generated code.
  • Composite Structure Diagram
    – instantiates objects and connects them
  • Component Diagram
    – knows the relation of Components and could generate “make” files that links the correct components

No code is generated from:

  • Usecase Diagrams
    – Oh how we would love that, don’t we 😉 No, is not really possible. I would rather write something that generates code directly from requirements….
  • Deployment Diagrams
    – Not really feasible
  • Communication Diagram
    – Possible but who would want that?
  • Timing Diagrams
    – That is also possible but we haven’t worked that one out yet.

So we established that once of the important things for Code Generation is the integration with the UML Tool.
This needs to guide you with the model so that code can be generated from it.
Also we need to directly show the generated code in a window in the tool. Feedback is the most important thing.
Roundtrip and reverse engineering are very important. We need to able to change the code outside of the tool in “our favorite editor”. Also we must be able to use legacy code in an easy way.

  • Generated Code must be understandable by developers
  • it must be efficient in code size and in run-time behavior
    • at least as optimised as hand-written code
    • must satisfy timing requirements.
  • it must fulfil safety aspects if used in safety-critical systems.
    • code must be compliant wit standards like MISRA
  • The generated code must be abstracted from RTOS/CPU and Compiler (The framework will do that)
  • it should not be unnecessarily dependent on other stuff

Up till today, there is still only one tool that does this way better than all others and that is Rhapsody. More than 20 years old and still going strong.

So. That’s it, have fun generating code with Rhapsody!

Walter van der Heiden wvdheiden@willert.de

 

Model Transformation

Introduction

What?!? No travel? Well… yes. too much travel. Hence the low posting frequency. Apart from moving with my family from our old house (that was sold and where we had to leave in 3 weeks) to a temporary vacation home that is not even large enough to house the family of 4 (well, 5 with the dog) let alone has enough place for all our stuff.
So most of it is stored at the moving company and will be brought to our new home when it’s finished (Planning date is December 13. But we all know what planning dates mean, do we….)

Luckily there was (and will be) much traveling in the last weeks and the coming months. I already visited Munich, for our MESCONF, Paris (just for flying to Schiphol), Bückeburg (For work, and we are also moving there), Köln (Cologne) and Zürich.

In the next weeks I’ll be traveling to Bückeburg (Office), Paris, Nantes, Berlin, Possibly Detroit, Ft Myers, Boston, Sindelfingen (ESE), Munich and more.

Transforming your Models

But that is not what I wanted to talk about. There is a more technical topic that needs attention.
Everybody knows (or should know) that we are no longer Willert but SodiusWillert and that we are awesome in connecting engineering data in the widest form possible.
Connecting Jira to IBM via OSLC, connecting the world of ALM to PLM by linking PTC Windchill to IBM with OSLC but also transforming your UML (or even SysML) model to code in C or C++.
One of the questions we receive is that to connect, sync or convert models into other models.

AUTOSAR

One of the models a lot of our customers use is AUTOSAR. That is a standard used in Automotive and contains a standard data format for exchanging information between tools. It is called ARXML (AUTOSAR XML) and is very complex. With ARXML you can exchange very detailed information about the software you make for car ECU’s. You have to use it if you want to create a run-time system for your ECU (RTE – Run-Time Environment) but also to use the Basic Software for your ECU.
But AUTOSAR also defines a model structure that can be used to define your ECU Architecture. Rhapsody can do that, you just load the AUTOSAR profile and you can model AUTOSAR. (Made by SodiusWillert)

Now this modeling structure has some similarities with SysML (Also uses Blocks and Ports etc) but that is, unfortunately, not really the same. AUTOSAR was, at the start, set up to improve cooperation between different automotive companies but somehow this path was left some time ago. IMHO opinion it is needlessly complex and tries to cover all possible ways to do something instead of limiting the users to the bare necessities and introduce an abstraction that would make life easier.
This is where the problems start when you want to use SysML to do architecture modeling, there is no defined path from SysML to AUTOSAR.

Different soup: M2M

That’s how this is called in German: everybody is boiling their own soup. That leads to the fact that there is no single correct solution but a tailor-made solution for every user.
That is where the SodiusWillert M2M comes in. Louis Talvande from SodiusWillert designed this tool to do a model transformation based on rules that the user can define himself.
These rules are part of your Rhapsody model so you can easily select your model elements.

Example of Transformation Rules

When started M2M will transform your current model to another model using the rules you have defined.

More than just transformation

Sometimes (or actually mostly….) just mapping one element to another just isn’t enough. That’s why M2M allows you to not only map single elements to multiple elements but also 1:n or n:1 or n:n.
You can also define conditions in your mapping rules that can decide if a transformation should be made.
And if that is not enough, you can also define scripts (Javascript) comfortably inside your Rhapsody model, to post-process your elements. The complete Rhapsody Java API is to your disposal there.

Merging

Of course, transforming a model is cool. But what if you make changes to the original model? Of course you can always throw away your target model and transform again but what if you also have made changes to the target model?
Rhapsody comes with DiffMerge built-in. Since you are using all standard Rhapsody elements Diffmerge works out-of-the-box.

Features of the M2M Tool

  • Transforms Rhapsody models into Rhapsody models
  • Flexible (user modifiable) transformation rules
  • Transformation can be launched via commandline
  • Portable mapping rules, so you can upgrade from e.g AUTOSAR 4.22 to AUTOSAR 4.31
  • Merging capability with DiffMerge
  • 1:1, 1:n, n:1 and n:n mappings
  • post-processing very easily possible
    • conditional mapping
    • creating new elements using the JAVA API

Just contact me or Louis if you want to learn more about M2M

Well… that’s it for today! Have fun transforming with Rhapsody

Walter van der Heiden ( wvdheiden@willert.de )
Louis Talvande ( ltalvande@sodius.com )

Model Transformation

Introduction

What?!? No travel? Well… yes. too much travel. Hence the low posting frequency. Apart from moving with my family from our old house (that was sold and where we had to leave in 3 weeks) to a temporary vacation home that is not even large enough to house the family of 4 (well, 5 with the dog) let alone has enough place for all our stuff.
So most of it is stored at the moving company and will be brought to our new home when it’s finished (Planning date is December 13. But we all know what planning dates mean, do we….)

Luckily there was (and will be) much traveling in the last weeks and the coming months. I already visited Munich, for our MESCONF, Paris (just for flying to Schiphol), Bückeburg (For work, and we are also moving there), Köln (Cologne) and Zürich.

In the next weeks I’ll be traveling to Bückeburg (Office), Paris, Nantes, Berlin, Possibly Detroit, Ft Myers, Boston, Sindelfingen (ESE), Munich and more.

Transforming your Models

But that is not what I wanted to talk about. There is a more technical topic that needs attention.
Everybody knows (or should know) that we are no longer Willert but SodiusWillert and that we are awesome in connecting engineering data in the widest form possible.
Connecting Jira to IBM via OSLC, connecting the world of ALM to PLM by linking PTC Windchill to IBM with OSLC but also transforming your UML (or even SysML) model to code in C or C++.
One of the questions we receive is that to connect, sync or convert models into other models.

AUTOSAR

One of the models a lot of our customers use is AUTOSAR. That is a standard used in Automotive and contains a standard data format for exchanging information between tools. It is called ARXML (AUTOSAR XML) and is very complex. With ARXML you can exchange very detailed information about the software you make for car ECU’s. You have to use it if you want to create a run-time system for your ECU (RTE – Run-Time Environment) but also to use the Basic Software for your ECU.
But AUTOSAR also defines a model structure that can be used to define your ECU Architecture. Rhapsody can do that, you just load the AUTOSAR profile and you can model AUTOSAR. (Made by SodiusWillert)

Now this modeling structure has some similarities with SysML (Also uses Blocks and Ports etc) but that is, unfortunately, not really the same. AUTOSAR was, at the start, set up to improve cooperation between different automotive companies but somehow this path was left some time ago. IMHO opinion it is needlessly complex and tries to cover all possible ways to do something instead of limiting the users to the bare necessities and introduce an abstraction that would make life easier.
This is where the problems start when you want to use SysML to do architecture modeling, there is no defined path from SysML to AUTOSAR.

Different soup: M2M

That’s how this is called in German: everybody is boiling their own soup. That leads to the fact that there is no single correct solution but a tailor-made solution for every user.
That is where the SodiusWillert M2M comes in. Louis Talvande from SodiusWillert designed this tool to do a model transformation based on rules that the user can define himself.
These rules are part of your Rhapsody model so you can easily select your model elements.

Example of Transformation Rules

When started M2M will transform your current model to another model using the rules you have defined.

More than just transformation

Sometimes (or actually mostly….) just mapping one element to another just isn’t enough. That’s why M2M allows you to not only map single elements to multiple elements but also 1:n or n:1 or n:n.
You can also define conditions in your mapping rules that can decide if a transformation should be made.
And if that is not enough, you can also define scripts (Javascript) comfortably inside your Rhapsody model, to post-process your elements. The complete Rhapsody Java API is to your disposal there.

Merging

Of course, transforming a model is cool. But what if you make changes to the original model? Of course you can always throw away your target model and transform again but what if you also have made changes to the target model?
Rhapsody comes with DiffMerge built-in. Since you are using all standard Rhapsody elements Diffmerge works out-of-the-box.

Features of the M2M Tool

  • Transforms Rhapsody models into Rhapsody models
  • Flexible (user modifiable) transformation rules
  • Transformation can be launched via commandline
  • Portable mapping rules, so you can upgrade from e.g AUTOSAR 4.22 to AUTOSAR 4.31
  • Merging capability with DiffMerge
  • 1:1, 1:n, n:1 and n:n mappings
  • post-processing very easily possible
    • conditional mapping
    • creating new elements using the JAVA API

Just contact me or Louis if you want to learn more about M2M

Well… that’s it for today! Have fun transforming with Rhapsody

Walter van der Heiden ( wvdheiden@willert.de )
Louis Talvande ( ltalvande@sodius.com )

Check, check, modelcheck….

Introduction

Lots of times I get questions about model checks in Rhapsody. First of all if Rhapsody does model checks, the short answer here is: yes.
The longer answer is that Rhapsody does not check much, just if there are no errors in the model that prevent code generation.
You can start model check by hand (Menu: “Tools”, “Check Model”, “<<Configuration Name>>”. This will start a better Model Checker.
Does that check your complete model? Short answer: Yes. Long answer: Not exactly….
It does some checks like if you have added a description to your model elements and if you have changed the default names (Class_01, etc) But nothing more.
If you want more thorough checks you have to provide them yourself. This is not as bad as it sounds, the UML is a language, it is very difficult to check if somebody is using it in the wrong way.
If you want to check something you first have to define your model guide lines. How do you want to model. Then you can define how you want to check that.

Java API

Rhapsody has a Java API that allows you to (almost) completely control Rhapsody from extern.
You can use that to check the model, convert model elements, generate code and much more.
For check model you need to extend the model check interface and implement checks. Via the API you can walk through the model selecting elements based on type/name/position in the Browser Tree. You can access all information from the model and even change it when you like.
Same thing for Code Generation, you can, of course, walk the model and generate your won code but you can also instruct Rhapsody to call your Java functions when Rhapsody is ready generating code. We call that the Simplifier, Rhapsody will first take your model and generate a simplified model You can make that visible by setting: CPP_CG::Configuration::ShowCgSimplifiedModelPackage to TRUE.

Oh no… not Eclipse….

Yes… this works with Eclipse. Eclipse and I have a difficult relationship… We don’t like each other. It is getting better last years… but still not as easy as other IDEs.
You just create an Eclipse Java Project and you go to the properties of your project. Open the Java Build Path tab, then in Libraries open “Add External JARs”, now select the Rhapsody.jar file in “Share/JavaApi” . That’s all… should work now.

The Check

First Ccreate a project (e.g. CustomChecksHelper). You can then create a class (e.g. CheckPlugin) that needs an entry point function:
RhpPluginInit (IRPApplication rpApp)
that will be called by Rhapsody. You can then instantiate all checks that you have made, all the classes that do checks have to extend RPExternalCheck and have to override the
check( IRPModelElement elem, IRPCollection failElem)
function.

Helper

Rhapsody uses “Helper” files to pre-load plugins. That makes them faster and immediately available. Therefor create a file under Share\Helpers with .hep as extension. The syntax of that file is quite cryptic, I always have to try 3 times before it works… Beware if you already have helpers then the numbers change.

[Helpers]
numberOfElements=1
name1=Checks_Plugin
isPlugin1=1
RhpVersion1=8.4
JavaMainClass1=com.telelogic.helpers.CheckPlugin
JavaClassPath1=$(OMROOT)\Helpers\CustomChecksHelper.jar

OK. That’s it! Have fun checking with Rhapsody!

Walter van der Heiden ( wvdheiden@willert.de )

RXF Cert

Introduction

The RXF can be bought in a version that is certifiable. So that does not mean it is certified. It is certifiable. That means we have done all work that is done in a certification process, like writing down requirements, connecting them with model elements, creating tests, performing tests and caring about MISRA, coverage etc.

What is the RXF?

It is not an RTOS or an RTE or any other Operating System, also not a driver layer that will give you hardware control.
It is just the functionality that the UML offers that is not available in ‘C’ or ‘C++’. Much of that functionality is implemented by using an RTOS. the RXF is than a sort of Abstraction Layer that makes a unified RTOS API.

When you create an active Class in the UML you tell your audience that this class runs in its own thread. (Or Task or even process but that has some additional difficulties see this article.) This class then should have behaviour, described in either a state-machine or an activity diagram, as it is defined in the UML. There is no other “standard” mechanism, you have to build that yourself. (Remember, the UML is a language, nothing more)

When you use timers in your behaviour diagrams ( like tm(xxx) in a state-machine ) then you will have to use something that times. Either a hardware timer or if you use an RTOS you can use the tick time. But either way: there is no standard ‘C’ or ‘C++’ mechanism for that.

The RXF also takes care of sending and receiving asynchronous events that are used in state-charts.

Certified vs Certifiable

It is very difficult to certify a “half-product” like the RXF. You have to predict all possible uses and much of the functionality depends on the rest of the system. So at best it can be made certifiable. That means that all possible work for a certification is already done, many documents are already there. If you have never gone through a certification process, this is an excellent starting point. The use of modelling is more or less recommended by an increasing number of certification institutes ( They tend to be quite conservative and that is OK! ) so using Rhapsody and the RXF is a huge step forward for setting up your own process.

What is there in the RXF-Cert?

  • Bill of Material (BOM)
    Contains a directory of all documents and deliveries. With exact version numbers and MD5 hashes. Also describes the RXF-Cert system borders and its influences on software development and code generation.
  • RXF-Cert Architectural Model (RCM)
  • High Level Requirements and Specification (SPEC)
  • Requirement Traceability Table (RTT)
    Showing full coverage of requirements through system specifications down to module specifications / implementation and tests.
  • User Manual (UM)
    How to use the RXF in Rhapsody. Includes installation guide and detailed technical descriptions of the RXF-Cert.
  • Validation Plan (ValP) and Validation Report (ValR)
    Describes how we validate the RXF-Cert. Documents reviews of requirements, code and documentation. (Four-eye principle)
  • Test Documentation: Verification Plan (VerP) and Verification Report (VerR)
    • Test Concept and Test Process Description
    • Acceptance Test Specification and Results
    • System Test Specification and Results
    • Unit Test Specification and Results (Model Based using the TestConductor)
    • MISRA Conformance Report:
      how MISRA compliance is implemented and what is done to certify that violations are handled correctly
    • All Tests are part of the delivery and can be re-executed by the customer.
  • Software Safety Plan
    Describes the strategy of safe software development we have followed during development of the RXF-Cert. Explains traceability, document review guidelines and our personal competence.
  • Software Safety Manual
    How is the RXF-Cert intended to be used, what are the restrictions and safety application conditions. Also contains a description of all the functions of the RXF that can be directly called by the user.
  • Tool Manual (TM)
    Lists all tools used in RXF-Cert development including reason for usage, classification, statements for safety related usage and detailed version information.
  • Software Modification Procedure (SMP)
    How modifications and updates of the RXF-Cert are handled.
  • Final Delivery Report (FDR)
    Documents final checks that have been performed when delivering the RXF-Cert.

Vacation time

So. That is what the RXF-Cert is really doing. Literally man-years were invested in creating that. As said, it is a great start for someone who needs to certify his software, many of the pitfalls are already covered.

So. It’s August, it’s vacation time. For me, unfortunately, there is no beach or mountains,, I am moving from my old house to my new house. The latter is not finished so I have to stay in a holiday home for about 4 months. So a sort of vacation… Luckily there is internet there so I will keep writing, don’t worry!

Sunny modelling with Rhapsody and the RXF

Walter van der Heiden ( wvdheiden@willert.de )

« Older posts Newer posts »

© 2025 Rhapsody TechBlog

Theme by Anders NorenUp ↑