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

Tag: AUTOSAR (Page 2 of 3)

Shanghai AUTOSAR

Traveling

Last year the 10th AOC was in San Jose, this year the 11th was just as far but then in the other direction… in Shanghai

Also a first time, I’ve never been to China before. before we left there was already a bit of bad news: The Hard-Rock cafe in Shanghai just closed. Grrr.

Also acquiring a Visa was a bit troublesome… but I managed in time.

But OK, we had to work anyway. So on Sunday, me and a colleague left for Schiphol Airport (My Favorite) to fly to Xiamen and then to Shanghai. Almost 16 hours in total. The first flight took 10 1/2 hours, that is long… Somehow I did not manage to sleep so I was pretty tired after arrival.

Luckily the arrival was in the evening so after a shower and a meal we could quickly go to bed. Before that we managed to get some SIM cards so that we could be online in an affordable way. Also we tried an ATM and that worked! China uses

But soon we noticed that not everything is easy in China. Almost everything is blocked, Google, Facebook, Uber, WhatsApp and even Pokémon (Yes, yes….) Even many commercial VPN services don’t work.

Luckily I have my own VPN at home so I could have some communication with the home front. But it is definitely not as easy as we are used to now. And slow. And you get kicked out every now and then.

So if you travel to China:

* buy a SIM card from China Mobile (costs about €20 for a Month unlimited data)

* Optionally take a second cel phone (Or a WiFi 4G Router)

* Organize a VPN

* Download WeChat. Without WeChat you are lost in China. It is their WhatsApp and Facebook and ApplePay.

* If you go to China longer: go to ICBC and organize a Bank Account. You can link that to WeChat and use it to pay. They not always accept you as a customer but just try another one.

* No Uber but China has DiDi, get that!

The Conference

The Conference was 2 days, the first was a technical day with 2 parallel slots, one for Classic and one for Adaptive. My colleague and I decided to split up, I would do the Classic track, he the Adaptive.

It turned out to be the most interesting day, the next day was much more superficially from an information standpoint. At night was the networking reception, that is always very useful.

I changed my opinion about Adaptive AUTOSAR. My usual comment was: “Adaptive is like teenager sex, they all speak about it but nobody know how it works and nobody has done it”. I thought the use would be limited to infotainment and autonomous driving ECUs.

But I noticed that there is a trend towards centralization, like in the IT world. Not a bad idea, you create lots of intelligent sensors and actors and connect them to a powerful system that can control them.

Since most ECU’s are not “stand-alone” anyway but have to share tons of information with other ECU’s it is a good idea to combine all these systems.

Since the “intelligent” sensors and actuators will be still made with Classic AUTOSAR, there must be an AUTOSAR Classic inside the Adaptive.

We also learned a lot of other things like the communication (SOME/IP) and DDS, a systemwide publisher Subscriber (A bit like Da Boston Broker )

Back Home

It was a short visit, on Thursday we went back the same way we came. We got lucky, a free upgrade to Economy Plus. Unfortunately a large family (I think from one of the countries that used to be Yugoslavia) thought it was a good idea to put the entire family in Economy Plus, including their noisy kids. But we returned home safely!

I will be back in Shanghai in 2 weeks for the MESCONF.

That was it

happy modeling with Rhapsody

Walter van der Heiden (wvdheiden@willert.de)

Paris, Pense!

Salut!

Just back from Munich I was one day at home to switch my suitcase and get prepared for the next trip. This time a bit longer and further away but the start was in Paris.

I had to go to France anyway so I combined the visit with a visit to the Louvre. No not the museum, IBM organized the IBM Think! Conference there.

This was a cool conference, the only problem is that everybody spoke French and all the presentations (but one) were in French.

My French is not as sophisticatedly my German and English, unfortunately… but I managed. There were 2 presentations with fast and unclear speaking people where I really struggled to understand what they were telling, but most was understandable.

The one presentation that was in English was also the coolest (by far…) :

INFRASTRUCTURES ET PERFORMANCES
Aston Martin Red Bull Racing – Brian Jones, Head of Software Development

