From 2a17457fd066f570aa68b04f9b74cfb9947e833a Mon Sep 17 00:00:00 2001
From: Minh Hiep Pham <minh.pham@telecom-paristech.fr>
Date: Thu, 28 Mar 2019 11:40:37 +0100
Subject: [PATCH] Updated model for test and created class AttachPortTest

---
 ttool/src/test/java/ui/AttachPortTest.java    | 118 +++
 .../ui/tmlcompd/input/TestPortName.xml        | 703 +++++++++++-------
 2 files changed, 562 insertions(+), 259 deletions(-)
 create mode 100644 ttool/src/test/java/ui/AttachPortTest.java

diff --git a/ttool/src/test/java/ui/AttachPortTest.java b/ttool/src/test/java/ui/AttachPortTest.java
new file mode 100644
index 0000000000..14c428924a
--- /dev/null
+++ b/ttool/src/test/java/ui/AttachPortTest.java
@@ -0,0 +1,118 @@
+package ui;
+
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import ui.tmlcompd.TMLCPrimitiveComponent;
+import ui.tmlcompd.TMLCPrimitivePort;
+import ui.tmlcompd.TMLComponentTaskDiagramPanel;
+
+import java.io.File;
+
+import static org.junit.Assert.*;
+
+public class AttachPortTest extends AbstractUITest{
+
+    static TDiagramPanel diagramPanel;
+    static TMLCPrimitiveComponent primitiveComp1;
+    static TMLCPrimitiveComponent primitiveComp3;
+    static TMLCPrimitiveComponent primitiveCompNullFather;
+    static TMLCPrimitivePort primitivePort1;
+    static TMLCPrimitivePort primitivePort2;
+    static TMLCPrimitivePort primitivePort3;
+    static TMLCPrimitivePort primitivePort4;
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {
+        RESOURCES_DIR = getBaseResourcesDir() + "/ui/tmlcompd/input/TestPortName.xml";
+    }
+
+    public AttachPortTest() {
+        super();
+        mainGUI.openProjectFromFile(new File(RESOURCES_DIR));
+    }
+
+
+    @Before
+    public void setUp() throws Exception {
+        diagramPanel = null;
+        for(TURTLEPanel _tab : mainGUI.getTabs()) {
+            if(_tab instanceof TMLComponentDesignPanel) {
+                for (TDiagramPanel tdp : _tab.getPanels()) {
+                    if (tdp instanceof TMLComponentTaskDiagramPanel) {
+                        diagramPanel = tdp;
+                        mainGUI.selectTab(tdp);
+                        break;
+                    }
+                }
+                break;
+            }
+        }
+
+        if(diagramPanel != null) {
+            for (TGComponent tgc : diagramPanel.getAllComponentList()) {
+                if (tgc.getValue().equals("PrimitiveComp1")) {
+                    primitiveComp1 = (TMLCPrimitiveComponent)tgc;
+                }
+
+                if (tgc.getValue().equals("PrimitiveComp3")) {
+                    primitiveComp3 = (TMLCPrimitiveComponent)tgc;
+                }
+
+                if (tgc.getValue().equals("PrimitiveCompNullFather")) {
+                    primitiveCompNullFather = (TMLCPrimitiveComponent)tgc;
+                }
+
+                if ((tgc instanceof TMLCPrimitivePort) && ((TMLCPrimitivePort)tgc).getPortName().equals("primitivePort1")) {
+                    primitivePort1 = (TMLCPrimitivePort) tgc;
+                }
+
+                if ((tgc instanceof TMLCPrimitivePort) && ((TMLCPrimitivePort)tgc).getPortName().equals("primitivePort2")) {
+                    primitivePort2 = (TMLCPrimitivePort) tgc;
+                }
+
+                if ((tgc instanceof TMLCPrimitivePort) && ((TMLCPrimitivePort)tgc).getPortName().equals("primitivePort3")) {
+                    primitivePort3 = (TMLCPrimitivePort) tgc;
+                }
+
+                if ((tgc instanceof TMLCPrimitivePort) && ((TMLCPrimitivePort)tgc).getPortName().equals("primitivePort4")) {
+                    primitivePort4 = (TMLCPrimitivePort) tgc;
+                }
+            }
+        }
+    }
+
+    @Test
+    public void NonAttachThenAttachTest(){
+        //Test for cases : Non-attach --> Attach
+        //Test before attaching
+        assertTrue(primitivePort1.getFather() == null);
+        assertTrue(primitivePort2.getFather() == null);
+        assertTrue(primitivePort3.getFather() == null);
+
+        diagramPanel.attach(primitivePort1);
+        diagramPanel.attach(primitivePort2);
+        diagramPanel.attach(primitivePort3);
+
+        //Test after attaching
+        assertTrue(primitivePort1.getFather() == primitiveCompNullFather);
+        assertTrue(primitivePort2.getFather() == primitiveComp1);
+        assertTrue(primitivePort3.getFather() == primitiveComp3);
+    }
+
+    @Test
+    public void DetachThenReAttachTest(){
+        //Tes for case : Attach --> Detach --> Re-attach
+        //test before detaching
+        assertTrue(primitivePort4.getFather() == primitiveComp3);
+
+        diagramPanel.detach(primitivePort4);
+        //test after detaching
+        assertTrue(primitivePort4.getFather() == null);
+
+        //test after attaching
+        diagramPanel.attach(primitivePort4);
+        assertTrue(primitivePort4.getFather() == primitiveComp3);
+    }
+
+}
\ No newline at end of file
diff --git a/ttool/src/test/resources/ui/tmlcompd/input/TestPortName.xml b/ttool/src/test/resources/ui/tmlcompd/input/TestPortName.xml
index cb637a74e2..eddec3397e 100644
--- a/ttool/src/test/resources/ui/tmlcompd/input/TestPortName.xml
+++ b/ttool/src/test/resources/ui/tmlcompd/input/TestPortName.xml
@@ -2,103 +2,228 @@
 
 <TURTLEGMODELING version="1.0beta">
 
