Rhapsody TechBlog

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

Page 5 of 16

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 )

Dauwpop & using Rhapsody code in a library

Traveling Modelers also need vacation once and a while. So last week I had that! And enjoyed it at home. The only thing I did was visiting a Music Festival. But that was on walking distance from my home. It’s called “Dauwpop” which means “Dew Pop”, dew as the stuff that makes the grass wet in the morning and Pop after Popmusic.
It is called that way because in the Netherlands we have a tradition on Ascension Day: “Dauwtrappen”. That is to step on the morning dew. And that is what happens. On that day, mostly young people, go out very early and walk or ride bikes. They do that while taking drinks and stop regularly to drink something.

The festival also starts in the morning although not that early… My main reason for going was that M<Ali Jazz (from Faithless) would be there with a DJ session. But he cancelled last minute. Bad luck, but I still went there with my 2 sons and we had a great day.

A customer asked us a question via support this week. They wanted to use Rhapsody code in a library. The main code was made in Qt (pronounced “cute”) but they wanted to use Rhapsody for the control logic.

So the code must be compiled and then linked into a library.

That, unfortunately, is not it, some more must be done to get it working.

In the general Tab of a Rhapsody Component there are three selections, “Executable”, “Library” and “Other”. There is only one choice possible here. Both the OXF and the RXF use that to generate different code.

When you only use non-active and non-reactive classes and initialize everything dynamically, you don’t have to do anything. You can then just include the correct .h files where you want to use Rhapsody generated classes. But if you do use static objects you have to call the InitRelations() function that is generated, And if you use state-charts and/or activity diagrams you have to initialize and start the framework.

When “Executable” is selected, Rhapsody will generate your main function (Or a function that is directly called by main, depending on the OS you use) In case of a “Library”, a function is generated to start the framework and to initialize the objects in your model. This is true for both RXF and OXF. (In some RXF Versions this was not totally implemented…. take the generated file for the EXE and use that for the LIB… that’ll work.)

The best way to learn how to do this is to start with a simple model first. Create 2 Components with <Name>_LIB and <Name>_EXE, select “Executable” and “Library” respectively and generate code. I always use beyond compare to compare two directories but there are enough other good working compare tools.

Then create 2 classes (“A” and “B”), connect them using an association, create a third class with a structure diagram to instantiate the other 2 (Don’t forget to create an instance of that class !!) now give them a small state-machine (or activity diagram) and make one of then active.

Again, generate code and see the differences. I made life simple for you…. I made the model and saved it (In Rhapsody 8.1.5, old but probably useable by everybody)

Happy Modeling with Rhapsody

Walter van der Heiden (wvdheiden@sodiuswillert.com)

Back in Motown, continue the adapter

Introduction

The next part of the trip was to Detroit, aka Motown. There were some customer visits planned and some internal training for a new collegue.

57817841614__6087F444-1266-44A6-810C-5F4A53BF0CB7
The flight was OK and everything went smooth. I picked up my rental car and then after typing in stuff for a long time the lady from Hertz told me that she could not find my car in the system…. I said, well that’s cool, I just take it and then I don’t have to take it back…
Nice try but she wasn’t going to do that. But she was nice, asked me politely to bring the car back and then pick another. Any other… So I ended up with a cool Infinity Q50. With 400 HP… cool…

IMG_0587

The rest of the trip was without incidents… except for some flooding. But I only saw that on the TV. Haven’t had any trouble with it.

IMG_0589

Back to work II

So from the MakeFileContent property there are some things you have to adapt.

What when it doesn’t work?

If you re-read the  model and you get an error message then…. you did something wrong 😉
Debugging is bnot so difficult. In Rhapsody go to the features of your model and open the “Makefilecontent” property. This will show you exectly to where it could be read…
When the make doesn’t work, try removing (or temporary) switch of the “echo off” with a rem before it. Also you can edit the makefile that is generated, copy the “cc” line and put an echo in it. Then you can see what happens.

 