I think that at least 2/3 of the audience left the room, because it was in English…. Their bad because Brian had a cool story to tell about using big data in formula 1 to achieve an advantage on the competition. Very very interesting, thanks Brian!

At night there was time left to visit the Mondial, the Paris Auto Salon. A nice view on the new cars of today and new technology, very cool!

AUTOSAR

This was a nice “bridge” to the subject of today. The use of Rhapsody in an Automotive environment. We at Sodius and Willert are working very hard at creating solutions that will support automotive engineers to do their complex jobs as good and right as possible.

That is not easy, many OEMs and TIERx companies have very well defined processes and always a high degree of time pressure that makes it difficult for them to change anything in their daily work.

As Henry Ford already said: If I had asked my customers what they wanted they would have said: “A faster horse”. So you can ask your customer (and you should surely do that!) but you have to define your own way at least partly and then convince customers that your way is the better way.

Since using Rhapsody with Code Generation will already change a lot in the daily routine of everybody but certainly in that of the automotive engineer who already has defined run-time systems (that mostly use periodic tasks) The Rhapsody generated code assumes a preemptive OS that allows you to send and receive events and react to them if they appear, and sleep when there is nothing to do. This is a fundamentally different approach than the MatLab approach that even uses “polled” state machines.

This kind of programming is also much closer to the human way of thinking. Many people consider a polling, or synchronous, system to be more deterministic than an asynchronous system. It is not, asynchronous systems are much more scalable and run without collision much longer than synchronous systems. They also fit better in Object Oriented Designs.

Many Automotive systems are only doable when using synchronous systems. All Control Loops work way better and simpler when you do them in Simulink. But there are lots of systems that are asynchronous. Think about everything that is under direct user control, indicator, power windows, HVAC control panel etc. There is lots of asynchronous stuff in a car.

The more complex systems in cars use both synchronous and asynchronous components. The easiest and nearest way to solve them is by using MatLab. Now that tool really helps you to do the synchronous stuff and it also can do asynchronous stuff with no real penalty. So that prevents people from using UML for creating code in an automotive environment.

Now MatLab and its friends will not really help you to gain understanding and reducing of the complexity in new systems. UML/SysML will, they allow you to setup an understandable architecture. But the real benefit will come from using it to program the asynchronous parts of the application and use the code generation.

The funny thing is that most people do not want the code that is generated from a UML tool like Rhapsody but have no objection against code from a MatLab Simulink model.
It took me a while to figure out why but I think I understand that now. Simulink, used by a Systems Engineer generates just a bit of code that is the exact representation of the algorithm. Writing the code for that would be difficult, the formulas are mathematical things that everybody hates to remember and understand. To generate the code actually relieves you from a lot of extra knowledge.
Generating code from UML is not that easy, you need a lot of extra knowledge to apply that. So people do generally not like to use it.

Another big difference with MatLab is that Simulink Code is mostly used in continuous algorithms, the code is incomprehensible but the diagram is easy to understand. UML (and certainly Rhapsody) excel in discrete algorithms. There the diagrams are also relatively light to understand, as is the code, but the code needs some extra stuff around it to work. That is where people stop using it, it is just not straight forward.

So this is the big dilemma of the Sodius Willert developers, but I think we have some pretty good solutions to use mixed UML/Simulink/AUTOSAR environments. We have a very minimal framework that is easily to use inside an SWC, per ECU we only need one Framework, it can handle multiple instances. You can also import and export ARXML to be converted in stereotyped UML/SysML elements. We will present some solutions on several congresses in the next months.

We have experience in using UML in AUTOSAR environments, we have ASPICE experts on board, certainly in environments where certification is an issue (ASIL C or D) we have expertise and matching tools. And we can train you in using them!

SECollab

A nice opportunity to introduce the Sodius/Willert Tool SECollab (Systems Engineering Collaboration). This helps System Engineers to control all data that they use in their development process, they can make links to achieve traceability, use it for reviews (You don’t even need a license for the original tool to do that!) and derive documents for certification purposes.

SECollab is a server based solution, clients use Web Access, so no tiresome installation issues, just login on the website and access all information available (to you, of course!)

