Page 4 of 15

Berlin #100

Intro

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

100

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

Police

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

Train

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

Hotel

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

Berlin

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

AUTOSAR Workflow

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

Back Home

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

Happy modeling with Rhapsody!

Walter van der Heiden

Paris Code Generation.

Introduction

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

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

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

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

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

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

Code Generation

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

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

So what does a good UML Code generator needs?

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

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

No code is generated from:

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

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

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

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

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

Walter van der Heiden wvdheiden@willert.de

 

Model Transformation

Introduction

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

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

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

Transforming your Models

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

AUTOSAR

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

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

Different soup: M2M

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

Example of Transformation Rules

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

More than just transformation

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

Merging

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

Features of the M2M Tool

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

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

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

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

Model Transformation

Introduction

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

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

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

Transforming your Models

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

AUTOSAR

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

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

Different soup: M2M

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

Example of Transformation Rules

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

More than just transformation

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

Merging

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

Features of the M2M Tool

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

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

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

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

Check, check, modelcheck….

Introduction

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

Java API

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

Oh no… not Eclipse….

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

The Check

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

Helper

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

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

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

Walter van der Heiden ( wvdheiden@willert.de )

RXF Cert

Introduction

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

What is the RXF?

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

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

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

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

Certified vs Certifiable

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

What is there in the RXF-Cert?

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

Vacation time

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

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

Sunny modelling with Rhapsody and the RXF

Walter van der Heiden ( wvdheiden@willert.de )

Task Force Rhapsody

Introduction