-<Modeling type="TML Component Design" nameTab="DIPLODOCUS_C_Design" >
+<Modeling type="TML Component Design" nameTab="DIPLODOCUS_C_Design" tabs="TML Component Task Diagram$PrimitiveComp2$PrimitiveComp1$PrimitiveComp3$PrimitiveCompNullFather" >
 <TMLComponentTaskDiagramPanel name="TML Component Task Diagram" minX="10" maxX="2500" minY="10" maxY="1500" channels="true" events="true" requests="true" zoom="1.0" >
 <CONNECTOR type="126" id="1" >
 <cdparam x="535" y="658" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="Connector between ports" />
-<P1  x="535" y="557" id="38" />
-<P2  x="708" y="557" id="17" />
+<P1  x="583" y="528" id="40" />
+<P2  x="753" y="528" id="61" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
 <CONNECTOR type="126" id="2" >
 <cdparam x="535" y="593" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="Connector between ports" />
-<P1  x="535" y="492" id="36" />
-<P2  x="708" y="492" id="15" />
+<P1  x="583" y="463" id="42" />
+<P2  x="753" y="463" id="63" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
 <CONNECTOR type="126" id="3" >
 <cdparam x="535" y="526" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="Connector between ports" />
-<P1  x="535" y="414" id="34" />
-<P2  x="708" y="413" id="13" />
+<P1  x="583" y="385" id="44" />
+<P2  x="753" y="384" id="65" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
 <CONNECTOR type="126" id="4" >
 <cdparam x="449" y="468" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="Connector between ports" />
-<P1  x="535" y="356" id="32" />
-<P2  x="708" y="356" id="11" />
+<P1  x="583" y="327" id="46" />
+<P2  x="753" y="327" id="67" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
 <CONNECTOR type="126" id="5" >
 <cdparam x="878" y="469" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="Connector between ports" />
-<P1  x="535" y="317" id="30" />
-<P2  x="708" y="317" id="9" />
+<P1  x="583" y="288" id="48" />
+<P2  x="753" y="288" id="69" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
 <CONNECTOR type="126" id="6" >
 <cdparam x="1021" y="460" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="Connector between ports" />
-<P1  x="708" y="268" id="7" />
-<P2  x="535" y="268" id="28" />
+<P1  x="753" y="239" id="71" />
+<P2  x="583" y="239" id="50" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
-<COMPONENT type="1200" id="63" >
-<cdparam x="294" y="149" />
+<COMPONENT type="1203" id="8" >
+<cdparam x="1202" y="737" />
+<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="Primitive port" value="Channel primitivePort1" />
+<TGConnectingPoint num="0" id="7" />
+<extraparam>
+<Prop commName="primitivePort1" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+</extraparam>
+</COMPONENT>
+
+<COMPONENT type="1203" id="10" >
+<cdparam x="440" y="404" />
+<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="Primitive port" value="Channel primitivePort2" />
+<TGConnectingPoint num="0" id="9" />
+<extraparam>
+<Prop commName="primitivePort2" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+</extraparam>
+</COMPONENT>
+
+<COMPONENT type="1203" id="12" >
+<cdparam x="656" y="712" />
+<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="Primitive port" value="Channel primitivePort3" />
+<TGConnectingPoint num="0" id="11" />
+<extraparam>
+<Prop commName="primitivePort3" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+</extraparam>
+</COMPONENT>
+
+<COMPONENT type="1202" id="21" >
+<cdparam x="1050" y="653" />
+<sizeparam width="326" height="181" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="Primitive component" value="PrimitiveCompNullFather" />
+<TGConnectingPoint num="0" id="13" />
+<TGConnectingPoint num="1" id="14" />
+<TGConnectingPoint num="2" id="15" />
+<TGConnectingPoint num="3" id="16" />
+<TGConnectingPoint num="4" id="17" />
+<TGConnectingPoint num="5" id="18" />
+<TGConnectingPoint num="6" id="19" />
+<TGConnectingPoint num="7" id="20" />
+<extraparam>
+<Data isAttacker="No" Operation="" />
+</extraparam>
+</COMPONENT>
+
+<COMPONENT type="1200" id="90" >
+<cdparam x="340" y="157" />
 <sizeparam width="672" height="717" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
 <infoparam name="Composite component" value="CompositeComponent" />