Take a look at it, if you like it, contact me for a demo!

Happy modeling with Rhapsody (and SECollab!)

Walter van der Heiden (wvdheiden@willert.de)

020 and 8.3.1

Helemaal niks in 020

People who know me will recognize the title at least partly. Because I was born in the best city of the Netherlands, Rotterdam, I will never pronounce the name of our capital. That city becoming capital is a capital mistake… (pun intended)
The Dutch government houses in The Hague, a beautiful city at the coast of the Northsea, so it would be logically that The Hague (Or ‘s Gravenhage as the official name is) should be the capital. Nobody really understand why it isn’t.
The rivalry between Rotterdam (010 btw) and 020 is of course very football related. “Helemaal niks in 020” is “Totally nothing in 020”. We in Rotterdam sing that if the 020 football team has another year without a prize. The 020 “fans” still think they are the best.
But OK, it is our capital and we have to live with it. And sometimes I have to visit it (I even worked there for 7 years…) since I had guests from the United States and they all want to visit that.

Tourists

So I organized that a friend of mine who happens to live here, the poor guy, would guide us around in the city. And we do that the tourist way. A walk through the center of the city and the same but then by boat. I can really recommend doing that, it’s really cool, admitted. A few visits to a terrace and a few beers. And of course to the Hard Rock Cafe. NO!!!, I did not buy a t-shirt. I will not wear that. The only HRC shirt I don’t have and never will have.

Any Rhapsody news?

Yes!! 8.3.1 is on the way, I have a beta version installed already, looks cool! AUTOSAR 4.3.1 is supported and what I like very much is the new bridges. Rhapsody can now, finally, create a small bridge in the diagram when two lines cross. Simple change but looks way better. The double click to enter stamp mode in a diagram is also really cool and saves you time when creating diagrams with a lot of similar elements. The quick navigation improved so you can switch to diagrams with a single click on an element.
The API is improved, you will not notice that much but the use is now in line with the Microsoft guidelines. There is now support for Visual Studio 2017 and.. there is a setting to let Rhapsody save in the old file format by default.
We are going to thoroughly test the new Rhapsody and I keep you informed when we release this version to all of our customers.

 

That’s it! Happy modeling with Rhapsody!

Walter van der Heiden ( wvdheiden@willert.de )

Pearl Jam

It’s a tough job but somebody’s got to do it…

Sometimes life is good, sometimes life is awesome. I had a busy week, hence the limited BLOG entries, but during this week I had time to travel to 020 (That’s how I call the city that became our capital by a “capital” mistake see: 020 and 8.3.1)
Then why go there? Well there is a place called Ziggodome where lots of concerts take place, On Wednesday it was the time of Pearl Jam, one of the bands I love.
Their first album “10” was one I played over and over and I still do that.

When I saw they were performing in the Netherlands I was sitting behind my computer at the start of the sale to get tickets. Unfortunately I could only get 2 tickets… Better than nothing I thought…

Unfortunately I also noticed that I had visitors from the US in that week that I could not shift. So I was already thinking of selling my tickets but when I told my guests that they all shouted: “Can you get more tickets”? Yes I can… 😉

So I traveled from the office in Bückeburg to “Nul Twintig” together with my American friends. A nice drive, about 350 kilometers. We ate a burger at the Burger B*tch (Not kidding, that is the real name, just google it) drank a beer and attended the awesome concert. Life is good.

What does this all have to do with Rhapsody? Nothing directly… but my friends are also Rhapsody and modeling people. Not only that, there were 2 Automotive Spice experts and another AUTOSAR expert. So we used all traveling time very useful with some interesting discussions on how to do ASpice with Rhapsody, how to import and export Rhapsody UML information to and from ARXML, how to do a model transformation from SysML to AUTOSAR and back with traceability links. We only stopped discussion when Eddie Vedder was singing. That was just too good. Love Rhapsody but I also love Pearl Jam.

So. Happy modeling with Rhapsody. one is Alive in Even Flow….

Walter van der Heiden ( wvdheiden@willert.de )

Modeling with AUTOSAR

Introduction

