Bug 480868: Type descriptor and controller references

Type descriptors for primitive types and types in the RTS library were
defined as pointers, and code generated accordingly, but this leads to
problems with legacy code which assumes that they are not pointers.

Furthermore, the API both in RSA-RTE and ours, expects pointers whenever
a controller is used, but generated code doesn't produce.

To align with RSA-RTE, type descriptors for primitive types and types in
the library are changed to non-pointer, and the code generator changed
accordingly. In particular references to these types in the field
descriptors in protocols and serializable classes are changed to access
them with '&' (the "address of" operator).

On the other hand, we change the generation of TopControllers.hh/.cc to
make controller variables into pointers.


Change-Id: I99fbc6a3bbd1683f96bd3c6db3e3998e3932f8e1
Signed-off-by: Ernesto Posse <eposse@gmail.com>
diff --git a/models/samples/ComputerSystem/expected_src/AppControl.cc b/models/samples/ComputerSystem/expected_src/AppControl.cc
index 7041998..7329cc5 100644
--- a/models/samples/ComputerSystem/expected_src/AppControl.cc
+++ b/models/samples/ComputerSystem/expected_src/AppControl.cc
@@ -38,14 +38,14 @@
 {
     {
         "fileName",
-        UMLRTType_ptr,
+        &UMLRTType_ptr,
         offsetof( params_createDocument, fileName ),
         1,
         0
     },
     {
         "data",
-        UMLRTType_ptr,
+        &UMLRTType_ptr,
         offsetof( params_createDocument, data ),
         1,
         0
@@ -63,7 +63,7 @@
 {
     {
         "fileName",
-        UMLRTType_ptr,
+        &UMLRTType_ptr,
         0,
         1,
         0
@@ -103,7 +103,7 @@
 {
     {
         "docID",
-        UMLRTType_int,
+        &UMLRTType_int,
         0,
         1,
         0
diff --git a/models/samples/ComputerSystem/expected_src/MakefileTop.mk b/models/samples/ComputerSystem/expected_src/MakefileTop.mk
index c3c40fc..e3907f8 100644
--- a/models/samples/ComputerSystem/expected_src/MakefileTop.mk
+++ b/models/samples/ComputerSystem/expected_src/MakefileTop.mk
@@ -11,7 +11,7 @@
 endif
 
 # Location of RTS root.
-UMLRTS_ROOT ?= /Users/epp/Development/PapyrusRT/git/org.eclipse.papyrus-rt/plugins/umlrt/modellib/org.eclipse.papyrusrt.rts/umlrts
+UMLRTS_ROOT ?= ./umlrt.rts
 
 CONFIG=$(TARGETOS).$(BUILDTOOLS)
 
diff --git a/models/samples/ComputerSystem/expected_src/OSCommand.cc b/models/samples/ComputerSystem/expected_src/OSCommand.cc
index 9fcc677..83f73f9 100644
--- a/models/samples/ComputerSystem/expected_src/OSCommand.cc
+++ b/models/samples/ComputerSystem/expected_src/OSCommand.cc
@@ -10,7 +10,7 @@
 {
     {
         "appType",
-        UMLRTType_int,
+        &UMLRTType_int,
         0,
         1,
         0
diff --git a/models/samples/ComputerSystem/expected_src/Resource.cc b/models/samples/ComputerSystem/expected_src/Resource.cc
index 7683702..490ad3e 100644
--- a/models/samples/ComputerSystem/expected_src/Resource.cc
+++ b/models/samples/ComputerSystem/expected_src/Resource.cc
@@ -54,7 +54,7 @@
 {
     {
         "resourceID",
-        UMLRTType_UMLRTCapsuleId,
+        &UMLRTType_UMLRTCapsuleId,
         0,
         1,
         0
diff --git a/models/samples/ComputerSystem/expected_src/TopControllers.cc b/models/samples/ComputerSystem/expected_src/TopControllers.cc
index 17a5c70..a79f075 100644
--- a/models/samples/ComputerSystem/expected_src/TopControllers.cc
+++ b/models/samples/ComputerSystem/expected_src/TopControllers.cc
@@ -19,7 +19,9 @@
 #include <cstddef>
 
 
-UMLRTController DefaultController( "DefaultController" );
+static UMLRTController DefaultController_( "DefaultController" );
+
+UMLRTController * DefaultController = &DefaultController_;
 
 static Capsule_Top top( &Top, &Top_slots[InstId_Top], NULL, NULL, true );
 
@@ -1102,7 +1104,7 @@
         NULL,
         0,
         &top,
-        &DefaultController,
+        &DefaultController_,
         1,
         parts_Top,
         0,
@@ -1118,7 +1120,7 @@
         &Top,
         Capsule_Top::part_computerSystem,
         &top_computerSystem,
-        &DefaultController,
+        &DefaultController_,
         4,
         parts_Top_computerSystem,
         2,
@@ -1134,7 +1136,7 @@
         &ComputerSystem,
         Capsule_ComputerSystem::part_computer,
         &top_computerSystem_computer,
-        &DefaultController,
+        &DefaultController_,
         3,
         parts_Top_computerSystem_computer,
         4,
@@ -1150,7 +1152,7 @@
         &Computer,
         Capsule_Computer::part_application,
         &top_computerSystem_computer_application,
-        &DefaultController,
+        &DefaultController_,
         1,
         parts_Top_computerSystem_computer_application,
         5,
@@ -1166,7 +1168,7 @@
         &WordProcessorApp,
         Capsule_WordProcessorApp::part_deviceInterface,
         NULL,
-        &DefaultController,
+        &DefaultController_,
         0,
         NULL,
         2,
@@ -1182,7 +1184,7 @@
         &Computer,
         Capsule_Computer::part_driverManager,
         &top_computerSystem_computer_driverManager,
-        &DefaultController,
+        &DefaultController_,
         2,
         parts_Top_computerSystem_computer_driverManager,
         4,
@@ -1198,7 +1200,7 @@
         &ResourceManager,
         Capsule_ResourceManager::part_usbPrinterDriver,
         NULL,
-        &DefaultController,
+        &DefaultController_,
         0,
         NULL,
         2,
@@ -1214,7 +1216,7 @@
         &ResourceManager,
         Capsule_ResourceManager::part_usbStorageDriver,
         NULL,
-        &DefaultController,
+        &DefaultController_,
         0,
         NULL,
         2,
@@ -1230,7 +1232,7 @@
         &Computer,
         Capsule_Computer::part_usbBus,
         NULL,
-        &DefaultController,
+        &DefaultController_,
         0,
         NULL,
         2,
@@ -1246,7 +1248,7 @@
         &Computer,
         Capsule_Computer::part_usbBus,
         NULL,
-        &DefaultController,
+        &DefaultController_,
         0,
         NULL,
         2,
@@ -1262,7 +1264,7 @@
         &ComputerSystem,
         Capsule_ComputerSystem::part_massStorage,
         NULL,
-        &DefaultController,
+        &DefaultController_,
         0,
         NULL,
         2,
@@ -1278,7 +1280,7 @@
         &ComputerSystem,
         Capsule_ComputerSystem::part_printer,
         NULL,
-        &DefaultController,
+        &DefaultController_,
         0,
         NULL,
         2,
@@ -1294,7 +1296,7 @@
         &ComputerSystem,
         Capsule_ComputerSystem::part_user,
         NULL,
-        &DefaultController,
+        &DefaultController_,
         0,
         NULL,
         2,
diff --git a/models/samples/ComputerSystem/expected_src/TopControllers.hh b/models/samples/ComputerSystem/expected_src/TopControllers.hh
index cf09ba9..34674d4 100644
--- a/models/samples/ComputerSystem/expected_src/TopControllers.hh
+++ b/models/samples/ComputerSystem/expected_src/TopControllers.hh
@@ -2,7 +2,7 @@
 #ifndef TOPCONTROLLERS_HH
 #define TOPCONTROLLERS_HH
 
-#include "umlrtcontroller.hh"
+class UMLRTController;
 struct UMLRTCommsPort;
 struct UMLRTSlot;
 
@@ -22,7 +22,7 @@
     InstId_Top_computerSystem_printer,
     InstId_Top_computerSystem_user
 };
-extern UMLRTController DefaultController;
+extern UMLRTController * DefaultController;
 extern UMLRTCommsPort borderports_Top_computerSystem[];
 extern UMLRTCommsPort borderports_Top_computerSystem_computer[];
 extern UMLRTCommsPort internalports_Top_computerSystem_computer[];
diff --git a/models/samples/ComputerSystem/expected_src/TopMain.cc b/models/samples/ComputerSystem/expected_src/TopMain.cc
index 62ba94e..34d987f 100644
--- a/models/samples/ComputerSystem/expected_src/TopMain.cc
+++ b/models/samples/ComputerSystem/expected_src/TopMain.cc
@@ -1,5 +1,6 @@
 #include "umlrtmain.hh"
 
+#include "umlrtcontroller.hh"
 #include "TopControllers.hh"
 #include "umlrtcapsuletocontrollermap.hh"
 #include "umlrtmessagepool.hh"
@@ -26,12 +27,12 @@
     if( ! UMLRTMain::targetStartup() )
         return EXIT_FAILURE;
 
-    DefaultController.spawn();
+    DefaultController->spawn();
 
     if( ! UMLRTMain::mainLoop() )
         return UMLRTMain::targetShutdown( false );
 
-    DefaultController.join();
+    DefaultController->join();
 
     return UMLRTMain::targetShutdown( true );
 }
diff --git a/models/samples/ComputerSystem/expected_src/USBProtocol.cc b/models/samples/ComputerSystem/expected_src/USBProtocol.cc
index 189bb4d..eeb3edf 100644
--- a/models/samples/ComputerSystem/expected_src/USBProtocol.cc
+++ b/models/samples/ComputerSystem/expected_src/USBProtocol.cc
@@ -44,7 +44,7 @@
 {
     {
         "data",
-        UMLRTType_ptr,
+        &UMLRTType_ptr,
         0,
         1,
         0
@@ -62,7 +62,7 @@
 {
     {
         "deviceClassID",
-        UMLRTType_int,
+        &UMLRTType_int,
         0,
         1,
         0
@@ -91,7 +91,7 @@
 {
     {
         "errorCode",
-        UMLRTType_int,
+        &UMLRTType_int,
         0,
         1,
         0
@@ -131,7 +131,7 @@
 {
     {
         "busId",
-        UMLRTType_int,
+        &UMLRTType_int,
         0,
         1,
         0
@@ -149,7 +149,7 @@
 {
     {
         "percent",
-        UMLRTType_int,
+        &UMLRTType_int,
         0,
         1,
         0
diff --git a/models/tests/MultiParam/MultiParam.notation b/models/tests/MultiParam/MultiParam.notation
index f70a930..9591c3d 100755
--- a/models/tests/MultiParam/MultiParam.notation
+++ b/models/tests/MultiParam/MultiParam.notation
@@ -693,38 +693,38 @@
     </edges>
   </notation:Diagram>
   <notation:Diagram xmi:id="_ibtZsCb0EeSBQ4h-CZj2Uw" type="PapyrusUMLStateMachineDiagram" name="Pinger_StateMachine" measurementUnit="Pixel">
-    <children xmi:type="notation:Shape" xmi:id="_ibtZsSb0EeSBQ4h-CZj2Uw" type="2000">
-      <children xmi:type="notation:DecorationNode" xmi:id="_ibtZsib0EeSBQ4h-CZj2Uw" type="2001">
-        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ibtZsyb0EeSBQ4h-CZj2Uw" width="475" height="20"/>
+    <children xmi:type="notation:Shape" xmi:id="_ibtZsSb0EeSBQ4h-CZj2Uw" type="StateMachine_Shape">
+      <children xmi:type="notation:DecorationNode" xmi:id="_ibtZsib0EeSBQ4h-CZj2Uw" type="StateMachine_NameLabel">
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ibtZsyb0EeSBQ4h-CZj2Uw" width="475" height="16"/>
       </children>
-      <children xmi:type="notation:DecorationNode" xmi:id="_ibtZtCb0EeSBQ4h-CZj2Uw" type="2002">
-        <children xmi:type="notation:Shape" xmi:id="_ibtZtSb0EeSBQ4h-CZj2Uw" type="3000">
+      <children xmi:type="notation:BasicCompartment" xmi:id="_tTdSYBxNEeaCtNNTSAWabQ" type="StateMachine_RegionCompartment">
+        <children xmi:type="notation:Shape" xmi:id="_ibtZtSb0EeSBQ4h-CZj2Uw" type="Region_Shape">
           <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ibtZtib0EeSBQ4h-CZj2Uw" source="RegionAnnotationKey">
             <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ibtZtyb0EeSBQ4h-CZj2Uw" key="RegionZoneKey" value=""/>
           </eAnnotations>
-          <children xmi:type="notation:DecorationNode" xmi:id="_ibtZuCb0EeSBQ4h-CZj2Uw" type="3002">
-            <children xmi:type="notation:Shape" xmi:id="_Xs2N0Cb1EeSBQ4h-CZj2Uw" type="8000">
-              <children xmi:type="notation:DecorationNode" xmi:id="_Xs204Cb1EeSBQ4h-CZj2Uw" type="8001">
+          <children xmi:type="notation:BasicCompartment" xmi:id="_tTeggBxNEeaCtNNTSAWabQ" type="Region_SubvertexCompartment">
+            <children xmi:type="notation:Shape" xmi:id="_Xs2N0Cb1EeSBQ4h-CZj2Uw" type="Pseudostate_InitialShape">
+              <children xmi:type="notation:DecorationNode" xmi:id="_Xs204Cb1EeSBQ4h-CZj2Uw" type="Pseudostate_InitialFloatingNameLabel">
                 <layoutConstraint xmi:type="notation:Location" xmi:id="_Xs204Sb1EeSBQ4h-CZj2Uw" x="25" y="3"/>
               </children>
-              <children xmi:type="notation:DecorationNode" xmi:id="_Xs204ib1EeSBQ4h-CZj2Uw" type="8002">
+              <children xmi:type="notation:DecorationNode" xmi:id="_Xs204ib1EeSBQ4h-CZj2Uw" type="Pseudostate_InitialStereotypeLabel">
                 <layoutConstraint xmi:type="notation:Location" xmi:id="_Xs204yb1EeSBQ4h-CZj2Uw" x="25" y="-10"/>
               </children>
               <element xmi:type="uml:Pseudostate" href="MultiParam.uml#_XswHMCb1EeSBQ4h-CZj2Uw"/>
               <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Xs2N0Sb1EeSBQ4h-CZj2Uw" x="29" y="23"/>
             </children>
-            <children xmi:type="notation:Shape" xmi:id="_lY7jUCb1EeSBQ4h-CZj2Uw" type="6000">
-              <children xmi:type="notation:DecorationNode" xmi:id="_lY8KYCb1EeSBQ4h-CZj2Uw" type="6001">
+            <children xmi:type="notation:Shape" xmi:id="_lY7jUCb1EeSBQ4h-CZj2Uw" type="State_Shape">
+              <children xmi:type="notation:DecorationNode" xmi:id="_lY8KYCb1EeSBQ4h-CZj2Uw" type="State_NameLabel">
                 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uogd0ClREeSG6Mdl9j2DSg" width="218"/>
               </children>
-              <children xmi:type="notation:DecorationNode" xmi:id="_lY8KYSb1EeSBQ4h-CZj2Uw" type="6002">
+              <children xmi:type="notation:BasicCompartment" xmi:id="_tTfHkBxNEeaCtNNTSAWabQ" type="State_RegionCompartment">
                 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lY8KYib1EeSBQ4h-CZj2Uw" y="-1" width="218"/>
               </children>
               <children xmi:type="notation:BasicCompartment" xmi:id="_GaHxsCcJEeSlGd4okkPIfw" type="compartment_shape_display">
                 <styles xmi:type="notation:TitleStyle" xmi:id="_GaHxsScJEeSlGd4okkPIfw"/>
                 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GaHxsicJEeSlGd4okkPIfw"/>
               </children>
-              <children xmi:type="notation:Shape" xmi:id="_HVpwMClWEeSG6Mdl9j2DSg" type="690">
+              <children xmi:type="notation:Shape" xmi:id="_HVpwMClWEeSG6Mdl9j2DSg" type="Behavior_EntryBehaviorLabel">
                 <element xmi:type="uml:OpaqueBehavior" href="MultiParam.uml#_HUocgClWEeSG6Mdl9j2DSg"/>
                 <layoutConstraint xmi:type="notation:Location" xmi:id="_HVpwMSlWEeSG6Mdl9j2DSg" x="-175" y="-111"/>
               </children>
@@ -760,7 +760,7 @@
           <element xsi:nil="true"/>
           <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kMp9khwCEeWC44H5F7bKfg" x="200"/>
         </children>
-        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ibtZuyb0EeSBQ4h-CZj2Uw" y="20" width="475" height="300"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ibtZuyb0EeSBQ4h-CZj2Uw" y="16" width="475" height="304"/>
       </children>
       <children xmi:type="notation:DecorationNode" xmi:id="_kMC5kBwCEeWC44H5F7bKfg" visible="false" type="StereotypeLabel">
         <styles xmi:type="notation:StringValueStyle" xmi:id="_kMC5kRwCEeWC44H5F7bKfg" name="stereotype" stringValue="UMLRealTimeStateMach::RTStateMachine"/>
@@ -778,20 +778,20 @@
       <element xsi:nil="true"/>
       <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kMaF8hwCEeWC44H5F7bKfg" x="230" y="30"/>
     </children>
-    <styles xmi:type="notation:StringValueStyle" xmi:id="_ibtZvSb0EeSBQ4h-CZj2Uw" name="diagram_compatibility_version" stringValue="1.1.0"/>
+    <styles xmi:type="notation:StringValueStyle" xmi:id="_ibtZvSb0EeSBQ4h-CZj2Uw" name="diagram_compatibility_version" stringValue="1.2.0"/>
     <styles xmi:type="notation:DiagramStyle" xmi:id="_ibtZvib0EeSBQ4h-CZj2Uw"/>
     <styles xmi:type="style:PapyrusViewStyle" xmi:id="_ibtZvyb0EeSBQ4h-CZj2Uw">
       <owner xmi:type="uml:Class" href="MultiParam.uml#__EW3UCSSEeS0XNKzoL660g"/>
     </styles>
     <element xmi:type="uml:StateMachine" href="MultiParam.uml#_aKvpECb0EeSBQ4h-CZj2Uw"/>
-    <edges xmi:type="notation:Connector" xmi:id="_9HecQCb1EeSBQ4h-CZj2Uw" type="7000" source="_Xs2N0Cb1EeSBQ4h-CZj2Uw" target="_lY7jUCb1EeSBQ4h-CZj2Uw">
-      <children xmi:type="notation:DecorationNode" xmi:id="_9HfDUib1EeSBQ4h-CZj2Uw" visible="false" type="7001">
+    <edges xmi:type="notation:Connector" xmi:id="_9HecQCb1EeSBQ4h-CZj2Uw" type="Transition_Edge" source="_Xs2N0Cb1EeSBQ4h-CZj2Uw" target="_lY7jUCb1EeSBQ4h-CZj2Uw">
+      <children xmi:type="notation:DecorationNode" xmi:id="_9HfDUib1EeSBQ4h-CZj2Uw" visible="false" type="Transition_NameLabel">
         <layoutConstraint xmi:type="notation:Location" xmi:id="_9HfDUyb1EeSBQ4h-CZj2Uw"/>
       </children>
-      <children xmi:type="notation:DecorationNode" xmi:id="_9HfDVCb1EeSBQ4h-CZj2Uw" visible="false" type="7002">
+      <children xmi:type="notation:DecorationNode" xmi:id="_9HfDVCb1EeSBQ4h-CZj2Uw" visible="false" type="Transition_GuardLabel">
         <layoutConstraint xmi:type="notation:Location" xmi:id="_9HfqYCb1EeSBQ4h-CZj2Uw"/>
       </children>
-      <children xmi:type="notation:DecorationNode" xmi:id="_9HfqYSb1EeSBQ4h-CZj2Uw" visible="false" type="7003">
+      <children xmi:type="notation:DecorationNode" xmi:id="_9HfqYSb1EeSBQ4h-CZj2Uw" visible="false" type="Transition_StereotypeLabel">
         <layoutConstraint xmi:type="notation:Location" xmi:id="_9HfqYib1EeSBQ4h-CZj2Uw" y="60"/>
       </children>
       <styles xmi:type="notation:FontStyle" xmi:id="_9HfDUCb1EeSBQ4h-CZj2Uw"/>
@@ -799,14 +799,14 @@
       <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_9HfDUSb1EeSBQ4h-CZj2Uw" points="[10, 4, -116, -49]$[105, 47, -21, -6]"/>
       <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_9H56ECb1EeSBQ4h-CZj2Uw" id="(0.0963302752293578,0.3287671232876712)"/>
     </edges>
-    <edges xmi:type="notation:Connector" xmi:id="_9xK5gCb1EeSBQ4h-CZj2Uw" type="7000" source="_lY7jUCb1EeSBQ4h-CZj2Uw" target="_lY7jUCb1EeSBQ4h-CZj2Uw">
-      <children xmi:type="notation:DecorationNode" xmi:id="_9xK5gyb1EeSBQ4h-CZj2Uw" type="7001">
+    <edges xmi:type="notation:Connector" xmi:id="_9xK5gCb1EeSBQ4h-CZj2Uw" type="Transition_Edge" source="_lY7jUCb1EeSBQ4h-CZj2Uw" target="_lY7jUCb1EeSBQ4h-CZj2Uw">
+      <children xmi:type="notation:DecorationNode" xmi:id="_9xK5gyb1EeSBQ4h-CZj2Uw" type="Transition_NameLabel">
         <layoutConstraint xmi:type="notation:Location" xmi:id="_9xLgkCb1EeSBQ4h-CZj2Uw" y="9"/>
       </children>
-      <children xmi:type="notation:DecorationNode" xmi:id="_9xLgkSb1EeSBQ4h-CZj2Uw" type="7002">
+      <children xmi:type="notation:DecorationNode" xmi:id="_9xLgkSb1EeSBQ4h-CZj2Uw" type="Transition_GuardLabel">
         <layoutConstraint xmi:type="notation:Location" xmi:id="_9xLgkib1EeSBQ4h-CZj2Uw" x="-1" y="-7"/>
       </children>
-      <children xmi:type="notation:DecorationNode" xmi:id="_9xLgkyb1EeSBQ4h-CZj2Uw" type="7003">
+      <children xmi:type="notation:DecorationNode" xmi:id="_9xLgkyb1EeSBQ4h-CZj2Uw" type="Transition_StereotypeLabel">
         <layoutConstraint xmi:type="notation:Location" xmi:id="_9xLglCb1EeSBQ4h-CZj2Uw" y="60"/>
       </children>
       <styles xmi:type="notation:FontStyle" xmi:id="_9xK5gSb1EeSBQ4h-CZj2Uw"/>
@@ -815,14 +815,14 @@
       <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_9xaKECb1EeSBQ4h-CZj2Uw" id="(0.8211009174311926,0.952054794520548)"/>
       <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_9xaxICb1EeSBQ4h-CZj2Uw" id="(0.16972477064220184,0.8904109589041096)"/>
     </edges>
-    <edges xmi:type="notation:Connector" xmi:id="_46YE0GxxEeSWy5Y1YWzXfQ" type="7000" source="_lY7jUCb1EeSBQ4h-CZj2Uw" target="_lY7jUCb1EeSBQ4h-CZj2Uw">
-      <children xmi:type="notation:DecorationNode" xmi:id="_46YE02xxEeSWy5Y1YWzXfQ" type="7001">
+    <edges xmi:type="notation:Connector" xmi:id="_46YE0GxxEeSWy5Y1YWzXfQ" type="Transition_Edge" source="_lY7jUCb1EeSBQ4h-CZj2Uw" target="_lY7jUCb1EeSBQ4h-CZj2Uw">
+      <children xmi:type="notation:DecorationNode" xmi:id="_46YE02xxEeSWy5Y1YWzXfQ" type="Transition_NameLabel">
         <layoutConstraint xmi:type="notation:Location" xmi:id="_46Yr4GxxEeSWy5Y1YWzXfQ" x="49" y="24"/>
       </children>
-      <children xmi:type="notation:DecorationNode" xmi:id="_46Yr4WxxEeSWy5Y1YWzXfQ" type="7002">
+      <children xmi:type="notation:DecorationNode" xmi:id="_46Yr4WxxEeSWy5Y1YWzXfQ" type="Transition_GuardLabel">
         <layoutConstraint xmi:type="notation:Location" xmi:id="_46Yr4mxxEeSWy5Y1YWzXfQ" x="63" y="34"/>
       </children>
-      <children xmi:type="notation:DecorationNode" xmi:id="_46Yr42xxEeSWy5Y1YWzXfQ" type="7003">
+      <children xmi:type="notation:DecorationNode" xmi:id="_46Yr42xxEeSWy5Y1YWzXfQ" type="Transition_StereotypeLabel">
         <layoutConstraint xmi:type="notation:Location" xmi:id="_46Yr5GxxEeSWy5Y1YWzXfQ" y="60"/>
       </children>
       <styles xmi:type="notation:FontStyle" xmi:id="_46YE0WxxEeSWy5Y1YWzXfQ"/>
@@ -1057,8 +1057,8 @@
       </children>
       <children xmi:type="notation:BasicCompartment" xmi:id="_1IpVADnvEeSo2vxA1pB3zA" visible="false" type="AppliedStereotypeCompartment">
         <styles xmi:type="notation:TitleStyle" xmi:id="_1IpVATnvEeSo2vxA1pB3zA" showTitle="true"/>
-        <element xmi:type="UMLRealTime:Capsule" href="MultiParam.uml#_MvcVACSYEeS0XNKzoL660g"/>
         <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1IpVAjnvEeSo2vxA1pB3zA"/>
+        <element xmi:type="UMLRealTime:Capsule" href="MultiParam.uml#_MvcVACSYEeS0XNKzoL660g"/>
       </children>
       <children xmi:type="notation:BasicCompartment" xmi:id="_1Ip8EDnvEeSo2vxA1pB3zA" type="compartment_shape_display">
         <styles xmi:type="notation:TitleStyle" xmi:id="_1Ip8ETnvEeSo2vxA1pB3zA"/>
diff --git a/models/tests/MultiParam/MultiParam.uml b/models/tests/MultiParam/MultiParam.uml
index b45bd7d..5bc8e27 100755
--- a/models/tests/MultiParam/MultiParam.uml
+++ b/models/tests/MultiParam/MultiParam.uml
@@ -38,7 +38,7 @@
       </ownedBehavior>
     </packagedElement>
     <packagedElement xmi:type="uml:Class" xmi:id="__EW3UCSSEeS0XNKzoL660g" name="Pinger" classifierBehavior="_aKvpECb0EeSBQ4h-CZj2Uw" isActive="true">
-      <ownedAttribute xmi:type="uml:Port" xmi:id="_PQ_kMCbnEeSBQ4h-CZj2Uw" name="PingPort" visibility="public" type="_bEbXYCS1EeS0XNKzoL660g" aggregation="composite"/>
+      <ownedAttribute xmi:type="uml:Port" xmi:id="_PQ_kMCbnEeSBQ4h-CZj2Uw" name="PingPort" visibility="public" type="_bEbXYCS1EeS0XNKzoL660g" aggregation="composite" isBehavior="true"/>
       <ownedAttribute xmi:type="uml:Port" xmi:id="_cV5-wGxxEeSWy5Y1YWzXfQ" name="timerPort" visibility="protected" aggregation="composite">
         <type xmi:type="uml:Collaboration" href="platform:/plugin/org.eclipse.papyrusrt.rts/libraries/UMLRT-RTS.uml#_MxQZgGXsEeS_4daqvwyFrg"/>
       </ownedAttribute>
@@ -79,6 +79,7 @@
             </effect>
             <trigger xmi:type="uml:Trigger" xmi:id="_byJF4CcOEeSlGd4okkPIfw" name="pongTrigger" event="_zFJ2YCS-EeS0XNKzoL660g" port="_PQ_kMCbnEeSBQ4h-CZj2Uw"/>
             <trigger xmi:type="uml:Trigger" xmi:id="_PoLZwGFXEeWB3_U1PJ3b1w" name="pong2Trigger" event="_qYZKsGJZEeWelbPom1-LOg" port="_PQ_kMCbnEeSBQ4h-CZj2Uw"/>
+            <trigger xmi:type="uml:Trigger" xmi:id="_AmUDIBxOEeaCtNNTSAWabQ" name="pong3Trigger" event="_3RSNcBxNEeaCtNNTSAWabQ" port="_PQ_kMCbnEeSBQ4h-CZj2Uw"/>
           </transition>
           <transition xmi:type="uml:Transition" xmi:id="_4p71EGxxEeSWy5Y1YWzXfQ" name="onTimeout" source="_lY5HECb1EeSBQ4h-CZj2Uw" target="_lY5HECb1EeSBQ4h-CZj2Uw">
             <effect xmi:type="uml:OpaqueBehavior" xmi:id="__I0kEGxxEeSWy5Y1YWzXfQ" name="onTimeout" isAbstract="true">
@@ -102,7 +103,7 @@
       </ownedBehavior>
     </packagedElement>
     <packagedElement xmi:type="uml:Class" xmi:id="_BMMGgCSTEeS0XNKzoL660g" name="Ponger" visibility="private" classifierBehavior="_ltVRwCcQEeSlGd4okkPIfw" isActive="true">
-      <ownedAttribute xmi:type="uml:Port" xmi:id="_aXdiUCbnEeSBQ4h-CZj2Uw" name="PongPort" visibility="public" type="_bEbXYCS1EeS0XNKzoL660g" aggregation="composite" isConjugated="true"/>
+      <ownedAttribute xmi:type="uml:Port" xmi:id="_aXdiUCbnEeSBQ4h-CZj2Uw" name="PongPort" visibility="public" type="_bEbXYCS1EeS0XNKzoL660g" aggregation="composite" isBehavior="true" isConjugated="true"/>
       <ownedAttribute xmi:type="uml:Property" xmi:id="_JCGtUNRwEeSDr9Y6ukJekA" name="messageLimit">
         <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
       </ownedAttribute>
@@ -192,6 +193,11 @@
             <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_7W3wkBydEduyofBvg4RL2w"/>
           </ownedParameter>
         </ownedOperation>
+        <ownedOperation xmi:type="uml:Operation" xmi:id="_3RN8ABxNEeaCtNNTSAWabQ" name="pong3">
+          <ownedParameter xmi:type="uml:Parameter" xmi:id="_3RN8ARxNEeaCtNNTSAWabQ" name="p">
+            <type xmi:type="uml:Class" href="platform:/plugin/org.eclipse.papyrusrt.rts/libraries/UMLRT-RTS.uml#_GfwZUICSEeSeANT-DfY5oA"/>
+          </ownedParameter>
+        </ownedOperation>
       </packagedElement>
       <packagedElement xmi:type="uml:Interface" xmi:id="_s_Lv8CS5EeS0XNKzoL660g" name="MultiParamProtocol~">
         <ownedOperation xmi:type="uml:Operation" xmi:id="_k7sskCS3EeS0XNKzoL660g" name="ping">
@@ -211,6 +217,7 @@
       <packagedElement xmi:type="uml:CallEvent" xmi:id="_qYZKsGJZEeWelbPom1-LOg" operation="_qYJ6IGJZEeWelbPom1-LOg">
         <name xsi:nil="true"/>
       </packagedElement>
+      <packagedElement xmi:type="uml:CallEvent" xmi:id="_3RSNcBxNEeaCtNNTSAWabQ" operation="_3RN8ABxNEeaCtNNTSAWabQ"/>
     </packagedElement>
     <packagedElement xmi:type="uml:Usage" xmi:id="_yt4-MCTEEeS0XNKzoL660g" name="Ponger uses MultiParam Protocol" client="_BMMGgCSTEeS0XNKzoL660g" supplier="_bEbXYCS1EeS0XNKzoL660g"/>
     <packagedElement xmi:type="uml:Usage" xmi:id="_zQ-dICTEEeS0XNKzoL660g" name="Pinger uses MultiParam Protocol" client="__EW3UCSSEeS0XNKzoL660g" supplier="_bEbXYCS1EeS0XNKzoL660g"/>
@@ -280,4 +287,5 @@
   <RTCppProperties:CapsuleProperties xmi:id="_GsMIwFicEeWU6doDzpwKkA" headerPreface="#include &lt;iostream>&#xA;" base_Class="__EW3UCSSEeS0XNKzoL660g"/>
   <RTCppProperties:CapsuleProperties xmi:id="_JpPvwFicEeWU6doDzpwKkA" headerPreface="#include &quot;umlrtcontroller.hh&quot;&#xA;#include &quot;umlrtmain.hh&quot;&#xA;#include &lt;iostream>&#xA;&#xA;" base_Class="_BMMGgCSTEeS0XNKzoL660g"/>
   <UMLRealTimeStateMach:RTTrigger xmi:id="_Vo0u4GJaEeWelbPom1-LOg" base_Operation="_qYJ6IGJZEeWelbPom1-LOg"/>
+  <UMLRealTimeStateMach:RTTrigger xmi:id="_52_EYBxNEeaCtNNTSAWabQ" base_Operation="_3RN8ABxNEeaCtNNTSAWabQ"/>
 </xmi:XMI>
diff --git a/models/tests/PingPong-data/expected_src/DataType1.cc b/models/tests/PingPong-data/expected_src/DataType1.cc
index 1d8a3ee..7723ec6 100644
--- a/models/tests/PingPong-data/expected_src/DataType1.cc
+++ b/models/tests/PingPong-data/expected_src/DataType1.cc
@@ -9,42 +9,42 @@
 {
     {
         "field0_enum",
-        UMLRTType_int,
+        &UMLRTType_int,
         offsetof( DataType1, field0_enum ),
         1,
         0
     },
     {
         "field1_int",
-        UMLRTType_int,
+        &UMLRTType_int,
         offsetof( DataType1, field1_int ),
         1,
         0
     },
     {
         "field2_bool",
-        UMLRTType_bool,
+        &UMLRTType_bool,
         offsetof( DataType1, field2_bool ),
         1,
         0
     },
     {
         "field3_double",
-        UMLRTType_double,
+        &UMLRTType_double,
         offsetof( DataType1, field3_double ),
         1,
         0
     },
     {
         "field4_ptr",
-        UMLRTType_ptr,
+        &UMLRTType_ptr,
         offsetof( DataType1, field4_ptr ),
         1,
         0
     },
     {
         "field6_string",
-        UMLRTType_ptr,
+        &UMLRTType_ptr,
         offsetof( DataType1, field6_string ),
         1,
         0
@@ -59,7 +59,7 @@
 
 
 
-static const UMLRTObject_class desc = 
+const UMLRTObject_class UMLRTType_DataType1 = 
 {
     UMLRTObjectInitialize<DataType1>,
     UMLRTObjectCopy<DataType1>,
@@ -78,5 +78,3 @@
     UMLRTOBJECTCLASS_DEFAULT_BACKWARDS
 };
 
-const UMLRTObject_class * const UMLRTType_DataType1 = &desc;
-
diff --git a/models/tests/PingPong-data/expected_src/DataType1.hh b/models/tests/PingPong-data/expected_src/DataType1.hh
index dcceb37..4b7986e 100644
--- a/models/tests/PingPong-data/expected_src/DataType1.hh
+++ b/models/tests/PingPong-data/expected_src/DataType1.hh
@@ -16,7 +16,7 @@
     char * field6_string;
     static const UMLRTObject_field fields[];
 };
-extern const UMLRTObject_class * const UMLRTType_DataType1;
+extern const UMLRTObject_class UMLRTType_DataType1;
 
 #endif
 
diff --git a/models/tests/PingPong-data/expected_src/PingPongProtocol.cc b/models/tests/PingPong-data/expected_src/PingPongProtocol.cc
index 1a38b97..b79e171 100644
--- a/models/tests/PingPong-data/expected_src/PingPongProtocol.cc
+++ b/models/tests/PingPong-data/expected_src/PingPongProtocol.cc
@@ -21,7 +21,7 @@
 {
     {
         "param",
-        UMLRTType_DataType1,
+        &UMLRTType_DataType1,
         0,
         1,
         0
diff --git a/models/tests/PingPong-data/expected_src/TopControllers.cc b/models/tests/PingPong-data/expected_src/TopControllers.cc
index 2785084..18215cc 100644
--- a/models/tests/PingPong-data/expected_src/TopControllers.cc
+++ b/models/tests/PingPong-data/expected_src/TopControllers.cc
@@ -13,7 +13,9 @@
 #include <cstddef>
 
 
-UMLRTController TopController( "TopController" );
+static UMLRTController TopController_( "TopController" );
+
+UMLRTController * TopController = &TopController_;
 
 static UMLRTCommsPortFarEnd borderfarEndList_Top[] = 
 {
@@ -110,7 +112,9 @@
     }
 };
 
-UMLRTController PingerController( "PingerController" );
+static UMLRTController PingerController_( "PingerController" );
+
+UMLRTController * PingerController = &PingerController_;
 
 static UMLRTCommsPortFarEnd borderfarEndList_Top_pinger[] = 
 {
@@ -187,7 +191,7 @@
         NULL,
         0,
         &top,
-        &TopController,
+        &TopController_,
         2,
         parts_Top,
         1,
@@ -203,7 +207,7 @@
         &Top,
         Capsule_Top::part_ponger,
         NULL,
-        &TopController,
+        &TopController_,
         0,
         NULL,
         1,
@@ -219,7 +223,7 @@
         &Top,
         Capsule_Top::part_pinger,
         &top_pinger,
-        &PingerController,
+        &PingerController_,
         0,
         NULL,
         2,
diff --git a/models/tests/PingPong-data/expected_src/TopControllers.hh b/models/tests/PingPong-data/expected_src/TopControllers.hh
index 0e596ed..e8ce58a 100644
--- a/models/tests/PingPong-data/expected_src/TopControllers.hh
+++ b/models/tests/PingPong-data/expected_src/TopControllers.hh
@@ -2,7 +2,7 @@
 #ifndef TOPCONTROLLERS_HH
 #define TOPCONTROLLERS_HH
 
-#include "umlrtcontroller.hh"
+class UMLRTController;
 struct UMLRTCommsPort;
 struct UMLRTSlot;
 
@@ -12,10 +12,10 @@
     InstId_Top_ponger,
     InstId_Top_pinger
 };
-extern UMLRTController TopController;
+extern UMLRTController * TopController;
 extern UMLRTCommsPort borderports_Top[];
 extern UMLRTCommsPort borderports_Top_ponger[];
-extern UMLRTController PingerController;
+extern UMLRTController * PingerController;
 extern UMLRTCommsPort borderports_Top_pinger[];
 extern UMLRTSlot Top_slots[];
 
diff --git a/models/tests/PingPong-data/expected_src/TopMain.cc b/models/tests/PingPong-data/expected_src/TopMain.cc
index 439a315..9c8a07b 100644
--- a/models/tests/PingPong-data/expected_src/TopMain.cc
+++ b/models/tests/PingPong-data/expected_src/TopMain.cc
@@ -1,5 +1,6 @@
 #include "umlrtmain.hh"
 
+#include "umlrtcontroller.hh"
 #include "TopControllers.hh"
 #include "umlrtcapsuletocontrollermap.hh"
 #include "umlrtmessagepool.hh"
@@ -26,14 +27,14 @@
     if( ! UMLRTMain::targetStartup() )
         return EXIT_FAILURE;
 
-    TopController.spawn();
-    PingerController.spawn();
+    TopController->spawn();
+    PingerController->spawn();
 
     if( ! UMLRTMain::mainLoop() )
         return UMLRTMain::targetShutdown( false );
 
-    PingerController.join();
-    TopController.join();
+    PingerController->join();
+    TopController->join();
 
     return UMLRTMain::targetShutdown( true );
 }
diff --git a/models/tests/PingPong/expected_src/MakefileTop.mk b/models/tests/PingPong/expected_src/MakefileTop.mk
index a447e8e..b1188f1 100644
--- a/models/tests/PingPong/expected_src/MakefileTop.mk
+++ b/models/tests/PingPong/expected_src/MakefileTop.mk
@@ -11,7 +11,7 @@
 endif
 
 # Location of RTS root.
-UMLRTS_ROOT ?= /Users/epp/Development/PapyrusRT/git/org.eclipse.papyrus-rt/plugins/umlrt/modellib/org.eclipse.papyrusrt.rts/umlrts
+UMLRTS_ROOT ?= ./umlrt.rts
 
 CONFIG=$(TARGETOS).$(BUILDTOOLS)
 
diff --git a/models/tests/PingPong/expected_src/PingPongProtocol.cc b/models/tests/PingPong/expected_src/PingPongProtocol.cc
index d4e904b..1adb8a9 100644
--- a/models/tests/PingPong/expected_src/PingPongProtocol.cc
+++ b/models/tests/PingPong/expected_src/PingPongProtocol.cc
@@ -9,7 +9,7 @@
 {
     {
         "param",
-        UMLRTType_int,
+        &UMLRTType_int,
         0,
         1,
         0
@@ -27,7 +27,7 @@
 {
     {
         "param",
-        UMLRTType_int,
+        &UMLRTType_int,
         0,
         1,
         0
diff --git a/models/tests/PingPong/expected_src/TopControllers.cc b/models/tests/PingPong/expected_src/TopControllers.cc
index e498e5a..68a02c5 100644
--- a/models/tests/PingPong/expected_src/TopControllers.cc
+++ b/models/tests/PingPong/expected_src/TopControllers.cc
@@ -13,7 +13,9 @@
 #include <cstddef>
 
 
-UMLRTController TopController( "TopController" );
+static UMLRTController TopController_( "TopController" );
+
+UMLRTController * TopController = &TopController_;
 
 static Capsule_Top top( &Top, &Top_slots[InstId_Top], NULL, NULL, true );
 
@@ -79,7 +81,9 @@
 
 static Capsule_Ponger top_ponger( &Ponger, &Top_slots[InstId_Top_ponger], borderports_Top_ponger_ptrs, NULL, true );
 
-UMLRTController PingerController( "PingerController" );
+static UMLRTController PingerController_( "PingerController" );
+
+UMLRTController * PingerController = &PingerController_;
 
 static UMLRTCommsPortFarEnd borderfarEndList_Top_pinger[] = 
 {
@@ -156,7 +160,7 @@
         NULL,
         0,
         &top,
-        &TopController,
+        &TopController_,
         2,
         parts_Top,
         0,
@@ -172,7 +176,7 @@
         &Top,
         Capsule_Top::part_ponger,
         &top_ponger,
-        &TopController,
+        &TopController_,
         0,
         NULL,
         1,
@@ -188,7 +192,7 @@
         &Top,
         Capsule_Top::part_pinger,
         &top_pinger,
-        &PingerController,
+        &PingerController_,
         0,
         NULL,
         2,
diff --git a/models/tests/PingPong/expected_src/TopControllers.hh b/models/tests/PingPong/expected_src/TopControllers.hh
index 37740cd..437ab50 100644
--- a/models/tests/PingPong/expected_src/TopControllers.hh
+++ b/models/tests/PingPong/expected_src/TopControllers.hh
@@ -2,7 +2,7 @@
 #ifndef TOPCONTROLLERS_HH
 #define TOPCONTROLLERS_HH
 
-#include "umlrtcontroller.hh"
+class UMLRTController;
 struct UMLRTCommsPort;
 struct UMLRTSlot;
 
@@ -12,9 +12,9 @@
     InstId_Top_ponger,
     InstId_Top_pinger
 };
-extern UMLRTController TopController;
+extern UMLRTController * TopController;
 extern UMLRTCommsPort borderports_Top_ponger[];
-extern UMLRTController PingerController;
+extern UMLRTController * PingerController;
 extern UMLRTCommsPort borderports_Top_pinger[];
 extern UMLRTSlot Top_slots[];
 
diff --git a/models/tests/PingPong/expected_src/TopMain.cc b/models/tests/PingPong/expected_src/TopMain.cc
index 439a315..9c8a07b 100644
--- a/models/tests/PingPong/expected_src/TopMain.cc
+++ b/models/tests/PingPong/expected_src/TopMain.cc
@@ -1,5 +1,6 @@
 #include "umlrtmain.hh"
 
+#include "umlrtcontroller.hh"
 #include "TopControllers.hh"
 #include "umlrtcapsuletocontrollermap.hh"
 #include "umlrtmessagepool.hh"
@@ -26,14 +27,14 @@
     if( ! UMLRTMain::targetStartup() )
         return EXIT_FAILURE;
 
-    TopController.spawn();
-    PingerController.spawn();
+    TopController->spawn();
+    PingerController->spawn();
 
     if( ! UMLRTMain::mainLoop() )
         return UMLRTMain::targetShutdown( false );
 
-    PingerController.join();
-    TopController.join();
+    PingerController->join();
+    TopController->join();
 
     return UMLRTMain::targetShutdown( true );
 }
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/src/org/eclipse/papyrusrt/codegen/cpp/structure/CompositionGenerator.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/src/org/eclipse/papyrusrt/codegen/cpp/structure/CompositionGenerator.java
index c739ae5..efa8c7c 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/src/org/eclipse/papyrusrt/codegen/cpp/structure/CompositionGenerator.java
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/src/org/eclipse/papyrusrt/codegen/cpp/structure/CompositionGenerator.java
@@ -132,11 +132,18 @@
         {
             Variable controllerVar
                 = new Variable(
-                        LinkageSpec.EXTERN,
+                        LinkageSpec.STATIC,
                         UMLRTRuntime.UMLRTController.getType(),
-                        controller.getName(),
+                        controller.getName() + "_",
                         UMLRTRuntime.UMLRTController.Ctor( new StringLiteral( controller.getName() ) ) );
             elements.addElement( controllerVar );
+            Variable exportedControllerVar
+            = new Variable(
+                    LinkageSpec.EXTERN,
+                    UMLRTRuntime.UMLRTController.getType().ptr(),
+                    controller.getName(),
+                    new AddressOfExpr( new ElementAccess( controllerVar ) ) );
+            elements.addElement( exportedControllerVar );
 
             for( ICapsuleInstance capsule : controller.getCapsules() )
             {
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/src/org/eclipse/papyrusrt/codegen/cpp/structure/CppMainGenerator.xtend b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/src/org/eclipse/papyrusrt/codegen/cpp/structure/CppMainGenerator.xtend
index d5610dd..238233d 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/src/org/eclipse/papyrusrt/codegen/cpp/structure/CppMainGenerator.xtend
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/src/org/eclipse/papyrusrt/codegen/cpp/structure/CppMainGenerator.xtend
@@ -28,6 +28,7 @@
 		'''
 #include "umlrtmain.hh"
 
+#include "umlrtcontroller.hh"
 #include "«topName»Controllers.hh"
 #include "umlrtcapsuletocontrollermap.hh"
 #include "umlrtmessagepool.hh"
@@ -55,14 +56,14 @@
         return EXIT_FAILURE;
 
     «FOR c : deployment.controllers»
-        «c.name».spawn();
+        «c.name»->spawn();
     «ENDFOR»
 
     if( ! UMLRTMain::mainLoop() )
         return UMLRTMain::targetShutdown( false );
 
     «FOR c : deployment.controllers.toList.reverse»
-        «c.name».join();
+        «c.name»->join();
     «ENDFOR»
 
     return UMLRTMain::targetShutdown( true );
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/META-INF/MANIFEST.MF b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/META-INF/MANIFEST.MF
index 3ac1c0a..7993121 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/META-INF/MANIFEST.MF
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@
 Bundle-SymbolicName: org.eclipse.papyrusrt.codegen.cpp;singleton:=true
 Bundle-Version: 0.7.2.qualifier
 Bundle-Vendor: Zeligsoft (2009) Limited
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Require-Bundle: com.google.guava,
  org.eclipse.cdt.core;bundle-version="5.11.0",
  org.eclipse.emf.common,
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/CppCodePattern.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/CppCodePattern.java
index 201f65e..209cd76 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/CppCodePattern.java
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/CppCodePattern.java
@@ -360,7 +360,7 @@
                 var = new Variable( LinkageSpec.EXTERN, UMLRTRuntime.UMLRTCapsuleClass.getType().const_(), getName( output, element ) );
                 break;
             case UMLRTTypeDescriptor:
-                var = new Variable( LinkageSpec.EXTERN, UMLRTRuntime.UMLRTObject.getType().const_().constPtr(), getName( output, element ) );
+                var = new Variable( LinkageSpec.EXTERN, UMLRTRuntime.UMLRTObject.getType().const_(), getName( output, element ) );
                 break;
             default:
                 throw new RuntimeException( "code pattern does not contain a Variable for " + output.toString() );
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/internal/ProtocolGenerator.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/internal/ProtocolGenerator.java
index ad35e2a..7ae440d 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/internal/ProtocolGenerator.java
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/internal/ProtocolGenerator.java
@@ -197,7 +197,7 @@
                 new BlockInitializer(
                     UMLRTRuntime.UMLRTObject.getFieldType(),
                     new StringLiteral( param.getName() ),
-                    TypesUtil.createRTTypeAccess( cpp, param, param.getType() ),
+                    new AddressOfExpr( TypesUtil.createRTTypeAccess( cpp, param, param.getType() ) ),
                     new IntegralLiteral( 0 ),     // offset
                     new IntegralLiteral( 1 ),
                     new IntegralLiteral( 0 ) ) );
@@ -223,7 +223,7 @@
                     new BlockInitializer(
                         UMLRTRuntime.UMLRTObject.getFieldType(),
                         new StringLiteral( fieldName ),
-                        TypesUtil.createRTTypeAccess( cpp, param, param.getType() ),
+                        new AddressOfExpr( TypesUtil.createRTTypeAccess( cpp, param, param.getType() ) ),
                         new OffsetOf( packingStruct, fieldName ),
                         new IntegralLiteral( 1 ),
                         new IntegralLiteral( 0 ) ) );
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/internal/SerializableClassGenerator.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/internal/SerializableClassGenerator.java
index 069686e..0af62e7 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/internal/SerializableClassGenerator.java
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/internal/SerializableClassGenerator.java
@@ -68,7 +68,7 @@
                     new BlockInitializer(
                         UMLRTRuntime.UMLRTObject.getFieldType().const_(),
                         new StringLiteral( attr.getName() ),
-                        TypesUtil.createRTTypeAccess( cpp, attr, attr.getType() ),
+                        new AddressOfExpr( TypesUtil.createRTTypeAccess( cpp, attr, attr.getType() ) ),
                         new OffsetOf( cls, attr.getName() ),
                         arraySize,
                         new IntegralLiteral( 0 ) ) ); // ptrIndirection
@@ -98,11 +98,11 @@
         descInit.addExpression( UMLRTRuntime.UMLRTObject.DEFAULT_VERSION() );
         descInit.addExpression( UMLRTRuntime.UMLRTObject.DEFAULT_BACKWARDS() );
 
-        Variable desc = new Variable( LinkageSpec.STATIC, descInit.getType(), "desc", descInit );
-        elements.addElement( desc );
+//        Variable desc = new Variable( LinkageSpec.STATIC, descInit.getType(), "desc", descInit );
+//        elements.addElement( desc );
 
         Variable rttype = cpp.getVariable( CppCodePattern.Output.UMLRTTypeDescriptor, data );
-        rttype.setInitializer( new AddressOfExpr( new ElementAccess( desc ) ) );
+        rttype.setInitializer( descInit );
         elements.addElement( rttype );
 
         return true;
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.standalone/META-INF/MANIFEST.MF b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.standalone/META-INF/MANIFEST.MF
index 91214b9..681b30d 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.standalone/META-INF/MANIFEST.MF
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.standalone/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@
 Bundle-SymbolicName: org.eclipse.papyrusrt.codegen.standalone
 Bundle-Version: 0.7.2.qualifier
 Bundle-Vendor: Zeligsoft (2009) Limited
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Require-Bundle: org.apache.commons.cli;bundle-version="1.2.0",
  org.eclipse.emf.ecore,
  org.eclipse.emf.common,
diff --git a/plugins/umlrt/runtime/rts/include/umlrtcapsuleid.hh b/plugins/umlrt/runtime/rts/include/umlrtcapsuleid.hh
index e11fac6..8143143 100644
--- a/plugins/umlrt/runtime/rts/include/umlrtcapsuleid.hh
+++ b/plugins/umlrt/runtime/rts/include/umlrtcapsuleid.hh
@@ -35,6 +35,6 @@
 
 };
 
-extern const UMLRTObject_class * const UMLRTType_UMLRTCapsuleId;
+extern const UMLRTObject_class UMLRTType_UMLRTCapsuleId;
 
 #endif // UMLRTCAPSULEID_HH
diff --git a/plugins/umlrt/runtime/rts/include/umlrtobjectclass.hh b/plugins/umlrt/runtime/rts/include/umlrtobjectclass.hh
index 29788d3..45d4acd 100644
--- a/plugins/umlrt/runtime/rts/include/umlrtobjectclass.hh
+++ b/plugins/umlrt/runtime/rts/include/umlrtobjectclass.hh
@@ -107,22 +107,22 @@
 extern int UMLRTObject_fprintf( FILE *ostream, const UMLRTObject_class * desc, const void * data, int nest = 0, int arraySize = 1 );
 
 // These are the primitive data-types with pre-defined data descriptors.
-extern const UMLRTObject_class * const UMLRTType_bool;
-extern const UMLRTObject_class * const UMLRTType_char;
-extern const UMLRTObject_class * const UMLRTType_double;
-extern const UMLRTObject_class * const UMLRTType_float;
-extern const UMLRTObject_class * const UMLRTType_int;
-extern const UMLRTObject_class * const UMLRTType_long;
-extern const UMLRTObject_class * const UMLRTType_longdouble;
-extern const UMLRTObject_class * const UMLRTType_longlong;
-extern const UMLRTObject_class * const UMLRTType_ptr;
-extern const UMLRTObject_class * const UMLRTType_short;
-extern const UMLRTObject_class * const UMLRTType_uchar;
-extern const UMLRTObject_class * const UMLRTType_uint;
-extern const UMLRTObject_class * const UMLRTType_ulong;
-extern const UMLRTObject_class * const UMLRTType_ulonglong;
-extern const UMLRTObject_class * const UMLRTType_ushort;
+extern const UMLRTObject_class UMLRTType_bool;
+extern const UMLRTObject_class UMLRTType_char;
+extern const UMLRTObject_class UMLRTType_double;
+extern const UMLRTObject_class UMLRTType_float;
+extern const UMLRTObject_class UMLRTType_int;
+extern const UMLRTObject_class UMLRTType_long;
+extern const UMLRTObject_class UMLRTType_longdouble;
+extern const UMLRTObject_class UMLRTType_longlong;
+extern const UMLRTObject_class UMLRTType_ptr;
+extern const UMLRTObject_class UMLRTType_short;
+extern const UMLRTObject_class UMLRTType_uchar;
+extern const UMLRTObject_class UMLRTType_uint;
+extern const UMLRTObject_class UMLRTType_ulong;
+extern const UMLRTObject_class UMLRTType_ulonglong;
+extern const UMLRTObject_class UMLRTType_ushort;
 
-extern const UMLRTObject_class * const UMLRTObject_empty;
+extern const UMLRTObject_class UMLRTObject_empty;
 
 #endif // UMLRTOBJECTCLASS_HH
diff --git a/plugins/umlrt/runtime/rts/include/umlrttimespec.hh b/plugins/umlrt/runtime/rts/include/umlrttimespec.hh
index f8b3863..bd98fd0 100644
--- a/plugins/umlrt/runtime/rts/include/umlrttimespec.hh
+++ b/plugins/umlrt/runtime/rts/include/umlrttimespec.hh
@@ -70,6 +70,6 @@
     static void timespecAdjust( UMLRTTimespec * tm );
 };
 
-extern const UMLRTObject_class * const UMLRTType_UMLRTTimespec;
+extern const UMLRTObject_class UMLRTType_UMLRTTimespec;
 
 #endif // UMLRTTIMESPEC_HH
diff --git a/plugins/umlrt/runtime/rts/umlrt/umlrtcapsuleid.cc b/plugins/umlrt/runtime/rts/umlrt/umlrtcapsuleid.cc
index c5663ed..030d3a1 100644
--- a/plugins/umlrt/runtime/rts/umlrt/umlrtcapsuleid.cc
+++ b/plugins/umlrt/runtime/rts/umlrt/umlrtcapsuleid.cc
@@ -41,7 +41,7 @@
     return nchar;
 }
 
-static const UMLRTObject_class UMLRTType_UMLRTCapsuleId_
+const UMLRTObject_class UMLRTType_UMLRTCapsuleId
 = {
         UMLRTObjectInitialize<UMLRTCapsuleId>,
         UMLRTObjectCopy<UMLRTCapsuleId>,
@@ -56,5 +56,3 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-const UMLRTObject_class * const UMLRTType_UMLRTCapsuleId = &UMLRTType_UMLRTCapsuleId_;
-
diff --git a/plugins/umlrt/runtime/rts/umlrt/umlrtframeservice.cc b/plugins/umlrt/runtime/rts/umlrt/umlrtframeservice.cc
index 78dc8cb..87b89a5 100644
--- a/plugins/umlrt/runtime/rts/umlrt/umlrtframeservice.cc
+++ b/plugins/umlrt/runtime/rts/umlrt/umlrtframeservice.cc
@@ -1486,7 +1486,7 @@
     // Default type supplied if data supplied is integer.
     if ((userData != NULL) && (type == NULL))
     {
-        type = UMLRTType_int;
+        type = &UMLRTType_int;
     }
     // Validate the index if it was explicitly set.
     if ((index < -1) || (index >= (int)part->numSlot))
diff --git a/plugins/umlrt/runtime/rts/umlrt/umlrtobjectclass.cc b/plugins/umlrt/runtime/rts/umlrt/umlrtobjectclass.cc
index f595f9f..f1644ba 100644
--- a/plugins/umlrt/runtime/rts/umlrt/umlrtobjectclass.cc
+++ b/plugins/umlrt/runtime/rts/umlrt/umlrtobjectclass.cc
@@ -421,7 +421,7 @@
     return nchar;
 }
 
-static const UMLRTObject_class UMLRTType_bool_
+const UMLRTObject_class UMLRTType_bool
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -436,7 +436,7 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-static const UMLRTObject_class UMLRTType_char_
+const UMLRTObject_class UMLRTType_char
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -451,7 +451,7 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-static const UMLRTObject_class UMLRTType_double_
+const UMLRTObject_class UMLRTType_double
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -466,7 +466,7 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-static const UMLRTObject_class UMLRTType_float_
+const UMLRTObject_class UMLRTType_float
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -481,7 +481,7 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-static const UMLRTObject_class UMLRTType_int_
+const UMLRTObject_class UMLRTType_int
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -496,7 +496,7 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-static const UMLRTObject_class UMLRTType_long_
+const UMLRTObject_class UMLRTType_long
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -511,7 +511,7 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-static const UMLRTObject_class UMLRTType_longdouble_
+const UMLRTObject_class UMLRTType_longdouble
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -526,7 +526,7 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-static const UMLRTObject_class UMLRTType_longlong_
+const UMLRTObject_class UMLRTType_longlong
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -541,7 +541,7 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-static const UMLRTObject_class UMLRTType_ptr_
+const UMLRTObject_class UMLRTType_ptr
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -556,7 +556,7 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-static const UMLRTObject_class UMLRTType_short_
+const UMLRTObject_class UMLRTType_short
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -571,7 +571,7 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-static const UMLRTObject_class UMLRTType_uchar_
+const UMLRTObject_class UMLRTType_uchar
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -586,7 +586,7 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-static const UMLRTObject_class UMLRTType_uint_
+const UMLRTObject_class UMLRTType_uint
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -601,7 +601,7 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-static const UMLRTObject_class UMLRTType_ulong_
+const UMLRTObject_class UMLRTType_ulong
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -616,7 +616,7 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-static const UMLRTObject_class UMLRTType_ulonglong_
+const UMLRTObject_class UMLRTType_ulonglong
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -631,7 +631,7 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-static const UMLRTObject_class UMLRTType_ushort_
+const UMLRTObject_class UMLRTType_ushort
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -646,23 +646,7 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-const UMLRTObject_class * const UMLRTType_bool = &UMLRTType_bool_;
-const UMLRTObject_class * const UMLRTType_char = &UMLRTType_char_;
-const UMLRTObject_class * const UMLRTType_double = &UMLRTType_double_;
-const UMLRTObject_class * const UMLRTType_float = &UMLRTType_float_;
-const UMLRTObject_class * const UMLRTType_int = &UMLRTType_int_;
-const UMLRTObject_class * const UMLRTType_long = &UMLRTType_long_;
-const UMLRTObject_class * const UMLRTType_longdouble = &UMLRTType_longdouble_;
-const UMLRTObject_class * const UMLRTType_longlong = &UMLRTType_longlong_;
-const UMLRTObject_class * const UMLRTType_ptr = &UMLRTType_ptr_;
-const UMLRTObject_class * const UMLRTType_short = &UMLRTType_short_;
-const UMLRTObject_class * const UMLRTType_uchar = &UMLRTType_uchar_;
-const UMLRTObject_class * const UMLRTType_uint = &UMLRTType_uint_;
-const UMLRTObject_class * const UMLRTType_ulong = &UMLRTType_ulong_;
-const UMLRTObject_class * const UMLRTType_ulonglong = &UMLRTType_ulonglong_;
-const UMLRTObject_class * const UMLRTType_ushort = &UMLRTType_ushort_;
-
-static const UMLRTObject_class UMLRTObject_empty_
+const UMLRTObject_class UMLRTObject_empty
 = {
         UMLRTObject_initialize,
         UMLRTObject_copy,
@@ -679,5 +663,3 @@
 
 };
 
-const UMLRTObject_class * const UMLRTObject_empty = &UMLRTObject_empty_;
-
diff --git a/plugins/umlrt/runtime/rts/umlrt/umlrttimespec.cc b/plugins/umlrt/runtime/rts/umlrt/umlrttimespec.cc
index 9779d4b..dcd2ea7 100644
--- a/plugins/umlrt/runtime/rts/umlrt/umlrttimespec.cc
+++ b/plugins/umlrt/runtime/rts/umlrt/umlrttimespec.cc
@@ -197,7 +197,7 @@
     return nchar;
 }
 
-static const UMLRTObject_class UMLRTType_UMLRTTimespec_
+const UMLRTObject_class UMLRTType_UMLRTTimespec
 = {
         UMLRTObjectInitialize<UMLRTTimespec>,
         UMLRTObjectCopy<UMLRTTimespec>,
@@ -212,4 +212,3 @@
         UMLRTOBJECTCLASS_DEFAULT_BACKWARDS, // backwards
 };
 
-const UMLRTObject_class * const UMLRTType_UMLRTTimespec = &UMLRTType_UMLRTTimespec_;
diff --git a/plugins/umlrt/runtime/tests/rts-computer/Computer.cc b/plugins/umlrt/runtime/tests/rts-computer/Computer.cc
index 38e06a7..32be7b9 100644
--- a/plugins/umlrt/runtime/tests/rts-computer/Computer.cc
+++ b/plugins/umlrt/runtime/tests/rts-computer/Computer.cc
@@ -147,7 +147,7 @@
                     { {timeoutCount, timeoutCount*10 + 1}, (timeoutCount & 1) != 0, timeoutCount*10 + 3.,
                             {{"start", 'a', timeoutCount*10 + 4}, {"middle", 'b', timeoutCount*10 + 5}, {"end", 'c', timeoutCount*10 + 6}}};
 
-        printerId = frame.incarnate(optionalUsb(), Printer, UMLRTTypedValue(&dt, RTType_DataType1));
+        printerId = frame.incarnate(optionalUsb(), Printer, UMLRTTypedValue(&dt, &RTType_DataType1));
 
         if (!printerId.isValid())
         {
@@ -230,7 +230,7 @@
     {
         printf("********************************************");
         printf("%s: incarnate Scanner - end-spp-test\n", getName());
-        scannerId = frame.incarnate(optionalUsb(), Scanner, NULL, UMLRTObject_empty, ((UMLRTController*)&Controller12));
+        scannerId = frame.incarnate(optionalUsb(), Scanner, NULL, &UMLRTObject_empty, Controller12);
 
         if (!scannerId.isValid())
         {
diff --git a/plugins/umlrt/runtime/tests/rts-computer/Controllers.cc b/plugins/umlrt/runtime/tests/rts-computer/Controllers.cc
index a9a003c..c4459b9 100644
--- a/plugins/umlrt/runtime/tests/rts-computer/Controllers.cc
+++ b/plugins/umlrt/runtime/tests/rts-computer/Controllers.cc
@@ -266,19 +266,34 @@
         &internalports_Top_computerArray[7],
 };
 
-UMLRTController DefaultController( "DefaultController", 9, DefaultController_slots );
-UMLRTController Controller1( "Controller1", 9, DefaultController_slots );
-UMLRTController Controller2( "Controller2", 9, DefaultController_slots );
-UMLRTController Controller3( "Controller3", 9, DefaultController_slots );
-UMLRTController Controller4( "Controller4", 9, DefaultController_slots );
-UMLRTController Controller5( "Controller5", 9, DefaultController_slots );
-UMLRTController Controller6( "Controller6", 9, DefaultController_slots );
-UMLRTController Controller7( "Controller7", 9, DefaultController_slots );
-UMLRTController Controller8( "Controller8", 9, DefaultController_slots );
-UMLRTController Controller9( "Controller9", 9, DefaultController_slots );
-UMLRTController Controller10( "Controller10", 9, DefaultController_slots );
-UMLRTController Controller11( "Controller11", 9, DefaultController_slots );
-UMLRTController Controller12( "Controller12", 9, DefaultController_slots );
+UMLRTController DefaultController_( "DefaultController", 9, DefaultController_slots );
+UMLRTController Controller1_( "Controller1", 9, DefaultController_slots );
+UMLRTController Controller2_( "Controller2", 9, DefaultController_slots );
+UMLRTController Controller3_( "Controller3", 9, DefaultController_slots );
+UMLRTController Controller4_( "Controller4", 9, DefaultController_slots );
+UMLRTController Controller5_( "Controller5", 9, DefaultController_slots );
+UMLRTController Controller6_( "Controller6", 9, DefaultController_slots );
+UMLRTController Controller7_( "Controller7", 9, DefaultController_slots );
+UMLRTController Controller8_( "Controller8", 9, DefaultController_slots );
+UMLRTController Controller9_( "Controller9", 9, DefaultController_slots );
+UMLRTController Controller10_( "Controller10", 9, DefaultController_slots );
+UMLRTController Controller11_( "Controller11", 9, DefaultController_slots );
+UMLRTController Controller12_( "Controller12", 9, DefaultController_slots );
+
+UMLRTController * DefaultController = &DefaultController_;
+UMLRTController * Controller1 = &Controller1_;
+UMLRTController * Controller2 = &Controller2_;
+UMLRTController * Controller3 = &Controller3_;
+UMLRTController * Controller4 = &Controller4_;
+UMLRTController * Controller5 = &Controller5_;
+UMLRTController * Controller6 = &Controller6_;
+UMLRTController * Controller7 = &Controller7_;
+UMLRTController * Controller8 = &Controller8_;
+UMLRTController * Controller9 = &Controller9_;
+UMLRTController * Controller10 = &Controller10_;
+UMLRTController * Controller11 = &Controller11_;
+UMLRTController * Controller12 = &Controller12_;
+
 static UMLRTSlot * slots_Top[] = 
 {
     &DefaultController_slots[InstId_Top_computer]
@@ -754,7 +769,7 @@
         NULL,
         0,
         &top,
-        &DefaultController,
+        &DefaultController_,
         1,
         parts_Top,
         0,
@@ -770,7 +785,7 @@
         &Top,
         Capsule_Top::part_computer,
         &top_computer,
-        &Controller1,
+        &Controller1_,
         3,
         parts_Top_computer,
         0,
@@ -786,7 +801,7 @@
         &Computer,
         Capsule_Computer::part_pluginUsb,
         NULL,
-        &Controller9,
+        &Controller9_,
         0,
         NULL,
         2,
@@ -802,7 +817,7 @@
         &Computer,
         Capsule_Computer::part_pluginUsb,
         NULL,
-        &Controller10,
+        &Controller10_,
         0,
         NULL,
         2,
@@ -818,7 +833,7 @@
         &Computer,
         Capsule_Computer::part_pluginUsb,
         NULL,
-        &Controller11,
+        &Controller11_,
         0,
         NULL,
         2,
@@ -834,7 +849,7 @@
         &Computer,
         Capsule_Computer::part_optionalUsb,
         NULL,
-        &Controller2,
+        &Controller2_,
         0,
         NULL,
         2,
@@ -850,7 +865,7 @@
         &Computer,
         Capsule_Computer::part_optionalUsb,
         NULL,
-        &Controller6,
+        &Controller6_,
         0,
         NULL,
         2,
@@ -866,7 +881,7 @@
         &Computer,
         Capsule_Computer::part_optionalUsb,
         NULL,
-        &Controller7,
+        &Controller7_,
         0,
         NULL,
         2,
@@ -882,7 +897,7 @@
         &Computer,
         Capsule_Computer::part_usbHub,
         &top_computer_usbHub,
-        &Controller12,
+        &Controller12_,
         0,
         NULL,
         2,
diff --git a/plugins/umlrt/runtime/tests/rts-computer/Controllers.hh b/plugins/umlrt/runtime/tests/rts-computer/Controllers.hh
index dc1b14a..3ce4e9b 100644
--- a/plugins/umlrt/runtime/tests/rts-computer/Controllers.hh
+++ b/plugins/umlrt/runtime/tests/rts-computer/Controllers.hh
@@ -9,7 +9,7 @@
 #ifndef CONTROLLERS_HH
 #define CONTROLLERS_HH
 
-#include "umlrtcontroller.hh"
+class UMLRTController;
 struct UMLRTCommsPort;
 struct UMLRTSlot;
 
@@ -26,19 +26,19 @@
     InstId_Top_computer_usbHub = 8
 };
 extern UMLRTCommsPort internalports_Top_computerArray[];
-extern UMLRTController DefaultController;
-extern UMLRTController Controller1;
-extern UMLRTController Controller2;
-extern UMLRTController Controller3;
-extern UMLRTController Controller4;
-extern UMLRTController Controller5;
-extern UMLRTController Controller6;
-extern UMLRTController Controller7;
-extern UMLRTController Controller8;
-extern UMLRTController Controller9;
-extern UMLRTController Controller10;
-extern UMLRTController Controller11;
-extern UMLRTController Controller12;
+extern UMLRTController * DefaultController;
+extern UMLRTController * Controller1;
+extern UMLRTController * Controller2;
+extern UMLRTController * Controller3;
+extern UMLRTController * Controller4;
+extern UMLRTController * Controller5;
+extern UMLRTController * Controller6;
+extern UMLRTController * Controller7;
+extern UMLRTController * Controller8;
+extern UMLRTController * Controller9;
+extern UMLRTController * Controller10;
+extern UMLRTController * Controller11;
+extern UMLRTController * Controller12;
 extern UMLRTCommsPort borderports_Top_computer_pluginUsb_0[];
 extern UMLRTCommsPort borderports_Top_computer_pluginUsb_1[];
 extern UMLRTCommsPort borderports_Top_computer_pluginUsb_2[];
diff --git a/plugins/umlrt/runtime/tests/rts-computer/DataType1.cc b/plugins/umlrt/runtime/tests/rts-computer/DataType1.cc
index c5f133b..5b489c5 100644
--- a/plugins/umlrt/runtime/tests/rts-computer/DataType1.cc
+++ b/plugins/umlrt/runtime/tests/rts-computer/DataType1.cc
@@ -9,35 +9,35 @@
 {
     {
         "name",
-        UMLRTType_char,
+        &UMLRTType_char,
         offsetof( SubStructType1, name ),
         8,
         0
     },
     {
         "character",
-        UMLRTType_char,
+        &UMLRTType_char,
         offsetof( SubStructType1, character),
         1,
         0
     },
     {
         "integer",
-        UMLRTType_int,
+        &UMLRTType_int,
         offsetof( SubStructType1, integer ),
         1,
         0
     },
     {
         "character2",
-        UMLRTType_char,
+        &UMLRTType_char,
         offsetof( SubStructType1, character2),
         1,
         0
     },
 };
 
-static const UMLRTObject_class sst1desc =
+const UMLRTObject_class RTType_SubStruct1 =
 {
     UMLRTObjectInitialize<SubStructType1>,
     UMLRTObjectCopy<SubStructType1>,
@@ -52,41 +52,39 @@
     UMLRTOBJECTCLASS_DEFAULT_BACKWARDS,
 };
 
-const UMLRTObject_class * const RTType_SubStruct1 = &sst1desc;
-
 static const UMLRTObject_field dt1fields[] =
 {
     {
         "field1_int",
-        UMLRTType_int,
+        &UMLRTType_int,
         offsetof( DataType1, field1_int ),
         2,
         0
     },
     {
         "field2_bool",
-        UMLRTType_bool,
+        &UMLRTType_bool,
         offsetof( DataType1, field2_bool ),
         1,
         0
     },
     {
         "field3_double",
-        UMLRTType_double,
+        &UMLRTType_double,
         offsetof( DataType1, field3_double ),
         1,
         0
     },
     {
         "field4_sst1",
-        RTType_SubStruct1,
+        &RTType_SubStruct1,
         offsetof( DataType1, field4_sst1 ),
         3,
         0
     },
 
 };
-static const UMLRTObject_class dt1desc =
+const UMLRTObject_class RTType_DataType1 =
 {
     UMLRTObjectInitialize<DataType1>,
     UMLRTObjectCopy<DataType1>,
@@ -100,5 +98,3 @@
     UMLRTOBJECTCLASS_DEFAULT_VERSION,
     UMLRTOBJECTCLASS_DEFAULT_BACKWARDS,
 };
-
-const UMLRTObject_class * const RTType_DataType1 = &dt1desc;
diff --git a/plugins/umlrt/runtime/tests/rts-computer/DataType1.hh b/plugins/umlrt/runtime/tests/rts-computer/DataType1.hh
index 768d05d..5c30a76 100644
--- a/plugins/umlrt/runtime/tests/rts-computer/DataType1.hh
+++ b/plugins/umlrt/runtime/tests/rts-computer/DataType1.hh
@@ -19,8 +19,8 @@
     double field3_double;
     SubStructType1 field4_sst1[3];
 };
-extern const UMLRTObject_class * const RTType_SubStructType1;
-extern const UMLRTObject_class * const RTType_DataType1;
+extern const UMLRTObject_class RTType_SubStructType1;
+extern const UMLRTObject_class RTType_DataType1;
 
 #endif
 
diff --git a/plugins/umlrt/runtime/tests/rts-computer/InkLevelProtocol.cc b/plugins/umlrt/runtime/tests/rts-computer/InkLevelProtocol.cc
index d7cfad4..b459291 100644
--- a/plugins/umlrt/runtime/tests/rts-computer/InkLevelProtocol.cc
+++ b/plugins/umlrt/runtime/tests/rts-computer/InkLevelProtocol.cc
@@ -24,7 +24,7 @@
 UMLRTOutSignal InkLevelProtocol::Base::inkLevel ( int level ) const
 {
     UMLRTOutSignal signal;
-    signal.initialize( "inkLevel", signal_inkLevel, srcPort, UMLRTType_int, &level );
+    signal.initialize( "inkLevel", signal_inkLevel, srcPort, &UMLRTType_int, &level );
     return signal;
 }
 
@@ -45,6 +45,6 @@
 UMLRTOutSignal InkLevelProtocol::Conj::inkLevelResponse( int level ) const
 {
     UMLRTOutSignal signal;
-    signal.initialize( "inkLevel", signal_inkLevel, srcPort, UMLRTType_int, &level);
+    signal.initialize( "inkLevel", signal_inkLevel, srcPort, &UMLRTType_int, &level);
     return signal;
 }
diff --git a/plugins/umlrt/runtime/tests/rts-computer/InkPresentProtocol.cc b/plugins/umlrt/runtime/tests/rts-computer/InkPresentProtocol.cc
index 413a0cb..61b9ca4 100644
--- a/plugins/umlrt/runtime/tests/rts-computer/InkPresentProtocol.cc
+++ b/plugins/umlrt/runtime/tests/rts-computer/InkPresentProtocol.cc
@@ -24,7 +24,7 @@
 UMLRTOutSignal InkPresentProtocol::Base::cartridgePresent ( int present ) const
 {
     UMLRTOutSignal signal;
-    signal.initialize( "cartridgePresent", signal_cartridgePresent, srcPort, UMLRTType_int, &present );
+    signal.initialize( "cartridgePresent", signal_cartridgePresent, srcPort, &UMLRTType_int, &present );
     return signal;
 }
 
@@ -45,6 +45,6 @@
 UMLRTOutSignal InkPresentProtocol::Conj::cartridgePresentResponse( int present ) const
 {
     UMLRTOutSignal signal;
-    signal.initialize( "cartridgePresentResponse", signal_cartridgePresent, srcPort, UMLRTType_int, &present);
+    signal.initialize( "cartridgePresentResponse", signal_cartridgePresent, srcPort, &UMLRTType_int, &present);
     return signal;
 }
diff --git a/plugins/umlrt/runtime/tests/rts-computer/Printer.cc b/plugins/umlrt/runtime/tests/rts-computer/Printer.cc
index 6654d96..d7c4e90 100644
--- a/plugins/umlrt/runtime/tests/rts-computer/Printer.cc
+++ b/plugins/umlrt/runtime/tests/rts-computer/Printer.cc
@@ -60,7 +60,7 @@
     {
         // Only gets initialize data from an incarnate from Computer - not from static capsule creation
         // as part of a Scanner.
-        UMLRTObject_fprintf(stdout, RTType_DataType1, dt);
+        UMLRTObject_fprintf(stdout, &RTType_DataType1, dt);
         fprintf(stdout, "\n");
     }
     // Create a timer that is going to fire every 1 seconds.
diff --git a/plugins/umlrt/runtime/tests/rts-computer/Toner.cc b/plugins/umlrt/runtime/tests/rts-computer/Toner.cc
index 5203c0f..227ddc4 100644
--- a/plugins/umlrt/runtime/tests/rts-computer/Toner.cc
+++ b/plugins/umlrt/runtime/tests/rts-computer/Toner.cc
@@ -114,7 +114,7 @@
     UMLRTTimespec tm;
     UMLRTTimespec::getclock(tm);
 
-    intervalTimerId = timer.informEvery(UMLRTTimespec(1,0), &tm, UMLRTType_UMLRTTimespec);
+    intervalTimerId = timer.informEvery(UMLRTTimespec(1,0), &tm, &UMLRTType_UMLRTTimespec);
     if (!intervalTimerId.isValid())
     {
         context()->perror("ERROR:%s: could not create interval timer", getName());
@@ -177,7 +177,7 @@
         // Create a timer that is going to fire every 1 seconds.
         UMLRTTimespec tm;
         UMLRTTimespec::getclock(&tm);
-        intervalTimerId = timer.informEvery(UMLRTTimespec(1,0), &tm, UMLRTType_UMLRTTimespec, PRIORITY_LOW);
+        intervalTimerId = timer.informEvery(UMLRTTimespec(1,0), &tm, &UMLRTType_UMLRTTimespec, PRIORITY_LOW);
         if (!intervalTimerId.isValid())
         {
             context()->perror("ERROR:%s: could not create interval timer", getName());
diff --git a/plugins/umlrt/runtime/tests/rts-computer/TonerStatusProtocol.cc b/plugins/umlrt/runtime/tests/rts-computer/TonerStatusProtocol.cc
index ff31a42..cc9f2e7 100644
--- a/plugins/umlrt/runtime/tests/rts-computer/TonerStatusProtocol.cc
+++ b/plugins/umlrt/runtime/tests/rts-computer/TonerStatusProtocol.cc
@@ -25,7 +25,7 @@
 UMLRTOutSignal TonerStatusProtocol::Base::tonerReady ( int present ) const
 {
     UMLRTOutSignal signal;
-    signal.initialize( "tonerReady", signal_tonerReady, srcPort, UMLRTType_int, &present );
+    signal.initialize( "tonerReady", signal_tonerReady, srcPort, &UMLRTType_int, &present );
     return signal;
 }
 
@@ -46,6 +46,6 @@
 UMLRTOutSignal TonerStatusProtocol::Conj::tonerReadyResponse( int present ) const
 {
     UMLRTOutSignal signal;
-    signal.initialize( "tonerReadyResponse", signal_tonerReadyResponse, srcPort, UMLRTType_int, &present );
+    signal.initialize( "tonerReadyResponse", signal_tonerReadyResponse, srcPort, &UMLRTType_int, &present );
     return signal;
 }
diff --git a/plugins/umlrt/runtime/tests/rts-computer/TonerTypeProtocol.cc b/plugins/umlrt/runtime/tests/rts-computer/TonerTypeProtocol.cc
index 2ca5ac3..237423d 100644
--- a/plugins/umlrt/runtime/tests/rts-computer/TonerTypeProtocol.cc
+++ b/plugins/umlrt/runtime/tests/rts-computer/TonerTypeProtocol.cc
@@ -27,7 +27,7 @@
 UMLRTOutSignal TonerTypeProtocol::Base::tonerType ( int type, UMLRTCapsuleId &id, UMLRTTimespec &tm ) const
 {
     UMLRTOutSignal signal;
-    signal.initialize( "tonerType", signal_tonerType, srcPort, UMLRTType_UMLRTCapsuleId, &id );
+    signal.initialize( "tonerType", signal_tonerType, srcPort, &UMLRTType_UMLRTCapsuleId, &id );
     return signal;
 }
 
@@ -48,6 +48,6 @@
 UMLRTOutSignal TonerTypeProtocol::Conj::tonerTypeResponse( int type, UMLRTCapsuleId &id, UMLRTTimespec &tm ) const
 {
     UMLRTOutSignal signal;
-    signal.initialize( "tonerType", signal_tonerTypeResponse, srcPort, UMLRTType_UMLRTTimespec, &tm );
+    signal.initialize( "tonerType", signal_tonerTypeResponse, srcPort, &UMLRTType_UMLRTTimespec, &tm );
     return signal;
 }
diff --git a/plugins/umlrt/runtime/tests/rts-computer/UsbPortProtocol.cc b/plugins/umlrt/runtime/tests/rts-computer/UsbPortProtocol.cc
index a8ea07c..0856462 100644
--- a/plugins/umlrt/runtime/tests/rts-computer/UsbPortProtocol.cc
+++ b/plugins/umlrt/runtime/tests/rts-computer/UsbPortProtocol.cc
@@ -25,7 +25,7 @@
 UMLRTOutSignal UsbPortProtocol::Base::deviceId ( int id ) const
 {
     UMLRTOutSignal signal;
-    signal.initialize( "deviceId", signal_deviceId, srcPort, UMLRTType_int, &id );
+    signal.initialize( "deviceId", signal_deviceId, srcPort, &UMLRTType_int, &id );
     return signal;
 }
 
@@ -46,6 +46,6 @@
 UMLRTOutSignal UsbPortProtocol::Conj::deviceIdResponse( int id ) const
 {
     UMLRTOutSignal signal;
-    signal.initialize( "deviceId", signal_deviceId, srcPort, UMLRTType_int, &id );
+    signal.initialize( "deviceId", signal_deviceId, srcPort, &UMLRTType_int, &id );
     return signal;
 }
diff --git a/plugins/umlrt/runtime/tests/rts-computer/main.cc b/plugins/umlrt/runtime/tests/rts-computer/main.cc
index b06d63b..d132eb6 100644
--- a/plugins/umlrt/runtime/tests/rts-computer/main.cc
+++ b/plugins/umlrt/runtime/tests/rts-computer/main.cc
@@ -6,6 +6,7 @@
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
 
+#include "umlrtcontroller.hh"
 #include "umlrtcapsuletocontrollermap.hh"
 #include "umlrtmain.hh"
 #include "umlrtmessagepool.hh"
@@ -48,26 +49,26 @@
     if (startup_ok)
     {
         // Spawn the controllers
-        DefaultController.spawn();
-        Controller1.spawn();
-        Controller2.spawn();
-        Controller3.spawn();
-        Controller4.spawn();
-        Controller5.spawn();
-        Controller6.spawn();
-        Controller7.spawn();
-        Controller8.spawn();
-        Controller9.spawn();
-        Controller10.spawn();
-        Controller11.spawn();
-        Controller12.spawn();
+        DefaultController->spawn();
+        Controller1->spawn();
+        Controller2->spawn();
+        Controller3->spawn();
+        Controller4->spawn();
+        Controller5->spawn();
+        Controller6->spawn();
+        Controller7->spawn();
+        Controller8->spawn();
+        Controller9->spawn();
+        Controller10->spawn();
+        Controller11->spawn();
+        Controller12->spawn();
 
         bool main_ok = UMLRTMain::mainLoop();
 
         if (main_ok)
         {
             // Wait for completion.
-            DefaultController.join();
+            DefaultController->join();
         }
         return UMLRTMain::targetShutdown(main_ok);
     }
diff --git a/plugins/umlrt/runtime/tests/rts-passthru/TopControllers.cc b/plugins/umlrt/runtime/tests/rts-passthru/TopControllers.cc
index c778e77..7c43646 100644
--- a/plugins/umlrt/runtime/tests/rts-passthru/TopControllers.cc
+++ b/plugins/umlrt/runtime/tests/rts-passthru/TopControllers.cc
@@ -14,7 +14,8 @@
 #include <cstddef>
 
 
-UMLRTController DefaultController( "DefaultController" );
+static UMLRTController DefaultController_( "DefaultController" );
+UMLRTController * DefaultController = &DefaultController_;
 
 static UMLRTCommsPortFarEnd borderfarEndList_Top[] = 
 {
@@ -323,7 +324,7 @@
         NULL,
         0,
         &top,
-        &DefaultController,
+        &DefaultController_,
         3,
         parts_Top,
         1,
@@ -339,7 +340,7 @@
         &Top,
         Capsule_Top::part_mediator,
         NULL,
-        &DefaultController,
+        &DefaultController_,
         0,
         NULL,
         2,
@@ -355,7 +356,7 @@
         &Top,
         Capsule_Top::part_receiver,
         &top_receiver,
-        &DefaultController,
+        &DefaultController_,
         0,
         NULL,
         1,
@@ -371,7 +372,7 @@
         &Top,
         Capsule_Top::part_sender,
         &top_sender,
-        &DefaultController,
+        &DefaultController_,
         0,
         NULL,
         2,
diff --git a/plugins/umlrt/runtime/tests/rts-passthru/TopControllers.hh b/plugins/umlrt/runtime/tests/rts-passthru/TopControllers.hh
index f1cc672..41bd27a 100644
--- a/plugins/umlrt/runtime/tests/rts-passthru/TopControllers.hh
+++ b/plugins/umlrt/runtime/tests/rts-passthru/TopControllers.hh
@@ -2,7 +2,7 @@
 #ifndef TOPCONTROLLERS_HH
 #define TOPCONTROLLERS_HH
 
-#include "umlrtcontroller.hh"
+class UMLRTController;
 struct UMLRTCommsPort;
 struct UMLRTSlot;
 
@@ -13,7 +13,7 @@
     InstId_Top_receiver,
     InstId_Top_sender
 };
-extern UMLRTController DefaultController;
+extern UMLRTController * DefaultController;
 extern UMLRTCommsPort borderports_Top[];
 extern UMLRTCommsPort internalports_Top[];
 extern UMLRTCommsPort borderports_Top_mediator[];
diff --git a/plugins/umlrt/runtime/tests/rts-passthru/TopMain.cc b/plugins/umlrt/runtime/tests/rts-passthru/TopMain.cc
index 9df1619..b465f00 100644
--- a/plugins/umlrt/runtime/tests/rts-passthru/TopMain.cc
+++ b/plugins/umlrt/runtime/tests/rts-passthru/TopMain.cc
@@ -1,5 +1,6 @@
 #include "umlrtmain.hh"
 
+#include "umlrtcontroller.hh"
 #include "TopControllers.hh"
 #include "umlrtcapsuletocontrollermap.hh"
 #include "umlrtmessagepool.hh"
@@ -26,12 +27,12 @@
     if( ! UMLRTMain::targetStartup() )
         return EXIT_FAILURE;
 
-    DefaultController.spawn();
+    DefaultController->spawn();
 
     if( ! UMLRTMain::mainLoop() )
         return UMLRTMain::targetShutdown( false );
 
-    DefaultController.join();
+    DefaultController->join();
 
     return UMLRTMain::targetShutdown( true );
 }
diff --git a/plugins/umlrt/runtime/tests/rts-pingpong/Controllers.cc b/plugins/umlrt/runtime/tests/rts-pingpong/Controllers.cc
index a5c4da9..f0ae566 100644
--- a/plugins/umlrt/runtime/tests/rts-pingpong/Controllers.cc
+++ b/plugins/umlrt/runtime/tests/rts-pingpong/Controllers.cc
@@ -13,7 +13,9 @@
 #include <cstddef>
 
 
-UMLRTController PingerController( "PingerController" );
+static UMLRTController PingerController_( "PingerController" );
+
+UMLRTController * PingerController = &PingerController_;
 
 static UMLRTCommsPortFarEnd borderfarEndList_Top_pinger[] = 
 {
@@ -93,7 +95,9 @@
 
 static Capsule_Pinger top_pinger( &Pinger, &Top_slots[InstId_Top_pinger], borderports_Top_pinger_ptrs, internalports_Top_pinger_ptrs, true );
 
-UMLRTController TopController( "TopController" );
+static UMLRTController TopController_( "TopController" );
+
+UMLRTController * TopController = &TopController_;
 
 static Capsule_Top top( &Top, &Top_slots[InstId_Top], NULL, NULL, true );
 
@@ -168,7 +172,7 @@
         &Top,
         Capsule_Top::part_pinger,
         &top_pinger,
-        &PingerController,
+        &PingerController_,
         0,
         NULL,
         1,
@@ -184,7 +188,7 @@
         NULL,
         0,
         &top,
-        &TopController,
+        &TopController_,
         2,
         parts_Top,
         0,
@@ -200,7 +204,7 @@
         &Top,
         Capsule_Top::part_ponger,
         &top_ponger,
-        &TopController,
+        &TopController_,
         0,
         NULL,
         1,
diff --git a/plugins/umlrt/runtime/tests/rts-pingpong/Controllers.hh b/plugins/umlrt/runtime/tests/rts-pingpong/Controllers.hh
index a641c76..e4eceed 100644
--- a/plugins/umlrt/runtime/tests/rts-pingpong/Controllers.hh
+++ b/plugins/umlrt/runtime/tests/rts-pingpong/Controllers.hh
@@ -2,7 +2,7 @@
 #ifndef CONTROLLERS_HH
 #define CONTROLLERS_HH
 
-#include "umlrtcontroller.hh"
+class UMLRTController;
 struct UMLRTCommsPort;
 struct UMLRTSlot;
 
@@ -14,8 +14,8 @@
 };
 extern UMLRTCommsPort borderports_Top[];
 extern UMLRTCommsPort borderports_Top_pinger[];
-extern UMLRTController TopController;
-extern UMLRTController PingerController;
+extern UMLRTController * TopController;
+extern UMLRTController * PingerController;
 extern UMLRTCommsPort borderports_Top_ponger[];
 extern UMLRTSlot Top_slots[];
 
diff --git a/plugins/umlrt/runtime/tests/rts-pingpong/DataType1.cc b/plugins/umlrt/runtime/tests/rts-pingpong/DataType1.cc
index c5f133b..f1f3602 100644
--- a/plugins/umlrt/runtime/tests/rts-pingpong/DataType1.cc
+++ b/plugins/umlrt/runtime/tests/rts-pingpong/DataType1.cc
@@ -9,35 +9,35 @@
 {
     {
         "name",
-        UMLRTType_char,
+        &UMLRTType_char,
         offsetof( SubStructType1, name ),
         8,
         0
     },
     {
         "character",
-        UMLRTType_char,
+        &UMLRTType_char,
         offsetof( SubStructType1, character),
         1,
         0
     },
     {
         "integer",
-        UMLRTType_int,
+        &UMLRTType_int,
         offsetof( SubStructType1, integer ),
         1,
         0
     },
     {
         "character2",
-        UMLRTType_char,
+        &UMLRTType_char,
         offsetof( SubStructType1, character2),
         1,
         0
     },
 };
 
-static const UMLRTObject_class sst1desc =
+const UMLRTObject_class RTType_SubStruct1 =
 {
     UMLRTObjectInitialize<SubStructType1>,
     UMLRTObjectCopy<SubStructType1>,
@@ -52,41 +52,40 @@
     UMLRTOBJECTCLASS_DEFAULT_BACKWARDS,
 };
 
-const UMLRTObject_class * const RTType_SubStruct1 = &sst1desc;
-
 static const UMLRTObject_field dt1fields[] =
 {
     {
         "field1_int",
-        UMLRTType_int,
+        &UMLRTType_int,
         offsetof( DataType1, field1_int ),
         2,
         0
     },
     {
         "field2_bool",
-        UMLRTType_bool,
+        &UMLRTType_bool,
         offsetof( DataType1, field2_bool ),
         1,
         0
     },
     {
         "field3_double",
-        UMLRTType_double,
+        &UMLRTType_double,
         offsetof( DataType1, field3_double ),
         1,
         0
     },
     {
         "field4_sst1",
-        RTType_SubStruct1,
+        &RTType_SubStruct1,
         offsetof( DataType1, field4_sst1 ),
         3,
         0
     },
 
 };
-static const UMLRTObject_class dt1desc =
+
+const UMLRTObject_class RTType_DataType1 =
 {
     UMLRTObjectInitialize<DataType1>,
     UMLRTObjectCopy<DataType1>,
@@ -100,5 +99,3 @@
     UMLRTOBJECTCLASS_DEFAULT_VERSION,
     UMLRTOBJECTCLASS_DEFAULT_BACKWARDS,
 };
-
-const UMLRTObject_class * const RTType_DataType1 = &dt1desc;
diff --git a/plugins/umlrt/runtime/tests/rts-pingpong/DataType1.hh b/plugins/umlrt/runtime/tests/rts-pingpong/DataType1.hh
index 768d05d..5c30a76 100644
--- a/plugins/umlrt/runtime/tests/rts-pingpong/DataType1.hh
+++ b/plugins/umlrt/runtime/tests/rts-pingpong/DataType1.hh
@@ -19,8 +19,8 @@
     double field3_double;
     SubStructType1 field4_sst1[3];
 };
-extern const UMLRTObject_class * const RTType_SubStructType1;
-extern const UMLRTObject_class * const RTType_DataType1;
+extern const UMLRTObject_class RTType_SubStructType1;
+extern const UMLRTObject_class RTType_DataType1;
 
 #endif
 
diff --git a/plugins/umlrt/runtime/tests/rts-pingpong/PingPongProtocol.cc b/plugins/umlrt/runtime/tests/rts-pingpong/PingPongProtocol.cc
index 2b41b8e..d22735a 100644
--- a/plugins/umlrt/runtime/tests/rts-pingpong/PingPongProtocol.cc
+++ b/plugins/umlrt/runtime/tests/rts-pingpong/PingPongProtocol.cc
@@ -22,7 +22,7 @@
 
 static const UMLRTObject_field pong1_fields[]
 = {
-        { "dta", RTType_DataType1, offsetof( pong1_params, dta ), 2, 0 },
+        { "dta", &RTType_DataType1, offsetof( pong1_params, dta ), 2, 0 },
 };
 
 static const UMLRTObject pong1_payload = { sizeof(pong1_params), 1, pong1_fields };
@@ -45,11 +45,11 @@
 
 static const UMLRTObject_field pong2_fields[]
 = {
-    { "command",     UMLRTType_int,      offsetof( pong2_params, command_param ),     1, 0 },
-    { "label",       UMLRTType_char,     offsetof( pong2_params, label_param ),       1, 0 },
-    { "datatype",    RTType_DataType1,   offsetof( pong2_params, datatype_param ),    1, 0 },
-    { "timestamp",   UMLRTType_longlong, offsetof( pong2_params, timestamp_param ),   1, 0 },
-    { "measurement", UMLRTType_float,    offsetof( pong2_params, measurement_param ), 1, 0 }
+    { "command",     &UMLRTType_int,      offsetof( pong2_params, command_param ),     1, 0 },
+    { "label",       &UMLRTType_char,     offsetof( pong2_params, label_param ),       1, 0 },
+    { "datatype",    &RTType_DataType1,   offsetof( pong2_params, datatype_param ),    1, 0 },
+    { "timestamp",   &UMLRTType_longlong, offsetof( pong2_params, timestamp_param ),   1, 0 },
+    { "measurement", &UMLRTType_float,    offsetof( pong2_params, measurement_param ), 1, 0 }
 };
 
 static const UMLRTObject pong2_object = { sizeof( pong2_params ), 5, pong2_fields };
@@ -73,7 +73,7 @@
 
 static const UMLRTObject_field ping1_fields[]
 = {
- { "dta", RTType_DataType1,  offsetof( ping1_params, dta ), 2, 0 },
+ { "dta", &RTType_DataType1,  offsetof( ping1_params, dta ), 2, 0 },
 };
 
 static const UMLRTObject ping1_payload = { sizeof(ping1_params), 1, ping1_fields };
@@ -96,11 +96,11 @@
 
 static const UMLRTObject_field ping2_fields[]
 = {
-    { "command",     UMLRTType_int,      offsetof( ping2_params, command_param ),     1, 0 },
-    { "label",       UMLRTType_char,     offsetof( ping2_params, label_param ),       1, 0 },
-    { "datatype",    RTType_DataType1,   offsetof( ping2_params, datatype_param ),    1, 0 },
-    { "timestamp",   UMLRTType_longlong, offsetof( ping2_params, timestamp_param ),   1, 0 },
-    { "measurement", UMLRTType_float,    offsetof( ping2_params, measurement_param ), 1, 0 }
+    { "command",     &UMLRTType_int,      offsetof( ping2_params, command_param ),     1, 0 },
+    { "label",       &UMLRTType_char,     offsetof( ping2_params, label_param ),       1, 0 },
+    { "datatype",    &RTType_DataType1,   offsetof( ping2_params, datatype_param ),    1, 0 },
+    { "timestamp",   &UMLRTType_longlong, offsetof( ping2_params, timestamp_param ),   1, 0 },
+    { "measurement", &UMLRTType_float,    offsetof( ping2_params, measurement_param ), 1, 0 }
 };
 
 static const UMLRTObject ping2_object = { sizeof( ping2_params ), 5, ping2_fields };
diff --git a/plugins/umlrt/runtime/tests/rts-pingpong/Pinger.cc b/plugins/umlrt/runtime/tests/rts-pingpong/Pinger.cc
index 34475ed..51917f6 100644
--- a/plugins/umlrt/runtime/tests/rts-pingpong/Pinger.cc
+++ b/plugins/umlrt/runtime/tests/rts-pingpong/Pinger.cc
@@ -101,7 +101,7 @@
     if (msg.getSignalId() == PingPongProtocol::signal_pong1)
     {
         std::cout << getName() << ":received pong1 payload size " << msg.signal.getPayloadSize() << std::endl;
-        UMLRTObject_fprintf(stdout, RTType_DataType1, dta, 0/*nest*/, 2/*arraySize*/);
+        UMLRTObject_fprintf(stdout, &RTType_DataType1, dta, 0/*nest*/, 2/*arraySize*/);
         std::cout << std::endl;
     }
     else
@@ -135,11 +135,11 @@
     if (timeoutCount & 1)
     {
         std::cout << getName() << ":Sending ping1 from timeout transition action - timeoutCount " << timeoutCount << " " << std::endl;
-        UMLRTObject_fprintf(stdout, RTType_DataType1, &dt, 0/*nest*/, 2/*arraySize*/);
+        UMLRTObject_fprintf(stdout, &RTType_DataType1, &dt, 0/*nest*/, 2/*arraySize*/);
         std::cout << std::endl;
         s = PingPort.ping1( dt );
         std::cout << "Encoded parameter:" << std::endl;
-        UMLRTObject_fprintf(stdout, RTType_DataType1, s.getPayload(), 0/*nest*/, 2/*arraySize*/);
+        UMLRTObject_fprintf(stdout, &RTType_DataType1, s.getPayload(), 0/*nest*/, 2/*arraySize*/);
         std::cout << std::endl;
     }
     else
diff --git a/plugins/umlrt/runtime/tests/rts-pingpong/Ponger.cc b/plugins/umlrt/runtime/tests/rts-pingpong/Ponger.cc
index bedfac0..46bc49b 100644
--- a/plugins/umlrt/runtime/tests/rts-pingpong/Ponger.cc
+++ b/plugins/umlrt/runtime/tests/rts-pingpong/Ponger.cc
@@ -111,7 +111,7 @@
     if (msg.getSignalId() == PingPongProtocol::signal_ping1)
     {
         std::cout << getName() << ":received ping1 payload size " << msg.signal.getPayloadSize() << std::endl;
-        UMLRTObject_fprintf(stdout, RTType_DataType1, msg.signal.getPayload(), 0/*nest*/, 2/*arraySize*/);
+        UMLRTObject_fprintf(stdout, &RTType_DataType1, msg.signal.getPayload(), 0/*nest*/, 2/*arraySize*/);
         std::cout << std::endl;
         dta[0].field1_int[0]++;
         dta[0].field1_int[1]++;
diff --git a/plugins/umlrt/runtime/tests/rts-pingpong/main.cc b/plugins/umlrt/runtime/tests/rts-pingpong/main.cc
index 9be01e0..d811a0c 100644
--- a/plugins/umlrt/runtime/tests/rts-pingpong/main.cc
+++ b/plugins/umlrt/runtime/tests/rts-pingpong/main.cc
@@ -1,3 +1,4 @@
+#include "umlrtcontroller.hh"
 #include "umlrtcapsuletocontrollermap.hh"
 #include "umlrtmain.hh"
 #include "umlrtmessagepool.hh"
@@ -40,15 +41,15 @@
     if( UMLRTMain::targetStartup() )
     {
         // Spawn the controllers
-        TopController.spawn();
-        PingerController.spawn();
+        TopController->spawn();
+        PingerController->spawn();
 
         bool main_ok = UMLRTMain::mainLoop();
         if( main_ok )
         {
             // Wait for completion.
-            PingerController.join();
-            TopController.join();
+            PingerController->join();
+            TopController->join();
         }
         return UMLRTMain::targetShutdown( main_ok );
     }
diff --git a/plugins/umlrt/runtime/tests/rts-ring/Controllers.cc b/plugins/umlrt/runtime/tests/rts-ring/Controllers.cc
index 4baae0b..4035da6 100644
--- a/plugins/umlrt/runtime/tests/rts-ring/Controllers.cc
+++ b/plugins/umlrt/runtime/tests/rts-ring/Controllers.cc
@@ -11,7 +11,9 @@
 #include <cstddef>
 
 
-UMLRTController Controller1( "Controller1" );
+static UMLRTController Controller1_( "Controller1" );
+
+UMLRTController * Controller1 = &Controller1_;
 
 static UMLRTCommsPortFarEnd borderfarEndList_Top_part3[] = 
 {
@@ -145,9 +147,12 @@
 
 static Capsule_Capsule top_part1( &Capsule, &Top_slots[InstId_Top_part1], borderports_Top_part1_ptrs, NULL, true );
 
-UMLRTController Controller2( "Controller2" );
-UMLRTController Controller3( "Controller3" );
-UMLRTController Controller4( "Controller4" );
+static UMLRTController Controller2_( "Controller2" );
+UMLRTController * Controller2 = &Controller2_;
+static UMLRTController Controller3_( "Controller3" );
+UMLRTController * Controller3 = &Controller3_;
+static UMLRTController Controller4_( "Controller4" );
+UMLRTController * Controller4 = &Controller4_;
 
 static UMLRTCommsPortFarEnd borderfarEndList_Top_part4[] = 
 {
@@ -290,7 +295,7 @@
         &Top,
         Capsule_Top::part_part3,
         &top_part3,
-        &Controller3,
+        &Controller3_,
         0,
         NULL,
         2,
@@ -306,7 +311,7 @@
         &Top,
         Capsule_Top::part_part1,
         &top_part1,
-        &Controller1,
+        &Controller1_,
         0,
         NULL,
         2,
@@ -322,7 +327,7 @@
         &Top,
         Capsule_Top::part_part4,
         &top_part4,
-        &Controller4,
+        &Controller4_,
         0,
         NULL,
         2,
@@ -338,7 +343,7 @@
         &Top,
         Capsule_Top::part_part2,
         &top_part2,
-        &Controller2,
+        &Controller2_,
         0,
         NULL,
         2,
diff --git a/plugins/umlrt/runtime/tests/rts-ring/Controllers.hh b/plugins/umlrt/runtime/tests/rts-ring/Controllers.hh
index 6b19c33..cc2167d 100644
--- a/plugins/umlrt/runtime/tests/rts-ring/Controllers.hh
+++ b/plugins/umlrt/runtime/tests/rts-ring/Controllers.hh
@@ -2,7 +2,7 @@
 #ifndef TOPCONTROLLERS_HH
 #define TOPCONTROLLERS_HH
 
-#include "umlrtcontroller.hh"
+class UMLRTController;
 struct UMLRTCommsPort;
 struct UMLRTSlot;
 
@@ -13,12 +13,12 @@
     InstId_Top_part4,
     InstId_Top_part2
 };
-extern UMLRTController Controller1;
+extern UMLRTController * Controller1;
 extern UMLRTCommsPort borderports_Top_part3[];
 extern UMLRTCommsPort borderports_Top_part1[];
-extern UMLRTController Controller2;
-extern UMLRTController Controller3;
-extern UMLRTController Controller4;
+extern UMLRTController * Controller2;
+extern UMLRTController * Controller3;
+extern UMLRTController * Controller4;
 extern UMLRTCommsPort borderports_Top_part4[];
 extern UMLRTCommsPort borderports_Top_part2[];
 extern UMLRTSlot Top_slots[];
diff --git a/plugins/umlrt/runtime/tests/rts-ring/MessageProtocol.cc b/plugins/umlrt/runtime/tests/rts-ring/MessageProtocol.cc
index fa8d41d..9b91427 100644
--- a/plugins/umlrt/runtime/tests/rts-ring/MessageProtocol.cc
+++ b/plugins/umlrt/runtime/tests/rts-ring/MessageProtocol.cc
@@ -14,7 +14,7 @@
 UMLRTOutSignal MessageProtocol::Base::msg( const Token & param ) const
 {
     UMLRTOutSignal signal;
-    signal.initialize( "signal_msg", signal_msg, srcPort, UMLRTType_Token, &param);
+    signal.initialize( "signal_msg", signal_msg, srcPort, &UMLRTType_Token, &param);
     return signal;
 }
 
@@ -26,7 +26,7 @@
 UMLRTOutSignal MessageProtocol::Conj::msg( const Token & param ) const
 {
     UMLRTOutSignal signal;
-    signal.initialize( "signal_msg", signal_msg, srcPort, UMLRTType_Token, &param);
+    signal.initialize( "signal_msg", signal_msg, srcPort, &UMLRTType_Token, &param);
     return signal;
 }
 
diff --git a/plugins/umlrt/runtime/tests/rts-ring/Token.cc b/plugins/umlrt/runtime/tests/rts-ring/Token.cc
index e5bdfd3..0428645 100644
--- a/plugins/umlrt/runtime/tests/rts-ring/Token.cc
+++ b/plugins/umlrt/runtime/tests/rts-ring/Token.cc
@@ -18,21 +18,21 @@
 {
     {
         "data",
-        UMLRTType_uint,
+        &UMLRTType_uint,
         offsetof( Token, data ),
         1,
         0
     },
     {
         "label",
-        UMLRTType_uint,
+        &UMLRTType_uint,
         offsetof( Token, label ),
         1,
         0
     }
 };
 
-static const UMLRTObject_class desc = 
+const UMLRTObject_class UMLRTType_Token =
 {
     UMLRTObjectInitialize<Token>,
     UMLRTObjectCopy<Token>,
@@ -47,5 +47,3 @@
     UMLRTOBJECTCLASS_DEFAULT_BACKWARDS,
 };
 
-const UMLRTObject_class * const UMLRTType_Token = &desc;
-
diff --git a/plugins/umlrt/runtime/tests/rts-ring/Token.hh b/plugins/umlrt/runtime/tests/rts-ring/Token.hh
index b2fdc89..e85aa46 100644
--- a/plugins/umlrt/runtime/tests/rts-ring/Token.hh
+++ b/plugins/umlrt/runtime/tests/rts-ring/Token.hh
@@ -12,7 +12,7 @@
     static unsigned int Label;
     void write( char id );
 };
-extern const UMLRTObject_class * const UMLRTType_Token;
+extern const UMLRTObject_class UMLRTType_Token;
 
 #endif
 
diff --git a/plugins/umlrt/runtime/tests/rts-ring/main.cc b/plugins/umlrt/runtime/tests/rts-ring/main.cc
index 0f20da3..7e55a00 100644
--- a/plugins/umlrt/runtime/tests/rts-ring/main.cc
+++ b/plugins/umlrt/runtime/tests/rts-ring/main.cc
@@ -1,3 +1,4 @@
+#include "umlrtcontroller.hh"
 #include "umlrtmain.hh"
 #include "umlrtmessagepool.hh"
 #include "umlrtsignalelementpool.hh"
@@ -36,19 +37,19 @@
     if( UMLRTMain::targetStartup() )
     {
         // Spawn the controllers
-        Controller4.spawn();
-        Controller3.spawn();
-        Controller2.spawn();
-        Controller1.spawn();
+        Controller4->spawn();
+        Controller3->spawn();
+        Controller2->spawn();
+        Controller1->spawn();
 
         bool main_ok = UMLRTMain::mainLoop();
         if( main_ok )
         {
             // Wait for completion.
-            Controller4.join();
-            Controller3.join();
-            Controller2.join();
-            Controller1.join();
+            Controller4->join();
+            Controller3->join();
+            Controller2->join();
+            Controller1->join();
         }
         return UMLRTMain::targetShutdown( main_ok );
     }