diff options
author | Thomas Schuetz | 2012-10-04 20:14:00 +0000 |
---|---|---|
committer | Thomas Schuetz | 2012-10-04 20:14:00 +0000 |
commit | 426289fa585c6d533f94cf6efc9f1e28d2770260 (patch) | |
tree | df8c0ad669080e597facca4015588fb094a78b53 /examples | |
parent | c18e073a3d56e7ddf67ea99b5ec5eee07dc277f2 (diff) | |
download | org.eclipse.etrice-426289fa585c6d533f94cf6efc9f1e28d2770260.tar.gz org.eclipse.etrice-426289fa585c6d533f94cf6efc9f1e28d2770260.tar.xz org.eclipse.etrice-426289fa585c6d533f94cf6efc9f1e28d2770260.zip |
[tutorials.simulators.trafficlight.example] completed working example with two coordinated traffic lights, fixed several diagrams, added script for flatten project structure
Diffstat (limited to 'examples')
14 files changed, 3079 insertions, 183 deletions
diff --git a/examples/org.eclipse.etrice.tutorials.java/model/Blinky/diagrams/Blinky.SubSystem_Blinky.structure b/examples/org.eclipse.etrice.tutorials.java/model/Blinky/diagrams/Blinky.SubSystem_Blinky.structure index 63956f25e..045db94e9 100644 --- a/examples/org.eclipse.etrice.tutorials.java/model/Blinky/diagrams/Blinky.SubSystem_Blinky.structure +++ b/examples/org.eclipse.etrice.tutorials.java/model/Blinky/diagrams/Blinky.SubSystem_Blinky.structure @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="ASCII"?>
-<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of SubSystem_Blinky" pictogramLinks="//@children.0/@link //@link //@children.0/@children.0/@link //@children.0/@children.1/@link //@children.0/@children.1/@children.1/@link //@children.0/@children.1/@children.2/@link //@connections.0/@link //@connections.1/@link" verticalGridUnit="10" version="0.9.0">
+<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of SubSystem_Blinky" pictogramLinks="//@children.0/@link //@link //@children.0/@children.0/@link //@children.0/@children.1/@link //@children.0/@children.1/@children.1/@link //@connections.0/@link" verticalGridUnit="10" version="0.9.0">
<graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
<link>
<businessObjects href="../Blinky.room#SubSystemClass:SubSystem_Blinky"/>
@@ -24,7 +24,7 @@ <link>
<businessObjects href="../Blinky.room#ActorRef:SubSystem_Blinky$application"/>
</link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0 //@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
<children visible="true">
<graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="application
(BlinkyTop)"/>
</children>
@@ -47,31 +47,17 @@ <children xsi:type="pi:ContainerShape" visible="true" active="true">
<properties key="obj-type" value="port"/>
<properties key="item-kind" value=""/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="59">
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="54">
<graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
</graphicsAlgorithm>
<link>
- <businessObjects href="file:/C:/eTriceJuno/eTrice-rt/org.eclipse.etrice.modellib.java/models/TimingService.room#SPPRef:ATimingService$timer"/>
+ <businessObjects href="file:/C:/entw/projekte/eTrice/eTriceDevelopment/repositories/eTriceGIT/FlatWorld/org.eclipse.etrice.modellib.java/models/TimingService.room#SPPRef:ATimingService$timer"/>
</link>
<anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
<children visible="true">
<graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="timer"/>
</children>
</children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="port"/>
- <properties key="item-kind" value=""/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="119">
- <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="file:/C:/eTriceJuno/eTrice-rt/org.eclipse.etrice.modellib.java/models/TimingService.room#SPPRef:ATimingService$timeout"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.1/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="timeout"/>
- </children>
- </children>
</children>
</children>
<connections xsi:type="pi:ManhattanConnection" visible="true" active="true" start="//@children.0/@children.0/@anchors.0" end="//@children.0/@children.1/@children.1/@anchors.0">
@@ -88,20 +74,6 @@ </graphicsAlgorithm>
</connectionDecorators>
</connections>
- <connections xsi:type="pi:ManhattanConnection" visible="true" active="true" start="//@children.0/@children.0/@anchors.0" end="//@children.0/@children.1/@children.2/@anchors.0">
- <properties key="obj-type" value="conn"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="2" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../Blinky.room#LayerConnection:SubSystem_Blinky$application-timingService!timeout"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="2" filled="false" transparency="0.0">
- <points x="-15" y="10"/>
- <points/>
- <points x="-15" y="-10"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- </connections>
<colors red="227" green="238" blue="249"/>
<colors red="255" green="255" blue="255"/>
<colors/>
diff --git a/examples/org.eclipse.etrice.tutorials.java/model/PedLightsController/diagrams/PedLightsController.SubSys_PedLights.structure b/examples/org.eclipse.etrice.tutorials.java/model/PedLightsController/diagrams/PedLightsController.SubSys_PedLights.structure index e9e5b8572..2f64483e7 100644 --- a/examples/org.eclipse.etrice.tutorials.java/model/PedLightsController/diagrams/PedLightsController.SubSys_PedLights.structure +++ b/examples/org.eclipse.etrice.tutorials.java/model/PedLightsController/diagrams/PedLightsController.SubSys_PedLights.structure @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="ASCII"?>
-<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of SubSys_PedLights" pictogramLinks="//@children.0/@link //@link //@children.0/@children.0/@link //@children.0/@children.1/@link //@children.0/@children.1/@children.1/@link //@children.0/@children.1/@children.2/@link //@connections.0/@link //@connections.1/@link" verticalGridUnit="10" version="0.9.0">
+<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of SubSys_PedLights" pictogramLinks="//@children.0/@link //@link //@children.0/@children.0/@link //@children.0/@children.1/@link //@children.0/@children.1/@children.1/@link //@connections.0/@link" verticalGridUnit="10" version="0.9.0">
<graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
<link>
<businessObjects href="../PedLightsController.room#SubSystemClass:SubSys_PedLights"/>
@@ -24,14 +24,14 @@ <link>
<businessObjects href="../PedLightsController.room#ActorRef:SubSys_PedLights$PedLightsTopRef"/>
</link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0 //@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
<children visible="true">
<graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="PedLightsTopRef
(PedLightsTop)"/>
</children>
</children>
<children xsi:type="pi:ContainerShape" visible="true" active="true">
<properties key="obj-type" value="ref"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="128" y="257">
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="128" y="264">
<graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
<graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50"/>
<graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65"/>
@@ -47,31 +47,17 @@ <children xsi:type="pi:ContainerShape" visible="true" active="true">
<properties key="obj-type" value="port"/>
<properties key="item-kind" value=""/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="59">
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="54">
<graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
</graphicsAlgorithm>
<link>
- <businessObjects href="file:/C:/eTriceJuno/eTrice-rt/org.eclipse.etrice.modellib.java/models/TimingService.room#SPPRef:ATimingService$timer"/>
+ <businessObjects href="file:/C:/entw/projekte/eTrice/eTriceDevelopment/repositories/eTriceGIT/FlatWorld/org.eclipse.etrice.modellib.java/models/TimingService.room#SPPRef:ATimingService$timer"/>
</link>
<anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
<children visible="true">
<graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="timer"/>
</children>
</children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="port"/>
- <properties key="item-kind" value=""/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="119">
- <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="file:/C:/eTriceJuno/eTrice-rt/org.eclipse.etrice.modellib.java/models/TimingService.room#SPPRef:ATimingService$timeout"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.1/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="timeout"/>
- </children>
- </children>
</children>
</children>
<connections xsi:type="pi:ManhattanConnection" visible="true" active="true" start="//@children.0/@children.0/@anchors.0" end="//@children.0/@children.1/@children.1/@anchors.0">
@@ -88,20 +74,6 @@ </graphicsAlgorithm>
</connectionDecorators>
</connections>
- <connections xsi:type="pi:ManhattanConnection" visible="true" active="true" start="//@children.0/@children.0/@anchors.0" end="//@children.0/@children.1/@children.2/@anchors.0">
- <properties key="obj-type" value="conn"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="2" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../PedLightsController.room#LayerConnection:SubSys_PedLights$PedLightsTopRef-timingService!timeout"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="2" filled="false" transparency="0.0">
- <points x="-15" y="10"/>
- <points/>
- <points x="-15" y="-10"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- </connections>
<colors red="227" green="238" blue="249"/>
<colors red="255" green="255" blue="255"/>
<colors/>
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.Application.structure b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.Application.structure new file mode 100644 index 000000000..7fe8fcb37 --- /dev/null +++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.Application.structure @@ -0,0 +1,140 @@ +<?xml version="1.0" encoding="ASCII"?> +<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of Application" pictogramLinks="//@children.0/@link //@link //@children.0/@children.0/@link //@children.0/@children.1/@link //@children.0/@children.0/@children.1/@link //@children.0/@children.1/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.2/@children.1/@link //@children.0/@children.2/@children.2/@link //@connections.0/@link //@connections.1/@link" verticalGridUnit="10" version="0.9.0"> + <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/> + <link> + <businessObjects href="../trafficlight.example.room#ActorClass:Application"/> + </link> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="cls"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40"/> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#ActorClass:Application"/> + </link> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="ref"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="79" y="264"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" width="20" height="10" x="150" y="50"/> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" width="20" height="10" x="145" y="65"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#ActorRef:Application$light1"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="light1
(TrafficLight)"/> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="port"/> + <properties key="item-kind" value=""/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="89"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#Port:TrafficLight$controller"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="controller"/> + </children> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="ref"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="458" y="264"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" width="20" height="10" x="150" y="50"/> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" width="20" height="10" x="145" y="65"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#ActorRef:Application$light2"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="light2
(TrafficLight)"/> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="port"/> + <properties key="item-kind" value=""/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="89"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#Port:TrafficLight$controller"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.1/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="controller"/> + </children> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="ref"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="279" y="87"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50"/> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#ActorRef:Application$controller"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="controller
(TrafficController)"/> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="port"/> + <properties key="item-kind" value="C"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="59" y="80"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#Port:TrafficController$light1"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.2/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="39" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="light1"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="port"/> + <properties key="item-kind" value="C"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="124" y="80"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#Port:TrafficController$light2"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.2/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="39" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="light2"/> + </children> + </children> + </children> + </children> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@children.1/@anchors.0" end="//@children.0/@children.0/@children.1/@anchors.0"> + <properties key="obj-type" value="bind"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#Binding:Application$light1!controller-controller!light1"/> + </link> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@children.2/@anchors.0" end="//@children.0/@children.1/@children.1/@anchors.0"> + <properties key="obj-type" value="bind"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#Binding:Application$light2!controller-controller!light2"/> + </link> + </connections> + <colors red="227" green="238" blue="249"/> + <colors red="255" green="255" blue="255"/> + <colors/> + <colors red="200" green="200" blue="200"/> + <fonts name="Arial" size="8"/> +</pi:Diagram> diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.SSTraffic.structure b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.SSTraffic.structure new file mode 100644 index 000000000..c464f8504 --- /dev/null +++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.SSTraffic.structure @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="ASCII"?> +<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of SSTraffic" pictogramLinks="//@children.0/@link //@link //@children.0/@children.0/@link //@children.0/@children.1/@link //@children.0/@children.1/@children.1/@link //@connections.0/@link" verticalGridUnit="10" version="0.9.0"> + <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/> + <link> + <businessObjects href="../trafficlight.example.room#SubSystemClass:SSTraffic"/> + </link> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="cls"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40"/> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SubSystemClass:SSTraffic"/> + </link> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="ref"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="156" y="170"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="20" height="10" x="150" y="50"/> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="20" height="10" x="145" y="65"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#ActorRef:SSTraffic$application"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="application
(Application)"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="ref"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="156" y="306"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50"/> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#ActorRef:SSTraffic$TimingService"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="TimingService
(ATimingService)"/> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="port"/> + <properties key="item-kind" value=""/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="54"> + <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/> + </graphicsAlgorithm> + <link> + <businessObjects href="file:/C:/entw/projekte/eTrice/eTriceDevelopment/repositories/eTriceGIT/FlatWorld/org.eclipse.etrice.modellib.java/models/TimingService.room#SPPRef:ATimingService$timer"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="timer"/> + </children> + </children> + </children> + </children> + <connections xsi:type="pi:ManhattanConnection" visible="true" active="true" start="//@children.0/@children.0/@anchors.0" end="//@children.0/@children.1/@children.1/@anchors.0"> + <properties key="obj-type" value="conn"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="2" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#LayerConnection:SSTraffic$application-TimingService!timer"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="2" filled="false" transparency="0.0"> + <points x="-15" y="10"/> + <points/> + <points x="-15" y="-10"/> + </graphicsAlgorithm> + </connectionDecorators> + </connections> + <colors red="227" green="238" blue="249"/> + <colors red="255" green="255" blue="255"/> + <colors/> + <colors red="200" green="200" blue="200"/> + <fonts name="Arial" size="8"/> +</pi:Diagram> diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.TrafficController.behavior b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.TrafficController.behavior new file mode 100644 index 000000000..cc93215d1 --- /dev/null +++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.TrafficController.behavior @@ -0,0 +1,524 @@ +<?xml version="1.0" encoding="ASCII"?> +<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.behavior" name="Behavior of TrafficController" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@connections.0/@link //@children.0/@children.3/@link //@children.0/@children.4/@link //@connections.1/@link //@children.0/@children.5/@link //@children.0/@children.6/@link //@connections.2/@link //@connections.3/@link //@connections.4/@link //@connections.5/@link //@children.0/@children.7/@link //@connections.6/@link //@children.0/@children.8/@link //@children.0/@children.9/@link //@connections.7/@link //@connections.8/@link //@children.0/@children.10/@link //@connections.9/@link //@connections.10/@link //@connections.11/@link" verticalGridUnit="10" version="0.9.0"> + <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/> + <link> + <businessObjects href="../trafficlight.example.room#ActorClass:TrafficController"/> + </link> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="sg"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#StateGraph:TrafficController$sg"/> + </link> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/"/> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="trp"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="40" height="40" x="96" y="84"> + <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="10" y="10"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#StateGraph:TrafficController$sg"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="40" height="20" y="10" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="I"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="307" y="109"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="30" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficController$Idle"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1" incomingConnections="//@connections.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Idle"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="186" height="90" x="138" y="382"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="126" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="101" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="63" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="63" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="63" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficController$Light1GreenForCars"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.6" incomingConnections="//@connections.4 //@connections.5" referencedGraphicsAlgorithm="//@children.0/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="126" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Light1GreenForCars"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="239" height="90" x="103" y="209"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="179" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="154" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="89" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="89" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="89" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficController$SwitchToLight1GreenForCars"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.2 //@connections.3" incomingConnections="//@connections.1 //@connections.11"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="179" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="SwitchToLight1GreenForCars"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="106" y="288"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficController$state0"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.5" incomingConnections="//@connections.2" referencedGraphicsAlgorithm="//@children.0/@children.5/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="state0"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="234" y="290"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficController$state1"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.4" incomingConnections="//@connections.3" referencedGraphicsAlgorithm="//@children.0/@children.6/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="state1"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="239" height="90" x="527" y="209"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="179" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="154" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="89" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="89" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="89" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficController$SwitchToLight2GreenForCars"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.7 //@connections.8" incomingConnections="//@connections.6"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="179" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="SwitchToLight2GreenForCars"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="497" y="304"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficController$state2"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.9" incomingConnections="//@connections.7" referencedGraphicsAlgorithm="//@children.0/@children.8/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="state2"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="659" y="304"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficController$state3"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.10" incomingConnections="//@connections.8" referencedGraphicsAlgorithm="//@children.0/@children.9/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="state3"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="186" height="90" x="554" y="394"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="126" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="101" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="63" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="63" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="63" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficController$Light2GreenForCars"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.11" incomingConnections="//@connections.9 //@connections.10" referencedGraphicsAlgorithm="//@children.0/@children.10/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="126" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Light2GreenForCars"/> + </children> + </children> + </children> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@anchors.0" end="//@children.0/@children.2/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#InitialTransition:TrafficController$initial"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="init"/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.4/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficController$tr0"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr0: <timeout:timeou..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.4/@anchors.0" end="//@children.0/@children.5/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficController$tr1"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="-79" y="-1" font="//@fonts.0" value="tr1: <greenForCarDon..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.4/@anchors.0" end="//@children.0/@children.6/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficController$tr2"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr2: <greenForPedDon..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.6/@anchors.0" end="//@children.0/@children.3/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficController$tr3"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="-26" y="-8" font="//@fonts.0" value="tr3: <greenForCarDon..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.5/@anchors.0" end="//@children.0/@children.3/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficController$tr4"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="-92" y="-7" font="//@fonts.0" value="tr4: <greenForPedDon..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.3/@anchors.0" end="//@children.0/@children.7/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficController$tr5"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="-35" y="-20" font="//@fonts.0" value="tr5: <timeout:timeou..."/> + </connectionDecorators> + <bendpoints x="471" y="364"/> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.7/@anchors.0" end="//@children.0/@children.8/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficController$tr6"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="-37" y="2" font="//@fonts.0" value="tr6: <greenForPedDon..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.7/@anchors.0" end="//@children.0/@children.9/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficController$tr7"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr7: <greenForCarDon..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.8/@anchors.0" end="//@children.0/@children.10/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficController$tr8"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr8: <greenForCarDon..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.9/@anchors.0" end="//@children.0/@children.10/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficController$tr9"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr9: <greenForPedDon..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.10/@anchors.0" end="//@children.0/@children.4/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficController$tr10"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr10: <timeout:timeo..."/> + </connectionDecorators> + <bendpoints x="487" y="423"/> + </connections> + <colors red="227" green="238" blue="249"/> + <colors red="255" green="255" blue="255"/> + <colors/> + <colors red="200" green="200" blue="200"/> + <fonts name="Arial" size="8"/> + <fonts name="Arial" size="9" bold="true"/> +</pi:Diagram> diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.TrafficController.structure b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.TrafficController.structure new file mode 100644 index 000000000..4b697f269 --- /dev/null +++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.TrafficController.structure @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="ASCII"?> +<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of TrafficController" pictogramLinks="//@children.0/@link //@link //@children.0/@children.0/@link //@children.0/@children.1/@link" verticalGridUnit="10" version="0.9.0"> + <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/> + <link> + <businessObjects href="../trafficlight.example.room#ActorClass:TrafficController"/> + </link> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="cls"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40"/> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#ActorClass:TrafficController"/> + </link> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="port"/> + <properties key="item-kind" value="C"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="263" y="500"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="40" height="40" x="20" y="20"/> + <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.2" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#Port:TrafficController$light1"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="80" height="20" y="60" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="light1"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="port"/> + <properties key="item-kind" value="C"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="553" y="500"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="40" height="40" x="20" y="20"/> + <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.2" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#Port:TrafficController$light2"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="80" height="20" y="60" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="light2"/> + </children> + </children> + </children> + <colors red="227" green="238" blue="249"/> + <colors red="255" green="255" blue="255"/> + <colors/> + <fonts name="Arial" size="8"/> +</pi:Diagram> diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.TrafficLight.behavior b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.TrafficLight.behavior new file mode 100644 index 000000000..6dead35c8 --- /dev/null +++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.TrafficLight.behavior @@ -0,0 +1,629 @@ +<?xml version="1.0" encoding="ASCII"?> +<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.behavior" name="Behavior of TrafficLight" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.3/@link //@children.0/@children.4/@link //@children.0/@children.5/@link //@children.0/@children.6/@link //@children.1/@link //@children.1/@children.1/@link //@children.0/@children.6/@children.1/@link //@children.1/@children.2/@link //@children.1/@children.3/@link //@connections.0/@link //@connections.1/@link //@connections.2/@link //@connections.3/@link //@connections.4/@link //@connections.5/@link //@connections.6/@link //@connections.7/@link //@children.0/@children.7/@link //@connections.8/@link //@children.0/@children.8/@link //@connections.9/@link //@children.0/@children.9/@link //@connections.10/@link //@connections.11/@link //@connections.12/@link" verticalGridUnit="10" version="0.9.0"> + <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/> + <link> + <businessObjects href="../trafficlight.example.room#ActorClass:TrafficLight"/> + </link> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="sg"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#StateGraph:TrafficLight$sg"/> + </link> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/"/> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="trp"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="40" height="40" x="100" y="100"> + <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="10" y="10"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#StateGraph:TrafficLight$sg"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.3" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="40" height="20" y="10" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="I"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="142" height="90" x="172" y="99"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="82" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="57" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="41" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="41" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="41" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficLight$OpenSocket"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.4" incomingConnections="//@connections.3" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="82" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="OpenSocket"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="183" y="331"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="30" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficLight$CarYellow"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.7" incomingConnections="//@connections.6"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="CarYellow"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="242" y="233"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="30" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficLight$PedRed"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.6" incomingConnections="//@connections.5 //@connections.11"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="PedRed"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="133" y="427"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="30" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficLight$CarGreen"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.12" incomingConnections="//@connections.7"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="CarGreen"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="139" height="90" x="376" y="155"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="79" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" width="15" height="8" x="54" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="39" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="39" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="39" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficLight$Off_Blinking"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.5 //@connections.8"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="79" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Off_Blinking"/> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="trp"/> + <properties key="item-kind" value="entp"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" y="16"> + <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="11" height="11" x="25" y="25"/> + <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"> + <points x="27" y="33"/> + <points x="33" y="27"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"> + <points x="27" y="27"/> + <points x="33" y="33"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#EntryPoint:TrafficLight$Off_Blinking$tp0"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.4" referencedGraphicsAlgorithm="//@children.0/@children.6/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="22" font="//@fonts.0" verticalAlignment="ALIGNMENT_BOTTOM" value="tp0"/> + </children> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="135" height="90" x="569" y="233"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="75" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="50" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="37" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="37" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="37" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficLight$CarYellow2"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.9" incomingConnections="//@connections.8 //@connections.12"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="75" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="CarYellow2"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="591" y="317"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="30" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficLight$CarRed"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.10" incomingConnections="//@connections.9"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="CarRed"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="128" height="90" x="590" y="396"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="68" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="43" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="34" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="34" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="34" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficLight$PedGreen"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.11" incomingConnections="//@connections.10"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="68" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="PedGreen"/> + </children> + </children> + </children> + <children xsi:type="pi:ContainerShape" active="true"> + <properties key="obj-type" value="sg"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#StateGraph:TrafficLight$Off_Blinking$sg"/> + </link> + <children> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/Off_Blinking"/> + </children> + <children xsi:type="pi:ContainerShape" active="true"> + <properties key="obj-type" value="trp"/> + <properties key="item-kind" value="entp"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="360"> + <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/> + <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="2" filled="false" transparency="0.0"> + <points x="33" y="47"/> + <points x="47" y="33"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="2" filled="false" transparency="0.0"> + <points x="33" y="33"/> + <points x="47" y="47"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#EntryPoint:TrafficLight$Off_Blinking$tp0"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0"/> + <children> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="80" height="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" verticalAlignment="ALIGNMENT_BOTTOM" value="tp0"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="206" y="120"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="30" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="30" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficLight$Off_Blinking$On"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1" incomingConnections="//@connections.0 //@connections.2"/> + <children> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="On"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="472" y="120"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="30" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#SimpleState:TrafficLight$Off_Blinking$Off"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.2" incomingConnections="//@connections.1"/> + <children> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Off"/> + </children> + </children> + </children> + <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.1/@children.1/@anchors.0" end="//@children.1/@children.2/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#ContinuationTransition:TrafficLight$Off_Blinking$tr0"/> + </link> + <connectionDecorators locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr0: "/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.1/@children.2/@anchors.0" end="//@children.1/@children.3/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficLight$Off_Blinking$tr1"/> + </link> + <connectionDecorators locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr1: <timeout:blinke..."/> + </connectionDecorators> + <bendpoints x="449" y="228"/> + </connections> + <connections xsi:type="pi:FreeFormConnection" active="true" start="//@children.1/@children.3/@anchors.0" end="//@children.1/@children.2/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficLight$Off_Blinking$tr2"/> + </link> + <connectionDecorators locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr2: <timeout:blinke..."/> + </connectionDecorators> + <bendpoints x="444" y="181"/> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@anchors.0" end="//@children.0/@children.2/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#InitialTransition:TrafficLight$initial"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="init"/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.6/@children.1/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficLight$tr0"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="-81" y="-7" font="//@fonts.0" value="tr0: <established:tc..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.6/@anchors.0" end="//@children.0/@children.4/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficLight$tr2"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="-62" y="-14" font="//@fonts.0" value="tr2: <greenForCar:co..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.4/@anchors.0" end="//@children.0/@children.3/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficLight$tr3"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="-48" y="-1" font="//@fonts.0" value="tr3: <timeout:timeou..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.3/@anchors.0" end="//@children.0/@children.5/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficLight$tr1"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr1: <timeout:timeou..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.6/@anchors.0" end="//@children.0/@children.7/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficLight$tr4"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="-27" y="-6" font="//@fonts.0" value="tr4: <greenForPed:co..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.7/@anchors.0" end="//@children.0/@children.8/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficLight$tr5"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr5: <timeout:timeou..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.8/@anchors.0" end="//@children.0/@children.9/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficLight$tr6"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr6: <timeout:timeou..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.9/@anchors.0" end="//@children.0/@children.4/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficLight$tr7"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr7: <greenForCar:co..."/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.5/@anchors.0" end="//@children.0/@children.7/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#TriggeredTransition:TrafficLight$tr8"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr8: <greenForPed:co..."/> + </connectionDecorators> + </connections> + <colors red="227" green="238" blue="249"/> + <colors red="255" green="255" blue="255"/> + <colors/> + <colors red="200" green="200" blue="200"/> + <fonts name="Arial" size="8"/> + <fonts name="Arial" size="9" bold="true"/> +</pi:Diagram> diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.TrafficLight.structure b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.TrafficLight.structure new file mode 100644 index 000000000..50a6849a6 --- /dev/null +++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/diagrams/trafficlight.example.TrafficLight.structure @@ -0,0 +1,125 @@ +<?xml version="1.0" encoding="ASCII"?> +<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of TrafficLight" pictogramLinks="//@children.0/@link //@link //@children.0/@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.2/@children.1/@link //@children.0/@children.2/@children.2/@link //@connections.0/@link //@connections.1/@link //@children.0/@children.3/@link" verticalGridUnit="10" version="0.9.0"> + <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/> + <link> + <businessObjects href="../trafficlight.example.room#ActorClass:TrafficLight"/> + </link> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="cls"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40"/> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#ActorClass:TrafficLight"/> + </link> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="port"/> + <properties key="item-kind" value="C"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="266" y="80"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="40" height="40" x="20" y="20"/> + <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.2" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#Port:TrafficLight$tcpCtrl"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="80" height="20" y="60" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="tcpCtrl"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="port"/> + <properties key="item-kind" value="C"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="532" y="80"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="40" height="40" x="20" y="20"/> + <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.2" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#Port:TrafficLight$tcpPayload"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="80" height="20" y="60" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="tcpPayload"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="ref"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="320" y="170"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50"/> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#ActorRef:TrafficLight$trafficLightSocket"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="trafficLightSocket
(ATcpClient)"/> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="port"/> + <properties key="item-kind" value=""/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="59"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/> + </graphicsAlgorithm> + <link> + <businessObjects href="file:/C:/entw/projekte/eTrice/eTriceDevelopment/repositories/eTriceGIT/FlatWorld/org.eclipse.etrice.modellib.java/models/TcpService.room#Port:ATcpClient$ControlPort"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.2/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="ControlPort"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="port"/> + <properties key="item-kind" value=""/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="119"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/> + </graphicsAlgorithm> + <link> + <businessObjects href="file:/C:/entw/projekte/eTrice/eTriceDevelopment/repositories/eTriceGIT/FlatWorld/org.eclipse.etrice.modellib.java/models/TcpService.room#Port:ATcpClient$PayloadPort"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.2/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="PayloadPort"/> + </children> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="port"/> + <properties key="item-kind" value=""/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="398"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="40" height="40" x="20" y="20"/> + <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.1" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../trafficlight.example.room#Port:TrafficLight$controller"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="80" height="20" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="controller"/> + </children> + </children> + </children> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@children.1/@anchors.0" end="//@children.0/@children.0/@anchors.0"> + <properties key="obj-type" value="bind"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#Binding:TrafficLight$ControlPort!trafficLightSocket-tcpCtrl!."/> + </link> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@children.2/@anchors.0" end="//@children.0/@children.1/@anchors.0"> + <properties key="obj-type" value="bind"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../trafficlight.example.room#Binding:TrafficLight$PayloadPort!trafficLightSocket-tcpPayload!."/> + </link> + </connections> + <colors red="227" green="238" blue="249"/> + <colors red="255" green="255" blue="255"/> + <colors/> + <colors red="200" green="200" blue="200"/> + <fonts name="Arial" size="8"/> +</pi:Diagram> diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/trafficlight.example.room b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/trafficlight.example.room index ee8019e58..f2bf2eb55 100644 --- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/trafficlight.example.room +++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/trafficlight.example.room @@ -1,43 +1,154 @@ RoomModel trafficlight.example { + import room.basic.types.* from "../../org.eclipse.etrice.modellib.java/models/Types.room" + import room.basic.service.timing.* from "../../org.eclipse.etrice.modellib.java/models/TimingService.room" + import room.basic.service.tcp.* from "../../org.eclipse.etrice.modellib.java/models/TcpService.room" - + SubSystemClass SSTraffic { - ActorRef application:Application + ActorRef application: Application ActorRef TimingService: ATimingService LayerConnection ref application satisfied_by TimingService.timer } - - + ActorClass Application { Structure { ActorRef light1: TrafficLight ActorRef light2: TrafficLight + ActorRef controller: TrafficController + Binding controller.light1 and light1.controller + Binding controller.light2 and light2.controller } Behavior { } } - + + ActorClass TrafficController { + Interface { + conjugated Port light1: PTrafficLight + conjugated Port light2: PTrafficLight + } + Structure { + external Port light1 + external Port light2 + SAP timeout: PTimer + } + Behavior { + StateMachine { + Transition init: initial -> Idle { } + Transition tr0: Idle -> SwitchToLight1GreenForCars { + triggers { + <timeout: timeout> + } + } + Transition tr1: SwitchToLight1GreenForCars -> state0 { + triggers { + <greenForCarDone: light1> + } + } + Transition tr2: SwitchToLight1GreenForCars -> state1 { + triggers { + <greenForPedDone: light2> + } + } + Transition tr3: state1 -> Light1GreenForCars { + triggers { + <greenForCarDone: light1> + } + } + Transition tr4: state0 -> Light1GreenForCars { + triggers { + <greenForPedDone: light2> + } + } + Transition tr5: Light1GreenForCars -> SwitchToLight2GreenForCars { + triggers { + <timeout: timeout> + } + } + Transition tr6: SwitchToLight2GreenForCars -> state2 { + triggers { + <greenForPedDone: light1> + } + } + Transition tr7: SwitchToLight2GreenForCars -> state3 { + triggers { + <greenForCarDone: light2> + } + } + Transition tr8: state2 -> Light2GreenForCars { + triggers { + <greenForCarDone: light2> + } + } + Transition tr9: state3 -> Light2GreenForCars { + triggers { + <greenForPedDone: light1> + } + } + Transition tr10: Light2GreenForCars -> SwitchToLight1GreenForCars { + triggers { + <timeout: timeout> + } + } + State Idle { + entry { + "timeout.startTimeout(3000);" + } + } + State Light1GreenForCars { + entry { + "timeout.startTimeout(10000);" + } + } + State SwitchToLight1GreenForCars { + entry { + "light1.greenForCar();" + "light2.greenForPed();" + } + } + State state0 + State state1 + State SwitchToLight2GreenForCars { + entry { + "light1.greenForPed();" + "light2.greenForCar();" + } + } + State state2 + State state3 + State Light2GreenForCars { + entry { + "timeout.startTimeout(10000);" + } + } + } + } + } + ActorClass TrafficLight { + Interface { + Port controller: PTrafficLight + } Structure { + external Port controller conjugated Port tcpCtrl: PTcpControl conjugated Port tcpPayload: PTcpPayload SAP timeout: PTimer SAP blinkerTimeout: PTimer - Attribute ipConfig : DTcpControl + Attribute ipConfig: DTcpControl ActorRef trafficLightSocket: ATcpClient Binding trafficLightSocket.ControlPort and tcpCtrl Binding trafficLightSocket.PayloadPort and tcpPayload - - } Behavior { - - Operation sendString (text: string){" + Operation sendString(text: string) { + " DTcpPayload pl = new DTcpPayload(); pl.setData(text.getBytes()); tcpPayload.send(new DTcpPayload(1, text.length(), text.getBytes())); - "} + " + } StateMachine { Transition init: initial -> OpenSocket { } Transition tr0: OpenSocket -> tp0 of Off_Blinking { @@ -45,53 +156,71 @@ RoomModel trafficlight.example { <established: tcpCtrl> } } - Transition tr2: Off_Blinking -> Red { + Transition tr2: Off_Blinking -> PedRed { + triggers { + <greenForCar: controller> + } + } + Transition tr3: PedRed -> CarYellow { triggers { <timeout: timeout> } } - Transition tr3: Red -> Yellow { + Transition tr1: CarYellow -> CarGreen { triggers { <timeout: timeout> } } - Transition tr1: Yellow -> Green { + Transition tr4: Off_Blinking -> CarYellow2 { + triggers { + <greenForPed: controller> + } + } + Transition tr5: CarYellow2 -> CarRed { triggers { <timeout: timeout> } } - Transition tr4: Green -> tp0 of Off_Blinking { + Transition tr6: CarRed -> PedGreen { triggers { <timeout: timeout> } } + Transition tr7: PedGreen -> PedRed { + triggers { + <greenForCar: controller> + } + } + Transition tr8: CarGreen -> CarYellow2 { + triggers { + <greenForPed: controller> + } + } State OpenSocket { entry { "tcpCtrl.open(ipConfig);" } } - State Yellow { + State CarYellow { entry { "sendString(\"carLights=yellow\\n\");" "timeout.startTimeout(1000);" } } - State Red { + State PedRed { entry { + "sendString(\"pedLights=red\\n\");" "sendString(\"carLights=red\\n\");" "timeout.startTimeout(1000);" } } - State Green { + State CarGreen { entry { "sendString(\"carLights=green\\n\");" - "timeout.startTimeout(1000);" + "controller.greenForCarDone();" } } State Off_Blinking { - entry { - "timeout.startTimeout(6000);" - } subgraph { Transition tr0: my tp0 -> On Transition tr1: On -> Off { @@ -109,7 +238,7 @@ RoomModel trafficlight.example { entry { "sendString(\"carLights=red\\n\");" "sendString(\"pedLights=red\\n\");" - "blinkerTimeout.startTimeout(1000);" + "blinkerTimeout.startTimeout(500);" } exit { "sendString(\"carLights=off\\n\");" @@ -118,13 +247,42 @@ RoomModel trafficlight.example { } State Off { entry { - "blinkerTimeout.startTimeout(1000);" + "blinkerTimeout.startTimeout(500);" } } } } + State CarYellow2 { + entry { + "sendString(\"carLights=yellow\\n\");" + "timeout.startTimeout(1000);" + } + } + State CarRed { + entry { + "sendString(\"carLights=red\\n\");" + "timeout.startTimeout(1000);" + } + } + State PedGreen { + entry { + "sendString(\"pedLights=green\\n\");" + "controller.greenForPedDone();" + } + } } } } + ProtocolClass PTrafficLight { + incoming { + Message greenForCar() + Message greenForPed() + } + outgoing { + Message greenForCarDone() + Message greenForPedDone() + } + } + }
\ No newline at end of file diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/src-gen/trafficlight/example/PTrafficLight.java b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/src-gen/trafficlight/example/PTrafficLight.java new file mode 100644 index 000000000..b6c38461e --- /dev/null +++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/src-gen/trafficlight/example/PTrafficLight.java @@ -0,0 +1,212 @@ +package trafficlight.example; + +import java.util.ArrayList; + +import org.eclipse.etrice.runtime.java.messaging.Address; +import org.eclipse.etrice.runtime.java.messaging.Message; +import org.eclipse.etrice.runtime.java.modelbase.*; +import org.eclipse.etrice.runtime.java.debugging.DebuggingService; + + + +public class PTrafficLight { + // message IDs + public static final int MSG_MIN = 0; + public static final int OUT_greenForCarDone = 1; + public static final int OUT_greenForPedDone = 2; + public static final int IN_greenForCar = 3; + public static final int IN_greenForPed = 4; + public static final int MSG_MAX = 5; + + + private static String messageStrings[] = {"MIN", "greenForCarDone","greenForPedDone", "greenForCar","greenForPed","MAX"}; + + public String getMessageString(int msg_id) { + if (msg_id<MSG_MIN || msg_id>MSG_MAX+1){ + // id out of range + return "Message ID out of range"; + } + else{ + return messageStrings[msg_id]; + } + } + + + // port class + static public class PTrafficLightPort extends PortBase { + // constructors + public PTrafficLightPort(IEventReceiver actor, String name, int localId, Address addr, Address peerAddress) { + this(actor, name, localId, 0, addr, peerAddress); + DebuggingService.getInstance().addPortInstance(this); + } + public PTrafficLightPort(IEventReceiver actor, String name, int localId, int idx, Address addr, Address peerAddress) { + super(actor, name, localId, idx, addr, peerAddress); + DebuggingService.getInstance().addPortInstance(this); + } + + @Override + public void receive(Message m) { + if (!(m instanceof EventMessage)) + return; + EventMessage msg = (EventMessage) m; + if (msg.getEvtId() <= 0 || msg.getEvtId() >= MSG_MAX) + System.out.println("unknown"); + else { + if (messageStrings[msg.getEvtId()] != "timerTick"){ + DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]); + } + if (msg instanceof EventWithDataMessage) + getActor().receiveEvent(this, msg.getEvtId(), ((EventWithDataMessage)msg).getData()); + else + getActor().receiveEvent(this, msg.getEvtId(), null); + } + } + + + // sent messages + public void greenForCarDone() { + if (messageStrings[ OUT_greenForCarDone] != "timerTick"){ + DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_greenForCarDone]); + } + if (getPeerAddress()!=null) + getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_greenForCarDone)); + } + public void greenForPedDone() { + if (messageStrings[ OUT_greenForPedDone] != "timerTick"){ + DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_greenForPedDone]); + } + if (getPeerAddress()!=null) + getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_greenForPedDone)); + } + } + + // replicated port class + static public class PTrafficLightReplPort { + private ArrayList<PTrafficLightPort> ports; + private int replication; + + public PTrafficLightReplPort(IEventReceiver actor, String name, int localId, Address[] addr, + Address[] peerAddress) { + replication = addr==null? 0:addr.length; + ports = new ArrayList<PTrafficLight.PTrafficLightPort>(replication); + for (int i=0; i<replication; ++i) { + ports.add(new PTrafficLightPort( + actor, name+i, localId, i, addr[i], peerAddress[i])); + } + } + + public int getReplication() { + return replication; + } + + public int getIndexOf(InterfaceItemBase ifitem){ + return ifitem.getIdx(); + } + + public PTrafficLightPort get(int i) { + return ports.get(i); + } + + // outgoing messages + public void greenForCarDone(){ + for (int i=0; i<replication; ++i) { + ports.get(i).greenForCarDone(); + } + } + public void greenForPedDone(){ + for (int i=0; i<replication; ++i) { + ports.get(i).greenForPedDone(); + } + } + } + + + // port class + static public class PTrafficLightConjPort extends PortBase { + // constructors + public PTrafficLightConjPort(IEventReceiver actor, String name, int localId, Address addr, Address peerAddress) { + this(actor, name, localId, 0, addr, peerAddress); + DebuggingService.getInstance().addPortInstance(this); + } + public PTrafficLightConjPort(IEventReceiver actor, String name, int localId, int idx, Address addr, Address peerAddress) { + super(actor, name, localId, idx, addr, peerAddress); + DebuggingService.getInstance().addPortInstance(this); + } + + @Override + public void receive(Message m) { + if (!(m instanceof EventMessage)) + return; + EventMessage msg = (EventMessage) m; + if (msg.getEvtId() <= 0 || msg.getEvtId() >= MSG_MAX) + System.out.println("unknown"); + else { + if (messageStrings[msg.getEvtId()] != "timerTick"){ + DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]); + } + if (msg instanceof EventWithDataMessage) + getActor().receiveEvent(this, msg.getEvtId(), ((EventWithDataMessage)msg).getData()); + else + getActor().receiveEvent(this, msg.getEvtId(), null); + } + } + + + // sent messages + public void greenForCar() { + if (messageStrings[ IN_greenForCar] != "timerTick"){ + DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_greenForCar]); + } + if (getPeerAddress()!=null) + getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_greenForCar)); + } + public void greenForPed() { + if (messageStrings[ IN_greenForPed] != "timerTick"){ + DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_greenForPed]); + } + if (getPeerAddress()!=null) + getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_greenForPed)); + } + } + + // replicated port class + static public class PTrafficLightConjReplPort { + private ArrayList<PTrafficLightConjPort> ports; + private int replication; + + public PTrafficLightConjReplPort(IEventReceiver actor, String name, int localId, Address[] addr, + Address[] peerAddress) { + replication = addr==null? 0:addr.length; + ports = new ArrayList<PTrafficLight.PTrafficLightConjPort>(replication); + for (int i=0; i<replication; ++i) { + ports.add(new PTrafficLightConjPort( + actor, name+i, localId, i, addr[i], peerAddress[i])); + } + } + + public int getReplication() { + return replication; + } + + public int getIndexOf(InterfaceItemBase ifitem){ + return ifitem.getIdx(); + } + + public PTrafficLightConjPort get(int i) { + return ports.get(i); + } + + // incoming messages + public void greenForCar(){ + for (int i=0; i<replication; ++i) { + ports.get(i).greenForCar(); + } + } + public void greenForPed(){ + for (int i=0; i<replication; ++i) { + ports.get(i).greenForPed(); + } + } + } + +} diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/src-gen/trafficlight/example/SSTraffic.java b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/src-gen/trafficlight/example/SSTraffic.java index d5d710d47..277d92051 100644 --- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/src-gen/trafficlight/example/SSTraffic.java +++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/src-gen/trafficlight/example/SSTraffic.java @@ -35,12 +35,13 @@ public class SSTraffic extends SubSystemClassBase{ // all addresses // Addresses for the Subsystem Systemport - Address addr_item_SystemPort_0 = new Address(0,0,123); - Address addr_item_SystemPort_1 = new Address(0,0,124); - Address addr_item_SystemPort_2 = new Address(0,0,125); - Address addr_item_SystemPort_3 = new Address(0,0,126); - Address addr_item_SystemPort_4 = new Address(0,0,127); - Address addr_item_SystemPort_5 = new Address(0,0,128); + Address addr_item_SystemPort_0 = new Address(0,0,130); + Address addr_item_SystemPort_1 = new Address(0,0,131); + Address addr_item_SystemPort_2 = new Address(0,0,132); + Address addr_item_SystemPort_3 = new Address(0,0,133); + Address addr_item_SystemPort_4 = new Address(0,0,134); + Address addr_item_SystemPort_5 = new Address(0,0,135); + Address addr_item_SystemPort_6 = new Address(0,0,136); // actor instance /SSTraffic/application itself => Systemport Address // TODOTJ: For each Actor, multiple addresses should be generated (actor?, systemport, debugport) @@ -50,41 +51,51 @@ public class SSTraffic extends SubSystemClassBase{ // TODOTJ: For each Actor, multiple addresses should be generated (actor?, systemport, debugport) Address addr_item__SSTraffic_application_light1 = new Address(0,0,102); // interface items of /SSTraffic/application/light1 - Address addr_item__SSTraffic_application_light1_tcpCtrl = new Address(0,0,103); - Address addr_item__SSTraffic_application_light1_tcpPayload = new Address(0,0,104); - Address addr_item__SSTraffic_application_light1_timeout = new Address(0,0,105); - Address addr_item__SSTraffic_application_light1_blinkerTimeout = new Address(0,0,106); + Address addr_item__SSTraffic_application_light1_controller = new Address(0,0,103); + Address addr_item__SSTraffic_application_light1_tcpCtrl = new Address(0,0,104); + Address addr_item__SSTraffic_application_light1_tcpPayload = new Address(0,0,105); + Address addr_item__SSTraffic_application_light1_timeout = new Address(0,0,106); + Address addr_item__SSTraffic_application_light1_blinkerTimeout = new Address(0,0,107); // actor instance /SSTraffic/application/light1/trafficLightSocket itself => Systemport Address // TODOTJ: For each Actor, multiple addresses should be generated (actor?, systemport, debugport) - Address addr_item__SSTraffic_application_light1_trafficLightSocket = new Address(0,0,107); + Address addr_item__SSTraffic_application_light1_trafficLightSocket = new Address(0,0,108); // interface items of /SSTraffic/application/light1/trafficLightSocket - Address addr_item__SSTraffic_application_light1_trafficLightSocket_ControlPort = new Address(0,0,108); - Address addr_item__SSTraffic_application_light1_trafficLightSocket_PayloadPort = new Address(0,0,109); + Address addr_item__SSTraffic_application_light1_trafficLightSocket_ControlPort = new Address(0,0,109); + Address addr_item__SSTraffic_application_light1_trafficLightSocket_PayloadPort = new Address(0,0,110); // actor instance /SSTraffic/application/light2 itself => Systemport Address // TODOTJ: For each Actor, multiple addresses should be generated (actor?, systemport, debugport) - Address addr_item__SSTraffic_application_light2 = new Address(0,0,110); + Address addr_item__SSTraffic_application_light2 = new Address(0,0,111); // interface items of /SSTraffic/application/light2 - Address addr_item__SSTraffic_application_light2_tcpCtrl = new Address(0,0,111); - Address addr_item__SSTraffic_application_light2_tcpPayload = new Address(0,0,112); - Address addr_item__SSTraffic_application_light2_timeout = new Address(0,0,113); - Address addr_item__SSTraffic_application_light2_blinkerTimeout = new Address(0,0,114); + Address addr_item__SSTraffic_application_light2_controller = new Address(0,0,112); + Address addr_item__SSTraffic_application_light2_tcpCtrl = new Address(0,0,113); + Address addr_item__SSTraffic_application_light2_tcpPayload = new Address(0,0,114); + Address addr_item__SSTraffic_application_light2_timeout = new Address(0,0,115); + Address addr_item__SSTraffic_application_light2_blinkerTimeout = new Address(0,0,116); // actor instance /SSTraffic/application/light2/trafficLightSocket itself => Systemport Address // TODOTJ: For each Actor, multiple addresses should be generated (actor?, systemport, debugport) - Address addr_item__SSTraffic_application_light2_trafficLightSocket = new Address(0,0,115); + Address addr_item__SSTraffic_application_light2_trafficLightSocket = new Address(0,0,117); // interface items of /SSTraffic/application/light2/trafficLightSocket - Address addr_item__SSTraffic_application_light2_trafficLightSocket_ControlPort = new Address(0,0,116); - Address addr_item__SSTraffic_application_light2_trafficLightSocket_PayloadPort = new Address(0,0,117); + Address addr_item__SSTraffic_application_light2_trafficLightSocket_ControlPort = new Address(0,0,118); + Address addr_item__SSTraffic_application_light2_trafficLightSocket_PayloadPort = new Address(0,0,119); + // actor instance /SSTraffic/application/controller itself => Systemport Address + // TODOTJ: For each Actor, multiple addresses should be generated (actor?, systemport, debugport) + Address addr_item__SSTraffic_application_controller = new Address(0,0,120); + // interface items of /SSTraffic/application/controller + Address addr_item__SSTraffic_application_controller_light1 = new Address(0,0,121); + Address addr_item__SSTraffic_application_controller_light2 = new Address(0,0,122); + Address addr_item__SSTraffic_application_controller_timeout = new Address(0,0,123); // actor instance /SSTraffic/TimingService itself => Systemport Address // TODOTJ: For each Actor, multiple addresses should be generated (actor?, systemport, debugport) - Address addr_item__SSTraffic_TimingService = new Address(0,0,118); + Address addr_item__SSTraffic_TimingService = new Address(0,0,124); // interface items of /SSTraffic/TimingService - Address addr_item__SSTraffic_TimingService_timer_0 = new Address(0,0,119); - Address addr_item__SSTraffic_TimingService_timer_1 = new Address(0,0,120); - Address addr_item__SSTraffic_TimingService_timer_2 = new Address(0,0,121); - Address addr_item__SSTraffic_TimingService_timer_3 = new Address(0,0,122); + Address addr_item__SSTraffic_TimingService_timer_0 = new Address(0,0,125); + Address addr_item__SSTraffic_TimingService_timer_1 = new Address(0,0,126); + Address addr_item__SSTraffic_TimingService_timer_2 = new Address(0,0,127); + Address addr_item__SSTraffic_TimingService_timer_3 = new Address(0,0,128); + Address addr_item__SSTraffic_TimingService_timer_4 = new Address(0,0,129); // instantiate all actor instances - instances = new ActorClassBase[6]; + instances = new ActorClassBase[7]; instances[0] = new Application( this, "application", @@ -101,6 +112,9 @@ public class SSTraffic extends SubSystemClassBase{ // own interface item addresses new Address[][] {{addr_item__SSTraffic_application_light1}, { + addr_item__SSTraffic_application_light1_controller + }, + { addr_item__SSTraffic_application_light1_tcpCtrl }, { @@ -116,6 +130,9 @@ public class SSTraffic extends SubSystemClassBase{ // peer interface item addresses new Address[][] {{addr_item_SystemPort_1}, { + addr_item__SSTraffic_application_controller_light1 + }, + { addr_item__SSTraffic_application_light1_trafficLightSocket_ControlPort }, { @@ -157,6 +174,9 @@ public class SSTraffic extends SubSystemClassBase{ // own interface item addresses new Address[][] {{addr_item__SSTraffic_application_light2}, { + addr_item__SSTraffic_application_light2_controller + }, + { addr_item__SSTraffic_application_light2_tcpCtrl }, { @@ -172,6 +192,9 @@ public class SSTraffic extends SubSystemClassBase{ // peer interface item addresses new Address[][] {{addr_item_SystemPort_3}, { + addr_item__SSTraffic_application_controller_light2 + }, + { addr_item__SSTraffic_application_light2_trafficLightSocket_ControlPort }, { @@ -207,7 +230,35 @@ public class SSTraffic extends SubSystemClassBase{ } } ); - instances[5] = new ATimingService( + instances[5] = new TrafficController( + instances[0], + "controller", + // own interface item addresses + new Address[][] {{addr_item__SSTraffic_application_controller}, + { + addr_item__SSTraffic_application_controller_light1 + }, + { + addr_item__SSTraffic_application_controller_light2 + }, + { + addr_item__SSTraffic_application_controller_timeout + } + }, + // peer interface item addresses + new Address[][] {{addr_item_SystemPort_5}, + { + addr_item__SSTraffic_application_light1_controller + }, + { + addr_item__SSTraffic_application_light2_controller + }, + { + addr_item__SSTraffic_TimingService_timer_4 + } + } + ); + instances[6] = new ATimingService( this, "TimingService", // own interface item addresses @@ -216,16 +267,18 @@ public class SSTraffic extends SubSystemClassBase{ addr_item__SSTraffic_TimingService_timer_0, addr_item__SSTraffic_TimingService_timer_1, addr_item__SSTraffic_TimingService_timer_2, - addr_item__SSTraffic_TimingService_timer_3 + addr_item__SSTraffic_TimingService_timer_3, + addr_item__SSTraffic_TimingService_timer_4 } }, // peer interface item addresses - new Address[][] {{addr_item_SystemPort_5}, + new Address[][] {{addr_item_SystemPort_6}, { addr_item__SSTraffic_application_light1_timeout, addr_item__SSTraffic_application_light1_blinkerTimeout, addr_item__SSTraffic_application_light2_timeout, - addr_item__SSTraffic_application_light2_blinkerTimeout + addr_item__SSTraffic_application_light2_blinkerTimeout, + addr_item__SSTraffic_application_controller_timeout } } ); @@ -252,7 +305,8 @@ public class SSTraffic extends SubSystemClassBase{ addr_item_SystemPort_2, addr_item_SystemPort_3, addr_item_SystemPort_4, - addr_item_SystemPort_5 + addr_item_SystemPort_5, + addr_item_SystemPort_6 }, // peer addresses new Address[]{ @@ -261,6 +315,7 @@ public class SSTraffic extends SubSystemClassBase{ addr_item__SSTraffic_application_light1_trafficLightSocket, addr_item__SSTraffic_application_light2, addr_item__SSTraffic_application_light2_trafficLightSocket, + addr_item__SSTraffic_application_controller, addr_item__SSTraffic_TimingService }); } diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/src-gen/trafficlight/example/TrafficController.java b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/src-gen/trafficlight/example/TrafficController.java new file mode 100644 index 000000000..e4ddfdd68 --- /dev/null +++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/src-gen/trafficlight/example/TrafficController.java @@ -0,0 +1,460 @@ +package trafficlight.example; + +import org.eclipse.etrice.runtime.java.messaging.Address; +import org.eclipse.etrice.runtime.java.messaging.IRTObject; +import org.eclipse.etrice.runtime.java.messaging.IMessageReceiver; +import org.eclipse.etrice.runtime.java.modelbase.ActorClassBase; +import org.eclipse.etrice.runtime.java.modelbase.SubSystemClassBase; +import org.eclipse.etrice.runtime.java.modelbase.InterfaceItemBase; +import org.eclipse.etrice.runtime.java.debugging.DebuggingService; +import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*; + +import room.basic.service.timing.*; + +import room.basic.service.timing.PTimer.*; +import trafficlight.example.PTrafficLight.*; + + + +public class TrafficController extends ActorClassBase { + + + + //--------------------- ports + protected PTrafficLightConjPort light1 = null; + protected PTrafficLightConjPort light2 = null; + + //--------------------- saps + protected PTimerConjPort timeout = null; + + //--------------------- services + + //--------------------- interface item IDs + public static final int IFITEM_light1 = 1; + public static final int IFITEM_light2 = 2; + public static final int IFITEM_timeout = 3; + + + /*--------------------- attributes ---------------------*/ + /*--------------------- operations ---------------------*/ + + //--------------------- construction + public TrafficController(IRTObject parent, String name, Address[][] port_addr, Address[][] peer_addr){ + super(parent, name, port_addr[0][0], peer_addr[0][0]); + setClassName("TrafficController"); + + // initialize attributes + + // own ports + light1 = new PTrafficLightConjPort(this, "light1", IFITEM_light1, 0, port_addr[IFITEM_light1][0], peer_addr[IFITEM_light1][0]); + light2 = new PTrafficLightConjPort(this, "light2", IFITEM_light2, 0, port_addr[IFITEM_light2][0], peer_addr[IFITEM_light2][0]); + + // own saps + timeout = new PTimerConjPort(this, "timeout", IFITEM_timeout, 0, port_addr[IFITEM_timeout][0], peer_addr[IFITEM_timeout][0]); + + // own service implementations + } + + + //--------------------- attribute setters and getters + + + //--------------------- port getters + public PTrafficLightConjPort getLight1 (){ + return this.light1; + } + public PTrafficLightConjPort getLight2 (){ + return this.light2; + } + public PTimerConjPort getTimeout (){ + return this.timeout; + } + + //--------------------- lifecycle functions + public void init(){ + initUser(); + } + + public void start(){ + startUser(); + } + + public void stop(){ + stopUser(); + } + + public void destroy(){ + } + + + /* state IDs */ + public static final int STATE_Idle = 2; + public static final int STATE_Light1GreenForCars = 3; + public static final int STATE_SwitchToLight1GreenForCars = 4; + public static final int STATE_state0 = 5; + public static final int STATE_state1 = 6; + public static final int STATE_SwitchToLight2GreenForCars = 7; + public static final int STATE_state2 = 8; + public static final int STATE_state3 = 9; + public static final int STATE_Light2GreenForCars = 10; + + /* transition chains */ + public static final int CHAIN_TRANS_INITIAL_TO__Idle = 1; + public static final int CHAIN_TRANS_tr0_FROM_Idle_TO_SwitchToLight1GreenForCars_BY_timeouttimeout = 2; + public static final int CHAIN_TRANS_tr10_FROM_Light2GreenForCars_TO_SwitchToLight1GreenForCars_BY_timeouttimeout = 3; + public static final int CHAIN_TRANS_tr1_FROM_SwitchToLight1GreenForCars_TO_state0_BY_greenForCarDonelight1 = 4; + public static final int CHAIN_TRANS_tr2_FROM_SwitchToLight1GreenForCars_TO_state1_BY_greenForPedDonelight2 = 5; + public static final int CHAIN_TRANS_tr3_FROM_state1_TO_Light1GreenForCars_BY_greenForCarDonelight1 = 6; + public static final int CHAIN_TRANS_tr4_FROM_state0_TO_Light1GreenForCars_BY_greenForPedDonelight2 = 7; + public static final int CHAIN_TRANS_tr5_FROM_Light1GreenForCars_TO_SwitchToLight2GreenForCars_BY_timeouttimeout = 8; + public static final int CHAIN_TRANS_tr6_FROM_SwitchToLight2GreenForCars_TO_state2_BY_greenForPedDonelight1 = 9; + public static final int CHAIN_TRANS_tr7_FROM_SwitchToLight2GreenForCars_TO_state3_BY_greenForCarDonelight2 = 10; + public static final int CHAIN_TRANS_tr8_FROM_state2_TO_Light2GreenForCars_BY_greenForCarDonelight2 = 11; + public static final int CHAIN_TRANS_tr9_FROM_state3_TO_Light2GreenForCars_BY_greenForPedDonelight1 = 12; + + /* triggers */ + public static final int POLLING = 0; + public static final int TRIG_light1__greenForCarDone = IFITEM_light1 + EVT_SHIFT*PTrafficLight.OUT_greenForCarDone; + public static final int TRIG_light1__greenForPedDone = IFITEM_light1 + EVT_SHIFT*PTrafficLight.OUT_greenForPedDone; + public static final int TRIG_light2__greenForCarDone = IFITEM_light2 + EVT_SHIFT*PTrafficLight.OUT_greenForCarDone; + public static final int TRIG_light2__greenForPedDone = IFITEM_light2 + EVT_SHIFT*PTrafficLight.OUT_greenForPedDone; + public static final int TRIG_timeout__timeout = IFITEM_timeout + EVT_SHIFT*PTimer.OUT_timeout; + + // state names + protected static final String stateStrings[] = {"<no state>","<top>","Idle", + "Light1GreenForCars", + "SwitchToLight1GreenForCars", + "state0", + "state1", + "SwitchToLight2GreenForCars", + "state2", + "state3", + "Light2GreenForCars" + }; + + // history + protected int history[] = {NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE}; + + private void setState(int new_state) { + DebuggingService.getInstance().addActorState(this,stateStrings[new_state]); + if (stateStrings[new_state]!="Idle") { + System.out.println(getInstancePath() + " -> " + stateStrings[new_state]); + } + this.state = new_state; + } + + /* Entry and Exit Codes */ + protected void entry_Idle() { + timeout.startTimeout(3000); + } + protected void entry_Light1GreenForCars() { + timeout.startTimeout(10000); + } + protected void entry_SwitchToLight1GreenForCars() { + light1.greenForCar(); + light2.greenForPed(); + } + protected void entry_SwitchToLight2GreenForCars() { + light1.greenForPed(); + light2.greenForCar(); + } + protected void entry_Light2GreenForCars() { + timeout.startTimeout(10000); + } + + /* Action Codes */ + + /** + * calls exit codes while exiting from the current state to one of its + * parent states while remembering the history + * @param current - the current state + * @param to - the final parent state + * @param handler - entry and exit codes are called only if not handler (for handler TransitionPoints) + */ + private void exitTo(int current, int to, boolean handler) { + while (current!=to) { + switch (current) { + case STATE_Idle: + this.history[STATE_TOP] = STATE_Idle; + current = STATE_TOP; + break; + case STATE_Light1GreenForCars: + this.history[STATE_TOP] = STATE_Light1GreenForCars; + current = STATE_TOP; + break; + case STATE_SwitchToLight1GreenForCars: + this.history[STATE_TOP] = STATE_SwitchToLight1GreenForCars; + current = STATE_TOP; + break; + case STATE_state0: + this.history[STATE_TOP] = STATE_state0; + current = STATE_TOP; + break; + case STATE_state1: + this.history[STATE_TOP] = STATE_state1; + current = STATE_TOP; + break; + case STATE_SwitchToLight2GreenForCars: + this.history[STATE_TOP] = STATE_SwitchToLight2GreenForCars; + current = STATE_TOP; + break; + case STATE_state2: + this.history[STATE_TOP] = STATE_state2; + current = STATE_TOP; + break; + case STATE_state3: + this.history[STATE_TOP] = STATE_state3; + current = STATE_TOP; + break; + case STATE_Light2GreenForCars: + this.history[STATE_TOP] = STATE_Light2GreenForCars; + current = STATE_TOP; + break; + } + } + } + + /** + * calls action, entry and exit codes along a transition chain. The generic data are cast to typed data + * matching the trigger of this chain. The ID of the final state is returned + * @param chain - the chain ID + * @param generic_data - the generic data pointer + * @return the ID of the final state + */ + private int executeTransitionChain(int chain, InterfaceItemBase ifitem, Object generic_data) { + switch (chain) { + case CHAIN_TRANS_INITIAL_TO__Idle: + { + return STATE_Idle; + } + case CHAIN_TRANS_tr0_FROM_Idle_TO_SwitchToLight1GreenForCars_BY_timeouttimeout: + { + return STATE_SwitchToLight1GreenForCars; + } + case CHAIN_TRANS_tr1_FROM_SwitchToLight1GreenForCars_TO_state0_BY_greenForCarDonelight1: + { + return STATE_state0; + } + case CHAIN_TRANS_tr2_FROM_SwitchToLight1GreenForCars_TO_state1_BY_greenForPedDonelight2: + { + return STATE_state1; + } + case CHAIN_TRANS_tr3_FROM_state1_TO_Light1GreenForCars_BY_greenForCarDonelight1: + { + return STATE_Light1GreenForCars; + } + case CHAIN_TRANS_tr4_FROM_state0_TO_Light1GreenForCars_BY_greenForPedDonelight2: + { + return STATE_Light1GreenForCars; + } + case CHAIN_TRANS_tr5_FROM_Light1GreenForCars_TO_SwitchToLight2GreenForCars_BY_timeouttimeout: + { + return STATE_SwitchToLight2GreenForCars; + } + case CHAIN_TRANS_tr6_FROM_SwitchToLight2GreenForCars_TO_state2_BY_greenForPedDonelight1: + { + return STATE_state2; + } + case CHAIN_TRANS_tr7_FROM_SwitchToLight2GreenForCars_TO_state3_BY_greenForCarDonelight2: + { + return STATE_state3; + } + case CHAIN_TRANS_tr8_FROM_state2_TO_Light2GreenForCars_BY_greenForCarDonelight2: + { + return STATE_Light2GreenForCars; + } + case CHAIN_TRANS_tr9_FROM_state3_TO_Light2GreenForCars_BY_greenForPedDonelight1: + { + return STATE_Light2GreenForCars; + } + case CHAIN_TRANS_tr10_FROM_Light2GreenForCars_TO_SwitchToLight1GreenForCars_BY_timeouttimeout: + { + return STATE_SwitchToLight1GreenForCars; + } + } + return NO_STATE; + } + + /** + * calls entry codes while entering a state's history. The ID of the final leaf state is returned + * @param state - the state which is entered + * @param handler - entry code is executed if not handler + * @return - the ID of the final leaf state + */ + private int enterHistory(int state, boolean handler, boolean skip_entry) { + while (true) { + switch (state) { + case STATE_Idle: + if (!(skip_entry || handler)) entry_Idle(); + // in leaf state: return state id + return STATE_Idle; + case STATE_Light1GreenForCars: + if (!(skip_entry || handler)) entry_Light1GreenForCars(); + // in leaf state: return state id + return STATE_Light1GreenForCars; + case STATE_SwitchToLight1GreenForCars: + if (!(skip_entry || handler)) entry_SwitchToLight1GreenForCars(); + // in leaf state: return state id + return STATE_SwitchToLight1GreenForCars; + case STATE_state0: + // in leaf state: return state id + return STATE_state0; + case STATE_state1: + // in leaf state: return state id + return STATE_state1; + case STATE_SwitchToLight2GreenForCars: + if (!(skip_entry || handler)) entry_SwitchToLight2GreenForCars(); + // in leaf state: return state id + return STATE_SwitchToLight2GreenForCars; + case STATE_state2: + // in leaf state: return state id + return STATE_state2; + case STATE_state3: + // in leaf state: return state id + return STATE_state3; + case STATE_Light2GreenForCars: + if (!(skip_entry || handler)) entry_Light2GreenForCars(); + // in leaf state: return state id + return STATE_Light2GreenForCars; + case STATE_TOP: + state = this.history[STATE_TOP]; + break; + } + skip_entry = false; + } + //return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true) + } + + public void executeInitTransition() { + int chain = CHAIN_TRANS_INITIAL_TO__Idle; + int next = executeTransitionChain(chain, null, null); + next = enterHistory(next, false, false); + setState(next); + } + + /* receiveEvent contains the main implementation of the FSM */ + public void receiveEvent(InterfaceItemBase ifitem, int evt, Object generic_data) { + int trigger = ifitem.getLocalId() + EVT_SHIFT*evt; + int chain = NOT_CAUGHT; + int catching_state = NO_STATE; + boolean is_handler = false; + boolean skip_entry = false; + + if (!handleSystemEvent(ifitem, evt, generic_data)) { + switch (this.state) { + case STATE_Idle: + switch(trigger) { + case TRIG_timeout__timeout: + { + chain = CHAIN_TRANS_tr0_FROM_Idle_TO_SwitchToLight1GreenForCars_BY_timeouttimeout; + catching_state = STATE_TOP; + } + break; + } + break; + case STATE_Light1GreenForCars: + switch(trigger) { + case TRIG_timeout__timeout: + { + chain = CHAIN_TRANS_tr5_FROM_Light1GreenForCars_TO_SwitchToLight2GreenForCars_BY_timeouttimeout; + catching_state = STATE_TOP; + } + break; + } + break; + case STATE_SwitchToLight1GreenForCars: + switch(trigger) { + case TRIG_light1__greenForCarDone: + { + chain = CHAIN_TRANS_tr1_FROM_SwitchToLight1GreenForCars_TO_state0_BY_greenForCarDonelight1; + catching_state = STATE_TOP; + } + break; + case TRIG_light2__greenForPedDone: + { + chain = CHAIN_TRANS_tr2_FROM_SwitchToLight1GreenForCars_TO_state1_BY_greenForPedDonelight2; + catching_state = STATE_TOP; + } + break; + } + break; + case STATE_state0: + switch(trigger) { + case TRIG_light2__greenForPedDone: + { + chain = CHAIN_TRANS_tr4_FROM_state0_TO_Light1GreenForCars_BY_greenForPedDonelight2; + catching_state = STATE_TOP; + } + break; + } + break; + case STATE_state1: + switch(trigger) { + case TRIG_light1__greenForCarDone: + { + chain = CHAIN_TRANS_tr3_FROM_state1_TO_Light1GreenForCars_BY_greenForCarDonelight1; + catching_state = STATE_TOP; + } + break; + } + break; + case STATE_SwitchToLight2GreenForCars: + switch(trigger) { + case TRIG_light1__greenForPedDone: + { + chain = CHAIN_TRANS_tr6_FROM_SwitchToLight2GreenForCars_TO_state2_BY_greenForPedDonelight1; + catching_state = STATE_TOP; + } + break; + case TRIG_light2__greenForCarDone: + { + chain = CHAIN_TRANS_tr7_FROM_SwitchToLight2GreenForCars_TO_state3_BY_greenForCarDonelight2; + catching_state = STATE_TOP; + } + break; + } + break; + case STATE_state2: + switch(trigger) { + case TRIG_light2__greenForCarDone: + { + chain = CHAIN_TRANS_tr8_FROM_state2_TO_Light2GreenForCars_BY_greenForCarDonelight2; + catching_state = STATE_TOP; + } + break; + } + break; + case STATE_state3: + switch(trigger) { + case TRIG_light1__greenForPedDone: + { + chain = CHAIN_TRANS_tr9_FROM_state3_TO_Light2GreenForCars_BY_greenForPedDonelight1; + catching_state = STATE_TOP; + } + break; + } + break; + case STATE_Light2GreenForCars: + switch(trigger) { + case TRIG_timeout__timeout: + { + chain = CHAIN_TRANS_tr10_FROM_Light2GreenForCars_TO_SwitchToLight1GreenForCars_BY_timeouttimeout; + catching_state = STATE_TOP; + } + break; + } + break; + } + } + if (chain != NOT_CAUGHT) { + exitTo(this.state, catching_state, is_handler); + int next = executeTransitionChain(chain, ifitem, generic_data); + next = enterHistory(next, is_handler, skip_entry); + setState(next); + } + } + + //****************************************** + // END of generated code for FSM + //****************************************** +}; diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/src-gen/trafficlight/example/TrafficLight.java b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/src-gen/trafficlight/example/TrafficLight.java index fb53e94e4..a3c630f26 100644 --- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/src-gen/trafficlight/example/TrafficLight.java +++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/src-gen/trafficlight/example/TrafficLight.java @@ -15,6 +15,7 @@ import room.basic.service.timing.*; import room.basic.service.tcp.PTcpControl.*; import room.basic.service.tcp.PTcpPayload.*; import room.basic.service.timing.PTimer.*; +import trafficlight.example.PTrafficLight.*; @@ -23,6 +24,7 @@ public class TrafficLight extends ActorClassBase { //--------------------- ports + protected PTrafficLightPort controller = null; protected PTcpControlConjPort tcpCtrl = null; protected PTcpPayloadConjPort tcpPayload = null; @@ -33,10 +35,11 @@ public class TrafficLight extends ActorClassBase { //--------------------- services //--------------------- interface item IDs - public static final int IFITEM_tcpCtrl = 1; - public static final int IFITEM_tcpPayload = 2; - public static final int IFITEM_timeout = 3; - public static final int IFITEM_blinkerTimeout = 4; + public static final int IFITEM_controller = 1; + public static final int IFITEM_tcpCtrl = 2; + public static final int IFITEM_tcpPayload = 3; + public static final int IFITEM_timeout = 4; + public static final int IFITEM_blinkerTimeout = 5; /*--------------------- attributes ---------------------*/ @@ -58,6 +61,7 @@ public class TrafficLight extends ActorClassBase { ipConfig = new DTcpControl(); // own ports + controller = new PTrafficLightPort(this, "controller", IFITEM_controller, 0, port_addr[IFITEM_controller][0], peer_addr[IFITEM_controller][0]); tcpCtrl = new PTcpControlConjPort(this, "tcpCtrl", IFITEM_tcpCtrl, 0, port_addr[IFITEM_tcpCtrl][0], peer_addr[IFITEM_tcpCtrl][0]); tcpPayload = new PTcpPayloadConjPort(this, "tcpPayload", IFITEM_tcpPayload, 0, port_addr[IFITEM_tcpPayload][0], peer_addr[IFITEM_tcpPayload][0]); @@ -79,6 +83,9 @@ public class TrafficLight extends ActorClassBase { //--------------------- port getters + public PTrafficLightPort getController (){ + return this.controller; + } public PTcpControlConjPort getTcpCtrl (){ return this.tcpCtrl; } @@ -112,40 +119,52 @@ public class TrafficLight extends ActorClassBase { /* state IDs */ public static final int STATE_Off_Blinking = 2; public static final int STATE_OpenSocket = 3; - public static final int STATE_Yellow = 4; - public static final int STATE_Red = 5; - public static final int STATE_Green = 6; + public static final int STATE_CarYellow = 4; + public static final int STATE_PedRed = 5; + public static final int STATE_CarGreen = 6; public static final int STATE_Off_Blinking_On = 7; public static final int STATE_Off_Blinking_Off = 8; + public static final int STATE_CarYellow2 = 9; + public static final int STATE_CarRed = 10; + public static final int STATE_PedGreen = 11; /* transition chains */ public static final int CHAIN_Off_Blinking_TRANS_tr1_FROM_On_TO_Off_BY_timeoutblinkerTimeout = 1; public static final int CHAIN_Off_Blinking_TRANS_tr2_FROM_Off_TO_On_BY_timeoutblinkerTimeout = 2; public static final int CHAIN_TRANS_INITIAL_TO__OpenSocket = 3; public static final int CHAIN_TRANS_tr0_FROM_OpenSocket_TO_Off_Blinking_tp0_BY_establishedtcpCtrl = 4; - public static final int CHAIN_TRANS_tr1_FROM_Yellow_TO_Green_BY_timeouttimeout = 5; - public static final int CHAIN_TRANS_tr2_FROM_Off_Blinking_TO_Red_BY_timeouttimeout = 6; - public static final int CHAIN_TRANS_tr3_FROM_Red_TO_Yellow_BY_timeouttimeout = 7; - public static final int CHAIN_TRANS_tr4_FROM_Green_TO_Off_Blinking_tp0_BY_timeouttimeout = 8; + public static final int CHAIN_TRANS_tr1_FROM_CarYellow_TO_CarGreen_BY_timeouttimeout = 5; + public static final int CHAIN_TRANS_tr2_FROM_Off_Blinking_TO_PedRed_BY_greenForCarcontroller = 6; + public static final int CHAIN_TRANS_tr3_FROM_PedRed_TO_CarYellow_BY_timeouttimeout = 7; + public static final int CHAIN_TRANS_tr4_FROM_Off_Blinking_TO_CarYellow2_BY_greenForPedcontroller = 8; + public static final int CHAIN_TRANS_tr5_FROM_CarYellow2_TO_CarRed_BY_timeouttimeout = 9; + public static final int CHAIN_TRANS_tr6_FROM_CarRed_TO_PedGreen_BY_timeouttimeout = 10; + public static final int CHAIN_TRANS_tr7_FROM_PedGreen_TO_PedRed_BY_greenForCarcontroller = 11; + public static final int CHAIN_TRANS_tr8_FROM_CarGreen_TO_CarYellow2_BY_greenForPedcontroller = 12; /* triggers */ public static final int POLLING = 0; public static final int TRIG_blinkerTimeout__timeout = IFITEM_blinkerTimeout + EVT_SHIFT*PTimer.OUT_timeout; + public static final int TRIG_controller__greenForCar = IFITEM_controller + EVT_SHIFT*PTrafficLight.IN_greenForCar; + public static final int TRIG_controller__greenForPed = IFITEM_controller + EVT_SHIFT*PTrafficLight.IN_greenForPed; public static final int TRIG_tcpCtrl__established = IFITEM_tcpCtrl + EVT_SHIFT*PTcpControl.OUT_established; public static final int TRIG_timeout__timeout = IFITEM_timeout + EVT_SHIFT*PTimer.OUT_timeout; // state names protected static final String stateStrings[] = {"<no state>","<top>","Off_Blinking", "OpenSocket", - "Yellow", - "Red", - "Green", + "CarYellow", + "PedRed", + "CarGreen", "Off_Blinking_On", - "Off_Blinking_Off" + "Off_Blinking_Off", + "CarYellow2", + "CarRed", + "PedGreen" }; // history - protected int history[] = {NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE}; + protected int history[] = {NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE,NO_STATE}; private void setState(int new_state) { DebuggingService.getInstance().addActorState(this,stateStrings[new_state]); @@ -159,32 +178,42 @@ public class TrafficLight extends ActorClassBase { protected void entry_OpenSocket() { tcpCtrl.open(ipConfig); } - protected void entry_Yellow() { + protected void entry_CarYellow() { sendString("carLights=yellow\n"); timeout.startTimeout(1000); } - protected void entry_Red() { + protected void entry_PedRed() { + sendString("pedLights=red\n"); sendString("carLights=red\n"); timeout.startTimeout(1000); } - protected void entry_Green() { + protected void entry_CarGreen() { sendString("carLights=green\n"); - timeout.startTimeout(1000); - } - protected void entry_Off_Blinking() { - timeout.startTimeout(6000); + controller.greenForCarDone(); } protected void entry_Off_Blinking_On() { sendString("carLights=red\n"); sendString("pedLights=red\n"); - blinkerTimeout.startTimeout(1000); + blinkerTimeout.startTimeout(500); } protected void exit_Off_Blinking_On() { sendString("carLights=off\n"); sendString("pedLights=off\n"); } protected void entry_Off_Blinking_Off() { - blinkerTimeout.startTimeout(1000); + blinkerTimeout.startTimeout(500); + } + protected void entry_CarYellow2() { + sendString("carLights=yellow\n"); + timeout.startTimeout(1000); + } + protected void entry_CarRed() { + sendString("carLights=red\n"); + timeout.startTimeout(1000); + } + protected void entry_PedGreen() { + sendString("pedLights=green\n"); + controller.greenForPedDone(); } /* Action Codes */ @@ -203,16 +232,16 @@ public class TrafficLight extends ActorClassBase { this.history[STATE_TOP] = STATE_OpenSocket; current = STATE_TOP; break; - case STATE_Yellow: - this.history[STATE_TOP] = STATE_Yellow; + case STATE_CarYellow: + this.history[STATE_TOP] = STATE_CarYellow; current = STATE_TOP; break; - case STATE_Red: - this.history[STATE_TOP] = STATE_Red; + case STATE_PedRed: + this.history[STATE_TOP] = STATE_PedRed; current = STATE_TOP; break; - case STATE_Green: - this.history[STATE_TOP] = STATE_Green; + case STATE_CarGreen: + this.history[STATE_TOP] = STATE_CarGreen; current = STATE_TOP; break; case STATE_Off_Blinking: @@ -228,6 +257,18 @@ public class TrafficLight extends ActorClassBase { this.history[STATE_Off_Blinking] = STATE_Off_Blinking_Off; current = STATE_Off_Blinking; break; + case STATE_CarYellow2: + this.history[STATE_TOP] = STATE_CarYellow2; + current = STATE_TOP; + break; + case STATE_CarRed: + this.history[STATE_TOP] = STATE_CarRed; + current = STATE_TOP; + break; + case STATE_PedGreen: + this.history[STATE_TOP] = STATE_PedGreen; + current = STATE_TOP; + break; } } } @@ -247,25 +288,39 @@ public class TrafficLight extends ActorClassBase { } case CHAIN_TRANS_tr0_FROM_OpenSocket_TO_Off_Blinking_tp0_BY_establishedtcpCtrl: { - entry_Off_Blinking(); return STATE_Off_Blinking_On; } - case CHAIN_TRANS_tr2_FROM_Off_Blinking_TO_Red_BY_timeouttimeout: + case CHAIN_TRANS_tr2_FROM_Off_Blinking_TO_PedRed_BY_greenForCarcontroller: { - return STATE_Red; + return STATE_PedRed; } - case CHAIN_TRANS_tr3_FROM_Red_TO_Yellow_BY_timeouttimeout: + case CHAIN_TRANS_tr3_FROM_PedRed_TO_CarYellow_BY_timeouttimeout: { - return STATE_Yellow; + return STATE_CarYellow; } - case CHAIN_TRANS_tr1_FROM_Yellow_TO_Green_BY_timeouttimeout: + case CHAIN_TRANS_tr1_FROM_CarYellow_TO_CarGreen_BY_timeouttimeout: { - return STATE_Green; + return STATE_CarGreen; } - case CHAIN_TRANS_tr4_FROM_Green_TO_Off_Blinking_tp0_BY_timeouttimeout: + case CHAIN_TRANS_tr4_FROM_Off_Blinking_TO_CarYellow2_BY_greenForPedcontroller: { - entry_Off_Blinking(); - return STATE_Off_Blinking_On; + return STATE_CarYellow2; + } + case CHAIN_TRANS_tr5_FROM_CarYellow2_TO_CarRed_BY_timeouttimeout: + { + return STATE_CarRed; + } + case CHAIN_TRANS_tr6_FROM_CarRed_TO_PedGreen_BY_timeouttimeout: + { + return STATE_PedGreen; + } + case CHAIN_TRANS_tr7_FROM_PedGreen_TO_PedRed_BY_greenForCarcontroller: + { + return STATE_PedRed; + } + case CHAIN_TRANS_tr8_FROM_CarGreen_TO_CarYellow2_BY_greenForPedcontroller: + { + return STATE_CarYellow2; } case CHAIN_Off_Blinking_TRANS_tr1_FROM_On_TO_Off_BY_timeoutblinkerTimeout: { @@ -292,20 +347,19 @@ public class TrafficLight extends ActorClassBase { if (!(skip_entry || handler)) entry_OpenSocket(); // in leaf state: return state id return STATE_OpenSocket; - case STATE_Yellow: - if (!(skip_entry || handler)) entry_Yellow(); + case STATE_CarYellow: + if (!(skip_entry || handler)) entry_CarYellow(); // in leaf state: return state id - return STATE_Yellow; - case STATE_Red: - if (!(skip_entry || handler)) entry_Red(); + return STATE_CarYellow; + case STATE_PedRed: + if (!(skip_entry || handler)) entry_PedRed(); // in leaf state: return state id - return STATE_Red; - case STATE_Green: - if (!(skip_entry || handler)) entry_Green(); + return STATE_PedRed; + case STATE_CarGreen: + if (!(skip_entry || handler)) entry_CarGreen(); // in leaf state: return state id - return STATE_Green; + return STATE_CarGreen; case STATE_Off_Blinking: - if (!(skip_entry || handler)) entry_Off_Blinking(); // state has a sub graph // without init transition state = this.history[STATE_Off_Blinking]; @@ -318,6 +372,18 @@ public class TrafficLight extends ActorClassBase { if (!(skip_entry || handler)) entry_Off_Blinking_Off(); // in leaf state: return state id return STATE_Off_Blinking_Off; + case STATE_CarYellow2: + if (!(skip_entry || handler)) entry_CarYellow2(); + // in leaf state: return state id + return STATE_CarYellow2; + case STATE_CarRed: + if (!(skip_entry || handler)) entry_CarRed(); + // in leaf state: return state id + return STATE_CarRed; + case STATE_PedGreen: + if (!(skip_entry || handler)) entry_PedGreen(); + // in leaf state: return state id + return STATE_PedGreen; case STATE_TOP: state = this.history[STATE_TOP]; break; @@ -354,31 +420,31 @@ public class TrafficLight extends ActorClassBase { break; } break; - case STATE_Yellow: + case STATE_CarYellow: switch(trigger) { case TRIG_timeout__timeout: { - chain = CHAIN_TRANS_tr1_FROM_Yellow_TO_Green_BY_timeouttimeout; + chain = CHAIN_TRANS_tr1_FROM_CarYellow_TO_CarGreen_BY_timeouttimeout; catching_state = STATE_TOP; } break; } break; - case STATE_Red: + case STATE_PedRed: switch(trigger) { case TRIG_timeout__timeout: { - chain = CHAIN_TRANS_tr3_FROM_Red_TO_Yellow_BY_timeouttimeout; + chain = CHAIN_TRANS_tr3_FROM_PedRed_TO_CarYellow_BY_timeouttimeout; catching_state = STATE_TOP; } break; } break; - case STATE_Green: + case STATE_CarGreen: switch(trigger) { - case TRIG_timeout__timeout: + case TRIG_controller__greenForPed: { - chain = CHAIN_TRANS_tr4_FROM_Green_TO_Off_Blinking_tp0_BY_timeouttimeout; + chain = CHAIN_TRANS_tr8_FROM_CarGreen_TO_CarYellow2_BY_greenForPedcontroller; catching_state = STATE_TOP; } break; @@ -392,9 +458,15 @@ public class TrafficLight extends ActorClassBase { catching_state = STATE_Off_Blinking; } break; - case TRIG_timeout__timeout: + case TRIG_controller__greenForCar: { - chain = CHAIN_TRANS_tr2_FROM_Off_Blinking_TO_Red_BY_timeouttimeout; + chain = CHAIN_TRANS_tr2_FROM_Off_Blinking_TO_PedRed_BY_greenForCarcontroller; + catching_state = STATE_TOP; + } + break; + case TRIG_controller__greenForPed: + { + chain = CHAIN_TRANS_tr4_FROM_Off_Blinking_TO_CarYellow2_BY_greenForPedcontroller; catching_state = STATE_TOP; } break; @@ -408,9 +480,45 @@ public class TrafficLight extends ActorClassBase { catching_state = STATE_Off_Blinking; } break; + case TRIG_controller__greenForCar: + { + chain = CHAIN_TRANS_tr2_FROM_Off_Blinking_TO_PedRed_BY_greenForCarcontroller; + catching_state = STATE_TOP; + } + break; + case TRIG_controller__greenForPed: + { + chain = CHAIN_TRANS_tr4_FROM_Off_Blinking_TO_CarYellow2_BY_greenForPedcontroller; + catching_state = STATE_TOP; + } + break; + } + break; + case STATE_CarYellow2: + switch(trigger) { + case TRIG_timeout__timeout: + { + chain = CHAIN_TRANS_tr5_FROM_CarYellow2_TO_CarRed_BY_timeouttimeout; + catching_state = STATE_TOP; + } + break; + } + break; + case STATE_CarRed: + switch(trigger) { case TRIG_timeout__timeout: { - chain = CHAIN_TRANS_tr2_FROM_Off_Blinking_TO_Red_BY_timeouttimeout; + chain = CHAIN_TRANS_tr6_FROM_CarRed_TO_PedGreen_BY_timeouttimeout; + catching_state = STATE_TOP; + } + break; + } + break; + case STATE_PedGreen: + switch(trigger) { + case TRIG_controller__greenForCar: + { + chain = CHAIN_TRANS_tr7_FROM_PedGreen_TO_PedRed_BY_greenForCarcontroller; catching_state = STATE_TOP; } break; diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/tmp/log/SSTraffic_Async.seq b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/tmp/log/SSTraffic_Async.seq index f3782be0a..98f564edd 100644 --- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/tmp/log/SSTraffic_Async.seq +++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/tmp/log/SSTraffic_Async.seq @@ -4,6 +4,7 @@ /SSTraffic >-- /SSTraffic/application/light1/trafficLightSocket executeInitialTransition /SSTraffic >-- /SSTraffic/application/light2 executeInitialTransition /SSTraffic >-- /SSTraffic/application/light2/trafficLightSocket executeInitialTransition + /SSTraffic >-- /SSTraffic/application/controller executeInitialTransition /SSTraffic >-- /SSTraffic/TimingService executeInitialTransition /SSTraffic --> /SSTraffic/application executeInitialTransition /SSTraffic --> /SSTraffic/application/light1 executeInitialTransition @@ -16,7 +17,414 @@ /SSTraffic/application/light2 >>> OpenSocket /SSTraffic --> /SSTraffic/application/light2/trafficLightSocket executeInitialTransition /SSTraffic/application/light2/trafficLightSocket >>> closed + /SSTraffic --> /SSTraffic/application/controller executeInitialTransition + /SSTraffic/application/controller >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/controller >>> Idle /SSTraffic --> /SSTraffic/TimingService executeInitialTransition /SSTraffic/TimingService >>> Operational /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket open - /SSTraffic/application/light1/trafficLightSocket >-- /SSTraffic/application/light1 error + /SSTraffic/application/light1/trafficLightSocket >-- /SSTraffic/application/light1 established + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket open + /SSTraffic/application/light2/trafficLightSocket >-- /SSTraffic/application/light2 established + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/controller --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/application/light1/trafficLightSocket --> /SSTraffic/application/light1 established + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light1 >>> Off_Blinking_On + /SSTraffic/application/light2/trafficLightSocket --> /SSTraffic/application/light2 established + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light2 >>> Off_Blinking_On + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService >-- /SSTraffic/application/light2 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light1 internalTimeout + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light1 >>> Off_Blinking_Off + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService --> /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light2 >>> Off_Blinking_Off + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light1 internalTimeout + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light1 >>> Off_Blinking_On + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light2 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light2 >>> Off_Blinking_On + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light1 internalTimeout + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light1 >>> Off_Blinking_Off + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light2 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light2 >>> Off_Blinking_Off + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light1 internalTimeout + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light1 >>> Off_Blinking_On + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/TimingService >-- /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService --> /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light2 >>> Off_Blinking_On + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light1 internalTimeout + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light1 >>> Off_Blinking_Off + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light2 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light2 >>> Off_Blinking_Off + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/controller internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/controller internalTimeout + /SSTraffic/application/controller >-- /SSTraffic/application/light1 greenForCar + /SSTraffic/application/controller >-- /SSTraffic/application/light2 greenForPed + /SSTraffic/application/controller >>> SwitchToLight1GreenForCars + /SSTraffic/application/controller --> /SSTraffic/application/light1 greenForCar + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light1 >>> PedRed + /SSTraffic/application/controller --> /SSTraffic/application/light2 greenForPed + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light2 >>> CarYellow2 + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService >-- /SSTraffic/application/light2 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light2 internalTimeout + /SSTraffic/TimingService >-- /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService >-- /SSTraffic/application/light2 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light1 internalTimeout + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light1 >>> CarYellow + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService --> /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light2 >>> CarRed + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light1 internalTimeout + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/application/controller greenForCarDone + /SSTraffic/application/light1 >>> CarGreen + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/TimingService >-- /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/application/controller greenForCarDone + /SSTraffic/application/controller >>> state0 + /SSTraffic/TimingService --> /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/application/controller greenForPedDone + /SSTraffic/application/light2 >>> PedGreen + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/application/controller greenForPedDone + /SSTraffic/application/controller >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/controller >>> Light1GreenForCars + /SSTraffic/application/controller --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/controller internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/controller internalTimeout + /SSTraffic/application/controller >-- /SSTraffic/application/light1 greenForPed + /SSTraffic/application/controller >-- /SSTraffic/application/light2 greenForCar + /SSTraffic/application/controller >>> SwitchToLight2GreenForCars + /SSTraffic/application/controller --> /SSTraffic/application/light1 greenForPed + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light1 >>> CarYellow2 + /SSTraffic/application/controller --> /SSTraffic/application/light2 greenForCar + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light2 >>> PedRed + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService >-- /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light1 >>> CarRed + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService --> /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light2 >>> CarYellow + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light1 internalTimeout + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/application/controller greenForPedDone + /SSTraffic/application/light1 >>> PedGreen + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/TimingService >-- /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/application/controller greenForPedDone + /SSTraffic/application/controller >>> state2 + /SSTraffic/TimingService --> /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/application/controller greenForCarDone + /SSTraffic/application/light2 >>> CarGreen + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/application/controller greenForCarDone + /SSTraffic/application/controller >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/controller >>> Light2GreenForCars + /SSTraffic/application/controller --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/controller internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/controller internalTimeout + /SSTraffic/application/controller >-- /SSTraffic/application/light1 greenForCar + /SSTraffic/application/controller >-- /SSTraffic/application/light2 greenForPed + /SSTraffic/application/controller >>> SwitchToLight1GreenForCars + /SSTraffic/application/controller --> /SSTraffic/application/light1 greenForCar + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light1 >>> PedRed + /SSTraffic/application/controller --> /SSTraffic/application/light2 greenForPed + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light2 >>> CarYellow2 + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService >-- /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light1 >>> CarYellow + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService --> /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light2 >>> CarRed + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService >-- /SSTraffic/application/light2 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light1 internalTimeout + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/application/controller greenForCarDone + /SSTraffic/application/light1 >>> CarGreen + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/application/controller greenForCarDone + /SSTraffic/application/controller >>> state0 + /SSTraffic/TimingService --> /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/application/controller greenForPedDone + /SSTraffic/application/light2 >>> PedGreen + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/application/controller greenForPedDone + /SSTraffic/application/controller >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/controller >>> Light1GreenForCars + /SSTraffic/application/controller --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/controller internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/controller internalTimeout + /SSTraffic/application/controller >-- /SSTraffic/application/light1 greenForPed + /SSTraffic/application/controller >-- /SSTraffic/application/light2 greenForCar + /SSTraffic/application/controller >>> SwitchToLight2GreenForCars + /SSTraffic/application/controller --> /SSTraffic/application/light1 greenForPed + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light1 >>> CarYellow2 + /SSTraffic/application/controller --> /SSTraffic/application/light2 greenForCar + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light2 >>> PedRed + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light1 internalTimeout + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light1 >>> CarRed + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light2 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/light2 >>> CarYellow + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational + /SSTraffic/TimingService >-- /SSTraffic/application/light1 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light1 internalTimeout + /SSTraffic/application/light1 >-- /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1 >-- /SSTraffic/application/controller greenForPedDone + /SSTraffic/application/light1 >>> PedGreen + /SSTraffic/application/light1 --> /SSTraffic/application/light1/trafficLightSocket send + /SSTraffic/application/light1/trafficLightSocket >>> opened + /SSTraffic/application/light1 --> /SSTraffic/application/controller greenForPedDone + /SSTraffic/application/controller >>> state2 + /SSTraffic/TimingService >-- /SSTraffic/application/light2 internalTimeout + /SSTraffic/TimingService --> /SSTraffic/application/light2 internalTimeout + /SSTraffic/application/light2 >-- /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2 >-- /SSTraffic/application/controller greenForCarDone + /SSTraffic/application/light2 >>> CarGreen + /SSTraffic/application/light2 --> /SSTraffic/application/light2/trafficLightSocket send + /SSTraffic/application/light2/trafficLightSocket >>> opened + /SSTraffic/application/light2 --> /SSTraffic/application/controller greenForCarDone + /SSTraffic/application/controller >-- /SSTraffic/TimingService internalStartTimeout + /SSTraffic/application/controller >>> Light2GreenForCars + /SSTraffic/application/controller --> /SSTraffic/TimingService internalStartTimeout + /SSTraffic/TimingService >>> Operational |