This is a small excerpt of my presentation at the IBM IoT CE Conference in Munich from may 14-16. A very nice conference, if you were not there: you missed out!

The Challenge

I might have said it before, cars are the most complex thing people build. Even more complex than planes. I “borrowed” a slide from Debby Edwards Keynote from the conference. That clearly shows it.

The F35 (JSF) plane has about 25 million lines of code, a modern high-end car 100 million. OK, there are trade-offs, like do you add multi-media systems or is a passenger plane more complex but the general idea is just: making cars is an immensely complex process. But look at a random big city during rush-hour and you see: The Automotive Industry still manages to make cars that work with a remarkable reliability.
Not always, we all know examples from cars that have huge electronic problems (I can tell some stories about that myself…)

No why is a car more complex than a plane? Well, part of the complexity is self-inflicted. Compare this:

  • Car > 1.000.000 pcs < EUR 100.000,-
  • Plane < 1.000 pcs. > EUR 100.000.000,-

this says it all, cars are mass products that are cheap (relatively to planes…) and planes are almost built-to-order products that are expensive.
A plane manufacturer does not bother the price of a micro-controller, they have a small number of certified ones that they choose from. If it costs EUR 2,50 or EUR 2,80 does not really bother him.
Now the car manufacturer is interested. If they can use a CPU that costs only EUR 0,10 less than another one for a device that is in a car (or even multiple times in a car) than the calculation looks different. 1.000.000,- * EUR 0,10 is already EUR 100.000,-
So mostly they choose small Microcontroller that barely fulfill the needs of their developers, adding to the complexity.

Mastering complexity: Process

autospice.gifOne of the things you can do to master complexity, certainly if you are not changing the tool environment.

The Automotive industry has a process, Automotive Spice or short A-Spice. A thorough and already more than 10 years old process that is a big help in mastering complexity. Of course A-Spice does more than just helping to master complexity, but that is not in my focus now.

The process helps you to define what needs to be done in what stage of the development. So every item is defined and there is a definition of what should be in there. This helps engineers to gather information and present it in the right way to their colleagues so the development information is always up-to-date.
This process can be followed by hand, of course, but this is so error-prone that I strongly advise to use tools. We discuss later what tools and how.

automotive.png

Also mastering Complexity: Abstraction

The way to master complexity is the use of patterns (or abstraction). Abstraction can be explained by looking at this bunch of matches. If you need to count them, sorted like that, it is not that easy. So you sort them in groups, that makes it much easier to count. That is abstraction, you just follow the pattern and it makes it much easier. The disadvantage of this is: space/time drawbacks. You see that the matches take up more space if they are close together then when they are sorted.

csm_721435599Fuenf_Streichhoelzer_5780056202_6af0698c2e_o_129adc9027.jpg

the same applies for patterns in software, they help you solve complex things but also at a price. The fact that the pattern is universally applicable creates overhead.

Not mastering Complexity: AUTOSAR

csm_AUTOSAR_01_c35041dc46The Automotive industry created AUTOSAR with a couple of goals in their minds. They wanted to make it easier to switch suppliers by letting them use a standard interface, they wanted to have multiple suppliers that develop applications on a single controller without having to know each other and be able to slip applications over multiple ECU’s without redesigning the complete application.

The extra data in AUTOSAR applications is stored in XML files called ARXML. This can be parsed and imported and tools can in that way exchange information in a standard way. That sounds fantastic but in praxis the advantages are limited, no one wants to share more information that absolutely necessary with others from a competitive standpoint.

AUTOSAR uses abstraction, they have standard software layers (Basic Software) that implements a lot of basic stuff. This will solve some pain but also introduces new complexity, the Basic Software layers are not easy to use.

AUTOSAR uses a Run-Time Environment that is derived from OSEK, the OS is very static and generated from ARXML. Although it sounds cool to just generate separate pieces of code that will be executed “somehow” this is not aiding to understandability.

You cannot create an easy to understand architecture that explains how your software is built-up and how it generally works. It basically adds a lot of abstraction overhead for a non-effective abstraction, it is measured that the use of AUTOSAR will almost double the memory needed compared to non-AUTOSAR solutions!

