Selaa lähdekoodia

Share project "org.yakindu.sct.examples.generator.java.trafficlight" into "https://svn.codespot.com/a/eclipselabs.org/yakindu"

markus.muehlbrandt@itemis.de 13 vuotta sitten
vanhempi
commit
7bd3c56c3b
44 muutettua tiedostoa jossa 3559 lisäystä ja 0 poistoa
  1. 8 0
      Examples/org.yakindu.sct.generator.java.trafficlight/.classpath
  2. 34 0
      Examples/org.yakindu.sct.generator.java.trafficlight/.project
  3. 3 0
      Examples/org.yakindu.sct.generator.java.trafficlight/.settings/org.eclipse.core.resources.prefs
  4. 12 0
      Examples/org.yakindu.sct.generator.java.trafficlight/.settings/org.eclipse.jdt.core.prefs
  5. 15 0
      Examples/org.yakindu.sct.generator.java.trafficlight/GenModelJava.sgen
  6. 9 0
      Examples/org.yakindu.sct.generator.java.trafficlight/META-INF/MANIFEST.MF
  7. 831 0
      Examples/org.yakindu.sct.generator.java.trafficlight/TrafficLightWaiting.sct
  8. 495 0
      Examples/org.yakindu.sct.generator.java.trafficlight/TrafficLightWaitingSimple.sct
  9. 4 0
      Examples/org.yakindu.sct.generator.java.trafficlight/build.properties
  10. 24 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/Event.java
  11. 21 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/EventNotification.java
  12. 17 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/INotificationListener.java
  13. 18 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/INotificationSender.java
  14. 18 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/IStatemachine.java
  15. 21 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ITimedStatemachine.java
  16. 18 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ITimerHandler.java
  17. 31 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/Notification.java
  18. 33 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/NotificationSender.java
  19. 15 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/NotificationType.java
  20. 29 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/TimeEvent.java
  21. 69 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/TimerHandler.java
  22. 32 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ValuedEvent.java
  23. 21 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceDefault.java
  24. 55 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceDefaultImpl.java
  25. 24 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfacePedestrian.java
  26. 51 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfacePedestrianImpl.java
  27. 24 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceTrafficLight.java
  28. 51 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceTrafficLightImpl.java
  29. 483 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingAbstractBaseStatemachine.java
  30. 29 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingCyleBasedStatemachine.java
  31. 37 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingEventBasedStatemachine.java
  32. 21 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfaceDefault.java
  33. 55 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfaceDefaultImpl.java
  34. 24 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfacePedestrian.java
  35. 51 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfacePedestrianImpl.java
  36. 24 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfaceTrafficLight.java
  37. 51 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfaceTrafficLightImpl.java
  38. 401 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/TrafficLightWaitingSimpleAbstractBaseStatemachine.java
  39. 29 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/TrafficLightWaitingSimpleCyleBasedStatemachine.java
  40. 37 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/TrafficLightWaitingSimpleEventBasedStatemachine.java
  41. 169 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src/org/yakindu/sct/examples/java/trafficlight/CrossingDemo.java
  42. 42 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src/org/yakindu/sct/examples/java/trafficlight/CrossingFigure.java
  43. 62 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src/org/yakindu/sct/examples/java/trafficlight/PedestrianLightFigure.java
  44. 61 0
      Examples/org.yakindu.sct.generator.java.trafficlight/src/org/yakindu/sct/examples/java/trafficlight/TrafficLightFigure.java

+ 8 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/.classpath

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="src-gen"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

+ 34 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/.project

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.yakindu.sct.examples.generator.java.trafficlight</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>

+ 3 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/.settings/org.eclipse.core.resources.prefs

@@ -0,0 +1,3 @@
+#Wed Nov 16 11:31:56 CET 2011
+eclipse.preferences.version=1
+encoding/TrafficLightWaiting.sct=UTF-8

+ 12 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/.settings/org.eclipse.jdt.core.prefs

@@ -0,0 +1,12 @@
+#Wed Nov 16 11:30:14 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7

+ 15 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/GenModelJava.sgen

@@ -0,0 +1,15 @@
+GeneratorModel for yakindu::java {
+	statechart TrafficLightWaiting {
+		feature OutletFeature {
+			targetProject = "org.yakindu.sct.examples.generator.java.trafficlight"
+			targetFolder = "src-gen"
+		}
+	}
+	
+	statechart TrafficLightWaitingSimple {
+		feature OutletFeature {
+			targetProject = "org.yakindu.sct.examples.generator.java.trafficlight"
+			targetFolder = "src-gen"
+		}
+	}
+}

+ 9 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/META-INF/MANIFEST.MF

@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Trafficlight
+Bundle-SymbolicName: org.yakindu.sct.examples.generator.java.trafficlight
+Bundle-Version: 1.0.0.qualifier
+Export-Package: org.yakindu.sct.examples.java.trafficlight,
+ org.yakindu.sct.runtime.java,
+ org.yakindu.sct.runtime.java.trafficlightwaiting
+Require-Bundle: org.eclipse.draw2d;bundle-version="3.7.0"

+ 831 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/TrafficLightWaiting.sct

