markus.muehlbrandt@itemis.de 14 лет назад
Родитель
Сommit
6eecb6695c
35 измененных файлов с 1502 добавлено и 2463 удалено
  1. 12 6
      Examples/org.yakindu.sct.generator.java.trafficlight/GenModelJava.sgen
  2. 877 831
      Examples/org.yakindu.sct.generator.java.trafficlight/TrafficLightWaiting.sct
  3. 0 495
      Examples/org.yakindu.sct.generator.java.trafficlight/TrafficLightWaitingSimple.sct
  4. 5 5
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/Event.java
  5. 2 2
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/EventNotification.java
  6. 4 4
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/INotificationListener.java
  7. 4 4
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/INotificationSender.java
  8. 3 3
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/IStatemachine.java
  9. 6 4
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ITimedStatemachine.java
  10. 5 5
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ITimerHandler.java
  11. 5 5
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/Notification.java
  12. 5 5
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/NotificationSender.java
  13. 2 2
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/NotificationType.java
  14. 8 9
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/TimeEvent.java
  15. 5 5
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/TimerHandler.java
  16. 6 6
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ValuedEvent.java
  17. 4 6
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceDefault.java
  18. 18 21
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceDefaultImpl.java
  19. 6 9
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfacePedestrian.java
  20. 17 19
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfacePedestrianImpl.java
  21. 6 9
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceTrafficLight.java
  22. 17 19
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/InterfaceTrafficLightImpl.java
  23. 470 257
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingAbstractBaseStatemachine.java
  24. 5 4
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingCyleBasedStatemachine.java
  25. 0 36
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaiting/TrafficLightWaitingEventBasedStatemachine.java
  26. 0 21
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfaceDefault.java
  27. 0 55
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfaceDefaultImpl.java
  28. 0 24
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfacePedestrian.java
  29. 0 51
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfacePedestrianImpl.java
  30. 0 24
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfaceTrafficLight.java
  31. 0 51
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/InterfaceTrafficLightImpl.java
  32. 0 397
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/TrafficLightWaitingSimpleAbstractBaseStatemachine.java
  33. 0 29
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/TrafficLightWaitingSimpleCyleBasedStatemachine.java
  34. 0 36
      Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/trafficlightwaitingsimple/TrafficLightWaitingSimpleEventBasedStatemachine.java
  35. 10 4
      Examples/org.yakindu.sct.generator.java.trafficlight/src/org/yakindu/sct/examples/java/trafficlight/CrossingDemo.java

+ 12 - 6
Examples/org.yakindu.sct.generator.java.trafficlight/GenModelJava.sgen

@@ -4,12 +4,18 @@ GeneratorModel for yakindu::java {
 			targetProject = "org.yakindu.sct.examples.generator.java.trafficlight"
 			targetFolder = "src-gen"
 		}
-	}
-	
-	statechart TrafficLightWaitingSimple {
-		feature Outlet {
-			targetProject = "org.yakindu.sct.examples.generator.java.trafficlight"
-			targetFolder = "src-gen"
+		
+		feature licenseHeader {
+			licenseText = "/**
+ * 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
+ */"
 		}
 	}
 }

Разница между файлами не показана из-за своего большого размера
+ 877 - 831
Examples/org.yakindu.sct.generator.java.trafficlight/TrafficLightWaiting.sct


Разница между файлами не показана из-за своего большого размера
+ 0 - 495
Examples/org.yakindu.sct.generator.java.trafficlight/TrafficLightWaitingSimple.sct


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

@@ -4,20 +4,20 @@
  * 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
- * 
+ *     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;
 	}

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

@@ -4,9 +4,9 @@
  * 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
- * 
+ *     committers of YAKINDU - initial API and implementation
  */
 package org.yakindu.sct.runtime.java;
 

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

@@ -4,14 +4,14 @@
  * 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
- * 
+ *     committers of YAKINDU - initial API and implementation
  */
 package org.yakindu.sct.runtime.java;
 
 public interface INotificationListener {
-	
+
 	public void notify(Notification<?> notification);
-	
+
 }

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

@@ -4,15 +4,15 @@
  * 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
- * 
+ *     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);
 }

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

@@ -4,14 +4,14 @@
  * 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
- * 
+ *     committers of YAKINDU - initial API and implementation
  */
 package org.yakindu.sct.runtime.java;
 
 public interface IStatemachine {
-	
+
 	public void init();
 
 	public void runCycle();

+ 6 - 4
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/ITimedStatemachine.java

@@ -4,16 +4,18 @@
  * 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
- * 
+ *     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 interface ITimedStatemachine
+		extends
+			IStatemachine,
+			INotificationListener {
 
 	public void setTimerHandler(ITimerHandler timerHandler);
 

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

@@ -4,17 +4,17 @@
  * 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
- * 
+ *     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);
-	
+
 	public void cancel();
 }

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