-<TGConnectingPoint num="0" id="55" />
-<TGConnectingPoint num="1" id="56" />
-<TGConnectingPoint num="2" id="57" />
-<TGConnectingPoint num="3" id="58" />
-<TGConnectingPoint num="4" id="59" />
-<TGConnectingPoint num="5" id="60" />
-<TGConnectingPoint num="6" id="61" />
-<TGConnectingPoint num="7" id="62" />
+<TGConnectingPoint num="0" id="82" />
+<TGConnectingPoint num="1" id="83" />
+<TGConnectingPoint num="2" id="84" />
+<TGConnectingPoint num="3" id="85" />
+<TGConnectingPoint num="4" id="86" />
+<TGConnectingPoint num="5" id="87" />
+<TGConnectingPoint num="6" id="88" />
+<TGConnectingPoint num="7" id="89" />
 <extraparam>
 <info hiddeni="false" />
 </extraparam>
 </COMPONENT>
-<SUBCOMPONENT type="1202" id="27" >
-<father id="63" num="0" />
-<cdparam x="721" y="220" />
-<sizeparam width="200" height="591" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<SUBCOMPONENT type="1200" id="39" >
+<father id="90" num="0" />
+<cdparam x="370" y="575" />
+<sizeparam width="621" height="268" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="0" maxX="51" minY="0" maxY="449" />
+<infoparam name="Composite component" value="CompositeComponent2" />
+<TGConnectingPoint num="0" id="31" />
+<TGConnectingPoint num="1" id="32" />
+<TGConnectingPoint num="2" id="33" />
+<TGConnectingPoint num="3" id="34" />
+<TGConnectingPoint num="4" id="35" />
+<TGConnectingPoint num="5" id="36" />
+<TGConnectingPoint num="6" id="37" />
+<TGConnectingPoint num="7" id="38" />
+<extraparam>
+<info hiddeni="false" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1202" id="30" >
+<father id="39" num="0" />
+<cdparam x="459" y="643" />
+<sizeparam width="449" height="169" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="0" maxX="172" minY="0" maxY="99" />
+<infoparam name="Primitive component" value="PrimitiveComp3" />
+<TGConnectingPoint num="0" id="22" />
+<TGConnectingPoint num="1" id="23" />
+<TGConnectingPoint num="2" id="24" />
+<TGConnectingPoint num="3" id="25" />
+<TGConnectingPoint num="4" id="26" />
+<TGConnectingPoint num="5" id="27" />
+<TGConnectingPoint num="6" id="28" />
+<TGConnectingPoint num="7" id="29" />
+<extraparam>
+<Data isAttacker="No" Operation="" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1203" id="154" >
+<father id="30" num="0" />
+<cdparam x="895" y="704" />
+<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="472" minY="0" maxY="126" />
-<infoparam name="Primitive component" value="PrimitiveComp2" />
-<TGConnectingPoint num="0" id="19" />
-<TGConnectingPoint num="1" id="20" />
-<TGConnectingPoint num="2" id="21" />
-<TGConnectingPoint num="3" id="22" />
-<TGConnectingPoint num="4" id="23" />
-<TGConnectingPoint num="5" id="24" />
-<TGConnectingPoint num="6" id="25" />
-<TGConnectingPoint num="7" id="26" />
+<cdrectangleparam minX="-13" maxX="436" minY="-13" maxY="156" />
+<infoparam name="Primitive port" value="Channel comm_0" />
+<TGConnectingPoint num="0" id="163" />
+<extraparam>
+<Prop commName="primitivePort4" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="1" checkStrongAuthStatus="1" vc="-1" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1202" id="60" >
+<father id="90" num="1" />
+<cdparam x="370" y="192" />
+<sizeparam width="200" height="366" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="0" maxX="472" minY="0" maxY="351" />
+<infoparam name="Primitive component" value="PrimitiveComp1" />
+<TGConnectingPoint num="0" id="52" />
+<TGConnectingPoint num="1" id="53" />
+<TGConnectingPoint num="2" id="54" />
+<TGConnectingPoint num="3" id="55" />
+<TGConnectingPoint num="4" id="56" />
+<TGConnectingPoint num="5" id="57" />
+<TGConnectingPoint num="6" id="58" />
+<TGConnectingPoint num="7" id="59" />
 <extraparam>
-<Data isAttacker="No" />
+<Data isAttacker="No" Operation="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1203" id="8" >
-<father id="27" num="0" />
-<cdparam x="708" y="255" />
+<SUBCOMPONENT type="1203" id="41" >
+<father id="60" num="0" />
+<cdparam x="557" y="515" />
 <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="578" />