This week (and last week) I am in what the Germans call: “Ruhrpott” (or “Revier”, “Kohlenpott” or just “Pott”.
“Ruhr” is the river that flows through this area, “Pott” is pot, like for cooking.
The area is know for its industry, for all the Coal mines and its really, really dense population. (More than 5 million people live there but when you add the other cities that are very close, like Düsseldorf and Köln, the population is way over 10 million in a very small area.

The are has a reputation of being very polluted but this is actually far from the truth. It was cleaned up decades ago and the green area’s that they had were nurtured and cultivated. The hotel is in the middle of a green area and nice and for all, quiet!
See the pictures and you’ll understand.

Tasks

This week a question came in how to setup tasks in Rhapsody. As usual the answer is: “it depends”…
First you have to consider your Framework. I cannot speak for all but when you use OO-RTX (A single thread RXF) you have no choice: everything runs in the main task. Scheduling between your objects is done based on “Cooperation”. When you have completed your State-machine actions you basically give back control.
Using a “while(1)” in a state-machine is the same as blocking all other objects.
So you need a full-fledged Framework using an RTOS underneath.
Then you can set a Class to “active” in the features of that Class (“General” Tab) This means that ALL Objects of this class will run in their own task (Thread would be a better expression see: Threads )
So if you instantiate that Class 10 times, you end up with 10 tasks. That might not be what you want.

Structured Class

If you make a Clas active and then give this class a structure diagram you can guide the way they are assigned to a task. All classes instantiated inside an active structured class run in the same task.

That is nice but if you want to control where all statecharts run (and even change it on the fly) you just have to create your Objects “by Hand”. You just call the Class_Create function from the Object in which task you want it to run, the Create function has a Task parameter, call that with class->ric_reactive->myTask. 
Your Statemachine then runs in the correct task. Don’t forget the Class_startBehavior() function….

Here is a small Rhapsody Model with the different methods in it.

That’s it, happy modeling with Rhapsody

Walter van der Heiden ( wvdheiden@willert.de )

Task Force Rhapsody

Introduction

This week (and last week) I am in what the Germans call: “Ruhrpott” (or “Revier”, “Kohlenpott” or just “Pott”.
“Ruhr” is the river that flows through this area, “Pott” is pot, like for cooking.
The area is know for its industry, for all the Coal mines and its really, really dense population. (More than 5 million people live there but when you add the other cities that are very close, like Düsseldorf and Köln, the population is way over 10 million in a very small area.

The are has a reputation of being very polluted but this is actually far from the truth. It was cleaned up decades ago and the green area’s that they had were nurtured and cultivated. The hotel is in the middle of a green area and nice and for all, quiet!
See the pictures and you’ll understand.

Tasks

This week a question came in how to setup tasks in Rhapsody. As usual the answer is: “it depends”…
First you have to consider your Framework. I cannot speak for all but when you use OO-RTX (A single thread RXF) you have no choice: everything runs in the main task. Scheduling between your objects is done based on “Cooperation”. When you have completed your State-machine actions you basically give back control.
Using a “while(1)” in a state-machine is the same as blocking all other objects.
So you need a full-fledged Framework using an RTOS underneath.
Then you can set a Class to “active” in the features of that Class (“General” Tab) This means that ALL Objects of this class will run in their own task (Thread would be a better expression see: Threads )
So if you instantiate that Class 10 times, you end up with 10 tasks. That might not be what you want.

Structured Class

If you make a Clas active and then give this class a structure diagram you can guide the way they are assigned to a task. All classes instantiated inside an active structured class run in the same task.

That is nice but if you want to control where all statecharts run (and even change it on the fly) you just have to create your Objects “by Hand”. You just call the Class_Create function from the Object in which task you want it to run, the Create function has a Task parameter, call that with class->ric_reactive->myTask. 
Your Statemachine then runs in the correct task. Don’t forget the Class_startBehavior() function….

Here is a small Rhapsody Model with the different methods in it.

That’s it, happy modeling with Rhapsody

Walter van der Heiden ( wvdheiden@willert.de )

2019 is half over already….

Introduction

Or as we say in the Netherlands: the year is cut in two. Time flies when you’re having fun!
What have we seen? A new Rhapsody (8.4)! Lots and lots of new customers, a merger with Sodius… learning French…

What are we going to see in the next half year?
A new Rhapsody! (8.4.1?, 8.5?… 9.0??? who knows!) RXF ‘C’ 7.0, AUTOSAR Adaptive support, C++14 support (Will take a while… sorry….)

MESCONF 2019

Something to really look forward to is the Mesconf, the Modeling for embedded systems conference that we organize every year in Munich. (Oh and last year in Shanghai!)
Since this is a German Congress, the flyer and other information is in German. So sorry for “english-only” readers….

Die deutsche Konferenz über modellbasiertes Engineering für Embedded Systeme gewinnt immer mehr an Bedeutung 

Im 5. Jahr seit der initialen Veranstaltung in 2015 ist die Verwendung von verifizierbaren Modellen als System Spezifikation eines der Schlüsselthemen

Jochen Epple von Daimler berichtet in seiner spannenden Keynote über die Motivation für modellgetriebenes Systems Engineering in seinem Unternehmen, wie es die klassische textuelle Anforderungsanalyse ablösen wird und wie weit man inzwischen gekommen ist.

In diesem Kontext wird es auch eine Arbeitsgruppe geben, die sich mit Konzepten beschäftigt, wie zukünftig bei Auftragsvergaben modellbasierte Spezifikationen im Kontext von Lasten- und Pflichtenheften genutzt werden können, welche Vorteile und Herausforderungen sich daraus ergeben werden.

In bewährter Manier werden Erfahrungen zu vielen anderen spannende Themen in Arbeitsgruppen ausgetauscht und Lösungskonzepte erarbeitet: Modellierung von Varianten und/oder Plattformen, Test Driven MDSE und die Simulation von Modellverhalten, um nur einige Beispiele zu nennen.

Raum für Experten und Toolhersteller, die Ihre Konzepte und Lösungen vorstellen ist inzwischen fester Bestandteil der Veranstaltung geworden.

Und wie immer erwartet die Besucher auch dieses mal ein innovatives aber bereits sehr bewährtes alternatives Format, was die Konferenz zu einem echten Anwendertreffen macht, die deren Fragen und Belange in den Vordergrund stellt. Dazu hier exemplarisch zwei Kommentare aus den letzten Jahren:

‘Ich war positiv überrascht von dem Open Space Ansatz. Zu allen Themen, die mich interessierten, habe ich wertvolle Anregungen oder Bestätigungen bekommen. Ich bin beim nächsten Mal wieder dabei.’ (Michael Sommer)

‘Es hat sich einmal mehr gezeigt, der direkte Austausch zwischen Anwendern lässt sich durch nichts ersetzen‘ (Martin Reiß)

Weitere Informationen: WWW.MESCONF.DE 

Treffen Sie Top-Experten,  Anwender und Toolhersteller. Lassen Sie sich inspirieren, bringen sie Ihre ganz konkreten Fragestellungen ein und diskutieren Sie Lösungen mit gleichgesinnten Praktikern und Experten. Machen Sie sich schlau über aktuelle Trends, Methoden, Tools und Lösungen. Zwei Tage rund um das Thema Modellierung von Embedded Systemen im Systems und Software Engineering sind ein gut angelegtes Investment in Zeiten des rapiden Wandels und der Komplexitätsfalle.

Zum 5. Jubiläum der MESCONF vergeben wir 10 Freikarten. Sie haben Interesse? Dann senden sie sofort eine Mail an uns, weil die schnellsten und am besten informierten, wie so oft, gewinnen!

OK that’s it. Have fun modeling (With any tool!)

Walter van der Heiden ( wvdheiden@willert.de )

IoT Exchange Berlin and a touch of GIT

Berlin’s Calling…

That is the title of a CD (and a movie) by Paul Kalkbrenner. I had to think of that when we heard that the IBM IoT Exchange Conference 2019 would take place in Berlin. I haven’t been to Berlin in ages, last time was in Potsdam at the previous IBM Conference. That was in November 2012, so a really long time ago.
So I was really happy to go, I really like Berlin. The city is not comparable to any other German city. It is the city with the highest number of start-up companies at least in Germany but I even think world-wide.
They also have a Hardrock Cafe… good for the collection. But there are many more places of interest to visit.
Visiting a Beergarden you hear mostly English around you. Very cool.
Luckily the Hotel was right in the middle of the city so at least I could see the “Reichstag”, “Brandenburger Tor” and some other monuments from the Uber…


Because as usual there was not much time left to visit the city but on the day of arrival we were invited to dinner in a very nice restaurant (“Ständige Vertretung”) which was in the days of the cold war something like an unofficial embassy.
That is one of the great things about Berlin, the city is really full of history. The second day we were invited to the Bikini Place where IBM has a so-called “pop-up store”.
For the rest is was speaking with customers, future customers and partners. And I had a presentation. No recording this time.

GIT

A few years ago most questions about Config management were directed to using SVN. This has changed, most people now ask me how they should use GIT. I have written a small piece about GIT in https://rhapsody.blog/2018/08/24/da-boston-broker/ but that was not really a lot.
So. Can you use GIT from Rhapsody? Short answer: YES!! Long answer: Yes, of course but do some thinking before…
The workflow in GIT is different than that of “classic” CM systems. “Normally” you have a working copy and you check-in/-out your changes into the repository. In GIT this works in 2 phases, you have a working copy but when you check-in/-out you do that in your local repository. You can then merge your repository with the central one.
The advantage is that you have all the changes locally and that you can work independently of others.

There are companies that deliver you a GIT server platform that is free (or at least free for personal use) like GitHub, GitLab and BitBucket. They are very convenient for quickly setting up projects.

Configure Rhapsody for using GIT

You need to install git first. I use a MAC that means that installing XCODE will automatically give me git. I recommend installing SourceTree so you can work with a GUI.
GIT will do automerge if you do not tell it to leave your files alone… You have to create a file called .gitattributes (Yes the “.” should be there… makes the file invisible) where you enter the following:

# Following files are treated as binary files
# GIT does not try to merge them
# "Old" Rhapsody files
*.rpy binary 
*.rpw binary
*.sbs binary
*.cls binary
*.cmp binary
*.ehl binary
*.omd binary
*.msc binary
*.ucd binary
*.ctd binary
*.clb binary
*.dpd binary
*.std binary
# "New" Rhapsody files
*.rpyx binary 
*.rpwx binary
*.sbsx binary
*.clsx binary
*.cmpx binary
*.ehlx binary
*.omdx binary
*.mscx binary
*.ucdx binary
*.ctdx binary
*.clbx binary
*.dpdx binary
*.stdx binary

The .gitignore is for indicating which files should not be checked in into the CM system.

#git ls-files --others --exclude-from=.git/info/excludeLines that #start with '#' are comments.
#For a project mostly in C, the following would be a good set of
#exclude patterns (uncomment them if you want to use them):
#*.[oa]
#*~
#/.metadata/
*/log/
*.d
*.o
*.obj
*.log
Snap.*
.dmp javacore.
heapdump.*
*_auto_rpy
*_auto_rpyx
*.pdb
*.db
#Ignore old RHP Model files
*.rhpold
*.rphold1
*.rhpold2
*.rphold3
.DS_Store
Code/KeilARM
Model/PureVueCpp - Kopie
Code/Windows/BrokerTest/VS2015/DeployerBackups
Code/Linux/TestInheritence
Code/String
Model/DDSTutorial
Model/PureVueCpp/BrokerStandAloneTest
core

I have put the following in my .gitconfig file, this should let GIT start the Rhapsody diffmerge program when merging/diffing.

[difftool]
     prompt = false
 [mergetool]
     prompt = false
 [diff]
     tool=difftool
 [merge]
     tool=mergetool
 [difftool "difftool"]
     cmd = difftool $LOCAL $REMOTE
     keepBackup = false
 [mergetool "mergetool"]
     cmd = mergetool $LOCAL $REMOTE $MERGED
     keepBackup = false

Then I created 2 batch files: difftool.bat and mergetool.bat that call diffmerge with the correct parameters.

echo difftool $1 $2 $3 $4 $5 $6 $7 $8
 diffmerge $1 $2 -compare -recursive
echo mergetool $1 $2 $3 $4 $5 $6 $7 $8
 diffmerge $1 $2 -merge -out $3 -recursive

Using this in Rhapsody

This should help you using GIT “outside” of Rhapsody. Please only check-in/-out only complete models, not “single” files, that is dangerous.
You can use the Rhapsody CM commandline interface to at least check-in/-out locally (index) and then use diffmerge to do a weekly (or so) merge with other developers. You should create a profile (Actually a settings file) “RPY_GIT.prp with something like this (Definitively not complete!):

Subject CG    
  Metaclass General      
    Property IncrementalCodeGenAcrossSession Bool "False"    
  end  
end  

Subject General    
  Metaclass Model      
    Property AutoSynchronize  Bool "False"      
    Property PathInProjectList  Enum "Absolute, Relative" "Relative"      
    Property ReferenceUnitPath  Enum "Absolute, Relative" "Relative"      
    Property SupportIncrementalModelSynchronization Bool "False"    
  end  
end  

Subject ConfigurationManagement    
  Metaclass General      
    Property CMTool Enum "None,ClearCase,RTC,RPY_GIT" "RPY_GIT"      
    Property UseSCCtool                     Enum "Yes,No" "No"         
    Property EncloseCommentsInQuotes        Enum "Yes,No" "No"      
    Property GUI                            Enum "Flat,Tree" "Tree"      
    Property RunCMToolCommand               File ""      
    Property ToolCommandTimeOut             Int "180000"      
    Property DefaultLockReserveOnCheckOut   Bool "False"   
  end  
  Metaclass RPY_GIT      
    Property AddMember  String "\"$OMROOT/etc/Executer.exe\" \"git add \"$UnitPath\";"      
    Property CheckIn    String "\"$OMROOT/etc/Executer.exe\" \"git commit \"$UnitPath\" -m \"$log\\";"      
    Property CheckOut   String "\"$OMROOT/etc/Executer.exe\" \"svn checkout \"$UnitPath\";"  
  end  
end

Last… but not least

You can use the pull/merge commands to push your local changes to the server (or fetch the server changes to your local copy)

This might not be the perfect solution for you but at least you can use this to build your own GIT integration!

More Info

There is a free eBook about GIT.
OK Nerds: stop reading. There are many nice GUI’s for GIT. I personally like SourceTree. But there are many more (also free!)

OK. That’s it. Have a great time using Rhapsody

Walter van der Heiden ( wvdheiden@willert.de )

« Older posts Newer posts »

© 2025 Rhapsody TechBlog

Theme by Anders NorenUp ↑