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

Category: Rhapsody (Page 14 of 14)

How to survive off-days….

Disaster days and how to handle them.

We all know them…. disaster days. Mostly they are already starting bad. Like cars that don’t start, public transportation that strikes. Rain that pours, people shouting at you for no obvious reason. That is a day where you should not have ignored the signs and have stayed at home in your bed. Sometimes this just happen “out-of-the-blue” sometimes it is self-inflicted while you suffer from an overdose of “cool party last night”

But no, we are tough. We persist and fight our way through the day. But the real surprise comes next day when everything is working OK until you check last days work….. This is the point where you start thinking about Configuration Management Systems or at least Source Code Control…. Too late, you should have done that before…;-)

Yeah Right….

Making a zip file from your working directory every day is a solution, (and definitely better then nothing) but there are better solutions, certainly if you are not alone in your company.

Source Code Control is very old, on Unix Systems this is been used since there are Unix Systems. In the personal computer area this is a bit newer but also used a long time. The last 10 years or so, many people use Subversion (SVN) or Git, sometimes still CVS. All these are open source systems, you can just download them and use them. Since millions of people have, these systems are good, very good.

Of course there are still commercial systems that cost money, sometimes a lot of money. That does not make them better than SVN just different and they have a phone number that you can call when things don’t work.

More then a backup

Config Management does so much more than just saving you from bad days, it helps you preserve versions and releases, it helps you cooperate with colleagues and prevent changing the same stuff twice (the first one in is out….)
Modern systems use automatic difference/merge tools that are pretty intelligent and can merge files that are edited by 2 persons. As long as not the exact same things are changed, these tools do a good job.

What does this has to do with Rhapsody?

Everything…. If you develop with Rhapsody you also want to preserve stuff, cooperate with co-workers and much more.
And… no…. you don’t just take the source code and put that in CM, the model contains much more information then just the generated source code. In fact, the code can be generated from the model ALWAYS. (In fact it is Object code…) so don’t bother checking that in. (Only if you don’t trust Rhapsody…. or if you want to speed things up.)
Yes! You put the model under CM’s control. Now how is that done?
Rhapsody does not have a CM System built-in, it uses either the good old command-line or the a bit better and a bit less old SCC, the Microsoft Source Code Control. The latter is a registered DLL that is called by Windows. Works faster (although hardly noticeable on modern computers) but much nicer then command-line.
Unfortunately neither CVS, nor SVN nor GIT know SCC… there have been tools to create an SCC Interface, PushOK and TamTam but both have been discontinued for years (and PushOK is Russian, used to be a problem in the US but that might have changed….)
Luckily we have created a profile for the use of SVN via command-line. It is included in all Willert adapters but if you want it: send me a mail, i will send it to you.

What do we CM then?

Units. What are units? That are files that Rhapsody uses to store its models. A Rhapsody model is not just one file, per default the base model file (.rpy), all packages (.sbs) and Components (.cmp) are stored in files. Since all CM systems are filed base, this is the only thing they can process in CM.
You can use properties to tell Rhapsody to store diagrams in units and you can even tell Rhapsody that a Class is a Unit (right click, create Unit) but I do not recommend that. It is a sign of bad design if you need Classes to be units.

How is the Workflow?

There are 2 possible workflows

  • Old-fashioned lock and free
    Once checked in CM the model is read-only until you check-out your “unit”. This is then locked for all others until you check it in again.
    In that way nobody can accidentally overwrite stuff that others have made.
  • Work and Merge
    All members of the team have a copy of the model, they all work on it until happy, then use the (included) DiffMerge Tool to merge the changes in the base version. There is more risk that people are changing the same model elements but many of these changes can be automerged back.

Which is the best workflow? As usually: that depends. On how you work, with how many people and more. Also on how you have built-up your model, do you have one large model? Or do have divided into multiple models? In one of the next BLOG entries I will write more about methods to split the model up in smaller models.

 

Happy Modeling with Rhapsody!

Walter van der Heiden (wvdheiden@willert.de)

 

 

Real-Time Framework, the robust base for your embedded applications.

Why a Framework?

Actually quite easy. When you generate code from UML you need a lot more then ‘C’ or ‘C++’ can offer you. Java is different, it has a VM that does most of the things you need. But ‘C’… how do you start a thread in ‘C’? Or how do you start a timer in ‘C++’?

Right. You can’t. At least not in the base language, you need an external library for that.
The “extra” functionality in the UML is all RTOS based functionality. So it seems logical to use an RTOS for that. To make the use of any RTOS easier it is smart to implement this in a framework that does the translation to your RTOS. in that way, the only thing you need to do is adapt the Framework to your current environment and your UML model should be runnable in that environment.

In an embedded environment this is only part of the story, many hardware and even compiler dependant parts exist. Modeling certainly helps you but you should take extra care to separate your hardware dependant parts in your model.

Also the framework adaptation is not always straight-forward but the reward is high when you stick to the standard: you can be independent of the environment you use.

We have done a model conversion from one environment to another environment twice, both times it went with minimal effort. As close as you can get to the holy grail of embedded software development: platform independent programming. But I will be honest… we are a long way from reaching that in the embedded world.

 