@@ -0,0 +1,831 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:sgraph="http://www.yakindu.org/sct/2.0.0" xmlns:stext="http://www.yakindu.org/sct/statechart/SText">
+  <sgraph:Statechart xmi:id="_NPjBgBA-EeGQ0KsLDV4EFg" name="TrafficLightWaiting" expression="interface TrafficLight:&#xD;&#xA;&#x9;var red:boolean&#xD;&#xA;&#x9;var yellow:boolean&#xD;&#xA;&#x9;var green:boolean&#xD;&#xA;&#xD;&#xA;interface Pedestrian:&#xD;&#xA;&#x9;var request:boolean&#xD;&#xA;&#x9;var red:boolean&#xD;&#xA;&#x9;var green:boolean&#xD;&#xA;&#xD;&#xA;interface:&#xD;&#xA;&#x9;in event keypress1&#xD;&#xA;&#x9;in event keypress2&#xD;&#xA;&#x9;in event keypress3">
+    <scopes xsi:type="stext:InterfaceScope" xmi:id="_p39HMRBQEeGZ49VSHcJZNw" name="TrafficLight">
+      <declarations xsi:type="stext:VariableDefinition" xmi:id="_p39HMhBQEeGZ49VSHcJZNw" name="red" type="boolean"/>
+      <declarations xsi:type="stext:VariableDefinition" xmi:id="_p39HMxBQEeGZ49VSHcJZNw" name="yellow" type="boolean"/>
+      <declarations xsi:type="stext:VariableDefinition" xmi:id="_p39HNBBQEeGZ49VSHcJZNw" name="green" type="boolean"/>
+    </scopes>
+    <scopes xsi:type="stext:InterfaceScope" xmi:id="_p39HNRBQEeGZ49VSHcJZNw" name="Pedestrian">
+      <declarations xsi:type="stext:VariableDefinition" xmi:id="_p39HNhBQEeGZ49VSHcJZNw" name="request" type="boolean"/>
+      <declarations xsi:type="stext:VariableDefinition" xmi:id="_p39HNxBQEeGZ49VSHcJZNw" name="red" type="boolean"/>
+      <declarations xsi:type="stext:VariableDefinition" xmi:id="_p39HOBBQEeGZ49VSHcJZNw" name="green" type="boolean"/>
+    </scopes>
+    <scopes xsi:type="stext:InterfaceScope" xmi:id="_p39HORBQEeGZ49VSHcJZNw">
+      <declarations xsi:type="stext:EventDefinition" xmi:id="_p39HOhBQEeGZ49VSHcJZNw" name="keypress1" direction="in"/>
+      <declarations xsi:type="stext:EventDefinition" xmi:id="_p39HOxBQEeGZ49VSHcJZNw" name="keypress2" direction="in"/>
+      <declarations xsi:type="stext:EventDefinition" xmi:id="_p39HPBBQEeGZ49VSHcJZNw" name="keypress3" direction="in"/>
+    </scopes>
+    <regions xmi:id="_NPjBgxA-EeGQ0KsLDV4EFg" name="main region">
+      <vertices xsi:type="sgraph:Entry" xmi:id="_NPjBjRA-EeGQ0KsLDV4EFg">
+        <outgoingTransitions xmi:id="_NPsyhxA-EeGQ0KsLDV4EFg" target="_NPjBmBA-EeGQ0KsLDV4EFg"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_NPjBmBA-EeGQ0KsLDV4EFg" name="on" incomingTransitions="_NPsyhxA-EeGQ0KsLDV4EFg _6kP60BBPEeGQ0KsLDV4EFg __OsQsBBPEeGQ0KsLDV4EFg">
+        <outgoingTransitions xmi:id="_Av3wkBBFEeGQ0KsLDV4EFg" expression="keypress3" target="_7PkwwBBEEeGQ0KsLDV4EFg">
+          <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p4G4MRBQEeGZ49VSHcJZNw">
+            <triggers xsi:type="stext:RegularEventSpec" xmi:id="_p4G4MhBQEeGZ49VSHcJZNw" event="_p39HPBBQEeGZ49VSHcJZNw"/>
+          </trigger>
+        </outgoingTransitions>
+        <outgoingTransitions xmi:id="_XlIREBBFEeGQ0KsLDV4EFg" expression="keypress2" target="_MF4mkBBFEeGQ0KsLDV4EFg">
+          <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p5mF8BBQEeGZ49VSHcJZNw">
+            <triggers xsi:type="stext:RegularEventSpec" xmi:id="_p5mF8RBQEeGZ49VSHcJZNw" event="_p39HOxBQEeGZ49VSHcJZNw"/>
+          </trigger>
+        </outgoingTransitions>
+        <scopes xmi:id="_p4G4MBBQEeGZ49VSHcJZNw"/>
+        <subRegions xmi:id="_vZz18BA_EeGQ0KsLDV4EFg" name="r1">
+          <vertices xsi:type="sgraph:State" xmi:id="_w8meYBA_EeGQ0KsLDV4EFg" name="StreetGreen" incomingTransitions="_pddaABBEEeGQ0KsLDV4EFg _yYuD0BBPEeGQ0KsLDV4EFg" expression="entry / TrafficLight.red = false; &#xD;&#xA;&#x9;TrafficLight.yellow = false;&#xD;&#xA;&#x9;TrafficLight.green = true;&#xD;&#xA;&#x9;Pedestrian.red = true;&#xD;&#xA;&#x9;Pedestrian.green = false;&#xD;&#xA;&#x9;Pedestrian.request = false;">
+            <outgoingTransitions xmi:id="_Lo2CEBBBEeGQ0KsLDV4EFg" expression="keypress1" target="_iAKe0BBAEeGQ0KsLDV4EFg">
+              <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p7h_oBBQEeGZ49VSHcJZNw">
+                <triggers xsi:type="stext:RegularEventSpec" xmi:id="_p7h_oRBQEeGZ49VSHcJZNw" event="_p39HOhBQEeGZ49VSHcJZNw"/>
+              </trigger>
+            </outgoingTransitions>
+            <scopes xmi:id="_p6L70BBQEeGZ49VSHcJZNw">
+              <declarations xsi:type="stext:LocalReaction" xmi:id="_p6L70RBQEeGZ49VSHcJZNw">
+                <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p6L70hBQEeGZ49VSHcJZNw">
+                  <triggers xsi:type="stext:EntryEvent" xmi:id="_p6L70xBQEeGZ49VSHcJZNw"/>
+                </trigger>
+                <effect xsi:type="stext:ReactionEffect" xmi:id="_p6L71BBQEeGZ49VSHcJZNw">
+                  <actions xsi:type="stext:Assignment" xmi:id="_p6L71RBQEeGZ49VSHcJZNw" varRef="_p39HMhBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p6L71hBQEeGZ49VSHcJZNw" value="false"/>
+                  </actions>
+                  <actions xsi:type="stext:Assignment" xmi:id="_p6L71xBQEeGZ49VSHcJZNw" varRef="_p39HMxBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p6L72BBQEeGZ49VSHcJZNw" value="false"/>
+                  </actions>
+                  <actions xsi:type="stext:Assignment" xmi:id="_p6L72RBQEeGZ49VSHcJZNw" varRef="_p39HNBBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p6L72hBQEeGZ49VSHcJZNw" value="true"/>
+                  </actions>
+                  <actions xsi:type="stext:Assignment" xmi:id="_p6L72xBQEeGZ49VSHcJZNw" varRef="_p39HNxBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p6L73BBQEeGZ49VSHcJZNw" value="true"/>
+                  </actions>
+                  <actions xsi:type="stext:Assignment" xmi:id="_p6L73RBQEeGZ49VSHcJZNw" varRef="_p39HOBBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p6L73hBQEeGZ49VSHcJZNw" value="false"/>
+                  </actions>
+                  <actions xsi:type="stext:Assignment" xmi:id="_p6L73xBQEeGZ49VSHcJZNw" varRef="_p39HNhBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p6L74BBQEeGZ49VSHcJZNw" value="false"/>
+                  </actions>
+                </effect>
+              </declarations>
+            </scopes>
+          </vertices>
+          <vertices xsi:type="sgraph:State" xmi:id="_iAKe0BBAEeGQ0KsLDV4EFg" name="PedWaiting" incomingTransitions="_Lo2CEBBBEeGQ0KsLDV4EFg" expression="exit / Pedestrian.request = false;">
+            <outgoingTransitions xmi:id="_LDXEgBBDEeGQ0KsLDV4EFg" expression="after 7s" target="_SKct4BBBEeGQ0KsLDV4EFg">
+              <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p8H1gBBQEeGZ49VSHcJZNw">
+                <triggers xsi:type="stext:TimeEventSpec" xmi:id="_p8H1gRBQEeGZ49VSHcJZNw" value="7"/>
+              </trigger>
+            </outgoingTransitions>
+            <scopes xmi:id="_p706kBBQEeGZ49VSHcJZNw">
+              <declarations xsi:type="stext:LocalReaction" xmi:id="_p706kRBQEeGZ49VSHcJZNw">
+                <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p706khBQEeGZ49VSHcJZNw">
+                  <triggers xsi:type="stext:ExitEvent" xmi:id="_p706kxBQEeGZ49VSHcJZNw"/>
+                </trigger>
+                <effect xsi:type="stext:ReactionEffect" xmi:id="_p706lBBQEeGZ49VSHcJZNw">
+                  <actions xsi:type="stext:Assignment" xmi:id="_p706lRBQEeGZ49VSHcJZNw" varRef="_p39HNhBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p706lhBQEeGZ49VSHcJZNw" value="false"/>
+                  </actions>
+                </effect>
+              </declarations>
+            </scopes>
+            <subRegions xmi:id="_iAKe0hBAEeGQ0KsLDV4EFg" name="r1">
+              <vertices xsi:type="sgraph:State" xmi:id="_mjm00BBAEeGQ0KsLDV4EFg" name="waitOn" incomingTransitions="_wTHnEBBAEeGQ0KsLDV4EFg _OXpxsBBBEeGQ0KsLDV4EFg" expression="entry / &#xD;&#xA;Pedestrian.request = true;">
+                <outgoingTransitions xmi:id="_6LZ60BBAEeGQ0KsLDV4EFg" expression="after 500ms" target="_n6DDUBBAEeGQ0KsLDV4EFg">
+                  <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p8RmgBBQEeGZ49VSHcJZNw">
+                    <triggers xsi:type="stext:TimeEventSpec" xmi:id="_p8RmgRBQEeGZ49VSHcJZNw" value="500" unit="ms"/>
+                  </trigger>
+                </outgoingTransitions>
+                <scopes xmi:id="_p8H1ghBQEeGZ49VSHcJZNw">
+                  <declarations xsi:type="stext:LocalReaction" xmi:id="_p8H1gxBQEeGZ49VSHcJZNw">
+                    <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p8H1hBBQEeGZ49VSHcJZNw">
+                      <triggers xsi:type="stext:EntryEvent" xmi:id="_p8H1hRBQEeGZ49VSHcJZNw"/>
+                    </trigger>
+                    <effect xsi:type="stext:ReactionEffect" xmi:id="_p8H1hhBQEeGZ49VSHcJZNw">
+                      <actions xsi:type="stext:Assignment" xmi:id="_p8H1hxBQEeGZ49VSHcJZNw" varRef="_p39HNhBQEeGZ49VSHcJZNw">
+                        <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p8H1iBBQEeGZ49VSHcJZNw" value="true"/>
+                      </actions>
+                    </effect>
+                  </declarations>
+                </scopes>
+              </vertices>
+              <vertices xsi:type="sgraph:State" xmi:id="_n6DDUBBAEeGQ0KsLDV4EFg" name="waitOff" incomingTransitions="_6LZ60BBAEeGQ0KsLDV4EFg" expression="entry / &#xD;&#xA;Pedestrian.request = false;">
+                <outgoingTransitions xmi:id="_OXpxsBBBEeGQ0KsLDV4EFg" expression="after 500ms" target="_mjm00BBAEeGQ0KsLDV4EFg">
+                  <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p8khcBBQEeGZ49VSHcJZNw">
+                    <triggers xsi:type="stext:TimeEventSpec" xmi:id="_p8khcRBQEeGZ49VSHcJZNw" value="500" unit="ms"/>
+                  </trigger>
+                </outgoingTransitions>
+                <scopes xmi:id="_p8awcBBQEeGZ49VSHcJZNw">
+                  <declarations xsi:type="stext:LocalReaction" xmi:id="_p8awcRBQEeGZ49VSHcJZNw">
+                    <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p8awchBQEeGZ49VSHcJZNw">
+                      <triggers xsi:type="stext:EntryEvent" xmi:id="_p8awcxBQEeGZ49VSHcJZNw"/>
+                    </trigger>
+                    <effect xsi:type="stext:ReactionEffect" xmi:id="_p8awdBBQEeGZ49VSHcJZNw">
+                      <actions xsi:type="stext:Assignment" xmi:id="_p8awdRBQEeGZ49VSHcJZNw" varRef="_p39HNhBQEeGZ49VSHcJZNw">
+                        <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p8awdhBQEeGZ49VSHcJZNw" value="false"/>
+                      </actions>
+                    </effect>
+                  </declarations>
+                </scopes>
+              </vertices>
+              <vertices xsi:type="sgraph:Entry" xmi:id="_pqXxcBBAEeGQ0KsLDV4EFg">
+                <outgoingTransitions xmi:id="_wTHnEBBAEeGQ0KsLDV4EFg" target="_mjm00BBAEeGQ0KsLDV4EFg"/>
+              </vertices>
+            </subRegions>
+          </vertices>
+          <vertices xsi:type="sgraph:State" xmi:id="_SKct4BBBEeGQ0KsLDV4EFg" name="StreetAttention" incomingTransitions="_LDXEgBBDEeGQ0KsLDV4EFg" expression="entry / TrafficLight.red = false;&#xD;&#xA;&#x9;TrafficLight.yellow = true;&#xD;&#xA;&#x9;TrafficLight.green = false;">
+            <outgoingTransitions xmi:id="_fS31UBBEEeGQ0KsLDV4EFg" expression="after 2s" target="_fO-pQBBDEeGQ0KsLDV4EFg">
+              <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p9BNYBBQEeGZ49VSHcJZNw">
+                <triggers xsi:type="stext:TimeEventSpec" xmi:id="_p9BNYRBQEeGZ49VSHcJZNw" value="2"/>
+              </trigger>
+            </outgoingTransitions>
+            <scopes xmi:id="_p8khchBQEeGZ49VSHcJZNw">
+              <declarations xsi:type="stext:LocalReaction" xmi:id="_p8khcxBQEeGZ49VSHcJZNw">
+                <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p8khdBBQEeGZ49VSHcJZNw">
+                  <triggers xsi:type="stext:EntryEvent" xmi:id="_p8khdRBQEeGZ49VSHcJZNw"/>
+                </trigger>
+                <effect xsi:type="stext:ReactionEffect" xmi:id="_p8khdhBQEeGZ49VSHcJZNw">
+                  <actions xsi:type="stext:Assignment" xmi:id="_p8khdxBQEeGZ49VSHcJZNw" varRef="_p39HMhBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p8kheBBQEeGZ49VSHcJZNw" value="false"/>
+                  </actions>
+                  <actions xsi:type="stext:Assignment" xmi:id="_p8kheRBQEeGZ49VSHcJZNw" varRef="_p39HMxBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p8khehBQEeGZ49VSHcJZNw" value="true"/>
+                  </actions>
+                  <actions xsi:type="stext:Assignment" xmi:id="_p8khexBQEeGZ49VSHcJZNw" varRef="_p39HNBBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p8khfBBQEeGZ49VSHcJZNw" value="false"/>
+                  </actions>
+                </effect>
+              </declarations>
+            </scopes>
+          </vertices>
+          <vertices xsi:type="sgraph:State" xmi:id="_fO-pQBBDEeGQ0KsLDV4EFg" name="StreetRed" incomingTransitions="_fS31UBBEEeGQ0KsLDV4EFg" expression="entry / TrafficLight.red = true;&#xD;&#xA;TrafficLight.yellow = false;&#xD;&#xA;TrafficLight.green = false;">
+            <outgoingTransitions xmi:id="_g7TywBBEEeGQ0KsLDV4EFg" expression="after 2s" target="_12GAEBBDEeGQ0KsLDV4EFg">
+              <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p9d5UBBQEeGZ49VSHcJZNw">
+                <triggers xsi:type="stext:TimeEventSpec" xmi:id="_p9d5URBQEeGZ49VSHcJZNw" value="2"/>
+              </trigger>
+            </outgoingTransitions>
+            <scopes xmi:id="_p9BNYhBQEeGZ49VSHcJZNw">
+              <declarations xsi:type="stext:LocalReaction" xmi:id="_p9BNYxBQEeGZ49VSHcJZNw">
+                <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p9BNZBBQEeGZ49VSHcJZNw">
+                  <triggers xsi:type="stext:EntryEvent" xmi:id="_p9BNZRBQEeGZ49VSHcJZNw"/>
+                </trigger>
+                <effect xsi:type="stext:ReactionEffect" xmi:id="_p9BNZhBQEeGZ49VSHcJZNw">
+                  <actions xsi:type="stext:Assignment" xmi:id="_p9BNZxBQEeGZ49VSHcJZNw" varRef="_p39HMhBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p9BNaBBQEeGZ49VSHcJZNw" value="true"/>
+                  </actions>
+                  <actions xsi:type="stext:Assignment" xmi:id="_p9BNaRBQEeGZ49VSHcJZNw" varRef="_p39HMxBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p9BNahBQEeGZ49VSHcJZNw" value="false"/>
+                  </actions>
+                  <actions xsi:type="stext:Assignment" xmi:id="_p9BNaxBQEeGZ49VSHcJZNw" varRef="_p39HNBBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p9BNbBBQEeGZ49VSHcJZNw" value="false"/>
+                  </actions>
+                </effect>
+              </declarations>
+            </scopes>
+          </vertices>
+          <vertices xsi:type="sgraph:State" xmi:id="_12GAEBBDEeGQ0KsLDV4EFg" name="PedestrianGreen" incomingTransitions="_g7TywBBEEeGQ0KsLDV4EFg" expression="entry / Pedestrian.red = false;&#xD;&#xA;Pedestrian.green = true;">
+            <outgoingTransitions xmi:id="_iZox8BBEEeGQ0KsLDV4EFg" expression="after 7s" target="_K-JX7RBEEeGQ0KsLDV4EFg">
+              <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p9w0QBBQEeGZ49VSHcJZNw">
+                <triggers xsi:type="stext:TimeEventSpec" xmi:id="_p9w0QRBQEeGZ49VSHcJZNw" value="7"/>
+              </trigger>
+            </outgoingTransitions>
+            <scopes xmi:id="_p9d5UhBQEeGZ49VSHcJZNw">
+              <declarations xsi:type="stext:LocalReaction" xmi:id="_p9d5UxBQEeGZ49VSHcJZNw">
+                <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p9d5VBBQEeGZ49VSHcJZNw">
+                  <triggers xsi:type="stext:EntryEvent" xmi:id="_p9d5VRBQEeGZ49VSHcJZNw"/>
+                </trigger>
+                <effect xsi:type="stext:ReactionEffect" xmi:id="_p9d5VhBQEeGZ49VSHcJZNw">
+                  <actions xsi:type="stext:Assignment" xmi:id="_p9d5VxBQEeGZ49VSHcJZNw" varRef="_p39HNxBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p9d5WBBQEeGZ49VSHcJZNw" value="false"/>
+                  </actions>
+                  <actions xsi:type="stext:Assignment" xmi:id="_p9d5WRBQEeGZ49VSHcJZNw" varRef="_p39HOBBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p9d5WhBQEeGZ49VSHcJZNw" value="true"/>
+                  </actions>
+                </effect>
+              </declarations>
+            </scopes>
+          </vertices>
+          <vertices xsi:type="sgraph:State" xmi:id="_K-JX7RBEEeGQ0KsLDV4EFg" name="PedestrianRed" incomingTransitions="_iZox8BBEEeGQ0KsLDV4EFg" expression="entry / Pedestrian.red = true;&#xD;&#xA;Pedestrian.green = false;">
+            <outgoingTransitions xmi:id="_nVCU8BBEEeGQ0KsLDV4EFg" expression="after 3s" target="_TfjYTRBEEeGQ0KsLDV4EFg">
+              <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p95-MBBQEeGZ49VSHcJZNw">
+                <triggers xsi:type="stext:TimeEventSpec" xmi:id="_p95-MRBQEeGZ49VSHcJZNw" value="3"/>
+              </trigger>
+            </outgoingTransitions>
+            <scopes xmi:id="_p9w0QhBQEeGZ49VSHcJZNw">
+              <declarations xsi:type="stext:LocalReaction" xmi:id="_p9w0QxBQEeGZ49VSHcJZNw">
+                <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p9w0RBBQEeGZ49VSHcJZNw">
+                  <triggers xsi:type="stext:EntryEvent" xmi:id="_p9w0RRBQEeGZ49VSHcJZNw"/>
+                </trigger>
+                <effect xsi:type="stext:ReactionEffect" xmi:id="_p9w0RhBQEeGZ49VSHcJZNw">
+                  <actions xsi:type="stext:Assignment" xmi:id="_p9w0RxBQEeGZ49VSHcJZNw" varRef="_p39HNxBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p9w0SBBQEeGZ49VSHcJZNw" value="true"/>
+                  </actions>
+                  <actions xsi:type="stext:Assignment" xmi:id="_p9w0SRBQEeGZ49VSHcJZNw" varRef="_p39HOBBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p9w0ShBQEeGZ49VSHcJZNw" value="false"/>
+                  </actions>
+                </effect>
+              </declarations>
+            </scopes>
+          </vertices>
+          <vertices xsi:type="sgraph:State" xmi:id="_TfjYTRBEEeGQ0KsLDV4EFg" name="StreetPrepare" incomingTransitions="_nVCU8BBEEeGQ0KsLDV4EFg" expression="entry / TrafficLight.red = true;&#xD;&#xA;&#x9;TrafficLight.yellow = true;&#xD;&#xA;&#x9;TrafficLight.green = false;">
+            <outgoingTransitions xmi:id="_pddaABBEEeGQ0KsLDV4EFg" expression="after 2s" target="_w8meYBA_EeGQ0KsLDV4EFg">
+              <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p-NgMBBQEeGZ49VSHcJZNw">
+                <triggers xsi:type="stext:TimeEventSpec" xmi:id="_p-NgMRBQEeGZ49VSHcJZNw" value="2"/>
+              </trigger>
+            </outgoingTransitions>
+            <scopes xmi:id="_p-DvMBBQEeGZ49VSHcJZNw">
+              <declarations xsi:type="stext:LocalReaction" xmi:id="_p-DvMRBQEeGZ49VSHcJZNw">
+                <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p-DvMhBQEeGZ49VSHcJZNw">
+                  <triggers xsi:type="stext:EntryEvent" xmi:id="_p-DvMxBQEeGZ49VSHcJZNw"/>
+                </trigger>
+                <effect xsi:type="stext:ReactionEffect" xmi:id="_p-DvNBBQEeGZ49VSHcJZNw">
+                  <actions xsi:type="stext:Assignment" xmi:id="_p-DvNRBQEeGZ49VSHcJZNw" varRef="_p39HMhBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p-DvNhBQEeGZ49VSHcJZNw" value="true"/>
+                  </actions>
+                  <actions xsi:type="stext:Assignment" xmi:id="_p-DvNxBQEeGZ49VSHcJZNw" varRef="_p39HMxBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p-DvOBBQEeGZ49VSHcJZNw" value="true"/>
+                  </actions>
+                  <actions xsi:type="stext:Assignment" xmi:id="_p-DvORBQEeGZ49VSHcJZNw" varRef="_p39HNBBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p-DvOhBQEeGZ49VSHcJZNw" value="false"/>
+                  </actions>
+                </effect>
+              </declarations>
+            </scopes>
+          </vertices>
+          <vertices xsi:type="sgraph:Entry" xmi:id="_xz0nABBPEeGQ0KsLDV4EFg">
+            <outgoingTransitions xmi:id="_yYuD0BBPEeGQ0KsLDV4EFg" target="_w8meYBA_EeGQ0KsLDV4EFg"/>
+          </vertices>
+        </subRegions>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_7PkwwBBEEeGQ0KsLDV4EFg" name="freeze" incomingTransitions="_Av3wkBBFEeGQ0KsLDV4EFg">
+        <outgoingTransitions xmi:id="_6kP60BBPEeGQ0KsLDV4EFg" expression="keypress3" target="_NPjBmBA-EeGQ0KsLDV4EFg">
+          <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p-NgMxBQEeGZ49VSHcJZNw">
+            <triggers xsi:type="stext:RegularEventSpec" xmi:id="_p-NgNBBQEeGZ49VSHcJZNw" event="_p39HPBBQEeGZ49VSHcJZNw"/>
+          </trigger>
+        </outgoingTransitions>
+        <scopes xmi:id="_p-NgMhBQEeGZ49VSHcJZNw"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_MF4mkBBFEeGQ0KsLDV4EFg" name="off" incomingTransitions="_XlIREBBFEeGQ0KsLDV4EFg" expression="entry / TrafficLight.red = false;&#xD;&#xA;&#x9;TrafficLight.green = false;&#xD;&#xA;&#x9;TrafficLight.yellow = false;&#xD;&#xA;&#x9;Pedestrian.red = true;">
+        <outgoingTransitions xmi:id="__OsQsBBPEeGQ0KsLDV4EFg" expression="keypress2" target="_NPjBmBA-EeGQ0KsLDV4EFg">
+          <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p-plEBBQEeGZ49VSHcJZNw">
+            <triggers xsi:type="stext:RegularEventSpec" xmi:id="_p-plERBQEeGZ49VSHcJZNw" event="_p39HOxBQEeGZ49VSHcJZNw"/>
+          </trigger>
+        </outgoingTransitions>
+        <scopes xmi:id="_p-WqIBBQEeGZ49VSHcJZNw">
+          <declarations xsi:type="stext:LocalReaction" xmi:id="_p-WqIRBQEeGZ49VSHcJZNw">
+            <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p-WqIhBQEeGZ49VSHcJZNw">
+              <triggers xsi:type="stext:EntryEvent" xmi:id="_p-WqIxBQEeGZ49VSHcJZNw"/>
+            </trigger>
+            <effect xsi:type="stext:ReactionEffect" xmi:id="_p-WqJBBQEeGZ49VSHcJZNw">
+              <actions xsi:type="stext:Assignment" xmi:id="_p-WqJRBQEeGZ49VSHcJZNw" varRef="_p39HMhBQEeGZ49VSHcJZNw">
+                <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p-WqJhBQEeGZ49VSHcJZNw" value="false"/>
+              </actions>
+              <actions xsi:type="stext:Assignment" xmi:id="_p-WqJxBQEeGZ49VSHcJZNw" varRef="_p39HNBBQEeGZ49VSHcJZNw">
+                <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p-WqKBBQEeGZ49VSHcJZNw" value="false"/>
+              </actions>
+              <actions xsi:type="stext:Assignment" xmi:id="_p-WqKRBQEeGZ49VSHcJZNw" varRef="_p39HMxBQEeGZ49VSHcJZNw">
+                <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p-WqKhBQEeGZ49VSHcJZNw" value="false"/>
+              </actions>
+              <actions xsi:type="stext:Assignment" xmi:id="_p-WqKxBQEeGZ49VSHcJZNw" varRef="_p39HNxBQEeGZ49VSHcJZNw">
+                <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p-WqLBBQEeGZ49VSHcJZNw" value="true"/>
+              </actions>
+            </effect>
+          </declarations>
+        </scopes>
+        <subRegions xmi:id="_xHG2gBBFEeGQ0KsLDV4EFg" name="r1">
+          <vertices xsi:type="sgraph:State" xmi:id="_BVnsgBBGEeGQ0KsLDV4EFg" name="BlinkYellow" incomingTransitions="_EwURwBBGEeGQ0KsLDV4EFg _Lpu1EBBQEeGQ0KsLDV4EFg" expression="entry / TrafficLight.yellow = true;">
+            <outgoingTransitions xmi:id="_Lpu1EBBQEeGQ0KsLDV4EFg" expression="/ TrafficLight.yellow = !TrafficLight.yellow;" target="_BVnsgBBGEeGQ0KsLDV4EFg">
+              <effect xsi:type="stext:ReactionEffect" xmi:id="_p-zWFxBQEeGZ49VSHcJZNw">
+                <actions xsi:type="stext:Assignment" xmi:id="_p-zWGBBQEeGZ49VSHcJZNw" varRef="_p39HMxBQEeGZ49VSHcJZNw">
+                  <expression xsi:type="stext:LogicalNotExpression" xmi:id="_p-zWGRBQEeGZ49VSHcJZNw">
+                    <operand xsi:type="stext:ElementReferenceExpression" xmi:id="_p-zWGhBQEeGZ49VSHcJZNw" value="_p39HMxBQEeGZ49VSHcJZNw"/>
+                  </expression>
+                </actions>
+              </effect>
+            </outgoingTransitions>
+            <scopes xmi:id="_p-zWEBBQEeGZ49VSHcJZNw">
+              <declarations xsi:type="stext:LocalReaction" xmi:id="_p-zWERBQEeGZ49VSHcJZNw">
+                <trigger xsi:type="stext:ReactionTrigger" xmi:id="_p-zWEhBQEeGZ49VSHcJZNw">
+                  <triggers xsi:type="stext:EntryEvent" xmi:id="_p-zWExBQEeGZ49VSHcJZNw"/>
+                </trigger>
+                <effect xsi:type="stext:ReactionEffect" xmi:id="_p-zWFBBQEeGZ49VSHcJZNw">
+                  <actions xsi:type="stext:Assignment" xmi:id="_p-zWFRBQEeGZ49VSHcJZNw" varRef="_p39HMxBQEeGZ49VSHcJZNw">
+                    <expression xsi:type="stext:PrimitiveValueExpression" xmi:id="_p-zWFhBQEeGZ49VSHcJZNw" value="true"/>
+                  </actions>
+                </effect>
+              </declarations>
+            </scopes>
+          </vertices>
+          <vertices xsi:type="sgraph:Entry" xmi:id="_EUWHcBBGEeGQ0KsLDV4EFg">
+            <outgoingTransitions xmi:id="_EwURwBBGEeGQ0KsLDV4EFg" target="_BVnsgBBGEeGQ0KsLDV4EFg"/>
+          </vertices>
+        </subRegions>
+      </vertices>
+    </regions>
+  </sgraph:Statechart>
+  <notation:Diagram xmi:id="_NPjBgRA-EeGQ0KsLDV4EFg" type="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor" element="_NPjBgBA-EeGQ0KsLDV4EFg" measurementUnit="Pixel">
+    <children xmi:id="_NPjBhBA-EeGQ0KsLDV4EFg" type="Region" element="_NPjBgxA-EeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_NPjBhxA-EeGQ0KsLDV4EFg" type="RegionName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_NPjBiBA-EeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_NPjBiRA-EeGQ0KsLDV4EFg"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_NPjBihA-EeGQ0KsLDV4EFg" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
+        <children xmi:id="_NPjBjhA-EeGQ0KsLDV4EFg" type="Entry" element="_NPjBjRA-EeGQ0KsLDV4EFg">
+          <children xmi:id="_NPjBkRA-EeGQ0KsLDV4EFg" type="BorderItemLabelContainer">
+            <children xsi:type="notation:DecorationNode" xmi:id="_NPjBlBA-EeGQ0KsLDV4EFg" type="BorderItemLabel">
+              <styles xsi:type="notation:ShapeStyle" xmi:id="_NPjBlRA-EeGQ0KsLDV4EFg"/>
+              <layoutConstraint xsi:type="notation:Location" xmi:id="_NPjBlhA-EeGQ0KsLDV4EFg"/>
+            </children>
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_NPjBkhA-EeGQ0KsLDV4EFg" fontName="Verdana" lineColor="4210752"/>
+            <layoutConstraint xsi:type="notation:Bounds" xmi:id="_NPjBkxA-EeGQ0KsLDV4EFg"/>
+          </children>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_NPjBjxA-EeGQ0KsLDV4EFg" fontName="Verdana" lineColor="4210752"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_NPjBlxA-EeGQ0KsLDV4EFg" x="424" y="4"/>
+        </children>
+        <children xmi:id="_NPjBmhA-EeGQ0KsLDV4EFg" type="State" element="_NPjBmBA-EeGQ0KsLDV4EFg">
+          <children xsi:type="notation:DecorationNode" xmi:id="_NPjBnhA-EeGQ0KsLDV4EFg" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_NPjBnxA-EeGQ0KsLDV4EFg"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_NPsygBA-EeGQ0KsLDV4EFg"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_NPsygRA-EeGQ0KsLDV4EFg" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_NPsyghA-EeGQ0KsLDV4EFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_NPsygxA-EeGQ0KsLDV4EFg"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_NPsyhBA-EeGQ0KsLDV4EFg" type="StateFigureCompartment">
+            <children xmi:id="_vZz18RA_EeGQ0KsLDV4EFg" type="Region" element="_vZz18BA_EeGQ0KsLDV4EFg">
+              <children xsi:type="notation:DecorationNode" xmi:id="_vZz19BA_EeGQ0KsLDV4EFg" type="RegionName">
+                <styles xsi:type="notation:ShapeStyle" xmi:id="_vZz19RA_EeGQ0KsLDV4EFg"/>
+                <layoutConstraint xsi:type="notation:Location" xmi:id="_vZz19hA_EeGQ0KsLDV4EFg"/>
+              </children>
+              <children xsi:type="notation:Shape" xmi:id="_vZz19xA_EeGQ0KsLDV4EFg" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
+                <children xmi:id="_w85ZUBA_EeGQ0KsLDV4EFg" type="State" element="_w8meYBA_EeGQ0KsLDV4EFg">
+                  <children xsi:type="notation:DecorationNode" xmi:id="_w85ZVBA_EeGQ0KsLDV4EFg" type="StateName">
+                    <styles xsi:type="notation:ShapeStyle" xmi:id="_w85ZVRA_EeGQ0KsLDV4EFg"/>
+                    <layoutConstraint xsi:type="notation:Location" xmi:id="_w85ZVhA_EeGQ0KsLDV4EFg"/>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_w85ZVxA_EeGQ0KsLDV4EFg" type="StateTextCompartment">
+                    <children xsi:type="notation:Shape" xmi:id="_w85ZWBA_EeGQ0KsLDV4EFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+                      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_w85ZWRA_EeGQ0KsLDV4EFg"/>
+                    </children>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_w85ZWhA_EeGQ0KsLDV4EFg" type="StateFigureCompartment"/>
+                  <styles xsi:type="notation:ShapeStyle" xmi:id="_w85ZURA_EeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+                  <styles xsi:type="notation:FontStyle" xmi:id="_w85ZUhA_EeGQ0KsLDV4EFg"/>
+                  <styles xsi:type="notation:BooleanValueStyle" xmi:id="_w85ZWxA_EeGQ0KsLDV4EFg"/>
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_w85ZUxA_EeGQ0KsLDV4EFg" x="228" y="4"/>
+                </children>
+                <children xmi:id="_iAUP0BBAEeGQ0KsLDV4EFg" type="State" element="_iAKe0BBAEeGQ0KsLDV4EFg">
+                  <children xsi:type="notation:DecorationNode" xmi:id="_iAUP1BBAEeGQ0KsLDV4EFg" type="StateName">
+                    <styles xsi:type="notation:ShapeStyle" xmi:id="_iAUP1RBAEeGQ0KsLDV4EFg"/>
+                    <layoutConstraint xsi:type="notation:Location" xmi:id="_iAUP1hBAEeGQ0KsLDV4EFg"/>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_iAUP1xBAEeGQ0KsLDV4EFg" type="StateTextCompartment">
+                    <children xsi:type="notation:Shape" xmi:id="_iAUP2BBAEeGQ0KsLDV4EFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+                      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_iAUP2RBAEeGQ0KsLDV4EFg"/>
+                    </children>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_iAUP2hBAEeGQ0KsLDV4EFg" type="StateFigureCompartment">
+                    <children xmi:id="_iBD2sBBAEeGQ0KsLDV4EFg" type="Region" element="_iAKe0hBAEeGQ0KsLDV4EFg">
+                      <children xsi:type="notation:DecorationNode" xmi:id="_iBD2sxBAEeGQ0KsLDV4EFg" type="RegionName">
+                        <styles xsi:type="notation:ShapeStyle" xmi:id="_iBD2tBBAEeGQ0KsLDV4EFg"/>
+                        <layoutConstraint xsi:type="notation:Location" xmi:id="_iBD2tRBAEeGQ0KsLDV4EFg"/>
+                      </children>
+                      <children xsi:type="notation:Shape" xmi:id="_iBD2thBAEeGQ0KsLDV4EFg" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
+                        <children xmi:id="_mjwl0BBAEeGQ0KsLDV4EFg" type="State" element="_mjm00BBAEeGQ0KsLDV4EFg">
+                          <children xsi:type="notation:DecorationNode" xmi:id="_mjwl1BBAEeGQ0KsLDV4EFg" type="StateName">
+                            <styles xsi:type="notation:ShapeStyle" xmi:id="_mjwl1RBAEeGQ0KsLDV4EFg"/>
+                            <layoutConstraint xsi:type="notation:Location" xmi:id="_mjwl1hBAEeGQ0KsLDV4EFg"/>
+                          </children>
+                          <children xsi:type="notation:Compartment" xmi:id="_mjwl1xBAEeGQ0KsLDV4EFg" type="StateTextCompartment">
+                            <children xsi:type="notation:Shape" xmi:id="_mjwl2BBAEeGQ0KsLDV4EFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+                              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_mjwl2RBAEeGQ0KsLDV4EFg"/>
+                            </children>
+                          </children>
+                          <children xsi:type="notation:Compartment" xmi:id="_mjwl2hBAEeGQ0KsLDV4EFg" type="StateFigureCompartment"/>
+                          <styles xsi:type="notation:ShapeStyle" xmi:id="_mjwl0RBAEeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+                          <styles xsi:type="notation:FontStyle" xmi:id="_mjwl0hBAEeGQ0KsLDV4EFg"/>
+                          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_mjwl2xBAEeGQ0KsLDV4EFg"/>
+                          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_mjwl0xBAEeGQ0KsLDV4EFg" x="8" y="38"/>
+                        </children>
+                        <children xmi:id="_n6M0UBBAEeGQ0KsLDV4EFg" type="State" element="_n6DDUBBAEeGQ0KsLDV4EFg">
+                          <children xsi:type="notation:DecorationNode" xmi:id="_n6M0VBBAEeGQ0KsLDV4EFg" type="StateName">
+                            <styles xsi:type="notation:ShapeStyle" xmi:id="_n6M0VRBAEeGQ0KsLDV4EFg"/>
+                            <layoutConstraint xsi:type="notation:Location" xmi:id="_n6M0VhBAEeGQ0KsLDV4EFg"/>
+                          </children>
+                          <children xsi:type="notation:Compartment" xmi:id="_n6M0VxBAEeGQ0KsLDV4EFg" type="StateTextCompartment">
+                            <children xsi:type="notation:Shape" xmi:id="_n6M0WBBAEeGQ0KsLDV4EFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+                              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_n6M0WRBAEeGQ0KsLDV4EFg"/>
+                            </children>
+                          </children>
+                          <children xsi:type="notation:Compartment" xmi:id="_n6M0WhBAEeGQ0KsLDV4EFg" type="StateFigureCompartment"/>
+                          <styles xsi:type="notation:ShapeStyle" xmi:id="_n6M0URBAEeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+                          <styles xsi:type="notation:FontStyle" xmi:id="_n6M0UhBAEeGQ0KsLDV4EFg"/>
+                          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_n6M0WxBAEeGQ0KsLDV4EFg"/>
+                          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_n6M0UxBAEeGQ0KsLDV4EFg" x="283" y="38"/>
+                        </children>
+                        <children xmi:id="_pqhicBBAEeGQ0KsLDV4EFg" type="Entry" element="_pqXxcBBAEeGQ0KsLDV4EFg">
+                          <children xmi:id="_pqhicxBAEeGQ0KsLDV4EFg" type="BorderItemLabelContainer">
+                            <children xsi:type="notation:DecorationNode" xmi:id="_pqhidhBAEeGQ0KsLDV4EFg" type="BorderItemLabel">
+                              <styles xsi:type="notation:ShapeStyle" xmi:id="_pqhidxBAEeGQ0KsLDV4EFg"/>
+                              <layoutConstraint xsi:type="notation:Location" xmi:id="_pqhieBBAEeGQ0KsLDV4EFg"/>
+                            </children>
+                            <styles xsi:type="notation:ShapeStyle" xmi:id="_pqhidBBAEeGQ0KsLDV4EFg" fontName="Verdana" lineColor="4210752"/>
+                            <layoutConstraint xsi:type="notation:Bounds" xmi:id="_pqhidRBAEeGQ0KsLDV4EFg"/>
+                          </children>
+                          <styles xsi:type="notation:ShapeStyle" xmi:id="_pqhicRBAEeGQ0KsLDV4EFg" fontName="Verdana" lineColor="4210752"/>
+                          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_pqhichBAEeGQ0KsLDV4EFg" x="96"/>
+                        </children>
+                        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_iBD2txBAEeGQ0KsLDV4EFg"/>
+                      </children>
+                      <styles xsi:type="notation:ShapeStyle" xmi:id="_iBD2sRBAEeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
+                      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_iBD2shBAEeGQ0KsLDV4EFg"/>
+                    </children>
+                  </children>
+                  <styles xsi:type="notation:ShapeStyle" xmi:id="_iAUP0RBAEeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+                  <styles xsi:type="notation:FontStyle" xmi:id="_iAUP0hBAEeGQ0KsLDV4EFg"/>
+                  <styles xsi:type="notation:BooleanValueStyle" xmi:id="_iAUP2xBAEeGQ0KsLDV4EFg"/>
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_iAUP0xBAEeGQ0KsLDV4EFg" x="288" y="194" width="526" height="206"/>
+                </children>
+                <children xmi:id="_SKwP4BBBEeGQ0KsLDV4EFg" type="State" element="_SKct4BBBEeGQ0KsLDV4EFg">
+                  <children xsi:type="notation:DecorationNode" xmi:id="_SKwP5BBBEeGQ0KsLDV4EFg" type="StateName">
+                    <styles xsi:type="notation:ShapeStyle" xmi:id="_SKwP5RBBEeGQ0KsLDV4EFg"/>
+                    <layoutConstraint xsi:type="notation:Location" xmi:id="_SKwP5hBBEeGQ0KsLDV4EFg"/>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_SKwP5xBBEeGQ0KsLDV4EFg" type="StateTextCompartment">
+                    <children xsi:type="notation:Shape" xmi:id="_SKwP6BBBEeGQ0KsLDV4EFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+                      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_SKwP6RBBEeGQ0KsLDV4EFg"/>
+                    </children>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_SKwP6hBBEeGQ0KsLDV4EFg" type="StateFigureCompartment"/>
+                  <styles xsi:type="notation:ShapeStyle" xmi:id="_SKwP4RBBEeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+                  <styles xsi:type="notation:FontStyle" xmi:id="_SKwP4hBBEeGQ0KsLDV4EFg"/>
+                  <styles xsi:type="notation:BooleanValueStyle" xmi:id="_SKwP6xBBEeGQ0KsLDV4EFg"/>
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_SKwP4xBBEeGQ0KsLDV4EFg" x="443" y="514"/>
+                </children>
+                <children xmi:id="_fPRkMBBDEeGQ0KsLDV4EFg" type="State" element="_fO-pQBBDEeGQ0KsLDV4EFg">
+                  <children xsi:type="notation:DecorationNode" xmi:id="_fPRkNBBDEeGQ0KsLDV4EFg" type="StateName">
+                    <styles xsi:type="notation:ShapeStyle" xmi:id="_fPRkNRBDEeGQ0KsLDV4EFg"/>
+                    <layoutConstraint xsi:type="notation:Location" xmi:id="_fPRkNhBDEeGQ0KsLDV4EFg"/>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_fPRkNxBDEeGQ0KsLDV4EFg" type="StateTextCompartment">
+                    <children xsi:type="notation:Shape" xmi:id="_fPRkOBBDEeGQ0KsLDV4EFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+                      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_fPRkORBDEeGQ0KsLDV4EFg"/>
+                    </children>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_fPRkOhBDEeGQ0KsLDV4EFg" type="StateFigureCompartment"/>
+                  <styles xsi:type="notation:ShapeStyle" xmi:id="_fPRkMRBDEeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+                  <styles xsi:type="notation:FontStyle" xmi:id="_fPRkMhBDEeGQ0KsLDV4EFg"/>
+                  <styles xsi:type="notation:BooleanValueStyle" xmi:id="_fPRkOxBDEeGQ0KsLDV4EFg"/>
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_fPRkMxBDEeGQ0KsLDV4EFg" x="3" y="514"/>
+                </children>
+                <children xmi:id="_12Y7ABBDEeGQ0KsLDV4EFg" type="State" element="_12GAEBBDEeGQ0KsLDV4EFg">
+                  <children xsi:type="notation:DecorationNode" xmi:id="_12Y7BBBDEeGQ0KsLDV4EFg" type="StateName">
+                    <styles xsi:type="notation:ShapeStyle" xmi:id="_12Y7BRBDEeGQ0KsLDV4EFg"/>
+                    <layoutConstraint xsi:type="notation:Location" xmi:id="_12Y7BhBDEeGQ0KsLDV4EFg"/>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_12Y7BxBDEeGQ0KsLDV4EFg" type="StateTextCompartment">
+                    <children xsi:type="notation:Shape" xmi:id="_12Y7CBBDEeGQ0KsLDV4EFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+                      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_12Y7CRBDEeGQ0KsLDV4EFg"/>
+                    </children>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_12Y7ChBDEeGQ0KsLDV4EFg" type="StateFigureCompartment"/>
+                  <styles xsi:type="notation:ShapeStyle" xmi:id="_12Y7ARBDEeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+                  <styles xsi:type="notation:FontStyle" xmi:id="_12Y7AhBDEeGQ0KsLDV4EFg"/>
+                  <styles xsi:type="notation:BooleanValueStyle" xmi:id="_12Y7CxBDEeGQ0KsLDV4EFg"/>
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_12Y7AxBDEeGQ0KsLDV4EFg" x="1" y="409"/>
+                </children>
+                <children xmi:id="_K-JX4RBEEeGQ0KsLDV4EFg" type="State" element="_K-JX7RBEEeGQ0KsLDV4EFg">
+                  <children xsi:type="notation:DecorationNode" xmi:id="_K-JX4hBEEeGQ0KsLDV4EFg" type="StateName">
+                    <styles xsi:type="notation:ShapeStyle" xmi:id="_K-JX4xBEEeGQ0KsLDV4EFg"/>
+                    <layoutConstraint xsi:type="notation:Location" xmi:id="_K-JX5BBEEeGQ0KsLDV4EFg"/>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_K-JX5RBEEeGQ0KsLDV4EFg" type="StateTextCompartment">
+                    <children xsi:type="notation:Shape" xmi:id="_K-JX5hBEEeGQ0KsLDV4EFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+                      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_K-JX5xBEEeGQ0KsLDV4EFg"/>
+                    </children>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_K-JX6BBEEeGQ0KsLDV4EFg" type="StateFigureCompartment"/>
+                  <styles xsi:type="notation:ShapeStyle" xmi:id="_K-JX6RBEEeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+                  <styles xsi:type="notation:FontStyle" xmi:id="_K-JX6hBEEeGQ0KsLDV4EFg"/>
+                  <styles xsi:type="notation:BooleanValueStyle" xmi:id="_K-JX6xBEEeGQ0KsLDV4EFg"/>
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_K-JX7BBEEeGQ0KsLDV4EFg" x="3" y="304"/>
+                </children>
+                <children xmi:id="_TfjYQRBEEeGQ0KsLDV4EFg" type="State" element="_TfjYTRBEEeGQ0KsLDV4EFg">
+                  <children xsi:type="notation:DecorationNode" xmi:id="_TfjYQhBEEeGQ0KsLDV4EFg" type="StateName">
+                    <styles xsi:type="notation:ShapeStyle" xmi:id="_TfjYQxBEEeGQ0KsLDV4EFg"/>
+                    <layoutConstraint xsi:type="notation:Location" xmi:id="_TfjYRBBEEeGQ0KsLDV4EFg"/>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_TfjYRRBEEeGQ0KsLDV4EFg" type="StateTextCompartment">
+                    <children xsi:type="notation:Shape" xmi:id="_TfjYRhBEEeGQ0KsLDV4EFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+                      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_TfjYRxBEEeGQ0KsLDV4EFg"/>
+                    </children>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_TfjYSBBEEeGQ0KsLDV4EFg" type="StateFigureCompartment"/>
+                  <styles xsi:type="notation:ShapeStyle" xmi:id="_TfjYSRBEEeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+                  <styles xsi:type="notation:FontStyle" xmi:id="_TfjYShBEEeGQ0KsLDV4EFg"/>
+                  <styles xsi:type="notation:BooleanValueStyle" xmi:id="_TfjYSxBEEeGQ0KsLDV4EFg"/>
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_TfjYTBBEEeGQ0KsLDV4EFg" x="1" y="179"/>
+                </children>
+                <children xmi:id="_xz9w8BBPEeGQ0KsLDV4EFg" type="Entry" element="_xz0nABBPEeGQ0KsLDV4EFg">
+                  <children xmi:id="_xz9w8xBPEeGQ0KsLDV4EFg" type="BorderItemLabelContainer">
+                    <children xsi:type="notation:DecorationNode" xmi:id="_xz9w9hBPEeGQ0KsLDV4EFg" type="BorderItemLabel">
+                      <styles xsi:type="notation:ShapeStyle" xmi:id="_xz9w9xBPEeGQ0KsLDV4EFg"/>
+                      <layoutConstraint xsi:type="notation:Location" xmi:id="_xz9w-BBPEeGQ0KsLDV4EFg"/>
+                    </children>
+                    <styles xsi:type="notation:ShapeStyle" xmi:id="_xz9w9BBPEeGQ0KsLDV4EFg" fontName="Verdana" lineColor="4210752"/>
+                    <layoutConstraint xsi:type="notation:Bounds" xmi:id="_xz9w9RBPEeGQ0KsLDV4EFg"/>
+                  </children>
+                  <styles xsi:type="notation:ShapeStyle" xmi:id="_xz9w8RBPEeGQ0KsLDV4EFg" fontName="Verdana" lineColor="4210752"/>
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_xz9w8hBPEeGQ0KsLDV4EFg" x="153" y="44"/>
+                </children>
+                <layoutConstraint xsi:type="notation:Bounds" xmi:id="_vZ9m8BA_EeGQ0KsLDV4EFg"/>
+              </children>
+              <styles xsi:type="notation:ShapeStyle" xmi:id="_vZz18hA_EeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_vZz18xA_EeGQ0KsLDV4EFg"/>
+            </children>
+          </children>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_NPjBmxA-EeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_NPjBnBA-EeGQ0KsLDV4EFg"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_NPsyhRA-EeGQ0KsLDV4EFg"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_NPsyhhA-EeGQ0KsLDV4EFg" x="4" y="43" width="856" height="696"/>
+        </children>
+        <children xmi:id="_7P4SwBBEEeGQ0KsLDV4EFg" type="State" element="_7PkwwBBEEeGQ0KsLDV4EFg">
+          <children xsi:type="notation:DecorationNode" xmi:id="_7P4SxBBEEeGQ0KsLDV4EFg" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_7P4SxRBEEeGQ0KsLDV4EFg"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_7P4SxhBEEeGQ0KsLDV4EFg"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_7P4SxxBEEeGQ0KsLDV4EFg" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_7P4SyBBEEeGQ0KsLDV4EFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_7P4SyRBEEeGQ0KsLDV4EFg"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_7P4SyhBEEeGQ0KsLDV4EFg" type="StateFigureCompartment"/>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_7P4SwRBEEeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_7P4SwhBEEeGQ0KsLDV4EFg"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_7P4SyxBEEeGQ0KsLDV4EFg"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_7P4SwxBEEeGQ0KsLDV4EFg" x="1043" y="119"/>
+        </children>
+        <children xmi:id="_MGCXkBBFEeGQ0KsLDV4EFg" type="State" element="_MF4mkBBFEeGQ0KsLDV4EFg">
+          <children xsi:type="notation:DecorationNode" xmi:id="_MGCXlBBFEeGQ0KsLDV4EFg" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_MGCXlRBFEeGQ0KsLDV4EFg"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_MGCXlhBFEeGQ0KsLDV4EFg"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_MGMIkBBFEeGQ0KsLDV4EFg" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_MGMIkRBFEeGQ0KsLDV4EFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_MGMIkhBFEeGQ0KsLDV4EFg"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_MGMIkxBFEeGQ0KsLDV4EFg" type="StateFigureCompartment">
+            <children xmi:id="_xHG2gRBFEeGQ0KsLDV4EFg" type="Region" element="_xHG2gBBFEeGQ0KsLDV4EFg">
+              <children xsi:type="notation:DecorationNode" xmi:id="_xHQAcBBFEeGQ0KsLDV4EFg" type="RegionName">
+                <styles xsi:type="notation:ShapeStyle" xmi:id="_xHQAcRBFEeGQ0KsLDV4EFg"/>
+                <layoutConstraint xsi:type="notation:Location" xmi:id="_xHQAchBFEeGQ0KsLDV4EFg"/>
+              </children>
+              <children xsi:type="notation:Shape" xmi:id="_xHQAcxBFEeGQ0KsLDV4EFg" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
+                <children xmi:id="_BV6ncBBGEeGQ0KsLDV4EFg" type="State" element="_BVnsgBBGEeGQ0KsLDV4EFg">
+                  <children xsi:type="notation:DecorationNode" xmi:id="_BV6ndBBGEeGQ0KsLDV4EFg" type="StateName">
+                    <styles xsi:type="notation:ShapeStyle" xmi:id="_BV6ndRBGEeGQ0KsLDV4EFg"/>
+                    <layoutConstraint xsi:type="notation:Location" xmi:id="_BV6ndhBGEeGQ0KsLDV4EFg"/>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_BV6ndxBGEeGQ0KsLDV4EFg" type="StateTextCompartment">
+                    <children xsi:type="notation:Shape" xmi:id="_BV6neBBGEeGQ0KsLDV4EFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+                      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_BV6neRBGEeGQ0KsLDV4EFg"/>
+                    </children>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_BV6nehBGEeGQ0KsLDV4EFg" type="StateFigureCompartment"/>
+                  <styles xsi:type="notation:ShapeStyle" xmi:id="_BV6ncRBGEeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+                  <styles xsi:type="notation:FontStyle" xmi:id="_BV6nchBGEeGQ0KsLDV4EFg"/>
+                  <styles xsi:type="notation:BooleanValueStyle" xmi:id="_BV6nexBGEeGQ0KsLDV4EFg"/>
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_BV6ncxBGEeGQ0KsLDV4EFg" x="3" y="42"/>
+                </children>
+                <children xmi:id="_EUppcBBGEeGQ0KsLDV4EFg" type="Entry" element="_EUWHcBBGEeGQ0KsLDV4EFg">
+                  <children xmi:id="_EUppcxBGEeGQ0KsLDV4EFg" type="BorderItemLabelContainer">
+                    <children xsi:type="notation:DecorationNode" xmi:id="_EUppdhBGEeGQ0KsLDV4EFg" type="BorderItemLabel">
+                      <styles xsi:type="notation:ShapeStyle" xmi:id="_EUppdxBGEeGQ0KsLDV4EFg"/>
+                      <layoutConstraint xsi:type="notation:Location" xmi:id="_EUppeBBGEeGQ0KsLDV4EFg"/>
+                    </children>
+                    <styles xsi:type="notation:ShapeStyle" xmi:id="_EUppdBBGEeGQ0KsLDV4EFg" fontName="Verdana" lineColor="4210752"/>
+                    <layoutConstraint xsi:type="notation:Bounds" xmi:id="_EUppdRBGEeGQ0KsLDV4EFg"/>
+                  </children>
+                  <styles xsi:type="notation:ShapeStyle" xmi:id="_EUppcRBGEeGQ0KsLDV4EFg" fontName="Verdana" lineColor="4210752"/>
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_EUppchBGEeGQ0KsLDV4EFg" x="112" y="2"/>
+                </children>
+                <layoutConstraint xsi:type="notation:Bounds" xmi:id="_xHQAdBBFEeGQ0KsLDV4EFg"/>
+              </children>
+              <styles xsi:type="notation:ShapeStyle" xmi:id="_xHG2ghBFEeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_xHG2gxBFEeGQ0KsLDV4EFg"/>
+            </children>
+          </children>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_MGCXkRBFEeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_MGCXkhBFEeGQ0KsLDV4EFg"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_MGMIlBBFEeGQ0KsLDV4EFg"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_MGCXkxBFEeGQ0KsLDV4EFg" x="944" y="204" width="311" height="286"/>
+        </children>
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_NPjBixA-EeGQ0KsLDV4EFg"/>
+      </children>
+      <styles xsi:type="notation:ShapeStyle" xmi:id="_NPjBhRA-EeGQ0KsLDV4EFg" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_NPjBjBA-EeGQ0KsLDV4EFg" x="220" y="10" width="1286" height="811"/>
+    </children>
+    <children xsi:type="notation:Shape" xmi:id="_NPsyjxA-EeGQ0KsLDV4EFg" type="StatechartText" fontName="Verdana" lineColor="4210752">
+      <children xsi:type="notation:DecorationNode" xmi:id="_NPsykRA-EeGQ0KsLDV4EFg" type="StatechartName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_NPsykhA-EeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_NPsykxA-EeGQ0KsLDV4EFg"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_NPsylBA-EeGQ0KsLDV4EFg" type="StatechartTextExpression" fontName="Verdana" lineColor="4210752">
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_NPsylRA-EeGQ0KsLDV4EFg"/>
+      </children>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_NPsylhA-EeGQ0KsLDV4EFg" x="10" y="10" width="200" height="400"/>
+    </children>
+    <styles xsi:type="notation:DiagramStyle" xmi:id="_NPjBghA-EeGQ0KsLDV4EFg"/>
+    <edges xmi:id="_NPsyiBA-EeGQ0KsLDV4EFg" type="Transition" element="_NPsyhxA-EeGQ0KsLDV4EFg" source="_NPjBjhA-EeGQ0KsLDV4EFg" target="_NPjBmhA-EeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_NPsyjBA-EeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_NPsyjRA-EeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_NPsyjhA-EeGQ0KsLDV4EFg" y="40"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_NPsyiRA-EeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_NPsyixA-EeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_NPsyihA-EeGQ0KsLDV4EFg" points="[1, 7, -72, -384]$[7, 43, -66, -348]"/>
+    </edges>
+    <edges xmi:id="_wTaiABBAEeGQ0KsLDV4EFg" type="Transition" element="_wTHnEBBAEeGQ0KsLDV4EFg" source="_pqhicBBAEeGQ0KsLDV4EFg" target="_mjwl0BBAEeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_wTaiBBBAEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_wTaiBRBAEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_wTaiBhBAEeGQ0KsLDV4EFg" y="40"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_wTaiARBAEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_wTaiAxBAEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_wTaiAhBAEeGQ0KsLDV4EFg" points="[-3, 7, 26, -61]$[-13, 31, 16, -37]"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_wUA-8BBAEeGQ0KsLDV4EFg" id="(0.5026178010471204,0.11688311688311688)"/>
+    </edges>
+    <edges xmi:id="_6Ljr0BBAEeGQ0KsLDV4EFg" type="Transition" element="_6LZ60BBAEeGQ0KsLDV4EFg" source="_mjwl0BBAEeGQ0KsLDV4EFg" target="_n6M0UBBAEeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_6Ljr1BBAEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_6Ljr1RBAEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_6Ljr1hBAEeGQ0KsLDV4EFg" y="-14"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_6Ljr0RBAEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_6Ljr0xBAEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_6Ljr0hBAEeGQ0KsLDV4EFg" points="[12, 2, -102, -8]$[105, -20, -9, -30]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_6MJhsBBAEeGQ0KsLDV4EFg" id="(0.93717277486911,0.2597402597402597)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_NsqT8BBBEeGQ0KsLDV4EFg" id="(0.035897435897435895,0.23376623376623376)"/>
+    </edges>
+    <edges xmi:id="_Lo_zEBBBEeGQ0KsLDV4EFg" type="Transition" element="_Lo2CEBBBEeGQ0KsLDV4EFg" source="_w85ZUBA_EeGQ0KsLDV4EFg" target="_iAUP0BBAEeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_Lo_zFBBBEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_Lo_zFRBBEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_Lo_zFhBBEeGQ0KsLDV4EFg" x="17" y="-38"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_Lo_zERBBEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_Lo_zExBBEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_Lo_zEhBBEeGQ0KsLDV4EFg" points="[18, 8, -142, -63]$[160, 62, 0, -9]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_LpvZ8BBBEeGQ0KsLDV4EFg" id="(0.9382716049382716,0.49635036496350365)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_LpvZ8RBBEeGQ0KsLDV4EFg" id="(0.5038022813688213,0.043689320388349516)"/>
+    </edges>
+    <edges xmi:id="_OXpxsRBBEeGQ0KsLDV4EFg" type="Transition" element="_OXpxsBBBEeGQ0KsLDV4EFg" source="_n6M0UBBAEeGQ0KsLDV4EFg" target="_mjwl0BBAEeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_OXzisRBBEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_OXzishBBEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_OXzisxBBEeGQ0KsLDV4EFg" y="13"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_OXpxshBBEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_OXzisBBBEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_OXpxsxBBEeGQ0KsLDV4EFg" points="[-5, -3, 94, 0]$[-89, 0, 10, 3]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_OYjJkBBBEeGQ0KsLDV4EFg" id="(0.02564102564102564,0.8831168831168831)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_OYjJkRBBEeGQ0KsLDV4EFg" id="(0.9476439790575916,0.8441558441558441)"/>
+    </edges>
+    <edges xmi:id="_LDg1gBBDEeGQ0KsLDV4EFg" type="Transition" element="_LDXEgBBDEeGQ0KsLDV4EFg" source="_iAUP0BBAEeGQ0KsLDV4EFg" target="_SKwP4BBBEeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_LDg1hBBDEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_LDg1hRBDEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_LDg1hhBDEeGQ0KsLDV4EFg" x="-1" y="-38"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_LDg1gRBDEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_LDg1gxBDEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_LDg1ghBDEeGQ0KsLDV4EFg" points="[-1, 4, 0, -95]$[1, 93, 2, -6]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_LEGrYBBDEeGQ0KsLDV4EFg" id="(0.5057034220532319,0.9805825242718447)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_LEGrYRBDEeGQ0KsLDV4EFg" id="(0.5194805194805194,0.16304347826086957)"/>
+    </edges>
+    <edges xmi:id="_fTBmUBBEEeGQ0KsLDV4EFg" type="Transition" element="_fS31UBBEEeGQ0KsLDV4EFg" source="_SKwP4BBBEeGQ0KsLDV4EFg" target="_fPRkMBBDEeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_fTBmVBBEEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_fTBmVRBEEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_fTBmVhBEEeGQ0KsLDV4EFg" y="17"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_fTBmURBEEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_fTBmUxBEEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_fTBmUhBEEeGQ0KsLDV4EFg" points="[-6, 0, 249, 0]$[-237, -1, 18, -1]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_fTncMBBEEeGQ0KsLDV4EFg" id="(0.025974025974025976,0.4782608695652174)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_fTncMRBEEeGQ0KsLDV4EFg" id="(0.9138755980861244,0.4782608695652174)"/>
+    </edges>
+    <edges xmi:id="_g7nUwBBEEeGQ0KsLDV4EFg" type="Transition" element="_g7TywBBEEeGQ0KsLDV4EFg" source="_fPRkMBBDEeGQ0KsLDV4EFg" target="_12Y7ABBDEeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_g7nUxBBEEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_g7nUxRBEEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_g7nUxhBEEeGQ0KsLDV4EFg" y="40"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_g7nUwRBEEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_g7nUwxBEEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_g7nUwhBEEeGQ0KsLDV4EFg" points="[-1, -4, 0, 55]$[-8, -42, -7, 17]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_g8NKoBBEEeGQ0KsLDV4EFg" id="(0.46411483253588515,0.043478260869565216)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_g8NKoRBEEeGQ0KsLDV4EFg" id="(0.460093896713615,0.7792207792207793)"/>
+    </edges>
+    <edges xmi:id="_iZx74BBEEeGQ0KsLDV4EFg" type="Transition" element="_iZox8BBEEeGQ0KsLDV4EFg" source="_12Y7ABBDEeGQ0KsLDV4EFg" target="_K-JX4RBEEeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_iZx75BBEEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_iZx75RBEEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_iZx75hBEEeGQ0KsLDV4EFg" y="40"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_iZx74RBEEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_iZx74xBEEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_iZx74hBEEeGQ0KsLDV4EFg" points="[2, -7, 0, 68]$[0, -65, -2, 10]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_iaYY0BBEEeGQ0KsLDV4EFg" id="(0.460093896713615,0.09090909090909091)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_iaYY0RBEEeGQ0KsLDV4EFg" id="(0.4784688995215311,0.8701298701298701)"/>
+    </edges>
+    <edges xmi:id="_nVCU8RBEEeGQ0KsLDV4EFg" type="Transition" element="_nVCU8BBEEeGQ0KsLDV4EFg" source="_K-JX4RBEEeGQ0KsLDV4EFg" target="_TfjYQRBEEeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_nVMF8RBEEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_nVMF8hBEEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_nVMF8xBEEeGQ0KsLDV4EFg" y="40"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_nVCU8hBEEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_nVMF8BBEEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_nVCU8xBEEeGQ0KsLDV4EFg" points="[5, -8, 0, 60]$[-2, -51, -7, 17]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_nVx70BBEEeGQ0KsLDV4EFg" id="(0.4688995215311005,0.1038961038961039)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_nVx70RBEEeGQ0KsLDV4EFg" id="(0.45454545454545453,0.8152173913043478)"/>
+    </edges>
+    <edges xmi:id="_pddaARBEEeGQ0KsLDV4EFg" type="Transition" element="_pddaABBEEeGQ0KsLDV4EFg" source="_TfjYQRBEEeGQ0KsLDV4EFg" target="_w85ZUBA_EeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_pddaBRBEEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_pddaBhBEEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_pddaBxBEEeGQ0KsLDV4EFg" x="-44" y="-31"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_pddaAhBEEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_pddaBBBEEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_pddaAxBEEeGQ0KsLDV4EFg" points="[5, -5, -120, 102]$[120, -107, -5, 0]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_peD28BBEEeGQ0KsLDV4EFg" id="(0.46320346320346323,0.05434782608695652)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_peD28RBEEeGQ0KsLDV4EFg" id="(0.0205761316872428,0.5328467153284672)"/>
+    </edges>
+    <edges xmi:id="_Av3wkRBFEeGQ0KsLDV4EFg" type="Transition" element="_Av3wkBBFEeGQ0KsLDV4EFg" source="_NPjBmhA-EeGQ0KsLDV4EFg" target="_7P4SwBBEEeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_Av3wlRBFEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_Av3wlhBFEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_Av3wlxBFEeGQ0KsLDV4EFg" x="4" y="-13"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_Av3wkhBFEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_Av3wlBBFEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_Av3wkxBFEeGQ0KsLDV4EFg" points="[1, -1, -186, 15]$[184, -16, -3, 0]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_AweNgBBFEeGQ0KsLDV4EFg" id="(0.9964953271028038,0.12643678160919541)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_AweNgRBFEeGQ0KsLDV4EFg" id="(0.058823529411764705,0.16393442622950818)"/>
+    </edges>
+    <edges xmi:id="_XlRbABBFEeGQ0KsLDV4EFg" type="Transition" element="_XlIREBBFEeGQ0KsLDV4EFg" source="_NPjBmhA-EeGQ0KsLDV4EFg" target="_MGCXkBBFEeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_XlRbBBBFEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_XlRbBRBFEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_XlRbBhBFEeGQ0KsLDV4EFg" x="-1" y="-10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_XlRbARBFEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_XlRbAxBFEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_XlRbAhBFEeGQ0KsLDV4EFg" points="[6, -4, -198, 0]$[195, 7, -9, 11]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_XmBB4BBFEeGQ0KsLDV4EFg" id="(0.9964953271028038,0.3146551724137931)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_XmBB4RBFEeGQ0KsLDV4EFg" id="(0.060109289617486336,0.22556390977443608)"/>
+    </edges>
+    <edges xmi:id="_EweCwBBGEeGQ0KsLDV4EFg" type="Transition" element="_EwURwBBGEeGQ0KsLDV4EFg" source="_EUppcBBGEeGQ0KsLDV4EFg" target="_BV6ncBBGEeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_EweCxBBGEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_EweCxRBGEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_EweCxhBGEeGQ0KsLDV4EFg" y="40"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_EweCwRBGEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_EweCwxBGEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_EweCwhBGEeGQ0KsLDV4EFg" points="[8, 0, -91, 0]$[86, -3, -13, -3]"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_ExD4oBBGEeGQ0KsLDV4EFg" id="(0.48493975903614456,0.24675324675324675)"/>
+    </edges>
+    <edges xmi:id="_yY3NwBBPEeGQ0KsLDV4EFg" type="Transition" element="_yYuD0BBPEeGQ0KsLDV4EFg" source="_xz9w8BBPEeGQ0KsLDV4EFg" target="_w85ZUBA_EeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_yY3NxBBPEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_yY3NxRBPEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_yY3NxhBPEeGQ0KsLDV4EFg" y="40"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_yY3NwRBPEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_yY3NwxBPEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_yY3NwhBPEeGQ0KsLDV4EFg" points="[7, 0, -124, -1]$[127, 0, -4, -1]"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_yZT5sBBPEeGQ0KsLDV4EFg" id="(0.01646090534979424,0.35036496350364965)"/>
+    </edges>
+    <edges xmi:id="_6kP60RBPEeGQ0KsLDV4EFg" type="Transition" element="_6kP60BBPEeGQ0KsLDV4EFg" source="_7P4SwBBEEeGQ0KsLDV4EFg" target="_NPjBmhA-EeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_6kP61RBPEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_6kP61hBPEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_6kP61xBPEeGQ0KsLDV4EFg" x="-5" y="9"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_6kP60hBPEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_6kP61BBPEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_6kP60xBPEeGQ0KsLDV4EFg" points="[-2, -4, 378, 0]$[-368, -11, 12, -7]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_6ksmwBBPEeGQ0KsLDV4EFg" id="(0.0196078431372549,0.7868852459016393)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_6ksmwRBPEeGQ0KsLDV4EFg" id="(0.9929906542056075,0.1752873563218391)"/>
+    </edges>
+    <edges xmi:id="__O1aoBBPEeGQ0KsLDV4EFg" type="Transition" element="__OsQsBBPEeGQ0KsLDV4EFg" source="_MGCXkBBFEeGQ0KsLDV4EFg" target="_NPjBmhA-EeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="__O1apBBPEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="__O1apRBPEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="__O1aphBPEeGQ0KsLDV4EFg" x="1" y="11"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="__O1aoRBPEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="__O1aoxBPEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="__O1aohBPEeGQ0KsLDV4EFg" points="[-4, -4, 180, 0]$[-172, -6, 12, -2]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="__PSGkBBPEeGQ0KsLDV4EFg" id="(0.006430868167202572,0.44405594405594406)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="__PSGkRBPEeGQ0KsLDV4EFg" id="(0.9929906542056075,0.40804597701149425)"/>
+    </edges>
+    <edges xmi:id="_Lp4mEBBQEeGQ0KsLDV4EFg" type="Transition" element="_Lpu1EBBQEeGQ0KsLDV4EFg" source="_BV6ncBBGEeGQ0KsLDV4EFg" target="_BV6ncBBGEeGQ0KsLDV4EFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_Lp4mFBBQEeGQ0KsLDV4EFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_Lp4mFRBQEeGQ0KsLDV4EFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_Lp4mFhBQEeGQ0KsLDV4EFg" x="64" y="-17"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_Lp4mERBQEeGQ0KsLDV4EFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_Lp4mExBQEeGQ0KsLDV4EFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_Lp4mEhBQEeGQ0KsLDV4EFg" points="[2, 0, 125, -21]$[19, 0, 142, -21]$[19, 48, 142, 27]$[-123, 48, 0, 27]$[-123, 30, 0, 9]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_LqVSABBQEeGQ0KsLDV4EFg" id="(0.9912280701754386,0.5161290322580645)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_LqVSARBQEeGQ0KsLDV4EFg" id="(0.4517543859649123,0.8548387096774194)"/>
+    </edges>
+  </notation:Diagram>
+</xmi:XMI>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 495 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/TrafficLightWaitingSimple.sct