@@ -4,23 +4,23 @@
  * 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
- * 
+ *     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;
 	}

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

@@ -4,9 +4,9 @@
  * 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
- * 
+ *     committers of YAKINDU - initial API and implementation
  */
 package org.yakindu.sct.runtime.java;
 
@@ -16,15 +16,15 @@ 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);

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

@@ -4,9 +4,9 @@
  * 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
- * 
+ *     committers of YAKINDU - initial API and implementation
  */
 package org.yakindu.sct.runtime.java;
 

+ 8 - 9
Examples/org.yakindu.sct.generator.java.trafficlight/src-gen/org/yakindu/sct/runtime/java/TimeEvent.java

@@ -4,26 +4,25 @@
  * 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
- * 
+ *     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){
+
+	public void setTime(long time) {
 		this.time = time;
 	}
-	
-	public long getTime(){
+
+	public long getTime() {
 		return time;
 	}
 }
-

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

@@ -4,9 +4,9 @@
  * 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
- * 
+ *     committers of YAKINDU - initial API and implementation
  */
 package org.yakindu.sct.runtime.java;
 
@@ -43,10 +43,10 @@ public class TimerHandler implements ITimerHandler {
 				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),
@@ -64,7 +64,7 @@ public class TimerHandler implements ITimerHandler {
 		}
 		timerTaskMap.remove(event);
 	}
-	
+
 	/**
 	 * Cancels all running TimersTasks
 	 */

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

@@ -4,25 +4,25 @@
  * 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
- * 
+ *     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();

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

@@ -4,18 +4,16 @@
  * 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
- * 
+ *     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();
-	
+
 }

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

@@ -4,52 +4,49 @@
  * 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
- * 
+ *     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) {
+
+	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;
 	}
-	
-	
+
 }

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

@@ -4,21 +4,18 @@
  * 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
- * 
+ *     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 void setVarRequest(boolean value);
 	public boolean getVarRed();
-	public void setVarRed(boolean value);	
+	public void setVarRed(boolean value);
 	public boolean getVarGreen();
-	public void setVarGreen(boolean value);	
+	public void setVarGreen(boolean value);
 }

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

@@ -4,48 +4,46 @@
  * 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
- * 
+ *     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) {
+
+	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;
-	}	
+	}
 }

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

@@ -4,21 +4,18 @@
  * 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
- * 
+ *     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 void setVarRed(boolean value);
 	public boolean getVarYellow();
-	public void setVarYellow(boolean value);	
+	public void setVarYellow(boolean value);
 	public boolean getVarGreen();
-	public void setVarGreen(boolean value);	
+	public void setVarGreen(boolean value);
 }

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

@@ -4,48 +4,46 @@
  * 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
- * 
+ *     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) {
+
+	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;
-	}	
+	}
 }

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

@@ -4,9 +4,9 @@
  * 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
- * 
+ *     committers of YAKINDU - initial API and implementation
  */
 package org.yakindu.sct.runtime.java.trafficlightwaiting;
 
@@ -21,87 +21,80 @@ 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 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);
+	private static final TimeEvent BlinkYellow_time_event_0 = new TimeEvent(
+			"BlinkYellow_time_event_0", true);
+
 	public enum State {
-	      On,
-	      StreetGreen,
-	      PedWaiting,
-	      WaitOn,
-	      WaitOff,
-	      StreetAttention,
-	      StreetRed,
-	      PedestrianGreen,
-	      PedestrianRed,
-	      StreetPrepare,
-	      Freeze,
-	      Off,
-	      BlinkYellow,
+		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) {
+
+	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(){
+
+	protected Collection<Event> getOutEvents() {
 		return outEvents;
 	}
-		
-	public void entry() {
-		cycleStartTime = System.currentTimeMillis();
-	activeStates.add(State.On);
-		
-		
-	}
-	
+
 	protected boolean eventOccured() {
 		return !getOccuredEvents().isEmpty();
 	}
-	
+
 	public void init() {
-		
+
 	}
-	
+
 	public void setTimerHandler(ITimerHandler timerHandler) {
 		this.timerHandler = timerHandler;
 	}
 
 	public ITimerHandler getTimerHandler() {
 		if (timerHandler == null) {
-			throw new NullPointerException("TimerHandler of statemachine \"+TrafficLightWaiting+\" not set!");
+			throw new NullPointerException(
+					"TimerHandler of statemachine \"+TrafficLightWaiting+\" not set!");
 		}
 		return timerHandler;
 	}
@@ -112,31 +105,39 @@ public abstract class TrafficLightWaitingAbstractBaseStatemachine implements ITi
 			getOccuredEvents().add(eventNotification.getElement());
 		}
 	}