The conclusion is that AUTOSAR is not designed to lessen the complexity, on the contrary, it adds to the complexity. Experts estimate the complexity of AUTOSAR about 10 times that of SysML.

Certainly mastering Complexity: UML/SysML

UML and its sibling SysML were created to master complexity. The graphical way to model using different diagrams that help the developer concentrate on different aspects of development without being distracted by other stuff.

UML is used to make software, SysML is a UML profile that uses some of the UML diagrams, sometimes in a different way (The same elements but they have a different meaning) and adds some new diagrams. It is used to make systems.

Many Automotive customers that want to start using modeling ask for SysML, since they make systems, not just software. Now there are a few disadvantages to that, it is harder to make just software from SysML, so you probably do stuff 2 times or you have to write helpers that do intelligent conversion/linking between your SysML and UML model.
The funny thing is that most people who ask for SysML, in the end only create software. So they would have been OK by using UML.

One of the nicer aspects of the UML is that it is set-up to be flexible and configurable. A good example is SysML, this is actually a UML profile. the same thing for the AUTOSAR profile, it changes the way the UML looks and feels by just loading a profile.

UML Tools help you in creating links between several development elements. In that way you can create traceability that helps you find back your stuff (and the reasons why you solved it that way) and is a must for certifications in safety-related applications.
The standard graphical UML helps you define and understand your architecture.

Helping to master Complexity: Tools

As already said, following a process with just pen and paper is not doable. Luckily there are enough tools around to help you in the development of your applications.

Most tools more or less use their elbows towards other tools to conquer as much space in the V-Model as possible. They all want to be used for everything. They all claim to have solutions for the complete process from requirements to acceptance test.

My advice: Don’t buy that!

Most tools have a specific area where they are good, or even “The Best”, on other area’s they shine a lot less and you could use much better tools.
Now it is understandable that you want as less tool switches as possible during development. Every time you are confronted with information that needs to be synchronized or linked. This needs to be solved good.

You may need AUTOSAR Tools to generate RTE and to have access to Basic Software and or stacks.
You may need Simulink (with Embedded Coder or Targetlink) to generate code for pi or pid control loops
You may need a UML Tool like Rhapsody to have your architecture defined, use statemachines to describe behavior and much more

There are lots of tools available but you should be using a combination of the tools that fits your needs and can be combined with each other.

The Master: Single source of truth

Or “How to avoid having multiple captains on one ship”. All Tools manage information. Sometimes information from different tools must be linked. Then you must use some synchronization (like IBM Rhapsody Gateway or the Willert RequirementXChanger) to keep the information synchronized AUTOMATICALLY! In that way you create a so-called “Single Source of Truth”, only one tool can be the master of a specific type of information. You have to define in your process definition which tool that is and how its done.

Be the Master: use Rhapsody with AUTOSAR

Method 1: Model AUTOSAR

New Project.JPG

This is the “full-fledged” way. You load one of the AUTOSAR profiles in Rhapsody. This changes the look and feel of Rhapsody to be an AUTOSAR modeling tool. The good-old UML elements are all disappeared and only AUTOSAR Items are available.autosar project

You can now use AUTOSAR diagrams (Block diagram etc) and model that. You can export your model into an ARXML file that you can use for other tools and for the RTE Generation.

If you want to use “plain” rhapsody state-charts you first have to add a so-called “RIMBO”, connect the interfaces and then you can use “normal” rhapsody.

This is the way IBM recommends.
Since 8.3 you can safely use the 64-Bit version, in AUTOSAR: Do that! It will be slow otherwise.
You can combine 64 and 32 if you have an older version, import/export with the 64-bit, do the rest as 32-bit.

Method 2: Transform AUTOSAR and model UML

This is the “Willert” method. For the AUTOSAR stuff you use an AUTOSAR authoring tool. Then you export the ARXML from there and import that into Rhapsody using the AUTOSARXChanger. The result is a UML model with”converted” AUTOSAR elements. They are, however, normal UML elements with stereotypes.

autosarxchanger.JPG

Willert is working on other ways to use Rhapsody in an Automotive environment. We will have an exporter that can export UML models (with the correct stereotypes) to ARXML files.