+ 4 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/build.properties

@@ -0,0 +1,4 @@
+source.. = src/,\
+           src-gen/
+bin.includes = META-INF/,\
+               .

+ 24 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/Event.java

@@ -0,0 +1,24 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java;
+
+public class Event {
+	
+	private String name;
+	
+	public Event(String name) {
+		this.name = name;
+	}
+	
+	public String getName() {
+		return name;
+	}
+}

+ 21 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/EventNotification.java

@@ -0,0 +1,21 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public class EventNotification extends Notification<Event> {
+
+	public EventNotification(Event element) {
+		super(NotificationType.EventNotification, element);
+	}
+
+}

+ 17 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/INotificationListener.java

@@ -0,0 +1,17 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java;
+
+public interface INotificationListener {
+	
+	public void notify(Notification<?> notification);
+	
+}

+ 18 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/INotificationSender.java

@@ -0,0 +1,18 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java;
+
+public interface INotificationSender {
+	
+	public boolean addNotificationListener(INotificationListener listener);
+	
+	public boolean removeNotificationListener(INotificationListener listener);
+}

+ 18 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/IStatemachine.java

@@ -0,0 +1,18 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java;
+
+public interface IStatemachine {
+	
+	public void init();
+
+	public void runCycle();
+}

+ 21 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ITimedStatemachine.java

