Bug 571656 - [Robotics, ROS2] Generated push callbacks don't compile when the communication object name matches a primitive type
- Change parameter to "commobj" in generator
- Update models as necessary (change has impact on existing functions)
- Update expected test code
Change-Id: I7b041c814f3f5df50813a36d8b5c4eeee7b8beec
Signed-off-by: Ansgar Radermacher <ansgar.radermacher@cea.fr>
diff --git a/plugins/customization/org.eclipse.papyrus.robotics.properties/src/org/eclipse/papyrus/robotics/properties/widgets/ReferenceWoAddDialog.java b/plugins/customization/org.eclipse.papyrus.robotics.properties/src/org/eclipse/papyrus/robotics/properties/widgets/ReferenceWoAddDialog.java
index a74e5fc..addc6fd 100644
--- a/plugins/customization/org.eclipse.papyrus.robotics.properties/src/org/eclipse/papyrus/robotics/properties/widgets/ReferenceWoAddDialog.java
+++ b/plugins/customization/org.eclipse.papyrus.robotics.properties/src/org/eclipse/papyrus/robotics/properties/widgets/ReferenceWoAddDialog.java
@@ -19,6 +19,9 @@
import org.eclipse.papyrus.robotics.core.provider.RoboticsLabelProvider;
import org.eclipse.swt.widgets.Composite;
+/**
+ * A variant of the reference dialog that does not "addition"
+ */
public class ReferenceWoAddDialog extends ReferenceDialog {
public ReferenceWoAddDialog(Composite parent, int style) {
diff --git a/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe/models/components/subscriber.compdef.notation b/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe/models/components/subscriber.compdef.notation
index 34566e4..e8d7903 100644
--- a/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe/models/components/subscriber.compdef.notation
+++ b/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe/models/components/subscriber.compdef.notation
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_TcGqsNAREemsvtLt7dgtCQ" type="CompositeStructure" name="Subscriber diagram" measurementUnit="Pixel">
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_TcGqsNAREemsvtLt7dgtCQ" type="CompositeStructure" name="Subscriber diagram" measurementUnit="Pixel">
<children xmi:type="notation:Shape" xmi:id="_dtVp8NAREemsvtLt7dgtCQ" type="Class_Shape">
<children xmi:type="notation:DecorationNode" xmi:id="_dtWRANAREemsvtLt7dgtCQ" type="Class_NameLabel"/>
<children xmi:type="notation:DecorationNode" xmi:id="_dtWRAdAREemsvtLt7dgtCQ" type="Class_FloatingNameLabel">
@@ -622,6 +622,38 @@
<element xsi:nil="true"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_PEH5IqguEeqREZyOpEdqSw" x="100" y="100"/>
</children>
+ <children xmi:type="notation:Shape" xmi:id="_1eLikH25Eeu4U6Ogm9zEWQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_1eLikX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_1eLik325Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="subscriber.compdef.uml#_kiyUIEiHEeiAtInRNnLmIQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1eLikn25Eeu4U6Ogm9zEWQ" x="494" y="40"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_1eV6oH25Eeu4U6Ogm9zEWQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_1eV6oX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_1eV6o325Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="subscriber.compdef.uml#_DNyKEHX0EeirHb2XH36K_A"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1eV6on25Eeu4U6Ogm9zEWQ" x="314" y="140"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_1elyQH25Eeu4U6Ogm9zEWQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_1elyQX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_1emZUH25Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Port" href="subscriber.compdef.uml#_FKrUkHX0EeirHb2XH36K_A"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1elyQn25Eeu4U6Ogm9zEWQ" x="190" y="30"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_1ez0sH25Eeu4U6Ogm9zEWQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_1ez0sX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_1ez0s325Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Connector" href="subscriber.compdef.uml#_JvmVMAbwEeq69tbfZET3mw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1ez0sn25Eeu4U6Ogm9zEWQ" x="100" y="100"/>
+ </children>
<styles xmi:type="notation:TitleStyle" xmi:id="_dtWRBNAREemsvtLt7dgtCQ"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_dtWRBdAREemsvtLt7dgtCQ"/>
</children>
@@ -1033,6 +1065,22 @@
<element xsi:nil="true"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_PERqIqguEeqREZyOpEdqSw" x="190" y="210"/>
</children>
+ <children xmi:type="notation:Shape" xmi:id="_1eBxnH25Eeu4U6Ogm9zEWQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_1eBxnX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_1eCYoH25Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="subscriber.compdef.uml#_-9MoUEiFEeiAtInRNnLmIQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1eBxnn25Eeu4U6Ogm9zEWQ" x="260" y="60"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_1hJXAH25Eeu4U6Ogm9zEWQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_1hJXAX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_1hJXA325Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Port" href="subscriber.compdef.uml#_ED_GgEiHEeiAtInRNnLmIQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1hJXAn25Eeu4U6Ogm9zEWQ" x="190" y="210"/>
+ </children>
<styles xmi:type="notation:StringValueStyle" xmi:id="_TcGqsdAREemsvtLt7dgtCQ" name="diagram_compatibility_version" stringValue="1.4.0"/>
<styles xmi:type="notation:DiagramStyle" xmi:id="_TcGqstAREemsvtLt7dgtCQ"/>
<styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_TcGqs9AREemsvtLt7dgtCQ" diagramKindId="org.eclipse.papyrus.robotics.diagram.component">
@@ -1954,4 +2002,64 @@
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PERqJ6guEeqREZyOpEdqSw"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PERqKKguEeqREZyOpEdqSw"/>
</edges>
+ <edges xmi:type="notation:Connector" xmi:id="_1eCYoX25Eeu4U6Ogm9zEWQ" type="StereotypeCommentLink" source="_dtVp8NAREemsvtLt7dgtCQ" target="_1eBxnH25Eeu4U6Ogm9zEWQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_1eCYon25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_1eCYpn25Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="subscriber.compdef.uml#_-9MoUEiFEeiAtInRNnLmIQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_1eCYo325Eeu4U6Ogm9zEWQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1eCYpH25Eeu4U6Ogm9zEWQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1eCYpX25Eeu4U6Ogm9zEWQ"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_1eLilH25Eeu4U6Ogm9zEWQ" type="StereotypeCommentLink" source="_NgzeIPWmEemhCpo2nwBldA" target="_1eLikH25Eeu4U6Ogm9zEWQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_1eLilX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_1eMJon25Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="subscriber.compdef.uml#_kiyUIEiHEeiAtInRNnLmIQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_1eLiln25Eeu4U6Ogm9zEWQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1eMJoH25Eeu4U6Ogm9zEWQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1eMJoX25Eeu4U6Ogm9zEWQ"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_1eV6pH25Eeu4U6Ogm9zEWQ" type="StereotypeCommentLink" source="_T7IdQPWmEemhCpo2nwBldA" target="_1eV6oH25Eeu4U6Ogm9zEWQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_1eV6pX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_1eV6qX25Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="subscriber.compdef.uml#_DNyKEHX0EeirHb2XH36K_A"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_1eV6pn25Eeu4U6Ogm9zEWQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1eV6p325Eeu4U6Ogm9zEWQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1eV6qH25Eeu4U6Ogm9zEWQ"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_1emZUX25Eeu4U6Ogm9zEWQ" type="StereotypeCommentLink" source="_YI6sUPWmEemhCpo2nwBldA" target="_1elyQH25Eeu4U6Ogm9zEWQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_1emZUn25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_1emZVn25Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Port" href="subscriber.compdef.uml#_FKrUkHX0EeirHb2XH36K_A"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_1emZU325Eeu4U6Ogm9zEWQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1emZVH25Eeu4U6Ogm9zEWQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1emZVX25Eeu4U6Ogm9zEWQ"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_1ez0tH25Eeu4U6Ogm9zEWQ" type="StereotypeCommentLink" source="_JyLIEAbwEeq69tbfZET3mw" target="_1ez0sH25Eeu4U6Ogm9zEWQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_1ez0tX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_1ez0uX25Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Connector" href="subscriber.compdef.uml#_JvmVMAbwEeq69tbfZET3mw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_1ez0tn25Eeu4U6Ogm9zEWQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1ez0t325Eeu4U6Ogm9zEWQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1ez0uH25Eeu4U6Ogm9zEWQ"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_1hJXBH25Eeu4U6Ogm9zEWQ" type="StereotypeCommentLink" source="_gyMiENAREemsvtLt7dgtCQ" target="_1hJXAH25Eeu4U6Ogm9zEWQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_1hJXBX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_1hJXCX25Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Port" href="subscriber.compdef.uml#_ED_GgEiHEeiAtInRNnLmIQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_1hJXBn25Eeu4U6Ogm9zEWQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1hJXB325Eeu4U6Ogm9zEWQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1hJXCH25Eeu4U6Ogm9zEWQ"/>
+ </edges>
</notation:Diagram>
diff --git a/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe/models/components/subscriber.compdef.uml b/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe/models/components/subscriber.compdef.uml
index e02ffa3..060669e 100644
--- a/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe/models/components/subscriber.compdef.uml
+++ b/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe/models/components/subscriber.compdef.uml
@@ -37,9 +37,9 @@
<packagedElement xmi:type="uml:OpaqueBehavior" xmi:id="_4IFoAHXzEeirHb2XH36K_A" name="fListening" isAbstract="true">
<language>C++</language>
<body>cout << "got map data" << endl;
-cout << "width: " << map->ogm.width << endl;
-cout << "height: " << map->ogm.height << endl;
-cout << "resolution: " << map->ogm.resolution << endl;
+cout << "width: " << commobj->ogm.width << endl;
+cout << "height: " << commobj->ogm.height << endl;
+cout << "resolution: " << commobj->ogm.resolution << endl;
</body>
</packagedElement>
<packagedElement xmi:type="uml:Usage" xmi:id="_u0V00PV5EemIj9SnfMX-0g" client="_bqR30EiGEeiAtInRNnLmIQ">
diff --git a/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe_extcode/src/subscriberCompdef/Subscriber_impl.cpp b/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe_extcode/src/subscriberCompdef/Subscriber_impl.cpp
index df334a3..d0b59d8 100644
--- a/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe_extcode/src/subscriberCompdef/Subscriber_impl.cpp
+++ b/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe_extcode/src/subscriberCompdef/Subscriber_impl.cpp
@@ -33,11 +33,11 @@
*
* @param map
*/
-void Subscriber_impl::fListening(const simple_msgs::msg::Map::SharedPtr /*in*/map) {
+void Subscriber_impl::fListening(const simple_msgs::msg::Map::SharedPtr /*in*/commobj) {
cout << "got map data" << endl;
- cout << "width: " << map->ogm.width << endl;
- cout << "height: " << map->ogm.height << endl;
- cout << "resolution: " << map->ogm.resolution << endl;
+ cout << "width: " << commobj->ogm.width << endl;
+ cout << "height: " << commobj->ogm.height << endl;
+ cout << "resolution: " << commobj->ogm.resolution << endl;
}
} // of namespace subscriberCompdef
diff --git a/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe_extcode/src/subscriberCompdef/Subscriber_impl.h b/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe_extcode/src/subscriberCompdef/Subscriber_impl.h
index 7d3040e..d12d67b 100644
--- a/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe_extcode/src/subscriberCompdef/Subscriber_impl.h
+++ b/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/publishSubscribe_extcode/src/subscriberCompdef/Subscriber_impl.h
@@ -42,7 +42,7 @@
*
* @param map
*/
- void fListening(const simple_msgs::msg::Map::SharedPtr /*in*/map);
+ void fListening(const simple_msgs::msg::Map::SharedPtr /*in*/commobj);
};
/************************************************************/
diff --git a/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/sendReceive/models/components/sendServer.compdef.notation b/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/sendReceive/models/components/sendServer.compdef.notation
index be12151..2002474 100644
--- a/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/sendReceive/models/components/sendServer.compdef.notation
+++ b/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/sendReceive/models/components/sendServer.compdef.notation
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mUFLYNATEemsvtLt7dgtCQ" type="CompositeStructure" name="SendServer diagram" measurementUnit="Pixel">
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mUFLYNATEemsvtLt7dgtCQ" type="CompositeStructure" name="SendServer diagram" measurementUnit="Pixel">
<children xmi:type="notation:Shape" xmi:id="_q5X7gNATEemsvtLt7dgtCQ" type="Class_Shape">
<children xmi:type="notation:DecorationNode" xmi:id="_q5X7gtATEemsvtLt7dgtCQ" type="Class_NameLabel"/>
<children xmi:type="notation:DecorationNode" xmi:id="_q5X7g9ATEemsvtLt7dgtCQ" type="Class_FloatingNameLabel">
@@ -785,6 +785,38 @@
<element xsi:nil="true"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_K8tcxRnNEeu8ps5-obE9qA" x="457" y="37"/>
</children>
+ <children xmi:type="notation:Shape" xmi:id="_-4EqIH25Eeu4U6Ogm9zEWQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-4EqIX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-4EqI325Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="sendServer.compdef.uml#_kdCx0Hq2EeikT4nAmbXssQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-4EqIn25Eeu4U6Ogm9zEWQ" x="297" y="17"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_-4NNAH25Eeu4U6Ogm9zEWQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-4NNAX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-4NNA325Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Port" href="sendServer.compdef.uml#_m-pL4Hq2EeikT4nAmbXssQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-4NNAn25Eeu4U6Ogm9zEWQ" x="190" y="10"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_-4UhwH25Eeu4U6Ogm9zEWQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-4UhwX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-4Uhw325Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Connector" href="sendServer.compdef.uml#_-ifjkAbvEeq69tbfZET3mw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-4Uhwn25Eeu4U6Ogm9zEWQ" x="100" y="100"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_-4cdkH25Eeu4U6Ogm9zEWQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-4cdkX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-4cdk325Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="sendServer.compdef.uml#_M63DAPWnEemhCpo2nwBldA"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-4cdkn25Eeu4U6Ogm9zEWQ" x="457" y="37"/>
+ </children>
<styles xmi:type="notation:TitleStyle" xmi:id="_q5X7htATEemsvtLt7dgtCQ"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_q5X7h9ATEemsvtLt7dgtCQ"/>
</children>
@@ -1264,6 +1296,22 @@
<element xsi:nil="true"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_K8y8QhnNEeu8ps5-obE9qA" x="190" y="66"/>
</children>
+ <children xmi:type="notation:Shape" xmi:id="_-3_Kmn25Eeu4U6Ogm9zEWQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-3_Km325Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-3_KnX25Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="sendServer.compdef.uml#_3m3NQHq0EeikT4nAmbXssQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-3_KnH25Eeu4U6Ogm9zEWQ" x="280" y="63"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_-4m1oH25Eeu4U6Ogm9zEWQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-4m1oX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-4m1o325Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Port" href="sendServer.compdef.uml#_4jVckHq0EeikT4nAmbXssQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-4m1on25Eeu4U6Ogm9zEWQ" x="190" y="66"/>
+ </children>
<styles xmi:type="notation:StringValueStyle" xmi:id="_mUFLYdATEemsvtLt7dgtCQ" name="diagram_compatibility_version" stringValue="1.4.0"/>
<styles xmi:type="notation:DiagramStyle" xmi:id="_mUFLYtATEemsvtLt7dgtCQ"/>
<styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_mUFLY9ATEemsvtLt7dgtCQ" diagramKindId="org.eclipse.papyrus.robotics.diagram.component">
@@ -2792,4 +2840,64 @@
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_K8y8RxnNEeu8ps5-obE9qA"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_K8y8SBnNEeu8ps5-obE9qA"/>
</edges>
+ <edges xmi:type="notation:Connector" xmi:id="_-3_Knn25Eeu4U6Ogm9zEWQ" type="StereotypeCommentLink" source="_q5X7gNATEemsvtLt7dgtCQ" target="_-3_Kmn25Eeu4U6Ogm9zEWQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_-3_Kn325Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-3_Ko325Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="sendServer.compdef.uml#_3m3NQHq0EeikT4nAmbXssQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_-3_KoH25Eeu4U6Ogm9zEWQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-3_KoX25Eeu4U6Ogm9zEWQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-3_Kon25Eeu4U6Ogm9zEWQ"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_-4EqJH25Eeu4U6Ogm9zEWQ" type="StereotypeCommentLink" source="_-7lrwPWmEemhCpo2nwBldA" target="_-4EqIH25Eeu4U6Ogm9zEWQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_-4EqJX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-4EqKX25Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="sendServer.compdef.uml#_kdCx0Hq2EeikT4nAmbXssQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_-4EqJn25Eeu4U6Ogm9zEWQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-4EqJ325Eeu4U6Ogm9zEWQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-4EqKH25Eeu4U6Ogm9zEWQ"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_-4NNBH25Eeu4U6Ogm9zEWQ" type="StereotypeCommentLink" source="_DK8BEPWnEemhCpo2nwBldA" target="_-4NNAH25Eeu4U6Ogm9zEWQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_-4NNBX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-4NNCX25Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Port" href="sendServer.compdef.uml#_m-pL4Hq2EeikT4nAmbXssQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_-4NNBn25Eeu4U6Ogm9zEWQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-4NNB325Eeu4U6Ogm9zEWQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-4NNCH25Eeu4U6Ogm9zEWQ"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_-4UhxH25Eeu4U6Ogm9zEWQ" type="StereotypeCommentLink" source="_-j540AbvEeq69tbfZET3mw" target="_-4UhwH25Eeu4U6Ogm9zEWQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_-4UhxX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-4UhyX25Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Connector" href="sendServer.compdef.uml#_-ifjkAbvEeq69tbfZET3mw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_-4Uhxn25Eeu4U6Ogm9zEWQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-4Uhx325Eeu4U6Ogm9zEWQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-4UhyH25Eeu4U6Ogm9zEWQ"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_-4cdlH25Eeu4U6Ogm9zEWQ" type="StereotypeCommentLink" source="_M88GoPWnEemhCpo2nwBldA" target="_-4cdkH25Eeu4U6Ogm9zEWQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_-4cdlX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-4cdmX25Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="sendServer.compdef.uml#_M63DAPWnEemhCpo2nwBldA"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_-4cdln25Eeu4U6Ogm9zEWQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-4cdl325Eeu4U6Ogm9zEWQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-4cdmH25Eeu4U6Ogm9zEWQ"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_-4m1pH25Eeu4U6Ogm9zEWQ" type="StereotypeCommentLink" source="_s0ar4NATEemsvtLt7dgtCQ" target="_-4m1oH25Eeu4U6Ogm9zEWQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_-4m1pX25Eeu4U6Ogm9zEWQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-4m1qX25Eeu4U6Ogm9zEWQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Port" href="sendServer.compdef.uml#_4jVckHq0EeikT4nAmbXssQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_-4m1pn25Eeu4U6Ogm9zEWQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-4m1p325Eeu4U6Ogm9zEWQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-4m1qH25Eeu4U6Ogm9zEWQ"/>
+ </edges>
</notation:Diagram>
diff --git a/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/sendReceive/models/components/sendServer.compdef.uml b/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/sendReceive/models/components/sendServer.compdef.uml
index 68c17cc..c4bea31 100644
--- a/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/sendReceive/models/components/sendServer.compdef.uml
+++ b/plugins/examples/org.eclipse.papyrus.robotics.ros2.examples/testmodels/sendReceive/models/components/sendServer.compdef.uml
@@ -45,10 +45,10 @@
</packagedElement>
<packagedElement xmi:type="uml:OpaqueBehavior" xmi:id="_1qacwHq2EeikT4nAmbXssQ" name="fReceive" isAbstract="true">
<language>C++</language>
- <body>// the parameter is called as the communication object - "map"
+ <body>// the parameter is called "commobj"
RCLCPP_INFO(get_logger(), "got map data");
RCLCPP_INFO(get_logger(), "width: %d, height: %d', resolution: %0.2f",
- map->ogm.width, map->ogm.height, map->ogm.resolution);</body>
+ commobj->ogm.width, commobj->ogm.height, commobj->ogm.resolution);</body>
</packagedElement>
<profileApplication xmi:type="uml:ProfileApplication" xmi:id="_6voUYEfEEeiwO_ETU0BG9A">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6vqJkEfEEeiwO_ETU0BG9A" source="http://www.eclipse.org/uml2/2.0.0/UML">
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe/src-gen/subscriberCompdef/Subscriber.cpp b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe/src-gen/subscriberCompdef/Subscriber.cpp
index b4a7b9c..3b6ac17 100644
--- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe/src-gen/subscriberCompdef/Subscriber.cpp
+++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe/src-gen/subscriberCompdef/Subscriber.cpp
@@ -34,13 +34,13 @@
/**
*
- * @param map
+ * @param commobj
*/
-void Subscriber::fListening(const simple_msgs::msg::Map::SharedPtr /*in*/map) {
+void Subscriber::fListening(const simple_msgs::msg::Map::SharedPtr /*in*/commobj) {
cout << "got map data" << endl;
- cout << "width: " << map->ogm.width << endl;
- cout << "height: " << map->ogm.height << endl;
- cout << "resolution: " << map->ogm.resolution << endl;
+ cout << "width: " << commobj->ogm.width << endl;
+ cout << "height: " << commobj->ogm.height << endl;
+ cout << "resolution: " << commobj->ogm.resolution << endl;
}
/**
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe/src-gen/subscriberCompdef/Subscriber.h b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe/src-gen/subscriberCompdef/Subscriber.h
index be0e0f9..e186550 100644
--- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe/src-gen/subscriberCompdef/Subscriber.h
+++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe/src-gen/subscriberCompdef/Subscriber.h
@@ -54,9 +54,9 @@
/**
*
- * @param map
+ * @param commobj
*/
- void fListening(const simple_msgs::msg::Map::SharedPtr /*in*/map);
+ void fListening(const simple_msgs::msg::Map::SharedPtr /*in*/commobj);
/**
*
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe_extcode/src-skel/subscriberCompdef/Subscriber_impl.cpp b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe_extcode/src-skel/subscriberCompdef/Subscriber_impl.cpp
index e19070b..c1f2bcb 100644
--- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe_extcode/src-skel/subscriberCompdef/Subscriber_impl.cpp
+++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe_extcode/src-skel/subscriberCompdef/Subscriber_impl.cpp
@@ -36,10 +36,10 @@
/**
*
- * @param map
+ * @param commobj
*/
void Subscriber_impl::fListening(
- const simple_msgs::msg::Map::SharedPtr /*in*/map) {
+ const simple_msgs::msg::Map::SharedPtr /*in*/commobj) {
}
} // of namespace subscriberCompdef
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe_extcode/src-skel/subscriberCompdef/Subscriber_impl.h b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe_extcode/src-skel/subscriberCompdef/Subscriber_impl.h
index 970420b..382e920 100644
--- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe_extcode/src-skel/subscriberCompdef/Subscriber_impl.h
+++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/publishSubscribe_extcode/src-skel/subscriberCompdef/Subscriber_impl.h
@@ -48,9 +48,9 @@
/**
*
- * @param map
+ * @param commobj
*/
- void fListening(const simple_msgs::msg::Map::SharedPtr /*in*/map);
+ void fListening(const simple_msgs::msg::Map::SharedPtr /*in*/commobj);
};
/************************************************************/
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/sendReceive/src-gen/sendReceive/SendServer.cpp b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/sendReceive/src-gen/sendReceive/SendServer.cpp
index b5e4355..3be9eeb 100644
--- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/sendReceive/src-gen/sendReceive/SendServer.cpp
+++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/sendReceive/src-gen/sendReceive/SendServer.cpp
@@ -39,13 +39,13 @@
/**
*
- * @param map
+ * @param commobj
*/
-void SendServer::fReceive(const simple_msgs::msg::Map::SharedPtr /*in*/map) {
- // the parameter is called as the communication object - "map"
+void SendServer::fReceive(const simple_msgs::msg::Map::SharedPtr /*in*/commobj) {
+ // the parameter is called "commobj"
RCLCPP_INFO(get_logger(), "got map data");
RCLCPP_INFO(get_logger(), "width: %d, height: %d', resolution: %0.2f",
- map->ogm.width, map->ogm.height, map->ogm.resolution);
+ commobj->ogm.width, commobj->ogm.height, commobj->ogm.resolution);
}
/**
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/sendReceive/src-gen/sendReceive/SendServer.h b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/sendReceive/src-gen/sendReceive/SendServer.h
index b9a16a5..88d956d 100644
--- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/sendReceive/src-gen/sendReceive/SendServer.h
+++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen.tests/expectedResult/sendReceive/src-gen/sendReceive/SendServer.h
@@ -54,9 +54,9 @@
/**
*
- * @param map
+ * @param commobj
*/
- void fReceive(const simple_msgs::msg::Map::SharedPtr /*in*/map);
+ void fReceive(const simple_msgs::msg::Map::SharedPtr /*in*/commobj);
/**
*
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen/src/org/eclipse/papyrus/robotics/ros2/codegen/component/Callbacks.xtend b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen/src/org/eclipse/papyrus/robotics/ros2/codegen/component/Callbacks.xtend
index 0fd6619..6292372 100644
--- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen/src/org/eclipse/papyrus/robotics/ros2/codegen/component/Callbacks.xtend
+++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.codegen/src/org/eclipse/papyrus/robotics/ros2/codegen/component/Callbacks.xtend
@@ -63,7 +63,7 @@
val fctCopy = component.getOwnedBehavior(fct.name)
if (fctCopy.specification !== null) {
// use commObject name as parameter
- val param = fctCopy.specification.createOwnedParameter(port.commObject.name.toLowerCase, port.commObject)
+ val param = fctCopy.specification.createOwnedParameter("commobj", port.commObject)
param.useSharedPtr
param.apply(Const)
return '''