-<infoparam name="Primitive port" value="Channel channel_in" />
-<TGConnectingPoint num="0" id="7" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="353" />
+<infoparam name="Primitive port" value="Request request_out_1" />
+<TGConnectingPoint num="0" id="40" />
 <extraparam>
-<Prop commName="channel_in" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Prop commName="request_out_1" commType="2" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
@@ -106,16 +231,16 @@
 <Type type="0" typeOther="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1203" id="10" >
-<father id="27" num="1" />
-<cdparam x="708" y="304" />
+<SUBCOMPONENT type="1203" id="43" >
+<father id="60" num="1" />
+<cdparam x="557" y="450" />
 <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="578" />
-<infoparam name="Primitive port" value="Event event_in" />
-<TGConnectingPoint num="0" id="9" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="353" />
+<infoparam name="Primitive port" value="Event event_out_1" />
+<TGConnectingPoint num="0" id="42" />
 <extraparam>
-<Prop commName="event_in" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Prop commName="event_out_1" commType="1" origin="true" finite="true" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
@@ -123,16 +248,16 @@
 <Type type="0" typeOther="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1203" id="12" >
-<father id="27" num="2" />
-<cdparam x="708" y="343" />
+<SUBCOMPONENT type="1203" id="45" >
+<father id="60" num="2" />
+<cdparam x="557" y="372" />
 <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="578" />
-<infoparam name="Primitive port" value="Request request_in" />
-<TGConnectingPoint num="0" id="11" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="353" />
+<infoparam name="Primitive port" value="Channel channel_out_1" />
+<TGConnectingPoint num="0" id="44" />
 <extraparam>
-<Prop commName="request_in" commType="2" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Prop commName="channel_out_1" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
@@ -140,16 +265,16 @@
 <Type type="0" typeOther="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1203" id="14" >
-<father id="27" num="3" />
-<cdparam x="708" y="400" />
+<SUBCOMPONENT type="1203" id="47" >
+<father id="60" num="3" />
+<cdparam x="557" y="314" />
 <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="578" />
-<infoparam name="Primitive port" value="Channel channel_in_1" />
-<TGConnectingPoint num="0" id="13" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="353" />
+<infoparam name="Primitive port" value="Request request_out" />
+<TGConnectingPoint num="0" id="46" />
 <extraparam>
-<Prop commName="channel_in_1" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Prop commName="request_out" commType="2" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
@@ -157,16 +282,16 @@
 <Type type="0" typeOther="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1203" id="16" >
-<father id="27" num="4" />
-<cdparam x="708" y="479" />
+<SUBCOMPONENT type="1203" id="49" >
+<father id="60" num="4" />
+<cdparam x="557" y="275" />
 <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="578" />
-<infoparam name="Primitive port" value="Event event_in_1" />
-<TGConnectingPoint num="0" id="15" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="353" />
+<infoparam name="Primitive port" value="Event event_out" />
+<TGConnectingPoint num="0" id="48" />
 <extraparam>
-<Prop commName="event_in_1" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Prop commName="event_out" commType="1" origin="true" finite="true" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
@@ -174,16 +299,16 @@
 <Type type="0" typeOther="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1203" id="18" >
-<father id="27" num="5" />
-<cdparam x="708" y="544" />
+<SUBCOMPONENT type="1203" id="51" >
+<father id="60" num="5" />
+<cdparam x="557" y="226" />
 <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="578" />
-<infoparam name="Primitive port" value="Request request_in_1" />
-<TGConnectingPoint num="0" id="17" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="353" />
+<infoparam name="Primitive port" value="Channel channel_out" />
+<TGConnectingPoint num="0" id="50" />
 <extraparam>
-<Prop commName="request_in_1" commType="2" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Prop commName="channel_out" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
@@ -191,35 +316,35 @@
 <Type type="0" typeOther="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1202" id="54" >
-<father id="63" num="1" />
-<cdparam x="322" y="221" />
-<sizeparam width="200" height="596" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<SUBCOMPONENT type="1202" id="81" >
+<father id="90" num="2" />
+<cdparam x="766" y="191" />
+<sizeparam width="200" height="361" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="472" minY="0" maxY="121" />
-<infoparam name="Primitive component" value="PrimitiveComp1" />
-<TGConnectingPoint num="0" id="46" />
-<TGConnectingPoint num="1" id="47" />
-<TGConnectingPoint num="2" id="48" />
-<TGConnectingPoint num="3" id="49" />
-<TGConnectingPoint num="4" id="50" />
-<TGConnectingPoint num="5" id="51" />
-<TGConnectingPoint num="6" id="52" />
-<TGConnectingPoint num="7" id="53" />
+<cdrectangleparam minX="0" maxX="472" minY="0" maxY="356" />
+<infoparam name="Primitive component" value="PrimitiveComp2" />
+<TGConnectingPoint num="0" id="73" />
+<TGConnectingPoint num="1" id="74" />
+<TGConnectingPoint num="2" id="75" />
+<TGConnectingPoint num="3" id="76" />
+<TGConnectingPoint num="4" id="77" />
+<TGConnectingPoint num="5" id="78" />
+<TGConnectingPoint num="6" id="79" />
+<TGConnectingPoint num="7" id="80" />
 <extraparam>