Build the new Framework

Now the framework also needs to be built. This can be done from the Rhapsody Menu (“Code”, “Build the Framework”) This is only visible if you can rebuild the framework i.e. when the following property is set:

CPP_CG::QNXv7NeutrinoMomentics::buildFrameworkCommand
"$OMROOT/etc/Executer.exe" "\"\"$OMROOT\"\etc\qnxv7cwmake.bat 
qnxv7cwbuild.mak build \"CPU=$CPU\" \"CPU_SUFFIX=$CPU_SUFFIX\" \"

This should contain the call to the batchfile (and makefile) that builds the framework. The same paths and changes you’ve made to the makefile content should be applied to all the makefiles that you can find in the batchfile, they are in the OXF, OMCOM, TOM, AOM and WebComponents directories. You actuall only need the OXF but do the rest (that is only needed for animation) anyway.

TARGETS= oxflibs omcomlib tomlib aomlibs  webcomponentslib

CPU=aarch64
CPU_SUFFIX=le
MAKE=make CPU=$(CPU) CPU_SUFFIX=$(CPU_SUFFIX)  all 

all: $(TARGETS)

oxflibs:
$(MAKE)  -C oxf -f QNXv7CWoxf.mak CFG=oxf
$(MAKE)  -C oxf -f QNXv7CWoxf.mak CFG=oxfinst

omcomlib:
$(MAKE)  -C omcom -f QNXv7CWomcom.mak CFG=omcomappl

tomlib:
$(MAKE) -C tom -f QNXv7CWtom.mak CFG=tomtrace
$(MAKE) -C tom -f QNXv7CWtom.mak CFG=tomtraceRiC

aomlibs:
$(MAKE)  -C aom -f QNXv7CWaom.mak CFG=aomtrace
$(MAKE)  -C aom -f QNXv7CWaom.mak CFG=aomanim 

webcomponentslib:
$(MAKE)  -C WebComponents -f QNXv7CWWebComponents.mak CFG=WebComponents
This is the content of the batch file, all calls have already been edited to the new environment.
Then in all makefiles set the correct include paths and compiler calls: (This is my example, adapt to your own paths)
ADDED_CPP_FLAGS = $(CPU_FLAG) $(DEFAULT_CPP_FLAGS) 
 -I$(QNX_TARGET)/usr/include/c++/5.4.0 
 -I$(QNX_TARGET)/usr/include/c++/5.4.0/aarch64-unknown-nto-qnx7.0.0 
 -I$(QNX_TARGET)/usr/include -DOM_STL -I.. 
 -I../osconfig/QNX -D_MSL_NO_VECTOR_BOOL -DUSE_IOSTREAM 
  $(RHAP_FLAGS)