What Framework?

There are quite a few Frameworks for Rhapsody. Out of the Box there are already a few. Are they any good? As always, the answer is: that depends….

On what? On what you want to achieve with it. Creating a PC application, Linux or Windows? Real-Time does not bother you, nor do you care about memory usage?
Than the standard OXF is your friend! It is the default in Rhapsody, you don’t have to do anything. If you are lucky enough to own a developer edition, animation, panel diagrams and webify are there to support you.

What Frameworks are there to choose from:

  • OXF, standard Framework
    Is not small, is not fast, is not deterministic, blocks interrupts for unknown time, uses an RTOS.
  • MXF, MicroC (Automotive) Framework, uses OSEK as RTOS
    in combination with the AUTOSAR import/export
  • SMXF, reduced MicroC Framework
    Targetted for use in Certification projects
  • RXF, Willert Framework
    Small, fast, C and C++, UML Target Debugger for back-annotation, enhanced Workflow, available as Cert with documentation.
  • IDF – Interrupt Drive Framework
    Single threaded. Started as a demo for “how the framework works”, is available and adaptable. Was designed to be small
  • SXF – Simplified C++ eXecution Framework
    C++ for Safety critical. Is also only static
  • synchronous Framework
    For very small environments, discards a lot of UML functionality, programming only with triggered operations.
  • NOF, No Framework
    For the real die-hard…..
  • ?? Did I forget one?

So here we have a few criteria that you can use to support your framework decision:

  • Code size, use an RTOS or just a main loop?
  • Language, C, C++ or else?
  • (Real-) Time behavior, are interrupts disabled? If yes for how long?
  • Safety viewpoint, MISRA? Is there documentation about safety?
  • Animation and Back-annotation, UML debugging available?
  • Simulation, on PC?
  • Hardware abstraction / Portability, fast switch to other environments?
  • Memory Management, static or “half”-dynamic?
  • Workflow, build in Rhapsody or elsewhere?
  • Limitations, Ports, Container Classes, Dynamic, etc

 

Check the criteria before you make a decision. As you can see, the Willert Frameworks (RXF and RXF-Cert) have excellent notes on all items.

PEPS

We use a model to test framework speed, the speed unit we have is PEPS (Processed Events Per Second) We have invented that ourselves since there was no other measurement available.
The model is there for use in other environments, it is pretty standard so it must be easy adaptable to other environments. Ask me if you want to have it!

Happy Modeling with Rhapsody

Walter van der Heiden (Email: wvdheiden@willert.de)

Who needs documentation anyway?

Yes who?

Everybody of course. Don’t be daft. I know software developers hate writing documentation. Why do i know that? I am a software developer myself… takes one to know one.

But when using Model Driven Software development, documentation is not that hard anymore. In fact, you are writing documentation while you are developing, almost without noticing it.

Oh, don’t get me wrong here, it is not done fully automatically, you have to do the right things, like putting effort in the way you build up your model. When you don’t, the same happens when you write source code without documentation.

It is fully possible to create a working (meaning: the code you generate will do what is expected) UML model from Rhapsody without a chance to understand what is happening by reading the model. Or as we used to say: you can mess up things pretty bad but to really screw things up requires a computer…

So. Let’s assume we modelled the right way. Now what? The boss wants to see what we did and I have to present the model for him/her on paper. How do we do that?

Well: Rhapsody offers multiple ways to document your models and make the information available to others.

  1. Use Rhapsody. Sounds a bit awkward but the best way to look at Rhapsody models is with…. Rhapsody. Don’t start with: But that is too expensive… there is an Architect Version that suffices for viewing the model for about € 600,- But a tiny bit of knowledge about models is required so that might not be the 100% solution.
  2. Use Reporter. It’s free. And it does documentation! So where’s the drawback? Well… it does documentation but that;s about it. There’s no formatting, you can only decide on a high level what will be in and what not, it’s just in RTF, no other formats and you can edit the documents but they will be overwritten when you regenerate them. So…. only limited use.
  3. Reporter Plus, is the version that costs. I’m not sure what the price is but since you ony need one, normally, that should not be a problem. This can write Word, PowerPoint, RTF and even HTML (with javaScript). The last format is pretty cool, it can build a web version of the model where you can click your way through as if you are using Rhapsody. The creating of the documentation template is a lot of work but not really complicated. Can document what and how you want.
  4. Publishing Engine is the successor to the Reporter Plus. Can document data from multiple tools, that can be quite handy when you also use Doors or other IBM Tools. Must also be purchased , but again, mostly only one license is needed. Is also not too complicated but a lot of work to make perfect documentation.
  5. Another method is often overlooked. But is sometimes the best way to do stuff. The Rhapsody Java API! It can access the model, it is built-in, (for free!) and is not too complicated. You are free to create any doc you like.

So. I hope this helps you in deciding how to document! If you have any questions, don’t hesitate to ask!

Happy Modeling with Rhapsody

Walter van der Heiden (wvdheiden@willert.de)

 

AUTOSAR meeting Juli 2017 Paderborn