-<Data isAttacker="No" />
+<Data isAttacker="No" Operation="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1203" id="29" >
-<father id="54" num="0" />
-<cdparam x="509" y="255" />
+<SUBCOMPONENT type="1203" id="62" >
+<father id="81" num="0" />
+<cdparam x="753" y="515" />
 <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="583" />
-<infoparam name="Primitive port" value="Channel channel_out" />
-<TGConnectingPoint num="0" id="28" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="348" />
+<infoparam name="Primitive port" value="Request request_in_1" />
+<TGConnectingPoint num="0" id="61" />
 <extraparam>
-<Prop commName="channel_out" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Prop commName="request_in_1" commType="2" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
@@ -227,16 +352,16 @@
 <Type type="0" typeOther="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1203" id="31" >
-<father id="54" num="1" />
-<cdparam x="509" y="304" />
+<SUBCOMPONENT type="1203" id="64" >
+<father id="81" num="1" />
+<cdparam x="753" y="450" />
 <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="583" />
-<infoparam name="Primitive port" value="Event event_out" />
-<TGConnectingPoint num="0" id="30" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="348" />
+<infoparam name="Primitive port" value="Event event_in_1" />
+<TGConnectingPoint num="0" id="63" />
 <extraparam>
-<Prop commName="event_out" commType="1" origin="true" finite="true" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Prop commName="event_in_1" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
@@ -244,16 +369,16 @@
 <Type type="0" typeOther="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1203" id="33" >
-<father id="54" num="2" />
-<cdparam x="509" y="343" />
+<SUBCOMPONENT type="1203" id="66" >
+<father id="81" num="2" />
+<cdparam x="753" y="371" />
 <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="583" />
-<infoparam name="Primitive port" value="Request request_out" />
-<TGConnectingPoint num="0" id="32" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="348" />
+<infoparam name="Primitive port" value="Channel channel_in_1" />
+<TGConnectingPoint num="0" id="65" />
 <extraparam>
-<Prop commName="request_out" commType="2" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Prop commName="channel_in_1" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
@@ -261,16 +386,16 @@
 <Type type="0" typeOther="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1203" id="35" >
-<father id="54" num="3" />
-<cdparam x="509" y="401" />
+<SUBCOMPONENT type="1203" id="68" >
+<father id="81" num="3" />
+<cdparam x="753" y="314" />
 <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="583" />
-<infoparam name="Primitive port" value="Channel channel_in_1" />
-<TGConnectingPoint num="0" id="34" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="348" />
+<infoparam name="Primitive port" value="Request request_in" />
+<TGConnectingPoint num="0" id="67" />
 <extraparam>
-<Prop commName="channel_in_1" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Prop commName="request_in" commType="2" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
@@ -278,16 +403,16 @@
 <Type type="0" typeOther="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1203" id="37" >
-<father id="54" num="4" />
-<cdparam x="509" y="479" />
+<SUBCOMPONENT type="1203" id="70" >
+<father id="81" num="4" />
+<cdparam x="753" y="275" />
 <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="583" />
-<infoparam name="Primitive port" value="Event event_out_1" />
-<TGConnectingPoint num="0" id="36" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="348" />
+<infoparam name="Primitive port" value="Event event_in" />
+<TGConnectingPoint num="0" id="69" />
 <extraparam>
-<Prop commName="event_out_1" commType="1" origin="true" finite="true" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Prop commName="event_in" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
@@ -295,16 +420,16 @@
 <Type type="0" typeOther="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1203" id="39" >
-<father id="54" num="5" />
-<cdparam x="509" y="544" />
+<SUBCOMPONENT type="1203" id="72" >
+<father id="81" num="5" />
+<cdparam x="753" y="226" />
 <sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="583" />
-<infoparam name="Primitive port" value="Request request_out_1" />
-<TGConnectingPoint num="0" id="38" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="348" />
+<infoparam name="Primitive port" value="Channel channel_in" />
+<TGConnectingPoint num="0" id="71" />
 <extraparam>
-<Prop commName="request_out_1" commType="2" origin="true" finite="false" blocking="false" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Prop commName="channel_in" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" vc="-1" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
 <Type type="0" typeOther="" />
@@ -316,289 +441,349 @@
 
 </TMLComponentTaskDiagramPanel>
 
-<TMLActivityDiagramPanel name="PrimitiveComp1" minX="10" maxX="2500" minY="10" maxY="1500" >
-<COMPONENT type="1001" id="65" >
-<cdparam x="397" y="440" />
+<TMLActivityDiagramPanel name="PrimitiveComp2" minX="10" maxX="2500" minY="10" maxY="1500" >
+<COMPONENT type="1001" id="92" >
+<cdparam x="520" y="416" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
 <infoparam name="stop state" value="null" />