That should be it.
The menu recommendation for today is the poutine… (In HopCat in Royal Oak in Detroit they have a “Wladimir Poutine” on the menu. It is not healty (and looks awful) but tastes very very good.
57859282305__6C1A0295-6104-4B96-941A-E3F784C4F2EE
OK, Happy modeling with Rhapsody
Walter van der Heiden (wvdheiden@willert.de)

 

USA and Adding support for compilers

Introduction

I receive a lot of questions from people who want to generate and compile code from Rhapsody using another compiler then the ones that are in the standard installation.
Since IBM is delivering some pre-adapted frameworks but does not officially supports them it is the users responsibility to do some adaptation work.
My usual answer is: switch to the RXF. Is smaller, faster and more comfortable since we took the command-line out of the workflow.
But sometimes this is not the answer. Adapting an OXF to a new RTOS is a bit difficult but using another compiler is not that hard.
Unfortunately the documentation to do this is very scarce and not really clear. So here is a (hopefully) better guideline to do that.

USA

Last weeks I was quite busy (and in another time-zone…) Yes back in the US! Again, Florida and Michigan.
In Florida I, of course, visited my friend in Fort Myers and then went to Orlando for the IBM IoT Exchange. I had a presentation there together with Ed Grinberg from Depuy, Boston. I made the movie using my iPhone so the quality is a bit less than professional…

I was also interviewed together with Tom Capelle by the great guys of Quick Bytes, Graeme & Ryan. We spoke about the Sodius-Willert Merger.

Back to Work….

OK.. How do you create an adapter for another compiler. We assume you use C++ and want to adapt the QNX adapter to a newer version.

  1. Never change the original files of the framework. Always make copies and create your own adapter.
  2. When you have changed property files: re-read the model to update the properties in your model.
  3. Use a decent editor to edit files. I recommend notepad++, is free and awesome.
  4. The instructions are for C++, just replace C++ with C and that will work as well.
  5. Either install all tools in the same directory on ALL workstations of everybody in the project or use environment variables to align all differences. (First solution is preferred)
  6. A property file (Only the factory, factory<lang>, site and site<lang> files, not your own!) must have an extra “end” on a newline. Also escape al quotes (“) and backslashes (\)

How does it work?

If you generate code in Rhapsody, a makefile is also generated. When you press build, Rhapsody will call your makefile using an available make for that environment. How does Rhapsody knows what to call? It’s all in the properties, mate!
So assume you’ve selected

The Share Directory

This directory contains all the secrets to Frameworks. The following subdirectories are interesting:

  • etc
    contains files that must be added to the build process and the makefiles for the frameworks itself. Also contains the batch files that Rhapsody calls when building applications.
  • Lang<Language> (C, Cpp, Java, Ada)
    This contains the source-code from the framework
  • MakeTmpl
    Contains files added to the make process.
  • Profiles
    The profiles that can be loaded (The RXF is completely adapted using profiles)
  • Properties
    Contains all property files. This is where Site,prp and Site<language>.prp are located. Also the Factory.prp and the Factory<language>.prp are here. NEVER NEVER NEVER edit these!!!!

There are more directories but these are the interesting ones when making an Adapter.

Step 1, edit the sitec++.prp

So in Share\properties you’ll find siteC++.prp that is usually empty unless you have already added something. We have to add only one (1) property that we can copy from the factoryC++.prp file (Open that factoryC++.prp.  search for environment and copy the line. Add that to your siteC++.prp file)

Subject CPP_CG
  Metaclass Configuration
    Property Environment Enum      
        "MSVC,MSVCDLL,MSVCStandardLibrary,VxWorks,
         VxWorks6diab,VxWorks6gnu,VxWorks6diab_RTP,
         VxWorks6gnu_RTP,Solaris2,Cygwin,MicrosoftWinCE600,
         OseSfk,Linux,Solaris2GNU,QNXNeutrinoGCC, 
         QNXNeutrinoMomentics,NucleusPLUS-PPC,
         WorkbenchManaged,WorkbenchManaged653,
         WorkbenchManaged_RTP" "MSVC"
  end
end

end

This is the “standard”. Now I recommend deleting all the environments that you will never use to make stuff more readable. Then add your own environment, in our case we will call it QNXv7Momentics. We want all changes for our environment in a separate file, that makes it easier to exchange the new adapter with others. This file can be included in the siteC++.prp file with the “Include” statement. The content of the siteC++.prp is something as follows:

Include "QNXv7Momentics.prp"
Subject CPP_CG
  Metaclass Configuration
    Property Environment Enum      
 "MSVC,MSVCDLL,Cygwin, QNXv7Momentics, QNXNeutrinoMomentics," "MSVC"
  end
end

end

Now copy the donor environment (QNXNeutrinoMomentics) to a new file QNXv7Momentics.prp in the Properties directory. (Same procedure, open factoryC++.prp and search for “QNXNeutrinoMomentics”). You have to add the Subject, that is CPP_CG. (Properties always have a Subject and a Metaclass but you can group them in a prp file) Don’t forget the “end” statements!

Edit the properties

Now it is time to edit. You probably have to edit more but that goes beyond the scope of this BLOG. I will describe the most important ones (here you can see the escaping of the backslash and the quotes, don’t forget that!!):

Property InvokeMake String "\"$OMROOT/etc/Executer.exe\" 
\"\\\"\\\"$OMROOT\\\"\\etc\\qnxv7cwmake.bat 
$makefile $maketarget \\\" \""

Here you fill in the name of your batchfile that compiles the Rhapsody generated code. You have to create that file later (In the “Share\etc” directory)
This file contains the commands to call the make command in your environment. Now it is time to figure out how the make command of your environment works.

@echo off
if "%2"=="" set target=all
if "%2"=="build" set target=all
if "%2"=="rebuild" set target=clean all
if "%2"=="clean" set target=clean

set QNXROOT=<The root of your QNX Install>
set MAKEFLAGS=-I%QNXROOT%/target/qnx7/usr/include 
          -I%QNXROOT%/target/qnx7/usr/include/c++/5.4.0
set QNX_TARGET=%QNXROOT%/target/qnx7
set QNX_HOST=%QNXROOT%/host/win64/x86_64
set QCC_CONF_PATH=%QNX_HOST%/etc/qcc
set LD_LIBRARY_PATH=%QNXROOT%/target/qnx7/lib
set PATH=%QNXROOT%/host/win64/x86_64/usr/bin;%PATH%

make -s %target% -f %1 %3 %4 %5 %6 %7 %8 %9

This is the example for my installation, fill in the correct paths for your environment.

More Properties

The following properties determine what you give the compiler. OmFileCPPCompileSwitches is what you fill in the “Settings” Tab of your Rhapsody component.

Property CPPCompileCommand MultiLine 
" @echo Compiling $OMFileImpPath
$(CREATE_OBJ_DIR)
@$(CC) $OMFileCPPCompileSwitches -o $OMFileObjPath $OMFileImpPath
"

Property CompileSwitches MultiLine "-lang-c++ -I. 
  -I$OMDefaultSpecificationDirectory -I$(OMROOT) -I$(OMROOT)/LangCpp 
  -I$(OMROOT)/LangCpp/oxf $(INST_FLAGS) $(INCLUDE_PATH) 
  $(INST_INCLUDES) -DUSE_IOSTREAM -DOM_USE_NOTHROW_GEN 
  $OMCPPCompileCommandSet -c "
Property CCCompileCommandString ""
Property CPPCompileDebug String "-g"
Property CPPCompileRelease String "-O"
Property LinkSwitches String "-Bstatic"
Property LinkDebug String "-g"
Property LinkRelease String "-O"

The next step is to create the makefile. This is generated from Rhapsody. There is a template for the makefile with “magic” macros that expand to the information inside the Rhapsody model.

Property MakefileContent MultiLine "
**** Lots of Stuff ****
"

If your environment is close to the donor environment then you do not have to change much here. Otherwise it is possible that you have to go to all the lines and decide if that is still correct.

So… the rest will be in the next episode

Happy Modeling with Rhapsody

Walter van der Heiden (wvdheiden@willert.de)

Transylvania

Je komt nog eens ergens

That is Dutch and means something like: “You go places”. Yes I certainly do. This time I had to be in Rumania to do a training for a customer that has a development center there.
Because everything was organized in a hurry I did not really prepare well for this trip. That is, I did the necessary things but no more than that. So I was not be able to visit the HardRock Cafe in Bucharest since that is a 5 hour drive away from Sibiu where I was located. My flights would stop in Buicharest but not long enough unfortunately.
My original plan to fly to Bucharest and take a car was not a good one, Romania does not have a concept of highways like we do. So the average speed will be under 50km/h which effectively rules out using a rental car. Also the rentals were really expensive, no idea why, cars are not really expensive in Rumania.
I also did not look up anything about the place I was about to visit..

Rumania is not _really_ Europe

They are part of the European Union, without the Euro though, they use their own currency, but that was not really noticeable. KLM did not offer flights to Sibiu on their website although I managed to find flights from AMS via OPT to SBZ (OPT = Bucharest, SBZ is Sibiu) via another website. I decided to phone with the Platinum Hotline (Hey! You have to use what you’ve got!) and they advised men to use the Air France Website and…. bingo. That was possible. The wonders of Air Travel.. KLM-Air France say they are one organization but as far as I know they are far from that.
Also going in and out I had to show my ID. Schengen??? “Never heard of”…

Looking Good, or?

Coincidentally I looked on my phone in the Air France app and I noticed that there was a message. I looked on it and it said: Your flight is cancelled, please contact the ticketing Buro.
Cool. What if I had not looked??? So phone again with the hotline. This was all done during my previous trip in a car driving from Germany to France via Switzerland… They said the last part of the trip was cancelled. This was the Tarom (Rumanian Air Company) flight from OTP-SBZ. First they told me I had to fly on another day. After i (still politely) explained them that that was a real bad idea because people would be waiting for me… They completely rebooked me to a Lufthansa flight AMS-VIE-MUC-SBZ (Yes… Vienna, Munich in that order…) Hopping through Europe like a crazy kangaroo… Also I would arrive at 1:10 am on the next day.

Later at home I phoned again and now they had a better alternative, AMS-MUC-SBZ, arriving 18:00 on the correct day. “Geht doch”…

Without Status…

I had already arranged that my XP would still be booked (important, I do not want to loose my fresh status on KLM) but I noticed that contrary to KLM (Where they really treat you well as a status passenger) Lufthansa did not know me at all…. And did not let me in their lounge nor would they give me a nice chair. They promised me a window seat on the flight from Munich. I had a seat next to the place where normally the windows are. Unfortunately not on that row….
But I arrived. And on time. The hotel was also close to the airport and the company where I had to be. Going by foot was not advised so i still used taxis but they are very cheap in Rumania. (Even when the taxi driver screws you…)

Dracula

Yes… I have to mention it… The part of Rumania where I was is Transylvania. Home of the famous Count Dracula. And Vampires and so. Luckily I do not believe in that.
Sibiu is a very nice city, definitively worth another visit!!!
My friend Jan Scholten (who has been in Rumania before) told me that Sibiu has a German speaking minority and that the town was also known as “Hermannstadt“. Since it has been the cultural capitol of Europe (in 2007) a lot of Restauration took place and it looks really beautiful!

Training

This was again an example of the necessity of having a training when you start to use Rhapsody. There are so many things that you can learn very fast from an experienced person but can hardly read in a book because you cannot find the connection between all that is written.
The Rhapsody manual is 600 pages, it does not nearly cover all topics and still you find nothing unless you really know what you are looking for.
Yes, partly that is due to the fact that the Rhapsody GUI is not always as easy as it could be. But I know that people are working very, very hard to improve that. Rhapsody 8.4 will be a great step in that direction. But even if the GUI would have been perfect, it is still a lot of stuff you have to learn.

Shortcuts

Three times in a row I met people that were quite experienced in Rhapsody but still did not know the keyboard shortcuts that make life so much easier….

  • Pressing “Alt” during resizing elements on diagrams will only resize the “outer” element and leave the content of the resized element as it is. (You can do that via the normal menu as well…)
  • Pressing “Shift” when dragging up or down in a sequence diagram will shift everything under the cursor up or down. (That way you can create or fill space on a Sequence diagram)
  • You can “multi” select using Shift and/or CTRL. You can then delete multiple items but also change “common” features or Display Options.
  • In the (OK…not so really cool) Editor you can select Rhapsody Model elements with CTRL-Space. (Intellivisor) The one in Eclipse (Or VS) is better but it’s not bad at all! Saves typing!
    Have you already tried the “Mouse menu” feature? Right clicking in a diagram gives you all possible model elements for that position. You don’t have to move the mouse to the menu and back!

That’s it! Have fun modeling with Rhapsody!

Walter van der Heiden (wvdheiden@willert.de)

Transylvania

Je komt nog eens ergens

That is Dutch and means something like: “You go places”. Yes I certainly do. This time I had to be in Rumania to do a training for a customer that has a development center there.
Because everything was organized in a hurry I did not really prepare well for this trip. That is, I did the necessary things but no more than that. So I was not be able to visit the HardRock Cafe in Bucharest since that is a 5 hour drive away from Sibiu where I was located. My flights would stop in Buicharest but not long enough unfortunately.
My original plan to fly to Bucharest and take a car was not a good one, Romania does not have a concept of highways like we do. So the average speed will be under 50km/h which effectively rules out using a rental car. Also the rentals were really expensive, no idea why, cars are not really expensive in Rumania.
I also did not look up anything about the place I was about to visit..

Rumania is not _really_ Europe

They are part of the European Union, without the Euro though, they use their own currency, but that was not really noticeable. KLM did not offer flights to Sibiu on their website although I managed to find flights from AMS via OPT to SBZ (OPT = Bucharest, SBZ is Sibiu) via another website. I decided to phone with the Platinum Hotline (Hey! You have to use what you’ve got!) and they advised men to use the Air France Website and…. bingo. That was possible. The wonders of Air Travel.. KLM-Air France say they are one organization but as far as I know they are far from that.
Also going in and out I had to show my ID. Schengen??? “Never heard of”…

Looking Good, or?

Coincidentally I looked on my phone in the Air France app and I noticed that there was a message. I looked on it and it said: Your flight is cancelled, please contact the ticketing Buro.
Cool. What if I had not looked??? So phone again with the hotline. This was all done during my previous trip in a car driving from Germany to France via Switzerland… They said the last part of the trip was cancelled. This was the Tarom (Rumanian Air Company) flight from OTP-SBZ. First they told me I had to fly on another day. After i (still politely) explained them that that was a real bad idea because people would be waiting for me… They completely rebooked me to a Lufthansa flight AMS-VIE-MUC-SBZ (Yes… Vienna, Munich in that order…) Hopping through Europe like a crazy kangaroo… Also I would arrive at 1:10 am on the next day.

Later at home I phoned again and now they had a better alternative, AMS-MUC-SBZ, arriving 18:00 on the correct day. “Geht doch”…

Without Status…

I had already arranged that my XP would still be booked (important, I do not want to loose my fresh status on KLM) but I noticed that contrary to KLM (Where they really treat you well as a status passenger) Lufthansa did not know me at all…. And did not let me in their lounge nor would they give me a nice chair. They promised me a window seat on the flight from Munich. I had a seat next to the place where normally the windows are. Unfortunately not on that row….
But I arrived. And on time. The hotel was also close to the airport and the company where I had to be. Going by foot was not advised so i still used taxis but they are very cheap in Rumania. (Even when the taxi driver screws you…)

Dracula

Yes… I have to mention it… The part of Rumania where I was is Transylvania. Home of the famous Count Dracula. And Vampires and so. Luckily I do not believe in that.
Sibiu is a very nice city, definitively worth another visit!!!
My friend Jan Scholten (who has been in Rumania before) told me that Sibiu has a German speaking minority and that the town was also known as “Hermannstadt“. Since it has been the cultural capitol of Europe (in 2007) a lot of Restauration took place and it looks really beautiful!

Training

This was again an example of the necessity of having a training when you start to use Rhapsody. There are so many things that you can learn very fast from an experienced person but can hardly read in a book because you cannot find the connection between all that is written.
The Rhapsody manual is 600 pages, it does not nearly cover all topics and still you find nothing unless you really know what you are looking for.
Yes, partly that is due to the fact that the Rhapsody GUI is not always as easy as it could be. But I know that people are working very, very hard to improve that. Rhapsody 8.4 will be a great step in that direction. But even if the GUI would have been perfect, it is still a lot of stuff you have to learn.

Shortcuts

Three times in a row I met people that were quite experienced in Rhapsody but still did not know the keyboard shortcuts that make life so much easier….

  • Pressing “Alt” during resizing elements on diagrams will only resize the “outer” element and leave the content of the resized element as it is. (You can do that via the normal menu as well…)
  • Pressing “Shift” when dragging up or down in a sequence diagram will shift everything under the cursor up or down. (That way you can create or fill space on a Sequence diagram)
  • You can “multi” select using Shift and/or CTRL. You can then delete multiple items but also change “common” features or Display Options.
  • In the (OK…not so really cool) Editor you can select Rhapsody Model elements with CTRL-Space. (Intellivisor) The one in Eclipse (Or VS) is better but it’s not bad at all! Saves typing!
    Have you already tried the “Mouse menu” feature? Right clicking in a diagram gives you all possible model elements for that position. You don’t have to move the mouse to the menu and back!

That’s it! Have fun modeling with Rhapsody!

Walter van der Heiden (wvdheiden@willert.de)

Travel, travel, travel and… my EW 2019 Presentation

Back in the air

The travel continues but hey… I’m the traveling modeler…. Last week I had an appointment in France but close to Switzerland so I took the plane to Geneva again.
As usual the moment of booking is mostly right before the mail or call with the question if you could also show up somewhere else.
Flexible as I am, I always try to arrange that. This was not so easy… I had to be in the south of Germany (Rietheim) and I was is France (Cluses). On the map that was 225km. Via the road it turned out to be almost 500…. The Swiss have these “Mountains” that really take in a lot of space…
But I organize all of it and so I took the train to Schiphol (My second home) and then the plane to Geneva. Unfortunately (also as usual) flights were cancelled and I was rebooked to another flight via Paris. Via CdG, not really my favorite airport (I try to be polite)
CdG lived up to its reputation… although I was only a few meters away from the gate of my connections flight I had to take a detour to go through the pass control… ( What happened to Schengen?) But I made it in time to the connecting flight (I could even drink coffee in the lounge.)

Platinum

Yes. The lounge… since recently KLM has handed me my platinum card. I crossed 300XP within one year. (Yes KLM no longer has miles… you earn XP when you fly, like in Pokémon Go)
This makes the traveling life much more easy and comfortable. And a comfortable place to write BLOg entries…

Snow!

Yep… Snow. And a lot. After flying the second leg of the trip to Genève, I picked up my rental car and drove out of the parking lot and asked myself: What is this white stuff falling from the sky??
It was snowing. I did not expect that. Luckily Hertz was so friendly to rent me a BMW 120d xDrive. (4-wheel Drive ) with decent wintertyres. That helped. But is was quite a drive. So finally I arrived at the hotel that luckily had parking places. And (what I first noticed in the morning, a Skipass machine… I was in a ski area….

Switzerland

the next day, after a good day at the customer I drove to Rietheim in south-Germany. That was a seriously long drive. Through a lot of snow.. And again arriving in the hotel at 10pm… After the customer visit the next day I had to drive almost the same distance back. Not as far because I had a hotel room close to the airport. The next day I returned the car and flew back without trouble.

Embedded World 2019

I have written about that already: EW 2019, we had a booth there but I also had a presentation! Not entirely about Rhapsody but about SECollab, also interesting enough! Here is the link to it: video, it is in English.

That was it! Happy modeling with Rhapsody!

Walter van der Heiden (wvdheiden@willert.de)

« Older posts Newer posts »

© 2025 Rhapsody TechBlog

Theme by Anders NorenUp ↑