@@ -0,0 +1,21 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java;
+
+import org.yakindu.sct.runtime.java.INotificationListener;
+
+public interface ITimedStatemachine extends
+		IStatemachine, INotificationListener {
+
+	public void setTimerHandler(ITimerHandler timerHandler);
+
+	public ITimerHandler getTimerHandler();
+}

+ 18 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ITimerHandler.java

@@ -0,0 +1,18 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java;
+
+public interface ITimerHandler {
+	
+	public void setTimer(TimeEvent event, long time, long cycleStartTime);
+	
+	public void resetTimer(TimeEvent event);
+}

+ 31 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/Notification.java

@@ -0,0 +1,31 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java;
+
+public class Notification<Element> {
+	
+	private NotificationType notificationType;
+	
+	private Element element;
+
+	public Notification(NotificationType notificationType, Element element) {
+		this.notificationType = notificationType;
+		this.element = element;
+	}
+	
+	public NotificationType getNotificationType() {
+		return notificationType;
+	}
+
+	public Element getElement() {
+		return element;
+	}
+}

+ 33 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/NotificationSender.java

@@ -0,0 +1,33 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class NotificationSender implements INotificationSender {
+
+	private Set<INotificationListener> listeners = new HashSet<INotificationListener>();
+	
+	public boolean addNotificationListener(INotificationListener listener) {
+		return listeners.add(listener);
+	}
+	
+	public boolean removeNotificationListener(INotificationListener listener) {
+		return listeners.remove(listener);
+	}
+	
+	protected void notifyListeners(Notification<?> notification) {
+		for (INotificationListener listener : listeners) {
+			listener.notify(notification);
+		}
+	}
+}

