Rhapsody TechBlog

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

Page 11 of 16

RXF Best Practice

Introduction

Today I will write about our RXF. I hear a lot of users that have issues and worse, there are a lot of users that do not speak about issues…. We find out indirectly that there was trouble.Most issues can be traced back to errors in the install procedure, take really good care that this is done properly.Also a big source of problems is the installation of a new version of the RXF. OK, this is not straight forward, I admit.Although the RXF has its own Macros for sending events, if you want to use the same model in an OXF environment, you better use the IBM macros.Assign the Memory Properties in the Component. Make new components if you want to experiment with these values.

Hints and Tips for installation

  • We are there to help you. Really. I know you are afraid that your friend Google might be insulted if you ask someone else for help, but really: he is not.
  • Install should run without errors!
    Yes. If install gives you an error, it’s serious. There is something wrong. You should not ignore it.
    • Install can tell you after entering a path for a compiler, RTOS or Rhapsody that it cannot find some file. Pressing “Yes” will much later expose errors that you cannot map on the install anymore!
    • READ!!! OK, OK… we do not always write clearly but you should be able to understand what the install program wants from you.
    • if you cannot read: ASK!
    • Check if the install path is not to long! (c:\user\thatsme\Install directory for tools\Rpy_CPP_embOS_IAR5_CM3_EFM32\Rpy_CPP_embOS_IAR5_CM3_EFM32\Rpy_CPP_embOS_IAR5_CM3_EFM32 is too long. Install will either give errors or just not copy everything. Sometimes without error message….
    • The version numbers of Compiler, RTOS and Rhapsody are not given in the install fore nothing. That means that the RXF is tested with these specific versions. Installing the RXF using older or newer versions can work, but not necessarily…
    • Do not install the RXF under a “magic” windows directory like “c:\Program Files” or any language/bitsize variant. As already said in one of the first entries: Installing Rhapsody.
  • If, in spite of being careful, you have problems: tell us! Windows is a complex environment, that in combination with differences in hardware and interfering IT departments can cause nightmares.
  • If you want to use the Willert Software Tools Embedded UML Studio: You HAVE to install and RXF! Just install, you don’t have to use it.

Hints and Tips for re-install

  • We are still there to help you. Never mind your girl-friends Siri and Alexa, we are better, much better!
  • Regularly check http://download.willert.de for updates.
  • Speak with us when you want to use a new version of Rhapsody, Compiler or RTOS (Or even CPU)
  • There are different use-cases for re-install.
    • You have a new version of Rhapsody but want to use the same RXF
      • You still have to re-install the RXF…. It may seem to work but it is not integrated in your Rhapsody…. No problem, it is still working in your old Rhapsody, that is… if you install the RXF to the same path as where it was.
    • You have the same Rhapsody but a new RXF
      • Is more difficult. Best is to install the new RXF and load the profile in the existing model. You have to check which stereotypes are used in your model and manually re-assign them to the new profile. A good test is to try and delete a profile, if there are stereotypes used, Rhapsody will refuse to delete it.
      • The properties for the static memory blocks are the same… but the MetaClass changes… you have to re-assign them to the correct properties.

I hope this makes your life with Rhapsody a bit easier!

Walter van der Heiden ( wvdheiden@willert.de )

Your license is safe in Switzerland. Very Safe…

Introduction

This week I’m in Switzerland. helping a customer to install and use Rhapsody and a lot of other tools. Switzerland is cool, very nice to travel to because of the beautiful landscape. Not nice to travel to because everything is soooo expensive… For the price of a  normal meal I can feed my entire family in Germany… This time I was lucky, finding a very nice and quit hotel where the food was delicious and not even that expensive (Well not for Switzerland…) I was also lucky with picking up my rental car: a free upgrade… OK, not a Merc, but the BMW 420D X-Drive was a nice car. And the snow on the last day was a piece of cake with the 4-wheel drive and the winter tires.

Back to work

As I have written before, it is not easy to install all tools in a way that everything works. Careful planning is required here.

Willert RXF License

The RXF does not have a license. There are 2 types of customers: One that is willing to pay and one that will never pay for software. License mechanisms are only there to annoy the first type: People that have paid for software and are legally entitled to use it.
The second type tries to hack it and if that is not possible: they will use other software.
We at Willert have rather that people steal our software then that they buy it from our competitors.

IBM Rhapsody license

IBM uses the so-called Flexible License Manage (Flex-LM), in spite of the name it is a very inflexible piece of software. Many things can go wrong there. We literally spend hours to get the stuff running sometimes.

Steady or Floating?

There are many different license types for Rhapsody depending on how you use the software and what version you use.

  • AU – Authorized User
  • FL – Floating User

The difference between these 2 is that an AU License is for a named person. This has to be the same person, always! (You can, of course, move the license internally but not on an hourly basis)
An FL can be used by multiple persons that not even have to be on the same location just not on the same time. Theoretically, if you have sites all over the world, you can have 3 people working a full day with same license. IBM allows that, Telelogic had a special (more expensive) license for that.
NOTE: IBM requires you to have a list available with the licenses you use and the names of the actual user! They are entitled to check that. (This is one of the points in the license agreement that you have not read)

Server, Locally or Dongle?

Flex-LM works with a license file. There are parts built into the software that uses it to check the file and determine if you are allowed to start it.

  • Server, you have a server that is reachable for everyone in the company (Yes that can be an international server)
  • Locally Server, you have the Flex-LM server on your local machine
  • Locally license file, there is no Flex-LM server, Rhapsody will read and decode the license file itself. The license file uses your network cards MAC address as a “key”.
  • Locally Dongle, you have a license file that uses the Dongle “ID” as a “key”

For the Server (local or remote) you need to install the Flex-LM key Manager

Have I already told you that I hate Windows?

I do. Really. It is such a @#$%^&*( OS. The fact that you must distinguish between 32-Bit and 64-Bit is already a pain not to mention everything else.
So for the dongle driver you need to check if you have 32- or 64-Bit. Also it seems to be a bit of a problem when you have the latest Windows 10 version. (although it seems to be Windows Type, (Home, Pro, ultimate, etc) dependant.
You can download your driver here.

OK. I did all that. It doesn’t work. Now what?

First: Don’t get mad or sad, this is not abnormal… Here are some pointers where you can start to get stuff running:

  • As always: You can ask us. We help you.
  • You can ask google. You’ll be surprised what google knows when you type in your exact error message.
  • READ the error message. Flex-LM mostly says exactly what the problem is.
  • find your lmtools.exe program, it helps you finding what is wronglmtoolsMain
  • There is an environment variable TELELOGIC_LICENSE_FILE that points to license files or paths where license files are (The latter only finds “license.lic” files). Unfortunately this is not the only source for locations, there is also:
  • A Registry Entry: HKEY_CURRENT_USER\Software\FLEXlm License Manager also has a Field “TELELOGIC_LICENSE_FILE” that contains the path information. If you want to delete incorrect entries you have to do it here as well… Flex-LM updates this entry when you add new paths to the Environment Variable but does not delete any when you change the Env Var again…
  • Check the number of your Dongle (Do this also physically on the Dongle itself) in the lmtools tab: “System Setting” and in the license file.
  • Any change in your system, OS update or Rhapsody update can influence the working of your license. beware of that. So if your license does not work anymore, try to check if something happens to the OS or other software (Check logs files)
  • Do you have a new network card? Most licenses work with your MAC address. Sometimes you can change the MAC address of your network card. But you can ask for a new license, IBM will give you one (Not every week of course…)

So. I hope this helps a little bit!

Happy modeling with Rhapsody!

Walter van der Heiden (wvdheiden@willert.de)

 

Computer problems

Somehow my Schiphol flights are jinxed. Last year my Zürich flight was cancelled twice, once with snow, the other one while the flight control center wasn’t working. But I was not thinking about that in the train to Schiphol. Today I fly to Bristol, that is… when KLM, Schiphol or whoever is letting me…

It is snowing very lightly so the plane arrived late, but that’s OK… Dropping of my suitcase was real quick today (thanks SkyPriority ) I could even pass the really long line for the passport check (What??? Yep… Brexit, remember…) But I always carry my real passport with me so I could use the electronic line. 5 minutes instead of 1,5 hours… Cool. I thought…

But at the gate, where I met Robert who was flying in from Detroit, we were waiting and waiting and waiting… After a while the PA system explained that they had computer problems and that boarding might take a while. Oh great.

But it was faster than feared and we were in the bus pretty fast. Wait the bus??? Yep.. Since Brexit the UK travels via gate D6 in the basement, you have to go by bus to the place where they park the, relatively small, airplanes (Embraer 175/190) After entering the bus and driving a bit we were waiting before an airplane. And waiting… and waiting… until the electronic Bus voice told us that the bus was leaving…

And after a small drive we were being dropped of at the terminal. When all passengers were back they told us that the plane we saw was really there but they couldn’t find the crew….

I’m typing this while waiting for a crew. Hoping we still go, it would be very inconvenient when the flight would be cancelled now.
After almost 3 Hours (The time after which KLM would have to start pay….) they finally managed to get a crew and get us in the air.. Hey! Flying is fun. Always.

C or C++

Always the question. I don’t want to answer it now, I just want to give some tips and tricks. In Rhapsody, a model (a.rpy file) has a language. if you open the file with a text editor you can see that on the first line, it says “C” (or “C++” or “Java”) Now, all units, which are files basically, have this language indicator in them. There is also a “*”, that indicates a “don’t-care” what the language is. That is very useful for profiles that are more or less language independent (e.g. a “Styles” profile that contains stuff to influence the GUI )

So it is possible to switch parts of your model to another language, just right click on the unit, select “Edit Unit” and then you can select the language. Now there are some side-effects. You can change the language of a component but it can only contain packages and classes/objects of the same language in its scope. So that is why not all browser elements show up. Also… there is a way to make elements show up in both, the “*” method. You have to edit the .sbs files by hand but it works.

I already tried that for you and…. it works…;-) You can create a “C” package, include that in the scope of a “C” Component, close the model, edit the package file by hand to be the other language, open the model and…. you can include it in the other component. Then edit the package file to be “*” (after closing the model…) and you will see that you can generate 2 different languages from the same package.

32Bit or 64Bit

I think that Rhapsody 8.3 has a real good 64Bit version. If the issues with the new file format and extensions (and some other issues) are solved, we start to test our RXF and other tools for the use with 64Bit. That will solve some problems! Also 64Bit is a lot faster when handling large AUTOSAR Models!

IFix2

– IBM just released iFix2 for Rhapsody 8.3.

That’s it for today, happy Modeling with Rhapsody

Walter van der Heiden (wvdheiden@willert.de)

Publisher Subscriber

On the road again….

Last week I was on tour in Germany by car. Not by myself but together with Andreas. That makes traveling a lot more fun, alone is OK but with someone to talk to (or to listen to Jazz on my Burmester…) is a lot cooler.

img_0058

S-class Burmester speaker

First evening stage was from home to Bückeburg. Sunday evening is perfect for driving, it is quit on the road and trucks are only allowed on the street after 22:00u. Then the next morning early to Stuttgart but via Karlsruhe. We had a visit to a partner company, show them our AUTOSAR solution. then to Stuttgart for the hotel.

Next two days was at an automotive customer to help them using Rhapsody to create the architecture for some very cool stuff. Sorry,…can’t tell you any more… sometimes stuff must be kept secret….

During that 2 days I came across an old friend, the Publisher-Subscriber Design Pattern and I decided to write something about it.

Design Pattern

Publisher Subscriber is a design pattern. A design pattern is not just a library function, it is a standard way to solve a problem, you can not give standard code for it but you can give example code that you must adapt to implement in your own realm. (Not always, due to clever inheritance it is possible to give some standard stuff for OO languages.)

What is PS (Publisher – Subscriber) ? It is just what it says. Somebody publishes something and somebody else can subscribe to it.
Suppos you have a button in your system and you want an event when the button is pressed. Easy, just do a CGEN (me->receiver, evOfInterest() )….
If it only were that easy… Of course this is not a solution, you probably want to re-use the button in other applications. If you have solved it like this, you have to change the button each time you want to re-use it. Better is to let the button be unaware of anything from the application and:

Reverse the Relation

Yes. The application should have a relation with the hardware and not the other way around. The hardware should have a “subscribe()” function that allows an interested user to be notified when the event of interst comes by.

*^@#$&*( “C”…

Yes… the old “C” fan starts to see the advantages of “C++”… “C” definitely has its uses but design patterns just work so much easier when you have encapsulation, inheritance templates and overloading.

image-1

A very cool example of ‘C’…

The publisher subscriber pattern works as follows, you have a publisher that “publishes” a certain service, let’s say a button can be pressed, you can “subscribe” to that press. This is done by a subscribe function where a function pointer and (We’re using Rhapsody in”C”!) a “me”-pointer are passed. The function stores them in attributes and can call the function via the pointer. Sounds easy but there are some caveats. You have to know the signature of the function to “type” the attribute and the subscribe functions’ arguments. This is a bit awkward since you can not “just” take any function, your compiler will protest. Also the “me”-pointer has to be of type “void *”, you can never predict which object it will be. Depending on the compiler you need some casts… not really elegant.PublSubsc

Elegant C++

Compare that to “C++” where you just create a Publisher Class that has a relation with a subscriber class. The publisher Class has the “subscribe” function that has a pointer to the class as argument. This will be stored in the “Subscriber”, that has an abstract Notify function that needs to be implement in the inheriting class (Since it is abstract) Screen Shot 2018-03-28 at 16.12.29.png
You can use the subscriber type as a template and you have a ready made function that works for most cases. You only have to adapt the subscriber function but you can even make multiple functions with different parameters, the compiler will help you.

To make life easier I have put this in a Rhapsody 8.2.1 model, download here: PublSubsc.
As always: If you need an older Version: please respond.

That was it for today! Happy modeling with Rhapsody!

Walter van der Heiden (wvdheiden@willert.de)

München in winter – Rhapsody 8.3!

Muenchen

This week I was in München again. We have lots of customers there so traveling to Munich once and a while is unavoidable.

This time I went there by plane. There are more possible ways to go to Munich, plane, train and car. I let it depend on the starting point (from Home, which is 150km further then from the Office) The weather forecast (not very good, snow and ice) and my own personal feeling at the time (don’t wanted to drive far) So… KLM, do your job…

This time they did, no snow or wind to cancel the flights. And then flying is pretty easy for me. Just hop on the train in the city I live, check in (Yes… the Netherlands have a “public Transport Chipcard”. Just hold it against the check-in pole and it beeps. Check out again 1,5 hours later at Schiphol and you’re done. Eat your heart out, Germany…..

Flying went fast and comfortable. I like flying with KLM. In Munich I took the S-Bahn to the hotel. Always a challenge to find out where to go and which train you need. Giving the right directions in the right dose is an art, Munich does not have that.
But OK, München is OK. I don’t like their football team (at least not “that one”) but the city is cool. So I arrived at the hotel and checked in. # days of AUTOSAR modeling before me, later more about that!

Rhapsody 8.3

Almost in Nikolaus day (December 6) IBM released Rhapsody 8.3. As I already mentioned before: If it ain’t broke, don’t fix it….
If you really want to update: please wait until we have tested the release and determined the parts that require special attention.
In a complex world, development environments are becoming more and more complex. Even small changes can have large consequences. Here I will give you a heads-up on the changes and some caveats we (and a helpfull customer!) have already established.

File Format and extensions

To allow a better integration in the Jazz platform, IBM needed to change the format that Rhapsody uses to store its models. until now that format was propriety (but working quite well) IBm changed that to an XML format. To indicate the change they changed the file extension (Like Microsoft did in Word and Excel, the went from .doc and .xls to .docx and .xlsx) Rhapsody files now also have an x behind it (.rpyx, .sbsx, etc)
This seems like a minor issue but is deadly when you want to keep your historical information in your config management files.
Some CM systems allow you to change the name of files but you have to do that by hand. Not a small job if you have large models….

Not new

In fact, the new database format was already there, it was just optional in version 8.2.1. It was there in the release notes but it was not really noticed. To be clear: I like this change. But it is a complex one, it takes time to solve all the pieces of the puzzle.

DiffMerge

OK, a new file format. Does that work with DiffMerge? The good new: Yes it does. The bad news: it only saves as .<file>x. converting old into new.

Save As?

The question that comes up immediately is: Can I still save in the old format. Yes you can! Like all (since 7.4) Rhapsody versions you can do “File”, “Save As” and then go back 2 Database versions. I don’t have an official statement from IBM yet but to me this looks like this option will be gone after 2 more releases.

When to update?

So this does not bother you? And you want to update to 8.3 anyway. Well… don’t do that yet. Certainly not if you use Eclipse (Plugin and Workflow), there have been some issues there.
There has been an iFix already but that did not solve all problems. IBM is working on this with high priority but it takes some time. I’ll keep you posted.
If you also use the RXF you also have to be a little patient, we have to test it first. Check our download portal, we keep you informed.

Happy modelling with Rhapsody (8.2.1)

Walter van der Heiden (wvdheiden@willert.de)

Nantes – Jules Verne

Introduction

The coolest thing about traveling: you always learn new stuff. Not necessarily about modeling but also about the cities and countries that you visit. I had to do work in the nice city of Nantes in France for 3 days. Nantes is about 1000km through the air and a lot more in a car or by train so we took the plane.
When flying, you have the choice when you’re on location, hire a car or use public transportation.
I’ve been to Nantes before and I remembered that they had Uber there and that the traffic is not really “my style” so I decided to do that. The Uber driver told us a lot about Nantes and one of its famous inhabitants: Jules Verne. There is even a museum there. Also there is a warship museum in the harbor where the film “??” was recorded. Not that we had time for that… but nice to know for the next visit.

What Diagram shall I use?

As long as you use UML to document your software, it does not really matter which Diagram you use for what. It does not even matter if you use the UML correctly. Or even worse, you don’t know while you cannot check if you use the UML correctly. At least in Rhapsody you can generate code to check if your model does what you specified. But there is enough left to do wrong… you can only generate code from Class-, Object-, Package-, State-machine- and activity Diagrams.

Admitted, the UML is not clear on when to use what diagram. The argument for not having that is that it is a programming language. “C does not tell you when to you which statement either”. Correct but if someone else does something in a certain way, that does not force me to do the same….

So the UML lacks a “process” that divides your development in stages with deliverables and rules on what to use when and how.

V-Model

The V-model is still used widely in software development. As it should be because it is a proven way to develop software. The exact way it is used changed over the last decades. From a waterfall model where each stage was finished completely before starting the next to the agile process we use now that makes the V-model more a system where you store your development artifacts.

Process

There are numerous processes that describe how to develop software. Some of them are more common and some of them specify UML or even Rhapsody specific, like IBM’s Harmony. Older processes are still used like RUP from rational, Ropes from Bruce and many more like Automotive Spice (a-spice)
You don’t need to try and follow these processes, you can use them to describe your own process. How thorough you do that is mostly depending on the safety level of your software. Railway systems or cars or planes have huge processes that require really thoroughly described steps.

Requirements

When you don’t know what to do, you cannot do it. So you first have to be clear on what it is that you are building. This is a difficult part for experienced software developers… We (Yes I am a software developer…) are very solution oriented. If somebody describes a problem to us we immediately start to think solution. Write down the real requirements of your product. Concentrate on “What do I need” not on “How do I do that”. You can use a Requirements Management Tool like DOORS (Next) of Polarion or even Word or Excel (Not good for linking and traceability but will work)

May be you are lucky and you will receive the requirements from your stakeholder, like in the Automotive industry.

Then import the requirements in your UML model. In Rhapsody you can use either the Gateway of the Willert RequirementXChanger. These tools will create a package with your requirements. They can even synchronize them if the requirements change and mark the changed requirements accordingly so you can do impact analysis on changes.

What diagram should you use for requirements? That is a good question since the UML does not know a requirement diagram. There are a couple of possibilities in Rhapsody, you can stereotype an OMD (Object Model Diagram) as a new term “Requirement Diagram”. Very elegant way, Rhapsody creates a category for new Terms so that you see them as a folder in the browser. Another possibility is to not show the requirements on diagrams but to create a table where you have the requirements on one axis and your linked model elements on the other. Have a dependency with “trace” stereotype as cell item and you can link requirements very easily. Also possible is to drag your requirements in the diagrams where you have the model elements that you want to link. This will make your diagrams messy but there is a solution for that too! You can apply filters (actually queries) to your diagrams and blend out certain elements.

Analysis

The next step is to analyze your requirements and create diagrams where you extract behavior.
The Diagram of choice here is a Sequence Diagram (At least that is my opinion) The nice thing about Sequence Diagrams is:

  • Even non-techies understand SD’s
  • They are easy to draw
  • They can be used for tests!

You just start drawing the first diagram by treating your system as a black-box, defining what output you expect for certain input. You then create new SD’s by refining the first one  in horizontal way (splitting up the system in sub-systems, then sub-sub-systems until you are at Class level) and vertical way (split the functions ins sub-functions and so on…)
You can use Class Diagrams (Or Object Model Diagrams) to already start drawing your system architecture that you find out when drawing the SD’s.
Some use Activity Diagrams or even State-charts for this part. There is nothing against that, I just don’t like it. Activity Diagrams are more or less OK but I think State-charts are just too complicated and distract your mind too much during analysing your system. Also if you need to speak with non-technical people about the exact requirements of the system, State-charts are much less “natural” to use.

Design/Implementation

Here you use the same diagrams as in the Analysis and now it is time for state-machines. Together with the state-machines you start creating tests for all your sequence diagrams, in that way you can immediately test if what you have created is correct. And even better: you can do so whenever you have made changes.
This allows you to do Analysis/Design/Implementation in a sort of spiral model. Just keep adding small pieces of functionality, keep starting automated tests (using Test Conductor) and you always have a working system.

Some pictures from Nantes

That’s it for today, happy modeling with Rhapsody!

Walter van der Heiden (wvdheiden@willert.de)

Nantes – Jules Verne

Introduction

The coolest thing about traveling: you always learn new stuff. Not necessarily about modeling but also about the cities and countries that you visit. I had to do work in the nice city of Nantes in France for 3 days. Nantes is about 1000km through the air and a lot more in a car or by train so we took the plane.
When flying, you have the choice when you’re on location, hire a car or use public transportation.
I’ve been to Nantes before and I remembered that they had Uber there and that the traffic is not really “my style” so I decided to do that. The Uber driver told us a lot about Nantes and one of its famous inhabitants: Jules Verne. There is even a museum there. Also there is a warship museum in the harbor where the film “??” was recorded. Not that we had time for that… but nice to know for the next visit.

What Diagram shall I use?

As long as you use UML to document your software, it does not really matter which Diagram you use for what. It does not even matter if you use the UML correctly. Or even worse, you don’t know while you cannot check if you use the UML correctly. At least in Rhapsody you can generate code to check if your model does what you specified. But there is enough left to do wrong… you can only generate code from Class-, Object-, Package-, State-machine- and activity Diagrams.

Admitted, the UML is not clear on when to use what diagram. The argument for not having that is that it is a programming language. “C does not tell you when to you which statement either”. Correct but if someone else does something in a certain way, that does not force me to do the same….

So the UML lacks a “process” that divides your development in stages with deliverables and rules on what to use when and how.

V-Model

The V-model is still used widely in software development. As it should be because it is a proven way to develop software. The exact way it is used changed over the last decades. From a waterfall model where each stage was finished completely before starting the next to the agile process we use now that makes the V-model more a system where you store your development artifacts.

Process

There are numerous processes that describe how to develop software. Some of them are more common and some of them specify UML or even Rhapsody specific, like IBM’s Harmony. Older processes are still used like RUP from rational, Ropes from Bruce and many more like Automotive Spice (a-spice)
You don’t need to try and follow these processes, you can use them to describe your own process. How thorough you do that is mostly depending on the safety level of your software. Railway systems or cars or planes have huge processes that require really thoroughly described steps.

Requirements

When you don’t know what to do, you cannot do it. So you first have to be clear on what it is that you are building. This is a difficult part for experienced software developers… We (Yes I am a software developer…) are very solution oriented. If somebody describes a problem to us we immediately start to think solution. Write down the real requirements of your product. Concentrate on “What do I need” not on “How do I do that”. You can use a Requirements Management Tool like DOORS (Next) of Polarion or even Word or Excel (Not good for linking and traceability but will work)

May be you are lucky and you will receive the requirements from your stakeholder, like in the Automotive industry.

Then import the requirements in your UML model. In Rhapsody you can use either the Gateway of the Willert RequirementXChanger. These tools will create a package with your requirements. They can even synchronize them if the requirements change and mark the changed requirements accordingly so you can do impact analysis on changes.

What diagram should you use for requirements? That is a good question since the UML does not know a requirement diagram. There are a couple of possibilities in Rhapsody, you can stereotype an OMD (Object Model Diagram) as a new term “Requirement Diagram”. Very elegant way, Rhapsody creates a category for new Terms so that you see them as a folder in the browser. Another possibility is to not show the requirements on diagrams but to create a table where you have the requirements on one axis and your linked model elements on the other. Have a dependency with “trace” stereotype as cell item and you can link requirements very easily. Also possible is to drag your requirements in the diagrams where you have the model elements that you want to link. This will make your diagrams messy but there is a solution for that too! You can apply filters (actually queries) to your diagrams and blend out certain elements.

Analysis

The next step is to analyze your requirements and create diagrams where you extract behavior.
The Diagram of choice here is a Sequence Diagram (At least that is my opinion) The nice thing about Sequence Diagrams is:

  • Even non-techies understand SD’s
  • They are easy to draw
  • They can be used for tests!

You just start drawing the first diagram by treating your system as a black-box, defining what output you expect for certain input. You then create new SD’s by refining the first one  in horizontal way (splitting up the system in sub-systems, then sub-sub-systems until you are at Class level) and vertical way (split the functions ins sub-functions and so on…)
You can use Class Diagrams (Or Object Model Diagrams) to already start drawing your system architecture that you find out when drawing the SD’s.
Some use Activity Diagrams or even State-charts for this part. There is nothing against that, I just don’t like it. Activity Diagrams are more or less OK but I think State-charts are just too complicated and distract your mind too much during analysing your system. Also if you need to speak with non-technical people about the exact requirements of the system, State-charts are much less “natural” to use.

Design/Implementation

Here you use the same diagrams as in the Analysis and now it is time for state-machines. Together with the state-machines you start creating tests for all your sequence diagrams, in that way you can immediately test if what you have created is correct. And even better: you can do so whenever you have made changes.
This allows you to do Analysis/Design/Implementation in a sort of spiral model. Just keep adding small pieces of functionality, keep starting automated tests (using Test Conductor) and you always have a working system.

Some pictures from Nantes

That’s it for today, happy modeling with Rhapsody!

Walter van der Heiden (wvdheiden@willert.de)

Task, Process, Thread

Introduction

On the way back from the US I decided to write something about a question that I received multiple times.

What is a task in Rhapsody? Or equivalent questions using different words but are all about the same topic: task, process, thread.
You can use Wikipedia to read about it, I did too and it will help you, but I will give you my interpretation. which is not necessarily the correct one but I can live with it.

The main difference between a process and a thread is the memory space. threads share the same space, processes have their own memory space. A task can be both, it just indicates that something is running independent from other tasks.

So what is an active class in Rhapsody? That is not specified in particular but for most frameworks it is a thread. “Normal” Rhapsody code runs in the same memory space, it has to, if you send an event to another object, you need to know the “me-Pointer” of that object, which, inevitably has to be in the same memory space.

Hmm so it is not possible to use processes as Rhapsody “tasks”? Oh that is possible but you need a different framework. And a not so easy framework, It is called “distributed Framework” or short”DOX”. The adaptation to an operating system is much trickier in such a system since there is a lot of difference between the methods of inter process communication. You basically have to “register” all tasks and create a function that can communicate between tasks using shared memory or whatever mechanism your OS offers you.

Sending an event means that you have to serialize the event (and, if there, its parameters) then store it in shared memory, notify the OS. Than the OS in its turn will provide it to the receiver that receives it, unserializes it and put it back in the structure.

Solutions

There are other ways to still use Processes when writing an Application in Rhapsody.

  1. You can, as described above, implement a different Framework and use the available interprocess communication. The advantaged is that the Rhapsody model can be kept unaware of that and is still portable to other environments.
  2. On some CPU’s (for instance ARM Cortex) you can use memory protection in a special way. In that way you can use the same memory space but only allow certain functions access to certain memory ranges. This is a proprietary solution, not portable but since the hardware will checked everything, safe and small.
  3. The last way is to use a normal framework, create processes when you have an active class and then implement the shared memory in a class that has all communication addresses “Pre-compiled” You can take an instance of that class in each process. You cannot send events since the message queues are in different memory spaces so you have to communicate differently.
    There is no real difference between a single app with multiple processes at multiple apps. You might as well create a component for every process and include the communication in each and every one.

So. Hope this helps. Happy Modeling with Rhapsody!

Walter van der Heiden ( wvdheiden@willert.de)

Task, Process, Thread

Introduction

On the way back from the US I decided to write something about a question that I received multiple times.

What is a task in Rhapsody? Or equivalent questions using different words but are all about the same topic: task, process, thread.
You can use Wikipedia to read about it, I did too and it will help you, but I will give you my interpretation. which is not necessarily the correct one but I can live with it.

The main difference between a process and a thread is the memory space. threads share the same space, processes have their own memory space. A task can be both, it just indicates that something is running independent from other tasks.

So what is an active class in Rhapsody? That is not specified in particular but for most frameworks it is a thread. “Normal” Rhapsody code runs in the same memory space, it has to, if you send an event to another object, you need to know the “me-Pointer” of that object, which, inevitably has to be in the same memory space.

Hmm so it is not possible to use processes as Rhapsody “tasks”? Oh that is possible but you need a different framework. And a not so easy framework, It is called “distributed Framework” or short”DOX”. The adaptation to an operating system is much trickier in such a system since there is a lot of difference between the methods of inter process communication. You basically have to “register” all tasks and create a function that can communicate between tasks using shared memory or whatever mechanism your OS offers you.

Sending an event means that you have to serialize the event (and, if there, its parameters) then store it in shared memory, notify the OS. Than the OS in its turn will provide it to the receiver that receives it, unserializes it and put it back in the structure.

Solutions

There are other ways to still use Processes when writing an Application in Rhapsody.

  1. You can, as described above, implement a different Framework and use the available interprocess communication. The advantaged is that the Rhapsody model can be kept unaware of that and is still portable to other environments.
  2. On some CPU’s (for instance ARM Cortex) you can use memory protection in a special way. In that way you can use the same memory space but only allow certain functions access to certain memory ranges. This is a proprietary solution, not portable but since the hardware will checked everything, safe and small.
  3. The last way is to use a normal framework, create processes when you have an active class and then implement the shared memory in a class that has all communication addresses “Pre-compiled” You can take an instance of that class in each process. You cannot send events since the message queues are in different memory spaces so you have to communicate differently.
    There is no real difference between a single app with multiple processes at multiple apps. You might as well create a component for every process and include the communication in each and every one.

So. Hope this helps. Happy Modeling with Rhapsody!

Walter van der Heiden ( wvdheiden@willert.de)

Back to Work. Question of the Week: Windows or Linux

So. The nice and quite days after Christmas and New year are over. Back to work means: back to travel. A small one to start, yesterday evening I drove to Bückeburg, this week I’m in the office the complete week. Then we slowly increase the travel distance (Nantes, Bristol, Boston,…)

Introduction

Lately people ask me if they can use Rhapsody “native” under Linux.
Short answer: Please NO!
Long answer: No it is not really usable under Linux. It is simply the Windows version that runs under Linux because the graphic engine happens to work under Linux as well. A lot of features will not work (See list below)
This only makes sens if you have a compiler that runs under Linux (or your target environment of your Rhapsody Development is Linux)
If you really insist on doing your daily work under Linux then install VmWare and install Windows in a Virtual Machine. I have the same on my Mac.
Question: But VmWare is not free!
Answer: Grrr, i should have known…  Then take Virtual Box. or try Wine (I don’t know if it works but I expect it to)
At least you can create a shared drive where Rhapsody can generate (or in case of RXF, the deployer will deploy) the source code to.
Or you setup an rsync between the Windows VM and Linux.

Trust me, this is the best way to do it. The Linux version was never really developed as a native Linux application and therefor does not use any of the Linux advantages.
Walter Quote #1: It is always surpising to see how much money people are willing to invest to be able to use Linux for free.
Happy Modeling with Rhapsody (under Windows)
Walter van der Heiden (wvdheiden@willert.de)

Features not available in Linux version of Rational Rhapsody 8 releases

Abstract

Features listed in this document are not available in the Linux version of the IBM Rational Rhapsody version 8 releases.

Content

  • Android application development (feature completely removed in release 8.1.4 of Rhapsody)
  • Automatic Test Generation (ATG) add-on
  • Breakpoint synchronization is not supported in the Wind River VxWorks 6.9 and Wind River Workbench 3.3 integrations
  • C# application development (feature completely removed in release 8.1.4 of Rhapsody)
  • CORBA development
  • Configuration management SCC mode
  • Customizable code generation
  • Eclipse platform integration
  • Functional Mock-up Interface (FMI)
  • Generate support request
  • Helpers can be used, subject to the following limitations:
    • Helpers that are set up to be triggered by actions such as code generation will not work with RhapsodyCL on Linux.
    • When using Java helpers, the JRE used must be the one installed with Rational Rhapsody or a different IBM Java JRE. Also, the JRE cannot be within a ClearCase VOB.
    • Arguments cannot be passed to Java plugins.
  • Import from Rational Rose (feature completely removed in release 8.1.4 of Rhapsody)
  • Languages: Japanese, Korean, Simplified Chinese, Traditional Chinese
  • MathWorks Simulink integration limitations:
    • Managed Mode for Simulink
    • Plant Modeling (exporting a structured block to Simulink for simulation)
  • Microsoft VBA (feature completely removed in release 8.1.4 of Rhapsody)
  • Microsoft Visual Studio integration
  • NATO Architecture Framework (NAF) version of Unified Profile for DoDAF/MODAF (UPDM)
  • NI VeriStand (feature completely removed in release 8.2.1 of Rhapsody)
  • Oracle Java for plug-ins (JVM)
  • Parametric constraint evaluator
  • Rational Rhapsody apps cannot be developed in Linux with SWT libraries. (Note that you can develop Rational Rhapsody apps with Eclipse in Windows and use them for both Linux and Windows.)
  • Rational Rhapsody 64-bit application
  • Rational Team Concert integration
  • Rhapsody Model Manager (feature introduced in release 8.3 of Rhapsody)
  • Safety Critical Development in C
  • Siemens Teamcenter integration (feature completely removed in release 8.2.1 of Rhapsody)
  • SMXF (Simplified/reduced MicroC Framework for C)
  • Split diagrams during export
  • SXF (Simplified eXecution Framework for Safety Critical developers)
  • Target monitoring
  • TestConductor add-on limitations:
    • Cannot be used with Rhapsody in Ada
    • Does not work with RhapsodyCL. As an alternative, you can use the command line of rhapsody.exe with command line option -hiddenui.
    • Integration with Rational Quality Manager 4.0 not supported
    • AUTOSAR SWCs not supported
    • VxWorks 653 platform not supported
  • VxWorks 653 integration
  • Web-enabling a model (Webify)
  • Wizards that help create ProxyPorts
  • XMI Toolkit add-on for Rational Rhapsody is not compatible with RhapsodyCL
« Older posts Newer posts »

© 2025 Rhapsody TechBlog

Theme by Anders NorenUp ↑