Keyless Master

An example how this works.

Keyless Master: Marquardt Case.

 

OK, that’s it! Happy modeling/mastering/driving!

Walter van der Heiden (wvdheiden@willert.de)

 

 

AUTOSAR in Noordwijk

Introduction

Lately a lot of automotive companies reach out to us for help with their development. Mostly their problem is that in spite of all the (expensive!) tools they use, they still have trouble getting all development done correctly, in-time and thoroughly tested.
I understand that, you can use several AUTOSAR Tools, you can use Simulink or ASCET or TargetLink or whatever, most of these tools do not solve your problems with, amongst others, complexity, timing and architecture.

With AUTOSAR you are able to develop very distributed. That is a big advantage but at the same time also the main problem with it.

Using AUTOSAR does not automatically mean you are using modeling, also modeling does not equal modeling. Using Simulink is completely different from using Rhapsody or another UML modeling tool.

This week I was in Noordwijk together with Clemens to define and implement some of our AUTOSAR/Rhapsody solutions.

How hard can it be?

As the famous Jeremy Clarkson always says when he and his former Top gear, now the Grand Tour, mates are doing something that is nearly impossible: “How hard can it be”.
I can tell you one thing: making software for cars is hard. Very hard.
In my opinion, cars are the most complex thing people build. Not planes or rockets ( The expression, “It’s not rocket science” should actually be: “it’s not automotive software”, IMHO )
Parts of that complexity stems from the fact that the Automotive sector suffers from a drastic price policy. If their purchase department can purchase a CPU that is €0,20 cheaper, they will do that, regardless of the fact that this can skyrocket the effort of building software. Well maybe it’s not that drastic but this is closer than what the Aerospace people do, they only use certified CPU’s. What they cost is pretty irrelevant, you never notice it on the price of a plane and they will only build a limited number of planes, not millions like car ECUs.
Other reasons for complexity is the environment of a car. Planes can fly and therefore already solve the problem of having millions of moving obstacles on their path. Air Control tell the plane where to go, how fast and how high. Makes things much more easy.
So the reason is this complexity, that will only be more now we are implementing autonomous driving.

UML or SysML?

The solution “du Jour” for this is now to use System Engineering or SysML (System Modeling Language) Is this better than UML? That is not a statement that you can make. It depends on what you are doing. I noticed lately that most people ask for SysML but they almost all end up with making software anyway, not systems. That does not mean that you should not use SysML but there are things in SysML that are different. Plus that you have “yet another Tool” and “yet another language” to learn.
So if you can be sure that no-one from any other department than the software guys will use SysML: choose UML. You can also mix SysML and UML (Even for Software development, we are embedded so in the end we always do some systems engineering as well.) The disadvantage is that you often have to do things double. Or put effort in model transformation or intelligent “helpers” that convert and link your model elements. (e.g. like the Harmony profile does)
But OK… since the UML has (still) not reached the critical mass in users, I gladly accept SysML (Which is nothing more than a UML profile) as the UML savior.

Multiple captains on one ship

That’s one of the problems with the multi-tool approach. It is generally a good idea to use the right tool for the right task. Unfortunately all tools think that they are capable of doing everything, which they are most definitely not. It’s like having 2 or more captains on a ship shouting contradictory commands.
The only way to use multiple tools where you have development information that is used in different tools is when you:

  • use automatic synchronisation.
  • use a tool that help you connect the information
  • use a very rigorous process that tells you where the information is created, kept, supplemented and changed.
  • Automate as much as possible

AUTOMOTIVE Spice

There is, luckily a process that you can use for development. This is a big help in defining your artefacts and how to store and process them.
Not really easy to implement but hey: we do complex stuff, this is never going to be easy. I could write a book about this but I won’t. Not here. You can read all about Aspice here.

Rhapsody can do AUTOSAR, can’t it?

Exactly. It can. You can load an AUTOSAR profile (Most AUTOSAR Versions are available) and then you can import and export ARXML files. You are no longer using UML, you use AUTOSAR. And you can model it, draw diagrams, make connections add AUTOSAR artefacts. You can even use UML State-machines you first have to create a so-called RIMBO (Rhapsody Implementation Block) and connect that to all AUTOSAR connectors.