+ 15 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/NotificationType.java

@@ -0,0 +1,15 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java;
+
+public enum NotificationType {
+	EventNotification,
+}

+ 29 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/TimeEvent.java

@@ -0,0 +1,29 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java;
+
+public class TimeEvent extends ValuedEvent<Boolean> {
+	
+	private long time = -1;
+	
+	public TimeEvent(String name, boolean periodic) {
+		super(name, periodic);
+	}
+	
+	public void setTime(long time){
+		this.time = time;
+	}
+	
+	public long getTime(){
+		return time;
+	}
+}
+

+ 69 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/TimerHandler.java

@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import org.yakindu.sct.runtime.java.EventNotification;
+
+public class TimerHandler implements ITimerHandler {
+
+	private final ITimedStatemachine statemachine;
+
+	private final Timer timer = new Timer();
+
+	private final Map<TimeEvent, TimerTask> timerTaskMap = new HashMap<TimeEvent, TimerTask>();;
+
+	public TimerHandler(ITimedStatemachine statemachine) {
+		this.statemachine = statemachine;
+	}
+
+	@Override
+	public void setTimer(final TimeEvent event, long time, long cycleStartTime) {
+		// Reset existing TimerTask for event. This step isn't necessary if
+		// timer tasks are properly reset by sexec model.
+		if (timerTaskMap.containsKey(event)) {
+			resetTimer(event);
+		}
+
+		// Create a new TimerTask for given event.
+		timerTaskMap.put(event, new TimerTask() {
+			@Override
+			public void run() {
+				statemachine.notify(new EventNotification(event));
+			}
+		});
+		
+		//set time field of event
+		event.setTime(time);
+		
+		// start scheduling the timer
+		if (event.getValue()) {
+			timer.scheduleAtFixedRate(timerTaskMap.get(event),
+					time - (System.currentTimeMillis() - cycleStartTime), time);
+		} else {
+			timer.schedule(timerTaskMap.get(event),
+					time - (System.currentTimeMillis() - cycleStartTime));
+		}
+	}
+
+	@Override
+	public void resetTimer(TimeEvent event) {
+		if (timerTaskMap.containsKey(event) && timerTaskMap.get(event) != null) {
+			timerTaskMap.get(event).cancel();
+			timer.purge();
+		}
+		timerTaskMap.remove(event);
+	}
+}

+ 32 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ValuedEvent.java

@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java;
+
+public class ValuedEvent<DataType> extends Event {
+	
+	private DataType value;
+	
+	public ValuedEvent(String name, DataType value) {
+		super(name);
+		this.value = value;
+	}
+	
+	public DataType getValue() {
+		return value;
+	}
+	
+	public void setValue(DataType value) {
+		if (value == null) {
+			throw new IllegalArgumentException();
+		}
+		this.value = value;
+	}
+}

+ 21 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceDefault.java

@@ -0,0 +1,21 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaiting;
+
+
+
+public interface InterfaceDefault {
+	
+	public void raiseKeypress1();
+	public void raiseKeypress2();
+	public void raiseKeypress3();
+	
+}

+ 55 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceDefaultImpl.java

@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaiting;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public class InterfaceDefaultImpl implements InterfaceDefault {
+	
+	private final Event EventKeypress1 = new Event("keypress1"); 
+	private final Event EventKeypress2 = new Event("keypress2"); 
+	private final Event EventKeypress3 = new Event("keypress3"); 
+	
+	private TrafficLightWaitingAbstractBaseStatemachine statemachine; 
+	
+	public InterfaceDefaultImpl(TrafficLightWaitingAbstractBaseStatemachine statemachine) {
+		this.statemachine = statemachine;
+	}
+	
+	public void raiseKeypress1() {
+		statemachine.getOccuredEvents().add(EventKeypress1);
+	}
+	
+	
+	public Event getEventKeypress1() {
+		return EventKeypress1;
+	}
+	
+	public void raiseKeypress2() {
+		statemachine.getOccuredEvents().add(EventKeypress2);
+	}
+	
+	
+	public Event getEventKeypress2() {
+		return EventKeypress2;
+	}
+	
+	public void raiseKeypress3() {
+		statemachine.getOccuredEvents().add(EventKeypress3);
+	}
+	
+	
+	public Event getEventKeypress3() {
+		return EventKeypress3;
+	}
+	
+	
+}