The planning was to have a more quit week with less travelling. As usual, this did not work out well. As my good friend Bruce always says: The difference between theory and praxis is a lot larger in praxis than it is in theory. No problem, I’m used to that.

On Tuesday, at least that is what Clemens thought, we had a common AUTOSAR Meeting. We are AUTOSAR Premium Member (by proxy of Sodius) so we visit the meetings and we try to influence the process of the AUTOSAR specification.

So on Tuesday morning very early we drove from the apartment in Bückeburg to dSpace in Paderborn where the meeting was held.

There it turned out that Clemens made a tiny mistake. He assumed that all meetings had the same footprint during the week which was wrong. (As _I_ always say: Assumption is the mother of all f***-ups) So after a Tuesday full of very very in-depth AUTOSAR workgroup meetings (and a nice lunch, thanks dSpace!) we drove back to the appartement just to go up very early again on Wednesday to visit the meeting we wanted to visit….

Anyway… shit happens. This way Clemens and I had time to discuss the Willert AUTOSAR solutions. Basically there are 2 AUTOSAR solutions, Classic and Adaptive.

Classic is for targeted at smaller controllers and very static environments. Base is that many system information and software (SW-C, Software Component) information is captured in an XML structure (ARXML) Tools can read that structure and use the information in there to configure themselves and to export their own added information to other tools.

Adaptive is targeted at larger systems that have dynamic components. Base is a Linux environment with many specs for security. It will (amongst others) be used by ADAS (Advanced Driver Assistent Systems)

What does that has to do with us? Well, Rhapsody is a tool as well and it is, out of the box, capable of reading and writing these ARXML files. You can then add information and work with the provided information. We think, however, that this solution is not applicable and scalable enough for a lot of customers. So we visit the meetings and have access to the AUTOSAR information to be able to create our own simplified AUTOSAR profile. (Apple Style, or better: Jobs Style, keep it as simple as possible, hide the complex stuff, make it usable for everybody but also make the complex stuff still accessible for Guru’s)

What we basically do with Classic is that we import ARXML and convert it to UML Elements right away. In that way we can use “normal” UML to develop AUTOSAR SWC’s.

Adaptive is very new and in early stages of definition. So there is a lot to do for us in that area, not only in profiles and frameworks but we can do a lot there in Rhapsody modeling, at least that is what we think.

So in the next weeks we have a lot to do. Clemens and I will be cooperating in creating / improving the Willert AUTOSAR Solution!

Happy modeling with Rhapsody

Walter van der Heiden (wvdheiden@willert.de)

 

Rhapsody Getting Started – part 1.

San José

The second part of this USA trip brings me to San José in California. I am joining the 10th AUTOSAR Conference there. The meeting is held in the Computer Museum in San Jose.
I think that’s pretty cool. Also in the neighborhood are Apple, Google, Tesla, the famous garage of Jobs&the Woz and the HP garage. When there’s time I will take pictures. But we will fly to Detroit very early on Thursday.. so there is only limited time.

San José is nice but very, very expensive. Hotels cost a fortune, the hotels that are affordable are really low-class. The weather is nice, about 20ºC .

 

Introduction

People ask me a lot of times: “Why don’t you write something for “beginners”?”
OK, good point. Let’s do something for beginners.

First: what are we going to do, what are we going to use.

  • Board: Infineon XMC2Go Board
    ARM Cortex M0 – XMC1100, 64k ROM, 16k RAM
  • Keil µVision IDE
    When installed without a license, this acts like an eval version with a 32k size limit: we can live with that! The Willert Frameworks are really small, a Blinky is only a few KiloBytes without optimisation. If optimising it’s just over 1 KiloByte.
  • Keil CMSIS2 RTOS
    Embedded RTOS that implements the CMSIS standard
  • Rhapsody 8.2.1, the latest version
    We use the ‘C’ or the ‘C++’ version. We will cover both languages.
  • Willert RXF for C or C++
    The “general” version of the award-winning Rhapsody Framework.
    includes the UML Target Debugger
  • CygWin/Visual Studio/Eclipse
    Some C/C++ compiler running on a PC, preferably a free one.

Second: The sequence of installing:

  • C/C++-Compiler
  • Keil
  • Rhapsody
  • Willert RXF

See Installing Rhapsody for more info.

Third: What are we going to make?

That’s easy, there is a Hello World equivalent in the embedded world. It’s called Blinky. We let an LED blink on the board, that is about the smallest complete program you can make that still has user interaction.

Getting Started

Now we have installed it all, we can start using the environment to create a project.

First we start Rhapsody. I always like to make a shortcut on the Desktop to have Rhapsody accessible always. In Windows 10 you can pin it to they taskbar. As you can read a in the Installing Rhapsody part, you can influence the version of Rhapsody that is started by adding command line options.

So the version we need to start is Rhapsody Developer in C++. You can start Rhapsody Developer in C if you like, i will describe the differences between these versions.

People that just start with Rhapsody often ask: Why do I have to choose a language when I start a new model? Why can’t I do that later. Well that is because Rhapsody not only generates code, it also accepts your own code that you type in. You can do that in operations that are in classes but also in state-charts and activity diagram actions.