You have to consider a few things. The ARXML import/export is using Java and uses a lot of memory. It turns out that Rhapsody 64-Bit is really much faster when importing or exporting ARXML. If you use Rhapsody 8.3 you’re OK, you can use the 64-Bit. For older versions you can still install the 64-Bit version just for import and export and do the modeling in the 32-Bit version.

If this is the solution, I want my problem back

This is not always the most optimal solution. In my opinion people want to use a UML/SysML tool because they want to use UML/SysML. And that is what you can do. The Willert Automotive Profile for Rhapsody delivers you the possibility to implement other use-cases with Rhapsody. You can use Rhapsody to:

  • implement functionality that uses state-machines and/or Activity diagrams with Code generation. The Automotive RXF is small and fast and will be called in your system in the form of 2 runnables. The names are imported from an ARXML file that you create with another AUTOSAR tool like ArcCore or so.
  • You can also model your AUTOSAR application in UML in Rhapsody, the stereotyped model elements can then be exported as ARXML and used in other AUTOSAR tools.
  • We have defined a base model that includes many Automotive modeling examples, that shows a lot of modeling best-practices and already some very useful helpers.

There are some limitations to using this, not everything is possible (yet). We are working on automatically generating code for communication between runnables (Sender/Receiver ports) You can do this by hand now, however.

OK, we also walked on the beach, drank a few beers in a beach club but we worked very hard on the Willert Modeling for Automotive Solution! In one of my next BLOG entries I will take you through a complete automotive example.

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 quiet 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.
Suppose 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 interest 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 implemented 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 helpful 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 proprietary (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, they 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)

Happy New Year!

I wish everybody a “model” 2018! I had a little break during the christmas and new year holidays. Traveling is cool, but even a modeling traveler needs some rest once and a while.
But now we started a whole new year, 2018, and we have lots of plans to improve modeling in embedded.
IBM is also cooperating, they released Rhapsody 8.3, a brand new version with lots of changes!

AUTOSAR: migration of models to older versions of AUTOSAR

In release 8.3, for migration of AUTOSAR projects to an older version of AUTOSAR, additional target AUTOSAR versions have been added.

Code-centric mode: roundtripping changes to operation signatures

Prior to release 8.3, in code-centric mode, if you renamed an operation or modified its parameters and then roundtripped the code, the old operation was automatically removed and a new one was created in its place.

Beginning in this release, when roundtripping such changes, you have the option of retaining the existing operation and having it marked with a stereotype called MergeCandidate. After roundtripping, you can then go through these operation and merge them with the new operation that was created. The new operation body and declaration will then be copied to the existing operation, which will retain any other existing information such as dependencies. The second operation will be discarded. To enable this option, set the value of the property MarkMergeCandidateOperations to True.

Code-centric mode: support in 64-bit version of Rhapsody

You can now use code-centric mode in the 64-bit version of Rhapsody. However, code cannot be generated while in code-centric mode.

Configuration Management integration: renaming/deletion of Rhapsody units

Prior to release 8.3, if you renamed a Rhapsody element that was saved as a separate unit, the name of the file representing the unit would always keep its original name. Beginning in this release, if you configured Rhapsody to use the integration with Rational Team Concert (using the CMTool property), then when you rename a model element that is a unit, you will be asked whether you want to also change the name of the underlying file. This behavior can be controlled by the property RenameActivation.

Similarly, if you delete a unit, you will be asked whether you want to also delete the underlying file. The deletion behavior is controlled by the property DeleteActivation.

Modeling: “satisfy” stereotype in non-SysML projects

The “satisfy” stereotype, previously available only in SysML projects, can now be applied to dependencies in all Rhapsody projects.

Modeling: ownership of dependency between two other elements

Beginning in release 8.3, an element can be the owner of a dependency between two other elements. Among other uses, this makes it possible to create a dependency between two read-only model elements.

Modeling: selection of type for flowport