+ 24 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfacePedestrian.java

@@ -0,0 +1,24 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaiting;
+
+
+
+public interface InterfacePedestrian {
+	
+	
+	public boolean getVarRequest();
+	public void setVarRequest(boolean value);	
+	public boolean getVarRed();
+	public void setVarRed(boolean value);	
+	public boolean getVarGreen();
+	public void setVarGreen(boolean value);	
+}

+ 51 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfacePedestrianImpl.java

@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaiting;
+
+
+public class InterfacePedestrianImpl implements InterfacePedestrian {
+	
+	
+	private TrafficLightWaitingAbstractBaseStatemachine statemachine; 
+	
+	public InterfacePedestrianImpl(TrafficLightWaitingAbstractBaseStatemachine statemachine) {
+		this.statemachine = statemachine;
+	}
+	
+	
+	private boolean varRequest;
+	
+	public boolean getVarRequest() {
+		return varRequest;
+	}
+	
+	public void setVarRequest(boolean value) {
+		varRequest = value;
+	}	
+	private boolean varRed;
+	
+	public boolean getVarRed() {
+		return varRed;
+	}
+	
+	public void setVarRed(boolean value) {
+		varRed = value;
+	}	
+	private boolean varGreen;
+	
+	public boolean getVarGreen() {
+		return varGreen;
+	}
+	
+	public void setVarGreen(boolean value) {
+		varGreen = value;
+	}	
+}

+ 24 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceTrafficLight.java

@@ -0,0 +1,24 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaiting;
+
+
+
+public interface InterfaceTrafficLight {
+	
+	
+	public boolean getVarRed();
+	public void setVarRed(boolean value);	
+	public boolean getVarYellow();
+	public void setVarYellow(boolean value);	
+	public boolean getVarGreen();
+	public void setVarGreen(boolean value);	
+}

+ 51 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceTrafficLightImpl.java

@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaiting;
+
+
+public class InterfaceTrafficLightImpl implements InterfaceTrafficLight {
+	
+	
+	private TrafficLightWaitingAbstractBaseStatemachine statemachine; 
+	
+	public InterfaceTrafficLightImpl(TrafficLightWaitingAbstractBaseStatemachine statemachine) {
+		this.statemachine = statemachine;
+	}
+	
+	
+	private boolean varRed;
+	
+	public boolean getVarRed() {
+		return varRed;
+	}
+	
+	public void setVarRed(boolean value) {
+		varRed = value;
+	}	
+	private boolean varYellow;
+	
+	public boolean getVarYellow() {
+		return varYellow;
+	}
+	
+	public void setVarYellow(boolean value) {
+		varYellow = value;
+	}	
+	private boolean varGreen;
+	
+	public boolean getVarGreen() {
+		return varGreen;
+	}
+	
+	public void setVarGreen(boolean value) {
+		varGreen = value;
+	}	
+}

+ 483 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingAbstractBaseStatemachine.java

@@ -0,0 +1,483 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaiting;
+
+import java.util.Collection;
+import java.util.EnumSet;
+import java.util.HashSet;
+import java.util.Set;
+import org.yakindu.sct.runtime.java.Event;
+import org.yakindu.sct.runtime.java.TimeEvent;
+import org.yakindu.sct.runtime.java.ITimedStatemachine;
+import org.yakindu.sct.runtime.java.ITimerHandler;
+import org.yakindu.sct.runtime.java.EventNotification;
+import org.yakindu.sct.runtime.java.Notification;
+
+public abstract class TrafficLightWaitingAbstractBaseStatemachine implements ITimedStatemachine {
+	
+	
+	private static final TimeEvent PedWaiting_time_event_0 = new TimeEvent("PedWaiting_time_event_0", false); 
+	private static final TimeEvent WaitOn_time_event_0 = new TimeEvent("WaitOn_time_event_0", false); 
+	private static final TimeEvent WaitOff_time_event_0 = new TimeEvent("WaitOff_time_event_0", false); 
+	private static final TimeEvent StreetAttention_time_event_0 = new TimeEvent("StreetAttention_time_event_0", false); 
+	private static final TimeEvent StreetRed_time_event_0 = new TimeEvent("StreetRed_time_event_0", false); 
+	private static final TimeEvent PedestrianGreen_time_event_0 = new TimeEvent("PedestrianGreen_time_event_0", false); 
+	private static final TimeEvent PedestrianRed_time_event_0 = new TimeEvent("PedestrianRed_time_event_0", false); 
+	private static final TimeEvent StreetPrepare_time_event_0 = new TimeEvent("StreetPrepare_time_event_0", false); 
+	
+	
+	public enum State {
+	      On,
+	      StreetGreen,
+	      PedWaiting,
+	      WaitOn,
+	      WaitOff,
+	      StreetAttention,
+	      StreetRed,
+	      PedestrianGreen,
+	      PedestrianRed,
+	      StreetPrepare,
+	      Freeze,
+	      Off,
+	      BlinkYellow,
+	};
+	
+	private InterfaceTrafficLightImpl interfaceTrafficLight;
+	private InterfacePedestrianImpl interfacePedestrian;
+	private InterfaceDefaultImpl interfaceDefault;
+
+	private final Set<State> activeStates = EnumSet.noneOf(State.class);
+	
+	private final Collection<Event> occuredEvents;
+	
+	private final Collection<Event> outEvents;
+	
+	private ITimerHandler timerHandler;
+	
+	private long cycleStartTime;
+	
+	public TrafficLightWaitingAbstractBaseStatemachine(Collection<Event> occuredEvents) {
+		this.occuredEvents = occuredEvents;
+		this.outEvents = new HashSet<Event>();
+		interfaceTrafficLight = new InterfaceTrafficLightImpl(this);
+		interfacePedestrian = new InterfacePedestrianImpl(this);
+		interfaceDefault = new InterfaceDefaultImpl(this);
+	}
+	
+	protected Collection<Event> getOccuredEvents() {
+		return occuredEvents;
+	}
+	
+	protected Collection<Event> getOutEvents(){
+		return outEvents;
+	}
+		
+	public void entry() {
+		cycleStartTime = System.currentTimeMillis();
+	activeStates.add(State.On);
+		
+		
+	}
+	
+	protected boolean eventOccured() {
+		return !getOccuredEvents().isEmpty();
+	}
+	
+	@Override
+	public void init() {
+		
+	}
+	
+	@Override
+	public void setTimerHandler(ITimerHandler timerHandler) {
+		this.timerHandler = timerHandler;
+	}
+
+	@Override
+	public ITimerHandler getTimerHandler() {
+		if (timerHandler == null) {
+			throw new NullPointerException("TimerHandler of statemachine \"+TrafficLightWaiting+\" not set!");
+		}
+		return timerHandler;
+	}
+	
+	@Override
+	public void notify(Notification<?> notification) {
+		if (notification instanceof EventNotification) {
+			EventNotification eventNotification = (EventNotification) notification;
+			getOccuredEvents().add(eventNotification.getElement());
+		}
+	}
+		
+	public Set<State> getActiveStates(){
+		return EnumSet.copyOf(activeStates);
+	}
+	
+	public InterfaceTrafficLight getInterfaceTrafficLight() {
+		return interfaceTrafficLight;
+	}
+	
+	public InterfacePedestrian getInterfacePedestrian() {
+		return interfacePedestrian;
+	}
+	
+	public InterfaceDefault getInterfaceDefault() {
+		return interfaceDefault;
+	}
+	
+	private boolean conditionOnTr0(Collection<?> events) {
+		return getOccuredEvents().contains(interfaceDefault.getEventKeypress3());
+	}
+	private boolean conditionOnTr1(Collection<?> events) {
+		return getOccuredEvents().contains(interfaceDefault.getEventKeypress2());
+	}
+	private boolean conditionStreetGreenTr0(Collection<?> events) {
+		return getOccuredEvents().contains(interfaceDefault.getEventKeypress1());
+	}
+	private boolean conditionPedWaitingTr0(Collection<?> events) {
+		return getOccuredEvents().contains(PedWaiting_time_event_0);
+	}
+	private boolean conditionWaitOnTr0(Collection<?> events) {
+		return getOccuredEvents().contains(WaitOn_time_event_0);
+	}
+	private boolean conditionWaitOffTr0(Collection<?> events) {
+		return getOccuredEvents().contains(WaitOff_time_event_0);
+	}
+	private boolean conditionStreetAttentionTr0(Collection<?> events) {
+		return getOccuredEvents().contains(StreetAttention_time_event_0);
+	}
+	private boolean conditionStreetRedTr0(Collection<?> events) {
+		return getOccuredEvents().contains(StreetRed_time_event_0);
+	}
+	private boolean conditionPedestrianGreenTr0(Collection<?> events) {
+		return getOccuredEvents().contains(PedestrianGreen_time_event_0);
+	}
+	private boolean conditionPedestrianRedTr0(Collection<?> events) {
+		return getOccuredEvents().contains(PedestrianRed_time_event_0);
+	}
+	private boolean conditionStreetPrepareTr0(Collection<?> events) {
+		return getOccuredEvents().contains(StreetPrepare_time_event_0);
+	}
+	private boolean conditionFreezeTr0(Collection<?> events) {
+		return getOccuredEvents().contains(interfaceDefault.getEventKeypress3());
+	}
+	private boolean conditionOffTr0(Collection<?> events) {
+		return getOccuredEvents().contains(interfaceDefault.getEventKeypress2());
+	}
+	private void actionsOnTr0() {
+	activeStates.remove(State.On);
+	activeStates.add(State.Freeze);
+
+	}
+	private void actionsOnTr1() {
+	activeStates.remove(State.On);
+	activeStates.add(State.Off);
+entryActionsOff();
+
+	}
+	private void actionsStreetGreenTr0() {
+	activeStates.remove(State.StreetGreen);
+	activeStates.add(State.PedWaiting);
+entryActionsPedWaiting();
+
+	}
+	private void actionsPedWaitingTr0() {
+exitActionsPedWaiting();
+	activeStates.remove(State.PedWaiting);
+	activeStates.add(State.StreetAttention);
+entryActionsStreetAttention();
+
+	}
+	private void actionsWaitOnTr0() {
+exitActionsWaitOn();
+	activeStates.remove(State.WaitOn);
+	activeStates.add(State.WaitOff);
+entryActionsWaitOff();
+
+	}
+	private void actionsWaitOffTr0() {
+exitActionsWaitOff();
+	activeStates.remove(State.WaitOff);
+	activeStates.add(State.WaitOn);
+entryActionsWaitOn();
+
+	}
+	private void actionsStreetAttentionTr0() {
+exitActionsStreetAttention();
+	activeStates.remove(State.StreetAttention);
+	activeStates.add(State.StreetRed);
+entryActionsStreetRed();
+
+	}
+	private void actionsStreetRedTr0() {
+exitActionsStreetRed();
+	activeStates.remove(State.StreetRed);
+	activeStates.add(State.PedestrianGreen);
+entryActionsPedestrianGreen();
+
+	}
+	private void actionsPedestrianGreenTr0() {
+exitActionsPedestrianGreen();
+	activeStates.remove(State.PedestrianGreen);
+	activeStates.add(State.PedestrianRed);
+entryActionsPedestrianRed();
+
+	}
+	private void actionsPedestrianRedTr0() {
+exitActionsPedestrianRed();
+	activeStates.remove(State.PedestrianRed);
+	activeStates.add(State.StreetPrepare);
+entryActionsStreetPrepare();
+
+	}
+	private void actionsStreetPrepareTr0() {
+exitActionsStreetPrepare();
+	activeStates.remove(State.StreetPrepare);
+	activeStates.add(State.StreetGreen);
+entryActionsStreetGreen();
+
+	}
+	private void actionsFreezeTr0() {
+	activeStates.remove(State.Freeze);
+	activeStates.add(State.On);
+
+	}
+	private void actionsOffTr0() {
+	activeStates.remove(State.Off);
+	activeStates.add(State.On);
+
+	}
+	private void actionsBlinkYellowTr0() {
+	activeStates.remove(State.BlinkYellow);
+	interfaceTrafficLight.setVarYellow( !interfaceTrafficLight.getVarYellow());
+
+	activeStates.add(State.BlinkYellow);
+entryActionsBlinkYellow();
+
+	}
+	private void cycleOn(Collection<?> events) {
+	}
+	private void cycleStreetGreen(Collection<?> events) {
+if (conditionStreetGreenTr0(events) ) { 
+actionsStreetGreenTr0();
+}
+	}
+	private void cyclePedWaiting(Collection<?> events) {
+	}
+	private void cycleWaitOn(Collection<?> events) {
+if (conditionWaitOnTr0(events) ) { 
+actionsWaitOnTr0();
+}
+	}
+	private void cycleWaitOff(Collection<?> events) {
+if (conditionWaitOffTr0(events) ) { 
+actionsWaitOffTr0();
+}
+	}
+	private void cycleStreetAttention(Collection<?> events) {
+if (conditionStreetAttentionTr0(events) ) { 
+actionsStreetAttentionTr0();
+}
+	}
+	private void cycleStreetRed(Collection<?> events) {
+if (conditionStreetRedTr0(events) ) { 
+actionsStreetRedTr0();
+}
+	}
+	private void cyclePedestrianGreen(Collection<?> events) {
+if (conditionPedestrianGreenTr0(events) ) { 
+actionsPedestrianGreenTr0();
+}
+	}
+	private void cyclePedestrianRed(Collection<?> events) {
+if (conditionPedestrianRedTr0(events) ) { 
+actionsPedestrianRedTr0();
+}
+	}
+	private void cycleStreetPrepare(Collection<?> events) {
+if (conditionStreetPrepareTr0(events) ) { 
+actionsStreetPrepareTr0();
+}
+	}
+	private void cycleFreeze(Collection<?> events) {
+if (conditionFreezeTr0(events) ) { 
+actionsFreezeTr0();
+}
+	}
+	private void cycleOff(Collection<?> events) {
+	}
+	private void cycleBlinkYellow(Collection<?> events) {
+if (true 
+) { 
+actionsBlinkYellowTr0();
+}
+	}
+	private void entryActionsStreetGreen() {
+	interfaceTrafficLight.setVarRed(false);
+	interfaceTrafficLight.setVarYellow(false);
+	interfaceTrafficLight.setVarGreen(true);
+	interfacePedestrian.setVarRed(true);
+	interfacePedestrian.setVarGreen(false);
+	interfacePedestrian.setVarRequest(false);
+
+
+	}
+	private void entryActionsPedWaiting() {
+getTimerHandler().setTimer(PedWaiting_time_event_0, (7 * 1000), cycleStartTime);
+
+	}
+	private void entryActionsWaitOn() {
+getTimerHandler().setTimer(WaitOn_time_event_0, 500, cycleStartTime);
+	interfacePedestrian.setVarRequest(true);
+
+
+	}
+	private void entryActionsWaitOff() {
+getTimerHandler().setTimer(WaitOff_time_event_0, 500, cycleStartTime);
+	interfacePedestrian.setVarRequest(false);
+
+
+	}
+	private void entryActionsStreetAttention() {
+getTimerHandler().setTimer(StreetAttention_time_event_0, (2 * 1000), cycleStartTime);
+	interfaceTrafficLight.setVarRed(false);
+	interfaceTrafficLight.setVarYellow(true);
+	interfaceTrafficLight.setVarGreen(false);
+
+
+	}
+	private void entryActionsStreetRed() {
+getTimerHandler().setTimer(StreetRed_time_event_0, (2 * 1000), cycleStartTime);
+	interfaceTrafficLight.setVarRed(true);
+	interfaceTrafficLight.setVarYellow(false);
+	interfaceTrafficLight.setVarGreen(false);
+
+
+	}
+	private void entryActionsPedestrianGreen() {
+getTimerHandler().setTimer(PedestrianGreen_time_event_0, (7 * 1000), cycleStartTime);
+	interfacePedestrian.setVarRed(false);
+	interfacePedestrian.setVarGreen(true);
+
+
+	}
+	private void entryActionsPedestrianRed() {
+getTimerHandler().setTimer(PedestrianRed_time_event_0, (3 * 1000), cycleStartTime);
+	interfacePedestrian.setVarRed(true);
+	interfacePedestrian.setVarGreen(false);
+
+
+	}
+	private void entryActionsStreetPrepare() {
+getTimerHandler().setTimer(StreetPrepare_time_event_0, (2 * 1000), cycleStartTime);
+	interfaceTrafficLight.setVarRed(true);
+	interfaceTrafficLight.setVarYellow(true);
+	interfaceTrafficLight.setVarGreen(false);
+
+
+	}
+	private void entryActionsOff() {
+	interfaceTrafficLight.setVarRed(false);
+	interfaceTrafficLight.setVarGreen(false);
+	interfaceTrafficLight.setVarYellow(false);
+	interfacePedestrian.setVarRed(true);
+
+
+	}
+	private void entryActionsBlinkYellow() {
+	interfaceTrafficLight.setVarYellow(true);
+
+
+	}
+	private void exitActionsPedWaiting() {
+getTimerHandler().resetTimer(PedWaiting_time_event_0);
+	interfacePedestrian.setVarRequest(false);
+
+
+	}
+	private void exitActionsWaitOn() {
+getTimerHandler().resetTimer(WaitOn_time_event_0);
+
+	}
+	private void exitActionsWaitOff() {
+getTimerHandler().resetTimer(WaitOff_time_event_0);
+
+	}
+	private void exitActionsStreetAttention() {
+getTimerHandler().resetTimer(StreetAttention_time_event_0);
+
+	}
+	private void exitActionsStreetRed() {
+getTimerHandler().resetTimer(StreetRed_time_event_0);
+
+	}
+	private void exitActionsPedestrianGreen() {
+getTimerHandler().resetTimer(PedestrianGreen_time_event_0);
+
+	}
+	private void exitActionsPedestrianRed() {
+getTimerHandler().resetTimer(PedestrianRed_time_event_0);
+
+	}
+	private void exitActionsStreetPrepare() {
+getTimerHandler().resetTimer(StreetPrepare_time_event_0);
+
+	}
+	protected void runCycle(Collection<?> events) {
+		cycleStartTime = System.currentTimeMillis();
+		getOutEvents().clear();
+		for (State state : activeStates) {
+			switch (state) {
+    		case On:
+        		cycleOn(events);
+        		break;
+    		case StreetGreen:
+        		cycleStreetGreen(events);
+        		break;
+    		case PedWaiting:
+        		cyclePedWaiting(events);
+        		break;
+    		case WaitOn:
+        		cycleWaitOn(events);
+        		break;
+    		case WaitOff:
+        		cycleWaitOff(events);
+        		break;
+    		case StreetAttention:
+        		cycleStreetAttention(events);
+        		break;
+    		case StreetRed:
+        		cycleStreetRed(events);
+        		break;
+    		case PedestrianGreen:
+        		cyclePedestrianGreen(events);
+        		break;
+    		case PedestrianRed:
+        		cyclePedestrianRed(events);
+        		break;
+    		case StreetPrepare:
+        		cycleStreetPrepare(events);
+        		break;
+    		case Freeze:
+        		cycleFreeze(events);
+        		break;
+    		case Off:
+        		cycleOff(events);
+        		break;
+    		case BlinkYellow:
+        		cycleBlinkYellow(events);
+        		break;
+			default:
+				// no state found
+			}
+		}
+	}
+}