-		
-	public Set<State> getActiveStates(){
+
+	public Set<State> getActiveStates() {
 		return EnumSet.copyOf(activeStates);
 	}
-	
+
 	public InterfaceTrafficLight getInterfaceTrafficLight() {
 		return interfaceTrafficLight;
 	}
-	
+
 	public InterfacePedestrian getInterfacePedestrian() {
 		return interfacePedestrian;
 	}
-	
+
 	public InterfaceDefault getInterfaceDefault() {
 		return interfaceDefault;
 	}
-	
+
+	public void enterSequenceStatechartTrafficLightWaiting() {
+		cycleStartTime = System.currentTimeMillis();
+		enterSequenceOn();
+	}
+
 	private boolean conditionOnTr0(Collection<?> events) {
-		return getOccuredEvents().contains(interfaceDefault.getEventKeypress3());
+		return getOccuredEvents()
+				.contains(interfaceDefault.getEventKeypress3());
 	}
 	private boolean conditionOnTr1(Collection<?> events) {
-		return getOccuredEvents().contains(interfaceDefault.getEventKeypress2());
+		return getOccuredEvents()
+				.contains(interfaceDefault.getEventKeypress2());
 	}
 	private boolean conditionStreetGreenTr0(Collection<?> events) {
-		return getOccuredEvents().contains(interfaceDefault.getEventKeypress1());
+		return getOccuredEvents()
+				.contains(interfaceDefault.getEventKeypress1());
 	}
 	private boolean conditionPedWaitingTr0(Collection<?> events) {
 		return getOccuredEvents().contains(PedWaiting_time_event_0);
@@ -163,316 +164,528 @@ public abstract class TrafficLightWaitingAbstractBaseStatemachine implements ITi
 		return getOccuredEvents().contains(StreetPrepare_time_event_0);
 	}
 	private boolean conditionFreezeTr0(Collection<?> events) {
-		return getOccuredEvents().contains(interfaceDefault.getEventKeypress3());
+		return getOccuredEvents()
+				.contains(interfaceDefault.getEventKeypress3());
 	}
 	private boolean conditionOffTr0(Collection<?> events) {
-		return getOccuredEvents().contains(interfaceDefault.getEventKeypress2());
+		return getOccuredEvents()
+				.contains(interfaceDefault.getEventKeypress2());
+	}
+	private boolean conditionBlinkYellowLr1(Collection<?> events) {
+		return getOccuredEvents().contains(BlinkYellow_time_event_0);
 	}
 	private void actionsOnTr0() {
-	activeStates.remove(State.On);
-	activeStates.add(State.Freeze);
+		exitSequenceOn();
+		enterSequenceFreeze();
 
 	}
 	private void actionsOnTr1() {
-	activeStates.remove(State.On);
-	activeStates.add(State.Off);
-entryActionsOff();
+		exitSequenceOn();
+		enterSequenceOff();
 
 	}
 	private void actionsStreetGreenTr0() {
-	activeStates.remove(State.StreetGreen);
-	activeStates.add(State.PedWaiting);
-entryActionsPedWaiting();
+		exitSequenceStreetGreen();
+		enterSequencePedWaiting();
 
 	}
 	private void actionsPedWaitingTr0() {
-exitActionsPedWaiting();
-	activeStates.remove(State.PedWaiting);
-	activeStates.add(State.StreetAttention);
-entryActionsStreetAttention();
+		exitSequencePedWaiting();
+		enterSequenceStreetAttention();
 
 	}
 	private void actionsWaitOnTr0() {
-exitActionsWaitOn();
-	activeStates.remove(State.WaitOn);
-	activeStates.add(State.WaitOff);
-entryActionsWaitOff();
+		exitSequenceWaitOn();
+		enterSequenceWaitOff();
 
 	}
 	private void actionsWaitOffTr0() {
-exitActionsWaitOff();
-	activeStates.remove(State.WaitOff);
-	activeStates.add(State.WaitOn);
-entryActionsWaitOn();
+		exitSequenceWaitOff();
+		enterSequenceWaitOn();
 
 	}
 	private void actionsStreetAttentionTr0() {
-exitActionsStreetAttention();
-	activeStates.remove(State.StreetAttention);
-	activeStates.add(State.StreetRed);
-entryActionsStreetRed();
+		exitSequenceStreetAttention();
+		enterSequenceStreetRed();
 
 	}
 	private void actionsStreetRedTr0() {
-exitActionsStreetRed();
-	activeStates.remove(State.StreetRed);
-	activeStates.add(State.PedestrianGreen);
-entryActionsPedestrianGreen();
+		exitSequenceStreetRed();
+		enterSequencePedestrianGreen();
 
 	}
 	private void actionsPedestrianGreenTr0() {
-exitActionsPedestrianGreen();
-	activeStates.remove(State.PedestrianGreen);
-	activeStates.add(State.PedestrianRed);
-entryActionsPedestrianRed();
+		exitSequencePedestrianGreen();
+		enterSequencePedestrianRed();
 
 	}
 	private void actionsPedestrianRedTr0() {
-exitActionsPedestrianRed();
-	activeStates.remove(State.PedestrianRed);
-	activeStates.add(State.StreetPrepare);
-entryActionsStreetPrepare();
+		exitSequencePedestrianRed();
+		enterSequenceStreetPrepare();
 
 	}
 	private void actionsStreetPrepareTr0() {
-exitActionsStreetPrepare();
-	activeStates.remove(State.StreetPrepare);
-	activeStates.add(State.StreetGreen);
-entryActionsStreetGreen();
+		exitSequenceStreetPrepare();
+		enterSequenceStreetGreen();
 
 	}
 	private void actionsFreezeTr0() {
-	activeStates.remove(State.Freeze);
-	activeStates.add(State.On);
+		exitSequenceFreeze();
+		enterSequenceOn();
 
 	}
 	private void actionsOffTr0() {
-	activeStates.remove(State.Off);
-	activeStates.add(State.On);
+		exitSequenceOff();
+		enterSequenceOn();
 
 	}
-	private void actionsBlinkYellowTr0() {
-	activeStates.remove(State.BlinkYellow);
-	interfaceTrafficLight.setVarYellow( !interfaceTrafficLight.getVarYellow());
+	private void actionsBlinkYellowLr1() {
+		interfaceTrafficLight.setVarYellow(!interfaceTrafficLight
+				.getVarYellow());
 
-	activeStates.add(State.BlinkYellow);
-entryActionsBlinkYellow();
+	}
+	private void entryActionStreetGreen() {
+		interfaceTrafficLight.setVarRed(false);
+		interfaceTrafficLight.setVarYellow(false);
+		interfaceTrafficLight.setVarGreen(true);
+		interfacePedestrian.setVarRed(true);
+		interfacePedestrian.setVarGreen(false);
+		interfacePedestrian.setVarRequest(false);
 
 	}
-	private void cycleOn(Collection<?> events) {
+	private void entryActionPedWaiting() {
+		getTimerHandler().setTimer(PedWaiting_time_event_0, (7 * 1000),
+				cycleStartTime);
+
 	}
-	private void cycleStreetGreen(Collection<?> events) {
-if (conditionStreetGreenTr0(events) ) { 
-actionsStreetGreenTr0();
-}
+	private void entryActionWaitOn() {
+		getTimerHandler().setTimer(WaitOn_time_event_0, 500, cycleStartTime);
+		interfacePedestrian.setVarRequest(true);
+
 	}
-	private void cyclePedWaiting(Collection<?> events) {
+	private void entryActionWaitOff() {
+		getTimerHandler().setTimer(WaitOff_time_event_0, 500, cycleStartTime);
+		interfacePedestrian.setVarRequest(false);
+
 	}
-	private void cycleWaitOn(Collection<?> events) {
-if (conditionWaitOnTr0(events) ) { 
-actionsWaitOnTr0();
-}
+	private void entryActionStreetAttention() {
+		getTimerHandler().setTimer(StreetAttention_time_event_0, (2 * 1000),
+				cycleStartTime);
+		interfaceTrafficLight.setVarRed(false);
+		interfaceTrafficLight.setVarYellow(true);
+		interfaceTrafficLight.setVarGreen(false);
+
 	}
-	private void cycleWaitOff(Collection<?> events) {
-if (conditionWaitOffTr0(events) ) { 
-actionsWaitOffTr0();
-}
+	private void entryActionStreetRed() {
+		getTimerHandler().setTimer(StreetRed_time_event_0, (2 * 1000),
+				cycleStartTime);
+		interfaceTrafficLight.setVarRed(true);
+		interfaceTrafficLight.setVarYellow(false);
+		interfaceTrafficLight.setVarGreen(false);
+
 	}
-	private void cycleStreetAttention(Collection<?> events) {
-if (conditionStreetAttentionTr0(events) ) { 
-actionsStreetAttentionTr0();
-}
+	private void entryActionPedestrianGreen() {
+		getTimerHandler().setTimer(PedestrianGreen_time_event_0, (7 * 1000),
+				cycleStartTime);
+		interfacePedestrian.setVarRed(false);
+		interfacePedestrian.setVarGreen(true);
+
 	}
-	private void cycleStreetRed(Collection<?> events) {
-if (conditionStreetRedTr0(events) ) { 
-actionsStreetRedTr0();
-}
+	private void entryActionPedestrianRed() {
+		getTimerHandler().setTimer(PedestrianRed_time_event_0, (3 * 1000),
+				cycleStartTime);
+		interfacePedestrian.setVarRed(true);
+		interfacePedestrian.setVarGreen(false);
+
 	}
-	private void cyclePedestrianGreen(Collection<?> events) {
-if (conditionPedestrianGreenTr0(events) ) { 
-actionsPedestrianGreenTr0();
-}
+	private void entryActionStreetPrepare() {
+		getTimerHandler().setTimer(StreetPrepare_time_event_0, (2 * 1000),
+				cycleStartTime);
+		interfaceTrafficLight.setVarRed(true);
+		interfaceTrafficLight.setVarYellow(true);
+		interfaceTrafficLight.setVarGreen(false);
+
 	}
-	private void cyclePedestrianRed(Collection<?> events) {
-if (conditionPedestrianRedTr0(events) ) { 
-actionsPedestrianRedTr0();
-}
+	private void entryActionOff() {
+		interfaceTrafficLight.setVarRed(false);
+		interfaceTrafficLight.setVarGreen(false);
+		interfaceTrafficLight.setVarYellow(false);
+		interfacePedestrian.setVarRed(true);
+
 	}
-	private void cycleStreetPrepare(Collection<?> events) {
-if (conditionStreetPrepareTr0(events) ) { 
-actionsStreetPrepareTr0();
-}
+	private void entryActionBlinkYellow() {
+		getTimerHandler().setTimer(BlinkYellow_time_event_0, 500,
+				cycleStartTime);
+		interfaceTrafficLight.setVarYellow(true);
+
 	}
-	private void cycleFreeze(Collection<?> events) {
-if (conditionFreezeTr0(events) ) { 
-actionsFreezeTr0();
-}
+	private void exitActionPedWaiting() {
+		getTimerHandler().resetTimer(PedWaiting_time_event_0);
+		interfacePedestrian.setVarRequest(false);
+
 	}
-	private void cycleOff(Collection<?> events) {
+	private void exitActionWaitOn() {
+		getTimerHandler().resetTimer(WaitOn_time_event_0);
+
 	}
-	private void cycleBlinkYellow(Collection<?> events) {
-if (true 
-) { 
-actionsBlinkYellowTr0();
-}
+	private void exitActionWaitOff() {
+		getTimerHandler().resetTimer(WaitOff_time_event_0);
+
+	}
+	private void exitActionStreetAttention() {
+		getTimerHandler().resetTimer(StreetAttention_time_event_0);
+
+	}
+	private void exitActionStreetRed() {
+		getTimerHandler().resetTimer(StreetRed_time_event_0);
+
 	}
-	private void entryActionsStreetGreen() {
-	interfaceTrafficLight.setVarRed(false);
-	interfaceTrafficLight.setVarYellow(false);
-	interfaceTrafficLight.setVarGreen(true);
-	interfacePedestrian.setVarRed(true);
-	interfacePedestrian.setVarGreen(false);
-	interfacePedestrian.setVarRequest(false);
+	private void exitActionPedestrianGreen() {
+		getTimerHandler().resetTimer(PedestrianGreen_time_event_0);
 
+	}
+	private void exitActionPedestrianRed() {
+		getTimerHandler().resetTimer(PedestrianRed_time_event_0);
 
 	}
-	private void entryActionsPedWaiting() {
-getTimerHandler().setTimer(PedWaiting_time_event_0, (7 * 1000), cycleStartTime);
+	private void exitActionStreetPrepare() {
+		getTimerHandler().resetTimer(StreetPrepare_time_event_0);
 
 	}
-	private void entryActionsWaitOn() {
-getTimerHandler().setTimer(WaitOn_time_event_0, 500, cycleStartTime);
-	interfacePedestrian.setVarRequest(true);
+	private void exitActionBlinkYellow() {
+		getTimerHandler().resetTimer(BlinkYellow_time_event_0);
 
+	}
 
+	private void enterSequenceOn() {
+		enterSequenceStreetGreen();
 	}
-	private void entryActionsWaitOff() {
-getTimerHandler().setTimer(WaitOff_time_event_0, 500, cycleStartTime);
-	interfacePedestrian.setVarRequest(false);
 
+	private void enterSequenceStreetGreen() {
+		entryActionStreetGreen();
+		activeStates.add(State.StreetGreen);
+	}
 
+	private void enterSequencePedWaiting() {
+		entryActionPedWaiting();
+		enterSequenceWaitOn();
 	}
-	private void entryActionsStreetAttention() {
-getTimerHandler().setTimer(StreetAttention_time_event_0, (2 * 1000), cycleStartTime);
-	interfaceTrafficLight.setVarRed(false);
-	interfaceTrafficLight.setVarYellow(true);
-	interfaceTrafficLight.setVarGreen(false);
 
+	private void enterSequenceWaitOn() {
+		entryActionWaitOn();
+		activeStates.add(State.WaitOn);
+	}
 
+	private void enterSequenceWaitOff() {
+		entryActionWaitOff();
+		activeStates.add(State.WaitOff);
 	}
-	private void entryActionsStreetRed() {
-getTimerHandler().setTimer(StreetRed_time_event_0, (2 * 1000), cycleStartTime);
-	interfaceTrafficLight.setVarRed(true);
-	interfaceTrafficLight.setVarYellow(false);
-	interfaceTrafficLight.setVarGreen(false);
 
+	private void enterSequenceStreetAttention() {
+		entryActionStreetAttention();
+		activeStates.add(State.StreetAttention);
+	}
 
+	private void enterSequenceStreetRed() {
+		entryActionStreetRed();
+		activeStates.add(State.StreetRed);
 	}
-	private void entryActionsPedestrianGreen() {
-getTimerHandler().setTimer(PedestrianGreen_time_event_0, (7 * 1000), cycleStartTime);
-	interfacePedestrian.setVarRed(false);
-	interfacePedestrian.setVarGreen(true);
 
+	private void enterSequencePedestrianGreen() {
+		entryActionPedestrianGreen();
+		activeStates.add(State.PedestrianGreen);
+	}
 
+	private void enterSequencePedestrianRed() {
+		entryActionPedestrianRed();
+		activeStates.add(State.PedestrianRed);
 	}
-	private void entryActionsPedestrianRed() {
-getTimerHandler().setTimer(PedestrianRed_time_event_0, (3 * 1000), cycleStartTime);
-	interfacePedestrian.setVarRed(true);
-	interfacePedestrian.setVarGreen(false);
 
+	private void enterSequenceStreetPrepare() {
+		entryActionStreetPrepare();
+		activeStates.add(State.StreetPrepare);
+	}
 
+	private void enterSequenceFreeze() {
+		activeStates.add(State.Freeze);
 	}
-	private void entryActionsStreetPrepare() {
-getTimerHandler().setTimer(StreetPrepare_time_event_0, (2 * 1000), cycleStartTime);
-	interfaceTrafficLight.setVarRed(true);
-	interfaceTrafficLight.setVarYellow(true);
-	interfaceTrafficLight.setVarGreen(false);
 
+	private void enterSequenceOff() {
+		entryActionOff();
+		enterSequenceBlinkYellow();
+	}
 
+	private void enterSequenceBlinkYellow() {
+		entryActionBlinkYellow();
+		activeStates.add(State.BlinkYellow);
 	}
-	private void entryActionsOff() {
-	interfaceTrafficLight.setVarRed(false);
-	interfaceTrafficLight.setVarGreen(false);
-	interfaceTrafficLight.setVarYellow(false);
-	interfacePedestrian.setVarRed(true);
+	private void exitSequenceOn() {
+		if (activeStates.contains(State.StreetGreen)) {
+			exitSequenceStreetGreen();
+
+		} else if (activeStates.contains(State.PedWaiting)) {
+			exitSequencePedWaiting();
 
+		} else if (activeStates.contains(State.StreetAttention)) {
+			exitSequenceStreetAttention();
 
+		} else if (activeStates.contains(State.StreetRed)) {
+			exitSequenceStreetRed();
+
+		} else if (activeStates.contains(State.PedestrianGreen)) {
+			exitSequencePedestrianGreen();
+
+		} else if (activeStates.contains(State.PedestrianRed)) {
+			exitSequencePedestrianRed();
+
+		} else if (activeStates.contains(State.StreetPrepare)) {
+			exitSequenceStreetPrepare();
+
+		}
+	}
+	private void exitSequenceStreetGreen() {
+		activeStates.remove(State.StreetGreen);
 	}
-	private void entryActionsBlinkYellow() {
-	interfaceTrafficLight.setVarYellow(true);
+	private void exitSequencePedWaiting() {
+		if (activeStates.contains(State.WaitOn)) {
+			exitSequenceWaitOn();
 
+		} else if (activeStates.contains(State.WaitOff)) {
+			exitSequenceWaitOff();
 
+		}
+		exitActionPedWaiting();
+	}
+	private void exitSequenceWaitOn() {
+		activeStates.remove(State.WaitOn);
+		exitActionWaitOn();
 	}
-	private void exitActionsPedWaiting() {
-getTimerHandler().resetTimer(PedWaiting_time_event_0);
-	interfacePedestrian.setVarRequest(false);
+	private void exitSequenceWaitOff() {
+		activeStates.remove(State.WaitOff);
+		exitActionWaitOff();
+	}
+	private void exitSequenceStreetAttention() {
+		activeStates.remove(State.StreetAttention);
+		exitActionStreetAttention();
+	}
+	private void exitSequenceStreetRed() {
+		activeStates.remove(State.StreetRed);
+		exitActionStreetRed();
+	}
+	private void exitSequencePedestrianGreen() {
+		activeStates.remove(State.PedestrianGreen);
+		exitActionPedestrianGreen();
+	}
+	private void exitSequencePedestrianRed() {
+		activeStates.remove(State.PedestrianRed);
+		exitActionPedestrianRed();
+	}
+	private void exitSequenceStreetPrepare() {
+		activeStates.remove(State.StreetPrepare);
+		exitActionStreetPrepare();
+	}
+	private void exitSequenceFreeze() {
+		activeStates.remove(State.Freeze);
+	}
+	private void exitSequenceOff() {
+		if (activeStates.contains(State.BlinkYellow)) {
+			exitSequenceBlinkYellow();
 
+		}
+	}
+	private void exitSequenceBlinkYellow() {
+		activeStates.remove(State.BlinkYellow);
+		exitActionBlinkYellow();
+	}
+	private void cycleOn(Collection<?> events) {
+	}
+	private void cycleStreetGreen(Collection<?> events) {
+		if (conditionOnTr0(events)) {
+			actionsOnTr0();
+		} else {
+			if (conditionOnTr1(events)) {
+				actionsOnTr1();
+			} else {
+				if (conditionStreetGreenTr0(events)) {
+					actionsStreetGreenTr0();
+				}
 
+			}
+		}
 	}
-	private void exitActionsWaitOn() {
-getTimerHandler().resetTimer(WaitOn_time_event_0);
+	private void cyclePedWaiting(Collection<?> events) {
+	}
+	private void cycleWaitOn(Collection<?> events) {
+		if (conditionOnTr0(events)) {
+			actionsOnTr0();
+		} else {
+			if (conditionOnTr1(events)) {
+				actionsOnTr1();
+			} else {
+				if (conditionPedWaitingTr0(events)) {
+					actionsPedWaitingTr0();
+				} else {
+					if (conditionWaitOnTr0(events)) {
+						actionsWaitOnTr0();
+					}
+
+				}
+
+			}
+		}
+	}
+	private void cycleWaitOff(Collection<?> events) {
+		if (conditionOnTr0(events)) {
+			actionsOnTr0();
+		} else {
+			if (conditionOnTr1(events)) {
+				actionsOnTr1();
+			} else {
+				if (conditionPedWaitingTr0(events)) {
+					actionsPedWaitingTr0();
+				} else {
+					if (conditionWaitOffTr0(events)) {
+						actionsWaitOffTr0();
+					}
+
+				}
 
+			}
+		}
 	}
-	private void exitActionsWaitOff() {
-getTimerHandler().resetTimer(WaitOff_time_event_0);
+	private void cycleStreetAttention(Collection<?> events) {
+		if (conditionOnTr0(events)) {
+			actionsOnTr0();
+		} else {
+			if (conditionOnTr1(events)) {
+				actionsOnTr1();
+			} else {
+				if (conditionStreetAttentionTr0(events)) {
+					actionsStreetAttentionTr0();
+				}
 
+			}
+		}
 	}
-	private void exitActionsStreetAttention() {
-getTimerHandler().resetTimer(StreetAttention_time_event_0);
+	private void cycleStreetRed(Collection<?> events) {
+		if (conditionOnTr0(events)) {
+			actionsOnTr0();
+		} else {
+			if (conditionOnTr1(events)) {
+				actionsOnTr1();
+			} else {
+				if (conditionStreetRedTr0(events)) {
+					actionsStreetRedTr0();
+				}
 
+			}
+		}
 	}
-	private void exitActionsStreetRed() {
-getTimerHandler().resetTimer(StreetRed_time_event_0);
+	private void cyclePedestrianGreen(Collection<?> events) {
+		if (conditionOnTr0(events)) {
+			actionsOnTr0();
+		} else {
+			if (conditionOnTr1(events)) {
+				actionsOnTr1();
+			} else {
+				if (conditionPedestrianGreenTr0(events)) {
+					actionsPedestrianGreenTr0();
+				}
 
+			}
+		}
 	}
-	private void exitActionsPedestrianGreen() {
-getTimerHandler().resetTimer(PedestrianGreen_time_event_0);
+	private void cyclePedestrianRed(Collection<?> events) {
+		if (conditionOnTr0(events)) {
+			actionsOnTr0();
+		} else {
+			if (conditionOnTr1(events)) {
+				actionsOnTr1();
+			} else {
+				if (conditionPedestrianRedTr0(events)) {
+					actionsPedestrianRedTr0();
+				}
 
+			}
+		}
 	}
-	private void exitActionsPedestrianRed() {
-getTimerHandler().resetTimer(PedestrianRed_time_event_0);
+	private void cycleStreetPrepare(Collection<?> events) {
+		if (conditionOnTr0(events)) {
+			actionsOnTr0();
+		} else {
+			if (conditionOnTr1(events)) {
+				actionsOnTr1();
+			} else {
+				if (conditionStreetPrepareTr0(events)) {
+					actionsStreetPrepareTr0();
+				}
 
+			}
+		}
 	}
-	private void exitActionsStreetPrepare() {
-getTimerHandler().resetTimer(StreetPrepare_time_event_0);
+	private void cycleFreeze(Collection<?> events) {
+		if (conditionFreezeTr0(events)) {
+			actionsFreezeTr0();
+		}
+	}
+	private void cycleOff(Collection<?> events) {
+	}
+	private void cycleBlinkYellow(Collection<?> events) {
+		if (conditionOffTr0(events)) {
+			actionsOffTr0();
+		} else {
+			if (conditionBlinkYellowLr1(events)) {
+				actionsBlinkYellowLr1();
+			}
 
+		}
 	}
 	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
+				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
 			}
 		}
 	}

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

@@ -1,13 +1,12 @@
-
 /**
  * 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
- * 
+ *     committers of YAKINDU - initial API and implementation
  */
 package org.yakindu.sct.runtime.java.trafficlightwaiting;
 
@@ -15,7 +14,9 @@ import java.util.HashSet;
 
 import org.yakindu.sct.runtime.java.Event;
 
-public class TrafficLightWaitingCyleBasedStatemachine extends TrafficLightWaitingAbstractBaseStatemachine {
+public class TrafficLightWaitingCyleBasedStatemachine
+		extends
+			TrafficLightWaitingAbstractBaseStatemachine {
 
 	public TrafficLightWaitingCyleBasedStatemachine() {
 		super(new HashSet<Event>());

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

@@ -1,36 +0,0 @@
-/**
- * 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();
-	}
-	
-	public void runCycle() {
-		if (eventOccured()) {
-			Event event = getOccuredEvents().poll();
-			runCycle(Collections.singletonList(event));
-		}
-	}
-}

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

@@ -1,21 +0,0 @@
-/**
- * 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();
-	
-}

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

@@ -1,55 +0,0 @@
-/**
- * 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;
-	}
-	
-	
-}

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

@@ -1,24 +0,0 @@
-/**
- * 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);	
-}

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

@@ -1,51 +0,0 @@
-/**
- * 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;
-	}	
-}

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

@@ -1,24 +0,0 @@
-/**
- * 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);	
-}

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

@@ -1,51 +0,0 @@
-/**
- * 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;
-	}	
-}

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

@@ -1,397 +0,0 @@
-/**
- * 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();
-	}
-	
-	public void init() {
-		
-	}
-	
-	public void setTimerHandler(ITimerHandler timerHandler) {
-		this.timerHandler = timerHandler;
-	}
-
-	public ITimerHandler getTimerHandler() {
-		if (timerHandler == null) {
-			throw new NullPointerException("TimerHandler of statemachine \"+TrafficLightWaitingSimple+\" not set!");
-		}
-		return timerHandler;
-	}
-
-	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
-			}
-		}
-	}
-}

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

@@ -1,29 +0,0 @@
-
-/**
- * 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();
-	}
-}

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

@@ -1,36 +0,0 @@
-/**
- * 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();
-	}
-	
-	public void runCycle() {
-		if (eventOccured()) {
-			Event event = getOccuredEvents().poll();
-			runCycle(Collections.singletonList(event));
-		}
-	}
-}

+ 10 - 4
Examples/org.yakindu.sct.generator.java.trafficlight/src/org/yakindu/sct/examples/java/trafficlight/CrossingDemo.java

@@ -31,13 +31,13 @@ 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;
+import org.yakindu.sct.runtime.java.trafficlightwaiting.TrafficLightWaitingCyleBasedStatemachine;
 
 public class CrossingDemo {
 
 	public static void main(String[] args) {
 
-		final TrafficLightWaitingSimpleCyleBasedStatemachine statemachine = new TrafficLightWaitingSimpleCyleBasedStatemachine();
+		final TrafficLightWaitingCyleBasedStatemachine statemachine = new TrafficLightWaitingCyleBasedStatemachine();
 
 		// create display and shell
 		Display display = new Display();
@@ -66,8 +66,13 @@ public class CrossingDemo {
 		Thread thread = new Thread() {
 			@Override
 			public void run() {
+				// Initialize the statemachine. Define TimerHandler and
+				// enterSequence. A default TimerHandler generated by the Java
+				// Generator is used in this case. You can add your own
+				// implementation of a TimerHandler. It has to implement the
+				// ITimerHandler interface.
 				statemachine.setTimerHandler(new TimerHandler(statemachine));
-				statemachine.entry();
+				statemachine.enterSequenceStatechartTrafficLightWaiting();
 				while (!isInterrupted()) {
 					statemachine.runCycle();
 					try {
@@ -81,6 +86,7 @@ public class CrossingDemo {
 						interrupt();
 					}
 				}
+				// End TimerHandler and timing thread.
 				statemachine.getTimerHandler().cancel();
 			}
 		};
@@ -119,7 +125,7 @@ public class CrossingDemo {
 	}
 
 	private static void createButtonComposite(
-			final TrafficLightWaitingSimpleCyleBasedStatemachine statemachine,
+			final TrafficLightWaitingCyleBasedStatemachine statemachine,
 			Shell shell) {
 		// create a composite to hold the buttons
 		Composite buttonComposite = new Composite(shell, SWT.NO_SCROLL);