-<TGConnectingPoint num="0" id="64" />
+<TGConnectingPoint num="0" id="91" />
 </COMPONENT>
 
-<COMPONENT type="1001" id="67" >
-<cdparam x="302" y="444" />
+<COMPONENT type="1001" id="94" >
+<cdparam x="397" y="418" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
 <infoparam name="stop state" value="null" />
-<TGConnectingPoint num="0" id="66" />
+<TGConnectingPoint num="0" id="93" />
 </COMPONENT>
 
-<COMPONENT type="1008" id="70" >
-<cdparam x="271" y="326" />
-<sizeparam width="82" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<COMPONENT type="1010" id="97" >
+<cdparam x="492" y="302" />
+<sizeparam width="76" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
-<infoparam name="send event" value="event_out()" />
-<TGConnectingPoint num="0" id="68" />
-<TGConnectingPoint num="1" id="69" />
+<infoparam name="wait event" value="event_in() " />
+<TGConnectingPoint num="0" id="95" />
+<TGConnectingPoint num="1" id="96" />
 <extraparam>
-<Data eventName="event_out" nbOfParams="5" />
+<Data eventName="event_in" nbOfParams="5" />
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="1006" id="73" >
-<cdparam x="355" y="324" />
-<sizeparam width="105" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<COMPONENT type="1009" id="100" >
+<cdparam x="358" y="296" />
+<sizeparam width="99" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
-<infoparam name="write channel" value="channel_out(1)" />
-<TGConnectingPoint num="0" id="71" />
-<TGConnectingPoint num="1" id="72" />
+<infoparam name="read channel" value="channel_in(1) " />
+<TGConnectingPoint num="0" id="98" />
+<TGConnectingPoint num="1" id="99" />
 <extraparam>
-<Data channelName="channel_out" nbOfSamples="1" secPattern="" isAttacker="No" isEncForm="Yes" />
+<Data channelName="channel_in" nbOfSamples="1" secPattern="" isAttacker="No" isEncForm="Yes" />
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="1012" id="81" >
-<cdparam x="392" y="183" />
+<COMPONENT type="1012" id="108" >
+<cdparam x="392" y="175" />
 <sizeparam width="30" height="30" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
 <infoparam name="choice" value="null" />
-<TGConnectingPoint num="0" id="77" />
-<TGConnectingPoint num="1" id="78" />
-<TGConnectingPoint num="2" id="79" />
-<TGConnectingPoint num="3" id="80" />
+<TGConnectingPoint num="0" id="104" />
+<TGConnectingPoint num="1" id="105" />
+<TGConnectingPoint num="2" id="106" />
+<TGConnectingPoint num="3" id="107" />
 </COMPONENT>
-<SUBCOMPONENT type="-1" id="74" >
-<father id="81" num="0" />
-<cdparam x="367" y="193" />
+<SUBCOMPONENT type="-1" id="101" >
+<father id="108" num="0" />
+<cdparam x="367" y="185" />
 <sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" />
 <infoparam name="guard 1" value="[ ]" />
 </SUBCOMPONENT>
-<SUBCOMPONENT type="-1" id="75" >
-<father id="81" num="1" />
-<cdparam x="427" y="193" />
+<SUBCOMPONENT type="-1" id="102" >
+<father id="108" num="1" />
+<cdparam x="427" y="185" />
 <sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" />
 <infoparam name="guard 2" value="[ ]" />
 </SUBCOMPONENT>
-<SUBCOMPONENT type="-1" id="76" >
-<father id="81" num="2" />
-<cdparam x="412" y="228" />
+<SUBCOMPONENT type="-1" id="103" >
+<father id="108" num="2" />
+<cdparam x="412" y="220" />
 <sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" />
 <infoparam name="guard 3" value="[ ]" />
 </SUBCOMPONENT>
 
-<COMPONENT type="1000" id="83" >
+<COMPONENT type="1000" id="110" >
 <cdparam x="400" y="50" />
 <sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
 <infoparam name="start state" value="null" />
-<TGConnectingPoint num="0" id="82" />
+<TGConnectingPoint num="0" id="109" />
 </COMPONENT>
 
-<CONNECTOR type="115" id="85" >
-<cdparam x="367" y="198" />
+<CONNECTOR type="115" id="112" >
+<cdparam x="447" y="190" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="null" />
-<P1  x="367" y="198" id="78" />
-<P2  x="312" y="321" id="68" />
-<Point x="312" y="198" />
+<P1  x="447" y="190" id="106" />
+<P2  x="530" y="297" id="95" />
+<Point x="530" y="190" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="84" >
-<father id="85" num="0" />
-<cdparam x="312" y="198" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="111" >
+<father id="112" num="0" />
+<cdparam x="530" y="190" />
 <sizeparam width="1" height="1" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
 <infoparam name="point " value="null" />
 </SUBCOMPONENT>
 