+ 29 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingCyleBasedStatemachine.java

@@ -0,0 +1,29 @@
+
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaiting;
+
+import java.util.HashSet;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public class TrafficLightWaitingCyleBasedStatemachine extends TrafficLightWaitingAbstractBaseStatemachine {
+
+	public TrafficLightWaitingCyleBasedStatemachine() {
+		super(new HashSet<Event>());
+	}
+
+	public void runCycle() {
+		runCycle(getOccuredEvents());
+		// remove all events
+		getOccuredEvents().clear();
+	}
+}

+ 37 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingEventBasedStatemachine.java

@@ -0,0 +1,37 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaiting;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.Queue;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public class TrafficLightWaitingEventBasedStatemachine extends TrafficLightWaitingAbstractBaseStatemachine {
+
+	public TrafficLightWaitingEventBasedStatemachine() {
+		super(new LinkedList<Event>());
+	}
+	
+	@Override
+	protected Queue<Event> getOccuredEvents() {
+		return (Queue<Event>) super.getOccuredEvents();
+	}
+	
+	@Override
+	public void runCycle() {
+		if (eventOccured()) {
+			Event event = getOccuredEvents().poll();
+			runCycle(Collections.singletonList(event));
+		}
+	}
+}

+ 21 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfaceDefault.java

@@ -0,0 +1,21 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaitingsimple;
+
+
+
+public interface InterfaceDefault {
+	
+	public void raiseKeypress1();
+	public void raiseKeypress2();
+	public void raiseKeypress3();
+	
+}

+ 55 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfaceDefaultImpl.java

@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaitingsimple;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public class InterfaceDefaultImpl implements InterfaceDefault {
+	
+	private final Event EventKeypress1 = new Event("keypress1"); 
+	private final Event EventKeypress2 = new Event("keypress2"); 
+	private final Event EventKeypress3 = new Event("keypress3"); 
+	
+	private TrafficLightWaitingSimpleAbstractBaseStatemachine statemachine; 
+	
+	public InterfaceDefaultImpl(TrafficLightWaitingSimpleAbstractBaseStatemachine statemachine) {
+		this.statemachine = statemachine;
+	}
+	
+	public void raiseKeypress1() {
+		statemachine.getOccuredEvents().add(EventKeypress1);
+	}
+	
+	
+	public Event getEventKeypress1() {
+		return EventKeypress1;
+	}
+	
+	public void raiseKeypress2() {
+		statemachine.getOccuredEvents().add(EventKeypress2);
+	}
+	
+	
+	public Event getEventKeypress2() {
+		return EventKeypress2;
+	}
+	
+	public void raiseKeypress3() {
+		statemachine.getOccuredEvents().add(EventKeypress3);
+	}
+	
+	
+	public Event getEventKeypress3() {
+		return EventKeypress3;
+	}
+	
+	
+}

+ 24 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfacePedestrian.java

@@ -0,0 +1,24 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaitingsimple;
+
+
+
+public interface InterfacePedestrian {
+	
+	
+	public boolean getVarRequest();
+	public void setVarRequest(boolean value);	
+	public boolean getVarRed();
+	public void setVarRed(boolean value);	
+	public boolean getVarGreen();
+	public void setVarGreen(boolean value);	
+}

+ 51 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfacePedestrianImpl.java

@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaitingsimple;
+
+
+public class InterfacePedestrianImpl implements InterfacePedestrian {
+	
+	
+	private TrafficLightWaitingSimpleAbstractBaseStatemachine statemachine; 
+	
+	public InterfacePedestrianImpl(TrafficLightWaitingSimpleAbstractBaseStatemachine statemachine) {
+		this.statemachine = statemachine;
+	}
+	
+	
+	private boolean varRequest;
+	
+	public boolean getVarRequest() {
+		return varRequest;
+	}
+	
+	public void setVarRequest(boolean value) {
+		varRequest = value;
+	}	
+	private boolean varRed;
+	
+	public boolean getVarRed() {
+		return varRed;
+	}
+	
+	public void setVarRed(boolean value) {
+		varRed = value;
+	}	
+	private boolean varGreen;
+	
+	public boolean getVarGreen() {
+		return varGreen;
+	}
+	
+	public void setVarGreen(boolean value) {
+		varGreen = value;
+	}	
+}

+ 24 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfaceTrafficLight.java

@@ -0,0 +1,24 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaitingsimple;
+
+
+
+public interface InterfaceTrafficLight {
+	
+	
+	public boolean getVarRed();
+	public void setVarRed(boolean value);	
+	public boolean getVarYellow();
+	public void setVarYellow(boolean value);	
+	public boolean getVarGreen();
+	public void setVarGreen(boolean value);	
+}

+ 51 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfaceTrafficLightImpl.java

@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaitingsimple;
+
+
+public class InterfaceTrafficLightImpl implements InterfaceTrafficLight {
+	
+	
+	private TrafficLightWaitingSimpleAbstractBaseStatemachine statemachine; 
+	
+	public InterfaceTrafficLightImpl(TrafficLightWaitingSimpleAbstractBaseStatemachine statemachine) {
+		this.statemachine = statemachine;
+	}
+	
+	
+	private boolean varRed;
+	
+	public boolean getVarRed() {
+		return varRed;
+	}
+	
+	public void setVarRed(boolean value) {
+		varRed = value;
+	}	
+	private boolean varYellow;
+	
+	public boolean getVarYellow() {
+		return varYellow;
+	}
+	
+	public void setVarYellow(boolean value) {
+		varYellow = value;
+	}	
+	private boolean varGreen;
+	
+	public boolean getVarGreen() {
+		return varGreen;
+	}
+	
+	public void setVarGreen(boolean value) {
+		varGreen = value;
+	}	
+}

+ 401 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/TrafficLightWaitingSimpleAbstractBaseStatemachine.java

@@ -0,0 +1,401 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaitingsimple;
+
+import java.util.Collection;
+import java.util.EnumSet;
+import java.util.HashSet;
+import java.util.Set;
+import org.yakindu.sct.runtime.java.Event;
+import org.yakindu.sct.runtime.java.TimeEvent;
+import org.yakindu.sct.runtime.java.ITimedStatemachine;
+import org.yakindu.sct.runtime.java.ITimerHandler;
+import org.yakindu.sct.runtime.java.EventNotification;
+import org.yakindu.sct.runtime.java.Notification;
+
+public abstract class TrafficLightWaitingSimpleAbstractBaseStatemachine implements ITimedStatemachine {
+	
+	
+	private static final TimeEvent StreetAttention_time_event_0 = new TimeEvent("StreetAttention_time_event_0", false); 
+	private static final TimeEvent StreetRed_time_event_0 = new TimeEvent("StreetRed_time_event_0", false); 
+	private static final TimeEvent PedestrianGreen_time_event_0 = new TimeEvent("PedestrianGreen_time_event_0", false); 
+	private static final TimeEvent PedestrianRed_time_event_0 = new TimeEvent("PedestrianRed_time_event_0", false); 
+	private static final TimeEvent StreetPrepare_time_event_0 = new TimeEvent("StreetPrepare_time_event_0", false); 
+	private static final TimeEvent WaitOn_time_event_0 = new TimeEvent("WaitOn_time_event_0", false); 
+	private static final TimeEvent WaitOff_time_event_0 = new TimeEvent("WaitOff_time_event_0", false); 
+	
+	
+	public enum State {
+	      StreetGreen,
+	      StreetAttention,
+	      StreetRed,
+	      PedestrianGreen,
+	      PedestrianRed,
+	      StreetPrepare,
+	      WaitOn,
+	      WaitOff,
+	};
+	
+	private InterfaceTrafficLightImpl interfaceTrafficLight;
+	private InterfacePedestrianImpl interfacePedestrian;
+	private InterfaceDefaultImpl interfaceDefault;
+	private int varCycle;
+	
+
+	private final Set<State> activeStates = EnumSet.noneOf(State.class);
+	
+	private final Collection<Event> occuredEvents;
+	
+	private final Collection<Event> outEvents;
+	
+	private ITimerHandler timerHandler;
+	
+	private long cycleStartTime;
+	
+	public TrafficLightWaitingSimpleAbstractBaseStatemachine(Collection<Event> occuredEvents) {
+		this.occuredEvents = occuredEvents;
+		this.outEvents = new HashSet<Event>();
+		interfaceTrafficLight = new InterfaceTrafficLightImpl(this);
+		interfacePedestrian = new InterfacePedestrianImpl(this);
+		interfaceDefault = new InterfaceDefaultImpl(this);
+	}
+	
+	protected Collection<Event> getOccuredEvents() {
+		return occuredEvents;
+	}
+	
+	protected Collection<Event> getOutEvents(){
+		return outEvents;
+	}
+		
+	public void entry() {
+		cycleStartTime = System.currentTimeMillis();
+	activeStates.add(State.StreetGreen);
+		entryActionsStreetGreen();
+		
+		
+	}
+	
+	protected boolean eventOccured() {
+		return !getOccuredEvents().isEmpty();
+	}
+	
+	@Override
+	public void init() {
+		
+	}
+	
+	@Override
+	public void setTimerHandler(ITimerHandler timerHandler) {
+		this.timerHandler = timerHandler;
+	}
+
+	@Override
+	public ITimerHandler getTimerHandler() {
+		if (timerHandler == null) {
+			throw new NullPointerException("TimerHandler of statemachine \"+TrafficLightWaitingSimple+\" not set!");
+		}
+		return timerHandler;
+	}
+	
+	@Override
+	public void notify(Notification<?> notification) {
+		if (notification instanceof EventNotification) {
+			EventNotification eventNotification = (EventNotification) notification;
+			getOccuredEvents().add(eventNotification.getElement());
+		}
+	}
+		
+	public Set<State> getActiveStates(){
+		return EnumSet.copyOf(activeStates);
+	}
+	
+	public InterfaceTrafficLight getInterfaceTrafficLight() {
+		return interfaceTrafficLight;
+	}
+	
+	public InterfacePedestrian getInterfacePedestrian() {
+		return interfacePedestrian;
+	}
+	
+	public InterfaceDefault getInterfaceDefault() {
+		return interfaceDefault;
+	}
+	
+	private int getVarCycle() {
+		return varCycle;
+	}
+	
+	private void setVarCycle(int value) {
+		varCycle = value;
+	}	
+	
+	private boolean conditionStreetGreenTr0(Collection<?> events) {
+		return getOccuredEvents().contains(interfaceDefault.getEventKeypress1());
+	}
+	private boolean conditionStreetAttentionTr0(Collection<?> events) {
+		return getOccuredEvents().contains(StreetAttention_time_event_0);
+	}
+	private boolean conditionStreetRedTr0(Collection<?> events) {
+		return getOccuredEvents().contains(StreetRed_time_event_0);
+	}
+	private boolean conditionPedestrianGreenTr0(Collection<?> events) {
+		return getOccuredEvents().contains(PedestrianGreen_time_event_0);
+	}
+	private boolean conditionPedestrianRedTr0(Collection<?> events) {
+		return getOccuredEvents().contains(PedestrianRed_time_event_0);
+	}
+	private boolean conditionStreetPrepareTr0(Collection<?> events) {
+		return getOccuredEvents().contains(StreetPrepare_time_event_0);
+	}
+	private boolean conditionWaitOnTr0(Collection<?> events) {
+		return getOccuredEvents().contains(WaitOn_time_event_0);
+	}
+	private boolean conditionWaitOffTr0(Collection<?> events) {
+		return (getVarCycle() >= 7);
+	}
+	private boolean conditionWaitOffTr1(Collection<?> events) {
+		return getOccuredEvents().contains(WaitOff_time_event_0);
+	}
+	private void actionsStreetGreenTr0() {
+	activeStates.remove(State.StreetGreen);
+	setVarCycle(1);
+
+	activeStates.add(State.WaitOn);
+entryActionsWaitOn();
+
+	}
+	private void actionsStreetAttentionTr0() {
+exitActionsStreetAttention();
+	activeStates.remove(State.StreetAttention);
+	activeStates.add(State.StreetRed);
+entryActionsStreetRed();
+
+	}
+	private void actionsStreetRedTr0() {
+exitActionsStreetRed();
+	activeStates.remove(State.StreetRed);
+	activeStates.add(State.PedestrianGreen);
+entryActionsPedestrianGreen();
+
+	}
+	private void actionsPedestrianGreenTr0() {
+exitActionsPedestrianGreen();
+	activeStates.remove(State.PedestrianGreen);
+	activeStates.add(State.PedestrianRed);
+entryActionsPedestrianRed();
+
+	}
+	private void actionsPedestrianRedTr0() {
+exitActionsPedestrianRed();
+	activeStates.remove(State.PedestrianRed);
+	activeStates.add(State.StreetPrepare);
+entryActionsStreetPrepare();
+
+	}
+	private void actionsStreetPrepareTr0() {
+exitActionsStreetPrepare();
+	activeStates.remove(State.StreetPrepare);
+	activeStates.add(State.StreetGreen);
+entryActionsStreetGreen();
+
+	}
+	private void actionsWaitOnTr0() {
+exitActionsWaitOn();
+	activeStates.remove(State.WaitOn);
+	activeStates.add(State.WaitOff);
+entryActionsWaitOff();
+
+	}
+	private void actionsWaitOffTr0() {
+exitActionsWaitOff();
+	activeStates.remove(State.WaitOff);
+	activeStates.add(State.StreetAttention);
+entryActionsStreetAttention();
+
+	}
+	private void actionsWaitOffTr1() {
+exitActionsWaitOff();
+	activeStates.remove(State.WaitOff);
+	setVarCycle(getVarCycle() + (1));
+
+	activeStates.add(State.WaitOn);
+entryActionsWaitOn();
+
+	}
+	private void cycleStreetGreen(Collection<?> events) {
+if (conditionStreetGreenTr0(events) ) { 
+actionsStreetGreenTr0();
+}
+	}
+	private void cycleStreetAttention(Collection<?> events) {
+if (conditionStreetAttentionTr0(events) ) { 
+actionsStreetAttentionTr0();
+}
+	}
+	private void cycleStreetRed(Collection<?> events) {
+if (conditionStreetRedTr0(events) ) { 
+actionsStreetRedTr0();
+}
+	}
+	private void cyclePedestrianGreen(Collection<?> events) {
+if (conditionPedestrianGreenTr0(events) ) { 
+actionsPedestrianGreenTr0();
+}
+	}
+	private void cyclePedestrianRed(Collection<?> events) {
+if (conditionPedestrianRedTr0(events) ) { 
+actionsPedestrianRedTr0();
+}
+	}
+	private void cycleStreetPrepare(Collection<?> events) {
+if (conditionStreetPrepareTr0(events) ) { 
+actionsStreetPrepareTr0();
+}
+	}
+	private void cycleWaitOn(Collection<?> events) {
+if (conditionWaitOnTr0(events) ) { 
+actionsWaitOnTr0();
+}
+	}
+	private void cycleWaitOff(Collection<?> events) {
+if (conditionWaitOffTr0(events) ) { 
+actionsWaitOffTr0();
+}
+else {
+if (conditionWaitOffTr1(events) ) { 
+actionsWaitOffTr1();
+}
+}
+	}
+	private void entryActionsStreetGreen() {
+	interfaceTrafficLight.setVarRed(false);
+	interfaceTrafficLight.setVarYellow(false);
+	interfaceTrafficLight.setVarGreen(true);
+	interfacePedestrian.setVarRed(true);
+	interfacePedestrian.setVarGreen(false);
+	interfacePedestrian.setVarRequest(false);
+
+
+	}
+	private void entryActionsStreetAttention() {
+getTimerHandler().setTimer(StreetAttention_time_event_0, (2 * 1000), cycleStartTime);
+	interfaceTrafficLight.setVarRed(false);
+	interfaceTrafficLight.setVarYellow(true);
+	interfaceTrafficLight.setVarGreen(false);
+
+
+	}
+	private void entryActionsStreetRed() {
+getTimerHandler().setTimer(StreetRed_time_event_0, (2 * 1000), cycleStartTime);
+	interfaceTrafficLight.setVarRed(true);
+	interfaceTrafficLight.setVarYellow(false);
+	interfaceTrafficLight.setVarGreen(false);
+
+
+	}
+	private void entryActionsPedestrianGreen() {
+getTimerHandler().setTimer(PedestrianGreen_time_event_0, (7 * 1000), cycleStartTime);
+	interfacePedestrian.setVarRed(false);
+	interfacePedestrian.setVarGreen(true);
+
+
+	}
+	private void entryActionsPedestrianRed() {
+getTimerHandler().setTimer(PedestrianRed_time_event_0, (3 * 1000), cycleStartTime);
+	interfacePedestrian.setVarRed(true);
+	interfacePedestrian.setVarGreen(false);
+
+
+	}
+	private void entryActionsStreetPrepare() {
+getTimerHandler().setTimer(StreetPrepare_time_event_0, (2 * 1000), cycleStartTime);
+	interfaceTrafficLight.setVarRed(true);
+	interfaceTrafficLight.setVarYellow(true);
+	interfaceTrafficLight.setVarGreen(false);
+
+
+	}
+	private void entryActionsWaitOn() {
+getTimerHandler().setTimer(WaitOn_time_event_0, 500, cycleStartTime);
+	interfacePedestrian.setVarRequest(true);
+
+
+	}
+	private void entryActionsWaitOff() {
+getTimerHandler().setTimer(WaitOff_time_event_0, 500, cycleStartTime);
+	interfacePedestrian.setVarRequest(false);
+
+
+	}
+	private void exitActionsStreetAttention() {
+getTimerHandler().resetTimer(StreetAttention_time_event_0);
+
+	}
+	private void exitActionsStreetRed() {
+getTimerHandler().resetTimer(StreetRed_time_event_0);
+
+	}
+	private void exitActionsPedestrianGreen() {
+getTimerHandler().resetTimer(PedestrianGreen_time_event_0);
+
+	}
+	private void exitActionsPedestrianRed() {
+getTimerHandler().resetTimer(PedestrianRed_time_event_0);
+
+	}
+	private void exitActionsStreetPrepare() {
+getTimerHandler().resetTimer(StreetPrepare_time_event_0);
+
+	}
+	private void exitActionsWaitOn() {
+getTimerHandler().resetTimer(WaitOn_time_event_0);
+
+	}
+	private void exitActionsWaitOff() {
+getTimerHandler().resetTimer(WaitOff_time_event_0);
+
+	}
+	protected void runCycle(Collection<?> events) {
+		cycleStartTime = System.currentTimeMillis();
+		getOutEvents().clear();
+		for (State state : activeStates) {
+			switch (state) {
+    		case StreetGreen:
+        		cycleStreetGreen(events);
+        		break;
+    		case StreetAttention:
+        		cycleStreetAttention(events);
+        		break;
+    		case StreetRed:
+        		cycleStreetRed(events);
+        		break;
+    		case PedestrianGreen:
+        		cyclePedestrianGreen(events);
+        		break;
+    		case PedestrianRed:
+        		cyclePedestrianRed(events);
+        		break;
+    		case StreetPrepare:
+        		cycleStreetPrepare(events);
+        		break;
+    		case WaitOn:
+        		cycleWaitOn(events);
+        		break;
+    		case WaitOff:
+        		cycleWaitOff(events);
+        		break;
+			default:
+				// no state found
+			}
+		}
+	}
+}