So changing the language after a while would implicate that you would have to change your own code as well. Can be done, but is much work. Also there are differences in the language versions. Rhapsody in C cannot generate code for inheritance (only from Interfaces) and there are mode differences.

Luckily you never switch the programming language that often, where I worked we always decided which one we’d use upfront and stayed with it…

Now that looks pretty empty

Yes, it does. That’s why it’s now time to create a new model. Rhapsody works with models. Models as in representations of the real world not the models from the middle pages of certain magazines… We can open an existing model but for now we will create a complete new one. Can be done in multiple ways;

I don’t use the mouse often so I usually press CTRL-N. Yes, I like the keyboard…. I’m old enough. And now we are outing ourselves anyway: Yes I like VI…. But feel free to use the mouse if you like. You’ll become a small window that asks you to enter 4 things.

  • Name, the name of the model. You’ll notice that Rhapsody adds the name of the model to the path. So it will create a new directory for every model you create.
  • Path, where the model is stored. Non-existing parts of the path will be created (after asking…. after all this is Windows!) only if you create a new directory in the root directory, this cannot be created. It’s not Rhapsody, it’s a Windows relict from the past. Have I already mentioned that I hate Windows?
  • Project type, here you can select a profile to be loaded with the new model. The profiles have to be stored in a Rhapsody directory (and preferably have an accompanying text file with the same name that contains a description)
  • Project settings, almost the same as project type but adds a settings file

You should create a directory that you can find easy, preferably c:\work or something similar. This is the directory to filled in after “Path”. As Project Name you take “Blinky”, as project Type you click on select, then scroll down to the directory “WST_RXF_V7”, in there choose “RXF_CPP_V7”. In the Settings Tab, go to the same directory and choose WSTProfile

If you have filled in everything a new model is created.

OK… Now what?

You see an empty model [picture of Rhapsody GUI]

There are a few area’s on the screen.

  • Menu
  • Browser
  • Diagram area
  • Output Area
  • Drawing Menu

The menu is a partly straightforward, the stuff that visual studio gives you for free, but parts are Rhapsody specific. You can create and open diagrams and do a lot more.

What is the Browser? It is the view to your model. It contains all element of your UML or SysML model. You can select what you see in the browser by using queries, you can from the browser, create and delete model elements. Your Browser View will not be empty, it will contain some default elements and the profiles you have selected when creating the model.

The Diagram Area is logically the view on your diagram. Per default Rhapsody will create and open a diagram for you: An object Model Diagram named “Model1”.

The Output Area is empty until you start doing things like generating, compiling or executing code. Then the output is shown here, beware, it has multiple tabs.

The drawing menu is on the right and contains the elements that can be used on the currently open diagram type. Rhapsody has possibilities to add items to it or to limit the items on the drawing menu.

Repository