-<CONNECTOR type="115" id="86" >
+<CONNECTOR type="115" id="113" >
 <cdparam x="407" y="65" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="null" />
-<P1  x="407" y="65" id="82" />
-<P2  x="407" y="173" id="77" />
+<P1  x="407" y="65" id="109" />
+<P2  x="407" y="165" id="104" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
-<CONNECTOR type="115" id="87" >
-<cdparam x="407" y="238" />
+<CONNECTOR type="115" id="114" >
+<cdparam x="407" y="230" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="null" />
-<P1  x="407" y="238" id="80" />
-<P2  x="407" y="319" id="71" />
+<P1  x="407" y="230" id="107" />
+<P2  x="407" y="291" id="98" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
-<CONNECTOR type="115" id="88" >
-<cdparam x="312" y="351" />
+<CONNECTOR type="115" id="115" >
+<cdparam x="407" y="321" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="null" />
-<P1  x="312" y="351" id="69" />
-<P2  x="312" y="439" id="66" />
+<P1  x="407" y="321" id="99" />
+<P2  x="407" y="413" id="93" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
-<CONNECTOR type="115" id="89" >
-<cdparam x="407" y="349" />
+<CONNECTOR type="115" id="116" >
+<cdparam x="530" y="327" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="null" />
-<P1  x="407" y="349" id="72" />
-<P2  x="407" y="435" id="64" />
+<P1  x="530" y="327" id="96" />
+<P2  x="530" y="411" id="91" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
 
 </TMLActivityDiagramPanel>
 
-<TMLActivityDiagramPanel name="PrimitiveComp2" minX="10" maxX="2500" minY="10" maxY="1500" >
-<COMPONENT type="1001" id="91" >
-<cdparam x="520" y="416" />
+<TMLActivityDiagramPanel name="PrimitiveComp1" minX="10" maxX="2500" minY="10" maxY="1500" >
+<COMPONENT type="1001" id="118" >
+<cdparam x="397" y="440" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
 <infoparam name="stop state" value="null" />
-<TGConnectingPoint num="0" id="90" />
+<TGConnectingPoint num="0" id="117" />
 </COMPONENT>
 
-<COMPONENT type="1001" id="93" >
-<cdparam x="397" y="418" />
+<COMPONENT type="1001" id="120" >
+<cdparam x="302" y="444" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
 <infoparam name="stop state" value="null" />
-<TGConnectingPoint num="0" id="92" />
+<TGConnectingPoint num="0" id="119" />
 </COMPONENT>
 
-<COMPONENT type="1010" id="96" >
-<cdparam x="492" y="302" />
-<sizeparam width="76" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<COMPONENT type="1008" id="123" >
+<cdparam x="271" y="326" />
+<sizeparam width="82" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
-<infoparam name="wait event" value="event_in() " />
-<TGConnectingPoint num="0" id="94" />
-<TGConnectingPoint num="1" id="95" />
+<infoparam name="send event" value="event_out()" />
+<TGConnectingPoint num="0" id="121" />
+<TGConnectingPoint num="1" id="122" />
 <extraparam>
-<Data eventName="event_in" nbOfParams="5" />
+<Data eventName="event_out" nbOfParams="5" />
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="1009" id="99" >
-<cdparam x="358" y="296" />
-<sizeparam width="99" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<COMPONENT type="1006" id="126" >
+<cdparam x="355" y="324" />
+<sizeparam width="105" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
-<infoparam name="read channel" value="channel_in(1) " />
-<TGConnectingPoint num="0" id="97" />
-<TGConnectingPoint num="1" id="98" />
+<infoparam name="write channel" value="channel_out(1)" />
+<TGConnectingPoint num="0" id="124" />
+<TGConnectingPoint num="1" id="125" />
 <extraparam>
-<Data channelName="channel_in" nbOfSamples="1" secPattern="" isAttacker="No" isEncForm="Yes" />
+<Data channelName="channel_out" nbOfSamples="1" secPattern="" isAttacker="No" isEncForm="Yes" />
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="1012" id="107" >
-<cdparam x="392" y="175" />
+<COMPONENT type="1012" id="134" >
+<cdparam x="392" y="183" />
 <sizeparam width="30" height="30" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
 <infoparam name="choice" value="null" />
-<TGConnectingPoint num="0" id="103" />
-<TGConnectingPoint num="1" id="104" />
-<TGConnectingPoint num="2" id="105" />
-<TGConnectingPoint num="3" id="106" />
+<TGConnectingPoint num="0" id="130" />
+<TGConnectingPoint num="1" id="131" />
+<TGConnectingPoint num="2" id="132" />
+<TGConnectingPoint num="3" id="133" />
 </COMPONENT>
-<SUBCOMPONENT type="-1" id="100" >
-<father id="107" num="0" />
-<cdparam x="367" y="185" />
+<SUBCOMPONENT type="-1" id="127" >
+<father id="134" num="0" />
+<cdparam x="367" y="193" />
 <sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" />
 <infoparam name="guard 1" value="[ ]" />
 </SUBCOMPONENT>