+ 29 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/TrafficLightWaitingSimpleCyleBasedStatemachine.java

@@ -0,0 +1,29 @@
+
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaitingsimple;
+
+import java.util.HashSet;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public class TrafficLightWaitingSimpleCyleBasedStatemachine extends TrafficLightWaitingSimpleAbstractBaseStatemachine {
+
+	public TrafficLightWaitingSimpleCyleBasedStatemachine() {
+		super(new HashSet<Event>());
+	}
+
+	public void runCycle() {
+		runCycle(getOccuredEvents());
+		// remove all events
+		getOccuredEvents().clear();
+	}
+}

+ 37 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/TrafficLightWaitingSimpleEventBasedStatemachine.java

@@ -0,0 +1,37 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.runtime.java.trafficlightwaitingsimple;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.Queue;
+
+import org.yakindu.sct.runtime.java.Event;
+
+public class TrafficLightWaitingSimpleEventBasedStatemachine extends TrafficLightWaitingSimpleAbstractBaseStatemachine {
+
+	public TrafficLightWaitingSimpleEventBasedStatemachine() {
+		super(new LinkedList<Event>());
+	}
+	
+	@Override
+	protected Queue<Event> getOccuredEvents() {
+		return (Queue<Event>) super.getOccuredEvents();
+	}
+	
+	@Override
+	public void runCycle() {
+		if (eventOccured()) {
+			Event event = getOccuredEvents().poll();
+			runCycle(Collections.singletonList(event));
+		}
+	}
+}

+ 169 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src/org/yakindu/sct/examples/java/trafficlight/CrossingDemo.java

@@ -0,0 +1,169 @@
+package org.yakindu.sct.examples.java.trafficlight;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.draw2d.FigureCanvas;
+import org.eclipse.draw2d.LightweightSystem;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.yakindu.sct.runtime.java.TimerHandler;
+import org.yakindu.sct.runtime.java.trafficlightwaitingsimple.TrafficLightWaitingSimpleCyleBasedStatemachine;
+
+public class CrossingDemo {
+
+	public static void main(String[] args) {
+		
+		final TrafficLightWaitingSimpleCyleBasedStatemachine statemachine = new TrafficLightWaitingSimpleCyleBasedStatemachine();
+
+		// create display and shell
+		Display display = new Display();
+		Shell shell = new Shell(display);
+		shell.setSize(400, 400);
+		shell.setText("Traffic Light Demo");
+		GridLayout shellLayout = new GridLayout();
+		shellLayout.numColumns = 1;
+		shell.setLayout(shellLayout);
+
+		LightweightSystem lws = createLightweightsystem(shell);
+		createButtonComposite(statemachine, shell);
+
+		CrossingFigure crossing = new CrossingFigure();
+		lws.setContents(crossing);
+		final TrafficLightFigure tl = new TrafficLightFigure();
+		crossing.add(tl);
+		crossing.getLayoutManager().setConstraint(tl,
+				new Rectangle(275, 75, 35, 90));
+
+		final PedestrianLightFigure pl = new PedestrianLightFigure();
+		crossing.add(pl);
+		crossing.getLayoutManager().setConstraint(pl,
+				new Rectangle(50, 10, 70, 20));
+		
+		Thread thread = new Thread() {
+			@Override
+			public void run() {
+				TimerHandler timerHandler = new TimerHandler(statemachine);
+				statemachine.setTimerHandler(timerHandler);
+				statemachine.entry();
+				while (!isInterrupted()) {
+					statemachine.runCycle();
+					try {
+						Thread.sleep(100);
+					} catch (InterruptedException e) {
+						// if Thread is interrupted from outside while sleeping
+						// the interrupt flag resets. Thread.sleep() reacts on
+						// interrupt() calls too. Therefore interrupt has to be
+						// called again to set the flag again and end the top
+						// while loop.
+						interrupt();
+					}
+				}
+			}
+		};
+		thread.start();
+		shell.open();
+		while (!shell.isDisposed()) {
+			// update traffic lights
+			tl.setRed(statemachine.getInterfaceTrafficLight().getVarRed());
+			tl.setYellow(statemachine.getInterfaceTrafficLight().getVarYellow());
+			tl.setGreen(statemachine.getInterfaceTrafficLight().getVarGreen());
+
+			pl.setWhite(statemachine.getInterfacePedestrian().getVarRequest());
+			pl.setRed(statemachine.getInterfacePedestrian().getVarRed());
+			pl.setGreen(statemachine.getInterfacePedestrian().getVarGreen());
+
+			crossing.repaint();
+
+			if (!display.readAndDispatch()) {
+				display.sleep();
+			}
+		}
+		System.out.println("Shell disposed...");
+		thread.interrupt();
+	}
+
+	private static LightweightSystem createLightweightsystem(Shell shell) {
+
+		FigureCanvas canvas = new FigureCanvas(shell);
+		GridData canvasGridData = new GridData();
+		canvasGridData.horizontalAlignment = GridData.FILL;
+		canvasGridData.verticalAlignment = GridData.FILL;
+		canvasGridData.grabExcessVerticalSpace = true;
+		canvasGridData.grabExcessHorizontalSpace = true;
+		canvas.setLayoutData(canvasGridData);
+		LightweightSystem lws = new LightweightSystem(canvas);
+		return lws;
+	}
+
+	private static void createButtonComposite(
+			final TrafficLightWaitingSimpleCyleBasedStatemachine statemachine,
+			Shell shell) {
+		// create a composite to hold the buttons
+		Composite buttonComposite = new Composite(shell, SWT.NO_SCROLL);
+		GridData buttonCompositeGridData = new GridData();
+		buttonCompositeGridData.horizontalAlignment = GridData.FILL;
+		buttonCompositeGridData.grabExcessHorizontalSpace = true;
+		buttonComposite.setLayoutData(buttonCompositeGridData);
+		FillLayout buttonCompositeLayout = new FillLayout();
+		buttonCompositeLayout.type = SWT.HORIZONTAL;
+		buttonComposite.setLayout(new FillLayout());
+
+		// create a button for each KEYPRESS event
+		Button[] button = new Button[3];
+		for (int i = 0; i < 3; i++) {
+			button[i] = new Button(buttonComposite, SWT.PUSH);
+			button[i].setText("key" + (i + 1));
+			final int j = i;
+			button[i].addListener(SWT.Selection, new Listener() {
+				public void handleEvent(
+						final org.eclipse.swt.widgets.Event event) {
+
+					// Shorter call for code commentet out below
+					try {
+						Class<?> interfaceClass = statemachine
+								.getInterfaceDefault().getClass();
+						interfaceClass.getDeclaredMethod(
+								"raiseKeypress" + (j + 1), new Class[0])
+								.invoke(statemachine.getInterfaceDefault(),
+										new Object[0]);
+					} catch (IllegalAccessException e) {
+						e.printStackTrace();
+					} catch (IllegalArgumentException e) {
+						e.printStackTrace();
+					} catch (InvocationTargetException e) {
+						e.printStackTrace();
+					} catch (NoSuchMethodException e) {
+						e.printStackTrace();
+					} catch (SecurityException e) {
+						e.printStackTrace();
+					}
+				}
+			});
+		}
+		// button[1].addListener(SWT.Selection, new Listener() {
+		// public void handleEvent(final org.eclipse.swt.widgets.Event event) {
+		// statechart.getInterfaceDefault().raiseKeypress1();
+		// }
+		// });
+		//
+		// button[2].addListener(SWT.Selection, new Listener() {
+		// public void handleEvent(final org.eclipse.swt.widgets.Event event) {
+		// statechart.getInterfaceDefault().raiseKeypress2();
+		// }
+		// });
+		//
+		// button[3].addListener(SWT.Selection, new Listener() {
+		// public void handleEvent(final org.eclipse.swt.widgets.Event event) {
+		// statechart.getInterfaceDefault().raiseKeypress3();
+		// }
+		// });
+	}
+}

+ 42 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src/org/yakindu/sct/examples/java/trafficlight/CrossingFigure.java

@@ -0,0 +1,42 @@
+package org.yakindu.sct.examples.java.trafficlight;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.XYLayout;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+public class CrossingFigure extends Figure {
+
+	public CrossingFigure() {
+		this.setLayoutManager(new XYLayout());
+
+	}
+
+	@Override
+	protected void paintFigure(Graphics graphics) {
+		Rectangle bounds = getBounds();
+
+		graphics
+				.setBackgroundColor(org.eclipse.draw2d.ColorConstants.lightGreen); // street
+																					// is
+																					// within
+																					// countryside
+																					// :-)
+		graphics.fillRectangle(bounds);
+
+		// paint street
+		graphics.setBackgroundColor(ColorConstants.lightGray);
+		graphics.fillRectangle(bounds.x + bounds.width / 3, bounds.y,
+				bounds.width / 3, bounds.height);
+
+		// paint crossing
+		graphics.setBackgroundColor(ColorConstants.white);
+		for (int i = 0; i <= 10; i += 2) {
+			graphics.fillRectangle(bounds.x + bounds.width / 3 + i
+					* bounds.width / 33, bounds.y + bounds.height / 11,
+					bounds.width / 30, bounds.height / 10);
+		}
+
+	}
+}

+ 62 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src/org/yakindu/sct/examples/java/trafficlight/PedestrianLightFigure.java

@@ -0,0 +1,62 @@
+package org.yakindu.sct.examples.java.trafficlight;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+public class PedestrianLightFigure extends Figure {
+
+	boolean white = false;
+	boolean red = false;
+	boolean green = false;
+
+	public boolean isWhite() {
+		return white;
+	}
+
+	public void setWhite(boolean white) {
+		this.white = white;
+	}
+
+	public boolean isRed() {
+		return red;
+	}
+
+	public void setRed(boolean red) {
+		this.red = red;
+	}
+
+	public boolean isGreen() {
+		return green;
+	}
+
+	public void setGreen(boolean green) {
+		this.green = green;
+	}
+
+	@Override
+	protected void paintFigure(Graphics graphics) {
+		Rectangle bounds = getBounds().getShrinked(new Insets(4, 4, 4, 4));
+
+		graphics.setBackgroundColor(ColorConstants.darkGray);
+		graphics.fillRectangle(getBounds());
+
+		graphics.setBackgroundColor(white ? ColorConstants.white
+				: ColorConstants.black);
+		graphics.fillRectangle(bounds.x, bounds.y, bounds.width / 5,
+				bounds.width / 5);
+
+		graphics.setBackgroundColor(red ? ColorConstants.red
+				: ColorConstants.black);
+		graphics.fillOval(bounds.x + 2 * bounds.width / 5, bounds.y,
+				bounds.width / 5, bounds.width / 5);
+
+		graphics.setBackgroundColor(green ? ColorConstants.green
+				: ColorConstants.black);
+		graphics.fillOval(bounds.x + 4 * bounds.width / 5, bounds.y,
+				bounds.width / 5, bounds.width / 5);
+
+	}
+}

+ 61 - 0
Examples/org.yakindu.sct.generator.java.trafficlight/src/org/yakindu/sct/examples/java/trafficlight/TrafficLightFigure.java

@@ -0,0 +1,61 @@
+package org.yakindu.sct.examples.java.trafficlight;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+public class TrafficLightFigure extends Figure {
+
+	private boolean red = false;
+	private boolean yellow = false;
+	private boolean green = false;
+
+	public boolean isRed() {
+		return red;
+	}
+
+	public void setRed(boolean red) {
+		this.red = red;
+	}
+
+	public boolean isYellow() {
+		return yellow;
+	}
+
+	public void setYellow(boolean yellow) {
+		this.yellow = yellow;
+	}
+
+	public boolean isGreen() {
+		return green;
+	}
+
+	public void setGreen(boolean green) {
+		this.green = green;
+	}
+
+	@Override
+	protected void paintFigure(Graphics graphics) {
+		Rectangle bounds = getBounds().getShrinked(new Insets(10, 10, 10, 10));
+
+		graphics.setBackgroundColor(ColorConstants.darkGray);
+		graphics.fillRectangle(getBounds());
+
+		graphics.setBackgroundColor(red ? ColorConstants.red
+				: ColorConstants.black);
+		graphics.fillOval(bounds.x, bounds.y, bounds.height / 5,
+				bounds.height / 5);
+
+		graphics.setBackgroundColor(yellow ? ColorConstants.yellow
+				: ColorConstants.black);
+		graphics.fillOval(bounds.x, bounds.y + 2 * bounds.height / 5,
+				bounds.height / 5, bounds.height / 5);
+
+		graphics.setBackgroundColor(green ? ColorConstants.green
+				: ColorConstants.black);
+		graphics.fillOval(bounds.x, bounds.y + 4 * bounds.height / 5,
+				bounds.height / 5, bounds.height / 5);
+	}
+}