Or, as we call it, the browser. When a new model is just created, it contains a few folders.

  • Components, contain what you are actually creating with Rhapsody. Per default it contains a single component: “DefaultComponent”. If you double-click that’s window will open, the Features Window. All Elements in Rhapsody have a feature window, a double-click will open it. Even diagrams have features, only they are not opened with a double click but with a right-click and selecting “Features”. A double click on a diagram will of course open that diagram. The first tab contains the name and type (library, executable or other”.The second has a “Scope” that lets you select what other UML elements are part of this component.
    Under a component there is at least one “Configuration” (Default: DefaultConfiguration” . This contains the information about the target environment.
  • Object Model Diagrams, normally all diagrams are located under a package, like all other UML elements. But to make a model better accessible for others we need diagrams on the top-level to assure an entry in the model. You can (Actually you should…) add navigation info to allow for traversing the model from there.
  • Packages, the base of your UML Model. Packages are nothing more than folders, however they have influence on the generated code, some elements will be generated inside .c (or .cpp) and .h. You can organize your work by dividing it in packages and sub-packages. And sub-sub-packages, and sub-sub-sub-packages, and… you get it I guess.
  • Profiles, these are the profiles that were loaded when we selected our project type. It is, of course possible to load more profiles after you have created the model. Just use “File”, “Add Profile to Model”. Profiles are used to transfer a lot of properties in one go but also to include certain information in the model.
  • Settings, about the same as profiles, technically there is no difference. Then why? Beats me….

C or C++?

What is the difference between Rhapsody in C and in C++? There are a few differences which I will explain but there is also a lot that is the same. You can draw exactly the same elements, the generated code will differ. Also the code that you enter must be equal to the chosen language otherwise nothing will work.

‘C++’ is of course closer to the UML. It already has classes, OO, inheritance and a lot more. But Rhapsody in ‘C’ also offers OO. Here you see the same class code, in ‘C’ and in ‘C++’.

The Object orientation in C is done by using a struct to mimic a class. (Private members are not really private there, unfortunately.But in Rhapsody, the get and set methods are used to implement private, public and (only in ‘C++) protected.
Functions have the name of the class as prefix to prevent linking problems when 2 classes have the same functions. Private functions have only the name of the function and are “static” which makes them really private.
All functions have a “class * me” as first parameter to have access to the objects attributes.
Calling a function in C++: object->function();
Calling the same in C: class_function(object);

So. That was the start. Happy modeling with Rhapsody and see you in part 2!

Walter van der Heiden (wvdheiden@willert.de)

Code-centric vs Model-centric Development with Rhapsody.

Keep on dreaming…..

On the phone with a customer I noticed that the customer was disappointed in Rhapsody and in its ability to handle C source code that was externally written.
I always find it very difficult to deal with people who are not happy with the tools we sold them. But yes, it does happen sometimes and unfortunately, this was no different.

This particular customer wanted to use Rhapsody to more or less monitor his coding in C and in the meantime draw diagrams that represent his documentation. And also when it fitted better he wanted to draw in Rhapsody and then generate the C code according to his coding standard.
I never promised that such a scenario would work, I’m very sure, but this is what the customer understood from my words in earlier visits before buying.
I think that is OK, I am not offended, nor angry, nor do I take it personally. Customers are just as human as I am. I also hear what I want to hear and interpret until it’s right for me.
So, I do hear the ice cream man say: “I will be in your street today” and I do not hear him add: “but I wont be stopping…..” No problem.

The problem is that it I hate it when my customers are unhappy and I would like to change that but it I find it very difficult to transfer the correct information to a future customer during the sales process. Let’s give it a try here…

The truth, the whole truth and nothing but the truth.

NO! It is NOT possible! You cannot use Rhapsody and just continue coding C or C++ (or even Java).
Well… not entirely…. You can do some of that.
Is it any good? No, it’s not. Well.. it is OK but not more than that. If you just want to understand your fuzzy written code and expect Rhapsody to generate perfect UML diagrams so that you can understand some spaghetti code that you found on your hard disk: Keep on Dreaming. Never gonna happen.

As I always say: Reverse Engineering is a GiGo Process: Garbage in, Garbage out. There is no way that you can automatically make the incomprehensible understandable.
That is perfectly OK, badly written code should be re-designed and re-made….
(Yes, I know there are programmers that think otherwise…
– It was hard to write, it should be hard to read….
– Better write software with “built-in understandability protection” to ensure your pension plan.
…but I do not agree there…)

Now in C++ or Java the conversion to UML works reasonably well since these languages already support OO like UML does. But even in these languages you have to comply with Rhapsody coding, it is not a simple process. Reverse Engineering for C, however, is a totally different matter.
There are some YouTube movies in the internet describing RE in Rhapsody (see links at the bottom) but for these demo’s they all used Rhapsody in C++.
And there is a reason for that…

But before I tell you what is possible and what not in Rhapsody in C, may I gently remind you that Rhapsody is a UML Tool? Yes!, that is what it was built for. From the beginning in 1996 it was designed from the bottom up to be the worlds greatest UML Tool. And it is!
(It is possible that I am a bit prejudiced here)

For Rhapsody the same applies as for all tools: the best way to become happy with a tool is by using it as closely to the way the creators have intended it. The more you bend the tool to do things your way, the unhappily you will become.

I always tell that to my customers and to my future customers. Always. But funny enough nobody hears it. That is just not what they want to hear. They all want the holy grail of software developers: the tool that does exactly what you want without errors. And there is no such thing, sorry. But, enough ranting, let’s go through what you _can_ do.

(Re-) Using your code in Rhapsody

Basically there are 3 variants: Code-centric, Model-centric and Code-aware.

Model-centric:

This is the way to use Rhapsody. Your Model is the base of all. Code generation will generate your application. It can be compiled and linked to the framework (RXF) and you have a working application.
Code will be generated from Class and Object Diagrams, Structure Diagrams and from State-machine Diagrams and Activity Diagrams.
Rhapsody also supports flowcharts (Although these are NOT UML!) for the behavioral code of operations.

Code-centric:

Here you use Rhapsody only to visualize your code. You can change the code and Rhapsody can process it to reflect the code in your model and in (some) diagrams.

How does that work?

  1. Switch your Rhapsody to Code-centric. How?
    – When you are working in the Rhapsody Architect for Software your project will be code-centric by default.
    – In Developer (or EUSIII) you can add the CodeCentric profile via the menu “Add Profile to Model”. In the next file selection screen go up one directory and then go to “Settings”. There you will find “CodeCentric” (Or if you have a Willert Install, “CodeCentric_Original) and load the newest file with the correct language)
  2. You can now use “Tools”, “Reverse Engineering” (RE) from the menu to read-in the files that you want to use. Beware!: Starting RE makes changes to Rhapsody that might not be easy to revert.
  3. Things you can (or should) do before using RE:
    • Create a new Component
  4. Your reversed engineered code is now in Rhapsody. How does it look?
    • You will see Packages, Files with variables and functions.
    • These artefacts are NOT UML artefacts, they are introduced by Rhapsody to allow working with code.
  5. Rhapsody will generate OMD’s (Object Model Diagrams) with the structure of your files. If you have a lot of include files this does not really help.
  6. Rhapsody will NOT automatically generate Flow Diagrams (Activity Diagrams for functions). You can ask Rhapsody to do so (Right-click, “Populate FlowChart”).
    remember: there is always just one “leading” source. Either your code or your Diagram. Check your settings.
  7. The best way to use the reversed engineered stuff is to convert it to “decent” Rhapsody elements like classes and objects. It is a bit of work but the result is very helpful.

 

Code-Aware:

The “hybrid” form. Not really supported.

Problems and possible solutions

  • All the code-centric stuff is (current version is 8.2) only useable on 32-bit Rhapsody. 64-bit is improving but not there yet.
  • Don’t expect miracles. If your code sucks, it will suck in Rhapsody as well. No way around it.
  • Be prepared to experiment with re-reading in a new model. Sometimes that clears things.
  • It’s 5 am…. do you know where your properties are? You better…. Check out what is set. Remember: Reverse Engineering sets properties by itself!

More information on YouTube

Gavin Arthurs speaks about Rhapsody mode/code centric:
Gavin on Rhapsody

Fraser Chadburn speaks about Code-centric development in C++:
Fraser on Code-centric

Chris Carson speaks about Code Reuse:
Chris about Code Reuse

Thomas Hall speaks about Reverse Engineering:
Thomas on Reverse Engineering

Stuttgart 2 (The Sequel)

OK… Stuttgart again. I’m there so often that people think I live there… “Neigeschmeckt” they call it … (Something like “Tastes new” but ask a Schwabe if you want to be sure…..) To make it halfway bearable I’m with a different customer again. And I’m not alone, Joachim is joins me for the training part and on Wednesday for support with our AUTOMOTIVE Rhapsody Model and later Andreas will join us on Wednesday for the MDSE part.

Yes correct, I’m with an Automotive customer again (what are the odds…) so a lot of extra constraints that are less important at non-automotive sites. They always use AUTOSAR, they never buy chips that have enough memory or enough power to do the job, often they have a very cheap CPU but there is only a CPU manufactured compiler (horrible, sometimes these don’t even fulfill ANSI-‘C’….) And they have time constraints that make all other projects look relaxed.

But this customer might use a bit different approach. At least a decent (although very expensive) compiler: Tasking and a decent (although complicated) CPU: Infineon TriCore. But they are determined to use MDSE and willing to put in the necessary effort.

It was a very nice week with very productive sessions. So I’m sure I will see a lot more of Stuttgart in the next months….

Back to Rhapsody. We had a new case, a customer from…. Stuttgart…., with a question I heard before. But that was a long time ago so i decided not to do a copy/paste solution but to dive into it and see if there were better solutions now. And there was…

The problem, or actually the question, was “How do I use Doxygen within Rhapsody”. Simple question. For those who do not know Doxygen: this is a system (Open source) to document C or C++ (amongst many others but these are the interesting for us)  source code. ( www.doxygen.org ) Of course it is Dutch, what else, and many developers use it.

You can document your source code with certain special comments, Doxygen will look for that and generate either an HTML or a LaTeX file. It can do stuff like generate call trees, looks pretty neat.

My first reaction, years ago, to this question was: why do you need to document your source code? It is generated, who cares? But that is too black and white. A lot of source code inside Rhapsody models can be documented and a Rhapsody model is, of course, way better as documentation but not everybody has Rhapsody! (We are working on that one…) So there is an actual use case for generating documentation from your partly generated source code. We even use Doxygen to document our RXF Framework!

But how do you do that? Simple way is to just use the “Description” field in Rhapsody, it will appear in the generated source code. But there are ways to make this more comfortable.

The “old” solution was to add some properties to your site.prp (sitec, sitecpp) But in modern time we can use profiles for that. So i decided to put the stuff into 2 profiles, one for C and one for C++.

A very nice feature of Rhapsody is that it has profiles. In these profiles you can do a lot of stuff that, once the profile is loaded in a model, has great influence on that model. You can set properties, define stereotypes and define tags. You can also define model elements that will be copied (and adapted!!) to your model and much more, I will write about that in a later Blog entry.

When you define tags in a profile and you assign these tags to a specific model element then (It’s magic!) the tags appear in all that elements in your complete model.

Another nice feature is that Rhapsody has a “Description Template” property for many model elements. In that property you can define what comment you want with that model element. You can use tags there ($TagName), the content of that tag will appear in the description. Quite cool eh?

So if you predefine some tags with Doxygen Standard Comments and you make a clever description template you can generate your source with the correct Doxygen Comments. The nice thing? I already did that for you, just download the model (8.1.5, if you need an older one: just ask, I’ll generate it for you, but you will owe me a beer…)

Download at: DoxyGen815

Happy Modeling with Rhapsody!

Walter van der Heiden (wvdheiden@willert.de)

Stuttgart

I do a lot of traveling. A whole lot of traveling. Mostly Germany but sometimes outside or way outside. But the city I travel to most is Stuttgart. Not because my car was made there but because we have lots and lots of customers here.

Stuttgart and the surrounding cities are not bad, just the traffic is really murdering. They even beat Munich in traffic jams. Part of it is caused by the geography, Stuttgart is a whole between some hills, there is no way you can build decent roads, what is there must be used, no room for more roads.

The other cause is the so-called “Stuttgart 21” plan. This involves railway only but it will take the complete main station and move it underground. If you look where the station used to be it looks like a nuclear bomb just went of…. Big hole with lots of machines. This has its influences on railway traffic but also on everything that goes through the city.

This week is Rhapsody Training at a customer. 5 days! A long time ago a 5 day Rhapsody Training was normal, unfortunately this is no longer the case. It went to 3 days, often only 2 days and there are companions that estimate their employers to be able to learn UML and Rhapsody in 1 day.

This is, of course, total rubbish. Learning UML and Rhapsody takes just as long as learning ‘C’ and compiler/debugger. If by now you think: “Learning ‘C’ goes quick” then please dig your memory for the truth…,. Before you are an experienced ‘C’ programmer, years go by!

The UML is not more difficult or easy to learn, it is just different. And… you have to know ‘C’’ (or ‘C++’) before. This is what Rhapsody generates.

What is difficult about UML/Modeling? Well.. the way you do it is very different from traditional source code programming. I think that is the most difficult part for most “converted programmers”. Modeling is an art, you learn it by doing a real good training (like ours… 😉 ) and by doing it! You need to practice, read a lot, try a lot.

I see many people using Rhapsody The way they use their IDE, try until the code generator produces the desired output. This is wrong! Follow the paths that people like Bruce Powel Douglas and others have described in books, modeling is a lot of work. In the end you will save because the number of errors and changes will be way lower than with traditional programming.

It pays of to invest in a good process (which diagram should I use when?, what information is where?)  and in making your model so that it is actually your documentation. Modeling takes time but it is time you have to take anyway to give your brain the time to understand what you are doing.

I always say: a model behaves just like your car. If you car is dirty, it does not drive “good”. As soon as you wash and vacuum it, you will sense that it drives “better”. Subconsciously, admitted but true. A model behaves the same. If you make it nicer, with straight lines and with elements that have the same size and are outlined you will notice that it makes more fun to use the model. Some think that the drawing part is wasted time: trust me, it’s not!

So beautify your mode, insert navigation information so that other can also find their way in your model, use enough diagrams, (every diagram should answer a question) use requirements that you connect to model elements to show traceability. Use stereotypes, profiles and tags to store information in your model. After a while you will do that automatically and the quality of your modeling will increase dramatically. Also re-use will be much easier then it was.

Happy modeling with Rhapsody

Walter van der Heiden (wvdheiden@willert.de)

RUGS & DUGS

On Tuesday June 27 we had our yearly RUGS&DUGS. That is the Doors and Rhapsody User Group Summit. Actually the correct abbreviation would be DRUGS. Is fine with me (i’m Dutch) but my German colleagues were against that name. Well OK… but acronyms ending in UGS are all problematic… well except Hugs I guess 😉 Check out RUGS/DUGS in google…

But the conference was successful despite the name, a lot of users were there. This year we were in München, not exactly my favourite city. Or to be precise: i hate Munich. Traffic is hell, public transportation sucks, hotel cost a fortune unless there is a fair then hotels cost more than a house in north Germany, the local soccer team are a bunch of tax criminals.

Enough about bad stuff, onto the good stuff. On our User Group Meetings (and also the MESConf we held the day before) we use something called “Open Space”. This is something that was invented by Harrison Owen and David Belisle. These guys organised conferences and in their evaluations they found out that most people liked the conversations they had during the breaks best. So they figured out a way to extend the conversations during breaks: cut the presentations and formalize the breaks.

There is a time/place plan that allows for multiple conversations to take place, participants determine the topics themselves, put them on a board on a specific time and place and others can, with a look on the board, determine what is interesting to go to.

Works like a charm, i’ve witnessed an Open Space conference a dozen times now and all were great. You can learn a lot in a short time.

More Info

This is one of the methods we use to spread our knowledge about MDSE/Rhapsody/Doors/etc. Other methods are:

this BLOG!

FaceBook

Twitter

IBM DeveloperWorks (Recommended!!!)

Rhapsody4You (please use Developerworks from now on!)

UMLforum (use Developerworks please!)

Andy’s Page

Training & Coaching

Download Portal

Support

You see, enough possibilities to extend your knowledge and become an MDSE Pro real fast! About the forums: In close cooperation with IBM (Thanks Johan Adelgaard!!) we decided to concentrate all Rhapsody knowledge on the IBM site. You will need an IBM ID to login but that is totally free and takes 1 minute to set up.

The next UML Trainings are:

  • 19. – 21.09.2017 in Stuttgart
  • 14. – 16.11.2017 in Bückeburg

 

 

Happy Modeling with Rhapsody!

Walter van der Heiden, wvdheiden@willert.de

Marquardt – Rhapsody unlocks doors

Introduction

The software development division of the Marquardt company decided in 2012 to switch from structured programming using ANSI-C to a model driven development approach using UML including automatic code generation. The reason was to have a better position in the future to master the increasing complexity and requirements in the automotive supplier market easily.

THE PROJECT

The first project where MDD was used was the development of a wireless keyless-entry/keyless-go system for a well known German car manufacturer. The hardware platform was a 16 bit controller with 64 Kb ROM and 4 Kb RAM. The application to be developed had to cope with limitations as the very small footprint, the minimal processing power and still require very little resources at startup time.

These challenges provided the Marquardt Software Design team with at the trigger- after successful proof of concept – to do a future oriented switch and become an ‘Early Adopter’ in Model Driven Development (MDD).

AT THE START

The assumption that MDD could be of great use in software development was initially quite controversial in the software development team. Also the question if the keyless system would be a suitable candidate for a pilot project was doubted, especially due to its its stringent resource requirements and the short time to develop. However, in the end it became clear that the
traditional methods of structured programming could no longer be used for such high requirements and time constraints in future projects. And although this keyless system project was not an ideal candidate as pilot project, given the short Time-to-Market that is common in the Automotive market, Marquardt decided not to wait with their switch to MDD. Its customers would benefit enormous of the innovative approach. The risks were carefully calculated and Willert Software Tools GmbH offered Training and Coaching during the entire product development process and helped in the Switch and the changed process.

Inlay Bennie Mattes

DURING THE PROJECT

The project was carefully planned as pilot project to recognise the advantages of MDD during development. An investigation of tools to use was carried out, based on the requirements with respect to memory- and CPU resource usage and realtime behaviour, to determine how feasible the introduction of MDD would be with respect to memory usage, performance and real-time requirements.

The positive outcome of this investigation was convincing. The idea that restrictions due to software development in ANSI-C could be surpassed, was clearly valid. The development team of the pilot project defined the following goals:

The Tools: UML as modelling language, modelling in IBM Rhapsody in C extended with the Realtime eXecution Framework (RXF) by Willert Software Tools (see infobox) made it possible to meet the specific technical requirements and use code generation for the limited memory- and CPU resources.

  1. Realistic project conditions: It should be possible to realise the project without extra time or manpower. The use of trainer and coach from Willert Software Tools helped to meet these conditions.
  2. Focus Quality Management: The effects of the use of MDD should be measurable and reproducible. The first project phase included training and coaching which assured a successful start and use of the tools. Next, well-defined training and coaching during development were the base for reaching planned schedule in time and costs plus quality and support the motivation within development team. The success of the first development proved the approach and selected tools to be the right choice.
  3. During the project the restrictions with respect to footprint and CPU resources formed the technical boundaries. The methods and know-how of modelling were extended within the development team which helped greatly. In close cooperation with the Willert trainers and coaches and multiple workshops, even in close to final project phases, further optimisation in model and RXF were realised. In this pilot project all requirements regarding memory- and CPU resource usage and realtime behaviour were met.
  4. In parallel the testing was tuned: unit tests, software in the loop and software integration were adapted to the modelling process and even automated. This was an extra effect which was not accounted for at forehand.

THE GAIN

First and most of all: a successful project and satisfied customer. At a functional level the project had realised what probably also could have been realised in the originally used development methods. But using MDD the road into the future with increasing demanding requirements is now open. Moreover, the quality aspect of the software engineering shows improved ease of maintenance, modifications and robustness. Apart from the functional result of this

pilot project, Marquardt now is capable of meeting steep requirements and specifically in reacting flexible on changes in requirements desired by the customer during the project. In addition, the steps needed in changing the development process and tasks within the team were mastered successfully. These changes were supported by the Willert trainer and coach. This resulted in a highly motivated team and guaranteed progress even in difficult times.

Most importantly is that the new know-how within the team and the investments in the new tools offer Marquardt a highly efficient and motivated team, ready for the future. This switch used by Marquardt in this project was acknowledged as an improvement of the software development.

THE FUTURE

Future projects will use the investments of this pilot project being the software tools, not-productive man-hours and consultancy, needed to introduce the new technology.

Traceability and maintenance of existing applications is much easier at the model level. The development process and applications therefore have become more defined and predictable. This will in its turn have positive impact on quality and time plus costs.

For the team members of the development team the switch to MDD means increasing competence and knowledge of modern software engineering.

The successful pilot project confirmed positively the decision taken to start using a new development environment and helped the customer in its success-story. This project proved Marquardt being an innovative company having a competent software development team which can coop with the ever-increasing demands of the automotive industry, ready for the future.

Inlay Marquardt Project

ABOUT MARQUARDT

Marquardt is an independent international and successful family owned company and leading manufacturer of electro-mechanic and electronic switches and -systems. Marquardt products are widely used by multiple car manufacturers. Marquardt also manufactures devices used in houses or for industrial appliances and is worldwide market leader in these areas.
http://www.marquardt.com

ABOUT WILLERT SOFTWARE TOOLS

The Willert Software Tools company specialises since 1992 in tools for Software Engineering with respect to realtime embedded systems. Willert has set its goal to offer technologies to enable customers to successfully develop software and support them in adapting the required tools. For this, Willert offers methods and tools plus training and coaching based on thorough knowledge of realtime embedded systems. Its customers include the automotive industry, aerospace, medical devices, public transport manufacturers, telecommunications, energy and infrastructural environment. Willert Software Tools has helped with numerous product specification, -development and Quality Assurance, for example vehicle control devices, coffee machines, frequency inverters, satellites, hearing instruments, door controls, fire alarms, röntgen devices, positioning systems and robotics.

Newer posts »

© 2025 Rhapsody TechBlog

Theme by Anders NorenUp ↑