-<SUBCOMPONENT type="-1" id="101" >
-<father id="107" num="1" />
-<cdparam x="427" y="185" />
+<SUBCOMPONENT type="-1" id="128" >
+<father id="134" num="1" />
+<cdparam x="427" y="193" />
 <sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" />
 <infoparam name="guard 2" value="[ ]" />
 </SUBCOMPONENT>
-<SUBCOMPONENT type="-1" id="102" >
-<father id="107" num="2" />
-<cdparam x="412" y="220" />
+<SUBCOMPONENT type="-1" id="129" >
+<father id="134" num="2" />
+<cdparam x="412" y="228" />
 <sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" />
 <infoparam name="guard 3" value="[ ]" />
 </SUBCOMPONENT>
 
-<COMPONENT type="1000" id="109" >
+<COMPONENT type="1000" id="136" >
 <cdparam x="400" y="50" />
 <sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
 <infoparam name="start state" value="null" />
-<TGConnectingPoint num="0" id="108" />
+<TGConnectingPoint num="0" id="135" />
 </COMPONENT>
 
-<CONNECTOR type="115" id="111" >
-<cdparam x="447" y="190" />
+<CONNECTOR type="115" id="138" >
+<cdparam x="367" y="198" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="null" />
-<P1  x="447" y="190" id="105" />
-<P2  x="530" y="297" id="94" />
-<Point x="530" y="190" />
+<P1  x="367" y="198" id="131" />
+<P2  x="312" y="321" id="121" />
+<Point x="312" y="198" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="110" >
-<father id="111" num="0" />
-<cdparam x="530" y="190" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="137" >
+<father id="138" num="0" />
+<cdparam x="312" y="198" />
 <sizeparam width="1" height="1" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
 <infoparam name="point " value="null" />
 </SUBCOMPONENT>
 
-<CONNECTOR type="115" id="112" >
+<CONNECTOR type="115" id="139" >
 <cdparam x="407" y="65" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="null" />
-<P1  x="407" y="65" id="108" />
-<P2  x="407" y="165" id="103" />
+<P1  x="407" y="65" id="135" />
+<P2  x="407" y="173" id="130" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
-<CONNECTOR type="115" id="113" >
-<cdparam x="407" y="230" />
+<CONNECTOR type="115" id="140" >
+<cdparam x="407" y="238" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="null" />
-<P1  x="407" y="230" id="106" />
-<P2  x="407" y="291" id="97" />
+<P1  x="407" y="238" id="133" />
+<P2  x="407" y="319" id="124" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
-<CONNECTOR type="115" id="114" >
-<cdparam x="407" y="321" />
+<CONNECTOR type="115" id="141" >
+<cdparam x="312" y="351" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="null" />
-<P1  x="407" y="321" id="98" />
-<P2  x="407" y="413" id="92" />
+<P1  x="312" y="351" id="122" />
+<P2  x="312" y="439" id="119" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
-<CONNECTOR type="115" id="115" >
-<cdparam x="530" y="327" />
+<CONNECTOR type="115" id="142" >
+<cdparam x="407" y="349" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="407" y="349" id="125" />
+<P2  x="407" y="435" id="117" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+
+</TMLActivityDiagramPanel>
+
+<TMLActivityDiagramPanel name="PrimitiveComp3" minX="10" maxX="2500" minY="10" maxY="1500" >
+<COMPONENT type="1001" id="144" >
+<cdparam x="397" y="149" />
+<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="stop state" value="null" />
+<TGConnectingPoint num="0" id="143" />
+</COMPONENT>
+
+<COMPONENT type="1000" id="146" >
+<cdparam x="400" y="50" />
+<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="start state" value="null" />
+<TGConnectingPoint num="0" id="145" />
+</COMPONENT>
+
+<CONNECTOR type="115" id="147" >
+<cdparam x="407" y="65" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="407" y="65" id="145" />
+<P2  x="407" y="144" id="143" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+
+</TMLActivityDiagramPanel>
+
+<TMLActivityDiagramPanel name="PrimitiveCompNullFather" minX="10" maxX="2500" minY="10" maxY="1500" >
+<COMPONENT type="1001" id="149" >
+<cdparam x="397" y="184" />
+<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="stop state" value="null" />
+<TGConnectingPoint num="0" id="148" />
+</COMPONENT>
+
+<COMPONENT type="1000" id="151" >
+<cdparam x="400" y="50" />
+<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="start state" value="null" />
+<TGConnectingPoint num="0" id="150" />
+</COMPONENT>
+
+<CONNECTOR type="115" id="152" >
+<cdparam x="407" y="65" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="null" />
-<P1  x="530" y="327" id="95" />
-<P2  x="530" y="411" id="90" />
+<P1  x="407" y="65" id="150" />
+<P2  x="407" y="179" id="148" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
 
-- 
GitLab