Now, when you try selecting a type for a flowport, the dialog remembers the last location used, allowing you quicker access to the relevant elements.

 

Rhapsody repository files: move to XML format

Beginning in release 8.3, the files used to save Rhapsody models are in XML format. To help differentiate between the new repository files and the repository files used in previous releases, the letter x has been added to the file extensions. For example, the main file for the project now uses the extension .rpyx instead of .rpy. Existing projects that are saved in version 8.3 of Rhapsody will be saved in the new format.

Statecharts: multi-line display of code for entry action, exit action, and internal transitions

Prior to release 8.3, in the graphical compartment used to display the code for a state’s entry action, exit action, and internal transitions, each of these items was allocated a single line, regardless of how long the code was.

Beginning in this release, there is an option to have the compartment display multiple lines of code when required. For individual states, this can be set in the Display Options dialog. If you want to set this as the default behavior in all your projects, you can add the following property to your site.prp file with a value of True: General::Graphics::SupportMultiLineCompartment.

Support for Red Hat Enterprise Linux 7.2

Rational Rhapsody can now be run on version 7.2 of Red Hat Enterprise Linux.

TestConductor/ATG: information about model elements not covered

In TestConductor and ATG, requirement coverage results now also include information about the model elements that are not covered.

TestConductor: testing of private/protected operations

Beginning in this release, TestConductor includes an option for testing private and protected operations by calling them directly. See the example and related documentation in the TestConductor Testing Cookbook.

TestConductor: user guide for assertion-based testing

The documentation for TestConductor now includes a new user guide (TestConductor_User_Guide.pdf) that deals only with C/C++ assertion-based testing mode. The existing user guide (RTC_User_Guide.pdf) now deals only with animation-based testing mode (Ada, Java, and C/C++).

User Interface: enhanced dialog for setting display options

Many element types now use a common tab-based dialog for setting display options.

User Interface: use of new combo box for filtering

A number of dialogs now use a new combo box that dynamically filters list elements as you type.

XMIToolkit: UML 2.4.1 namespace

XMIToolkit now recognizes the UML 2.4.1 namespace

XMIToolkit: activities with horizontal swimlanes

Now, when importing activities that contain horizontal swimlanes, the swimlanes are rotated so that they can be brought into Rhapsody.

In the next week we will test 8.3 ourselves and check compatibility with our RXF.

Happy modeling with Rhapsody in 2018!

Walter van der Heiden (wvdheiden@willert.de)

A380

I have spent a lot of my time in airplanes, certainly more than a whole month. That is a lot of time. I used to be afraid of flying due to an “unlucky” experience when flying from Austria back to Rotterdam.
That flight had everything, storm, and I mean a real serious storm, a broken of landing, emergency landing on another airport, crying flight attendants, not to mention the other passengers.
It took me a while to get over that but since the first US flight I don’t care anymore. Or better, I like flying. In spite of hundreds of flights, I still like it very much.

As said I’ve seen lots of different airplanes, Boeing 737, 747, 767, 777, 787, Airbus 319, 320, 330, 340 and the 380. Also Embraer, Fokker, Dash, Ilyushin, Bombardier and even some smaller ones.

But the A380 is something special. Very very silent and of course: Huge. And I mean, really huge. I’m an engineer, i know how planes fly but even I am wondering how something this size can just fly.

My Facebook timeline told me this morning that it was exactly 5 years ago since I went to India. The flight was via Dubai so I’ve flown with the A380 of Emirates from Schiphol to Dubai and back. I was already impressed that time.

This time i flew from Paris (CDG, the worst airport in the world) to Miami with Air France. But… Business Class (Yes!!!) So upper deck and a real lot of space.

So… back in the USA. After just a bit over 3 weeks…. This time I have an AUTOSAR conference in San Jose (November 7-8) and the IBM IoT CE Conference in New Orleans (November 14-17)

I will be speaking on both events and on November 17 we will have a Rhapsody Workshop.

I hope to see you there!

Happy modeling with Rhapsody

Walter van der Heiden ( wvdheiden@willert.de )

« Older posts Newer posts »

© 2026 Rhapsody TechBlog

Theme by Anders NorenUp ↑