Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schuetz2013-07-12 08:40:15 +0000
committerThomas Schuetz2013-07-12 08:40:15 +0000
commit12cda553738ca88662624b6f47066b5564549648 (patch)
treebfa65b6c38aa566a5f1cc98395da6546a6c6e282 /examples/org.eclipse.etrice.tutorials.simulators.trafficlight
parent3447749b1a453735ac54fc09ea7680acdbb19b69 (diff)
parentd65e1d1bdd43feadb43261b85aac2d8aef5e089c (diff)
downloadorg.eclipse.etrice-12cda553738ca88662624b6f47066b5564549648.tar.gz
org.eclipse.etrice-12cda553738ca88662624b6f47066b5564549648.tar.xz
org.eclipse.etrice-12cda553738ca88662624b6f47066b5564549648.zip
Merge remote-tracking branch 'origin/master'
Conflicts: plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.c.zip plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.java.zip plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zip plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.c.zip plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.java.zip Change-Id: I98e2df3ab57d6e7e8f27e5b0aee7eaa189bfbc33
Diffstat (limited to 'examples/org.eclipse.etrice.tutorials.simulators.trafficlight')
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.classpath12
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.gitignore2
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.project34
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.settings/org.eclipse.jdt.core.prefs24
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/release.jardesc32
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/ButtonActionListener.java94
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java110
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/PedastrianLightWnd.java364
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight2.java172
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight3.java182
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/WindowClosingAdapter.java106
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4441.launch24
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4442.launch24
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4443.launch24
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4444.launch24
15 files changed, 614 insertions, 614 deletions
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.classpath b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.classpath
index 07ca123c6..18d70f02c 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.classpath
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.classpath
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.gitignore b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.gitignore
index 092357e47..ba077a403 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.gitignore
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.gitignore
@@ -1 +1 @@
-bin
+bin
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.project b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.project
index c67fa413e..a0bb7df0c 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.project
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.project
@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.etrice.tutorials.simulators.trafficlight</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.etrice.tutorials.simulators.trafficlight</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.settings/org.eclipse.jdt.core.prefs
index b1bdd4dee..a23aa28f4 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.settings/org.eclipse.jdt.core.prefs
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.settings/org.eclipse.jdt.core.prefs
@@ -1,12 +1,12 @@
-#Sat Jun 16 13:47:44 CEST 2012
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
-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.6
+#Sat Jun 16 13:47:44 CEST 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.6
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/release.jardesc b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/release.jardesc
index aa0b55c28..339890e9b 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/release.jardesc
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/release.jardesc
@@ -1,16 +1,16 @@
-<?xml version="1.0" encoding="WINDOWS-1252" standalone="no"?>
-<jardesc>
- <jar path="org.eclipse.etrice.tutorials.simulators.trafficlight/release/trafficlight.jar"/>
- <options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.etrice.tutorials.simulators.trafficlight/release.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
- <storedRefactorings deprecationInfo="true" structuralOnly="false"/>
- <selectedProjects/>
- <manifest generateManifest="true" mainClassHandleIdentifier="=org.eclipse.etrice.tutorials.simulators.trafficlight/src&lt;org.eclipse.etrice.tutorials.simulators.trafficlight{Main.java[Main" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
- <sealing sealJar="false">
- <packagesToSeal/>
- <packagesToUnSeal/>
- </sealing>
- </manifest>
- <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
- <javaElement handleIdentifier="=org.eclipse.etrice.tutorials.simulators.trafficlight/src"/>
- </selectedElements>
-</jardesc>
+<?xml version="1.0" encoding="WINDOWS-1252" standalone="no"?>
+<jardesc>
+ <jar path="org.eclipse.etrice.tutorials.simulators.trafficlight/release/trafficlight.jar"/>
+ <options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.etrice.tutorials.simulators.trafficlight/release.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
+ <storedRefactorings deprecationInfo="true" structuralOnly="false"/>
+ <selectedProjects/>
+ <manifest generateManifest="true" mainClassHandleIdentifier="=org.eclipse.etrice.tutorials.simulators.trafficlight/src&lt;org.eclipse.etrice.tutorials.simulators.trafficlight{Main.java[Main" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
+ <sealing sealJar="false">
+ <packagesToSeal/>
+ <packagesToUnSeal/>
+ </sealing>
+ </manifest>
+ <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
+ <javaElement handleIdentifier="=org.eclipse.etrice.tutorials.simulators.trafficlight/src"/>
+ </selectedElements>
+</jardesc>
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/ButtonActionListener.java b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/ButtonActionListener.java
index e0ea689ca..1f7867d0c 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/ButtonActionListener.java
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/ButtonActionListener.java
@@ -1,47 +1,47 @@
-/*******************************************************************************
- * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
- * 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:
- * Thomas Jung (initial contribution)
- *
- *******************************************************************************/
-
-
-package org.eclipse.etrice.tutorials.simulators.trafficlight;
-
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.OutputStream;
-import java.io.IOException;
-
-public class ButtonActionListener
-implements ActionListener {
-
- private OutputStream out;
- private String cmd1 = "requestGreen";
-
- public ButtonActionListener(OutputStream out){
- this.out = out;
- }
-
- public void actionPerformed(ActionEvent arg0) {
- String s = arg0.getActionCommand();
-
- if (s.equals("REQUEST")) {
- System.out.println("Taste gedrückt");
- try {
- out.write(cmd1.getBytes());
- out.flush();
- }
- catch (IOException e){
- System.out.println(e.toString());
- }
- // out.write(cmd1.getBytes());
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
+ * 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:
+ * Thomas Jung (initial contribution)
+ *
+ *******************************************************************************/
+
+
+package org.eclipse.etrice.tutorials.simulators.trafficlight;
+
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.OutputStream;
+import java.io.IOException;
+
+public class ButtonActionListener
+implements ActionListener {
+
+ private OutputStream out;
+ private String cmd1 = "requestGreen";
+
+ public ButtonActionListener(OutputStream out){
+ this.out = out;
+ }
+
+ public void actionPerformed(ActionEvent arg0) {
+ String s = arg0.getActionCommand();
+
+ if (s.equals("REQUEST")) {
+ System.out.println("Taste gedrückt");
+ try {
+ out.write(cmd1.getBytes());
+ out.flush();
+ }
+ catch (IOException e){
+ System.out.println(e.toString());
+ }
+ // out.write(cmd1.getBytes());
+ }
+ }
+}
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java
index cad6821a1..266d6bbc1 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java
@@ -1,55 +1,55 @@
-/*******************************************************************************
- * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
- * 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:
- * Thomas Jung (initial contribution)
- *
- *******************************************************************************/
-
-
-
-package org.eclipse.etrice.tutorials.simulators.trafficlight;
-
-public class Main {
-
- /**
- * @param args
- */
- public static void main(String[] args) {
-
- if (checkArgs(args) == false) {
- System.exit(0);
- }
-
- new PedastrianLightWnd(Integer.parseInt(args[0]));
- }
-
- public static boolean checkArgs(String[] args) {
- // check length
- if (args.length != 1) {
- System.out
- .println("ERROR: wrong number of arguments - expected 1 argument");
- printUsage();
- return false;
- } else {
- try {
- Integer.parseInt(args[0]);
- return true;
- } catch (Exception e) {
- System.out.println("ERROR: integer value expected as argument");
- printUsage();
- return false;
- }
- }
- }
-
- public static void printUsage() {
- System.out.println("Usage: java -jar trafficlight.jar [ip-address]");
- System.out.println("Example: java -jar trafficlight.jar 4440");
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
+ * 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:
+ * Thomas Jung (initial contribution)
+ *
+ *******************************************************************************/
+
+
+
+package org.eclipse.etrice.tutorials.simulators.trafficlight;
+
+public class Main {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+
+ if (checkArgs(args) == false) {
+ System.exit(0);
+ }
+
+ new PedastrianLightWnd(Integer.parseInt(args[0]));
+ }
+
+ public static boolean checkArgs(String[] args) {
+ // check length
+ if (args.length != 1) {
+ System.out
+ .println("ERROR: wrong number of arguments - expected 1 argument");
+ printUsage();
+ return false;
+ } else {
+ try {
+ Integer.parseInt(args[0]);
+ return true;
+ } catch (Exception e) {
+ System.out.println("ERROR: integer value expected as argument");
+ printUsage();
+ return false;
+ }
+ }
+ }
+
+ public static void printUsage() {
+ System.out.println("Usage: java -jar trafficlight.jar [ip-address]");
+ System.out.println("Example: java -jar trafficlight.jar 4440");
+ }
+
+}
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/PedastrianLightWnd.java b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/PedastrianLightWnd.java
index b95ec3e43..94e3ffbe3 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/PedastrianLightWnd.java
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/PedastrianLightWnd.java
@@ -1,182 +1,182 @@
-/*******************************************************************************
- * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
- * 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:
- * Thomas Jung (initial contribution)
- * Thomas Schuetz
- *******************************************************************************/
-
-package org.eclipse.etrice.tutorials.simulators.trafficlight;
-
-import java.awt.Button;
-import java.awt.Frame;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.TextField;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.net.ServerSocket;
-import java.net.Socket;
-
-public class PedastrianLightWnd extends Frame {
- private static final long serialVersionUID = 1L;
-
- private TrafficLight3 carLights = null;
- private TrafficLight2 pedLights = null;
-
- ButtonActionListener buttonListener = null;
-
- Button requestButton = null;
- TextField statusLine = null;
-
-
- public PedastrianLightWnd(int ipPort) {
- super("PedestrianLightsGUI");
- GridBagLayout layout = new GridBagLayout();
- GridBagConstraints gbc;
- carLights = new TrafficLight3(4);
- pedLights = new TrafficLight2(2);
- statusLine = new TextField();
- requestButton = new Button("REQUEST");
- requestButton.setEnabled(false);
- addWindowListener(new WindowClosingAdapter(true));
-
- setLayout(layout);
-
- gbc = makeGbc(0, 1, 1, 1);
- layout.setConstraints(carLights, gbc);
- add(carLights);
-
- gbc = makeGbc(1, 1, 1, 1);
- layout.setConstraints(pedLights, gbc);
- add(pedLights);
-
- statusLine.setText("listening on TCP Port " + ipPort);
- statusLine.setEditable(false);
- statusLine.setFocusable(false);
- gbc = makeGbc(0, 0, 2, 1);
- gbc.fill = GridBagConstraints.BOTH;
- layout.setConstraints(statusLine, gbc);
- add(statusLine);
-
- gbc = makeGbc(0, 2, 2, 1);
- gbc.fill = GridBagConstraints.BOTH;
- layout.setConstraints(requestButton, gbc);
- add(requestButton);
-
- pack();
- setVisible(true);
-
- loopSocket(ipPort); // blocking loop
- }
-
- private void loopSocket(int ipPort) {
- while (true) {
- // open and close socket endlessly
- try {
- // open Socket
- ServerSocket socketServer = new ServerSocket(ipPort);
-
- // wait blocking for client to connect
- Socket socket = socketServer.accept();
- statusLine.setText("socket connected !");
-
- // prepare input and output streams
- BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
- OutputStream out = socket.getOutputStream();
-
- // add listener for outgoing command
- buttonListener = new ButtonActionListener(out);
- requestButton.addActionListener(buttonListener);
- requestButton.setEnabled(true);
-
- resetLights();
-
- // read blocking until socket is disconnected
- String cmd;
- while ((cmd = in.readLine()) != null) {
- dispatchCommand(requestButton, cmd);
- }
- statusLine.setText("socket disconnected !");
-
- // deactivate button
- requestButton.removeActionListener(buttonListener);
- requestButton.setEnabled(false);
-
- resetLights();
-
- // clean up socket
- socket.close();
- socketServer.close();
-
- } catch (IOException e) {
- System.err.println(e.toString());
- System.exit(1);
- }
- }
- }
-
- private void dispatchCommand(Button requestButton, String cmd) {
- // check carLights
- if (cmd.equals("carLights=red")) {
- carLights.setState(carLights.RED);
- }
- if (cmd.equals("carLights=yellowRed")) {
- carLights.setState(carLights.YELLOWRED);
- }
- if (cmd.equals("carLights=green")) {
- carLights.setState(carLights.GREEN);
- }
- if (cmd.equals("carLights=yellow")) {
- carLights.setState(carLights.YELLOW);
- }
- if (cmd.equals("carLights=off")) {
- carLights.setState(carLights.OFF);
- }
-
- // check pedLights
- if (cmd.equals("pedLights=red")) {
- pedLights.setState(pedLights.RED);
- }
- if (cmd.equals("pedLights=green")) {
- pedLights.setState(pedLights.GREEN);
- }
- if (cmd.equals("pedLights=off")) {
- pedLights.setState(pedLights.OFF);
- }
-
- // check button
- if (cmd.equals("button=on")) {
- requestButton.setEnabled(true);
- }
- if (cmd.equals("button=off")) {
- requestButton.setEnabled(false);
- }
- }
-
- private void resetLights() {
- carLights.setState(carLights.OFF);
- pedLights.setState(pedLights.OFF);
- }
-
- private GridBagConstraints makeGbc(int x, int y, int width, int height) {
- GridBagConstraints gbc = new GridBagConstraints();
- gbc.gridx = x;
- gbc.gridy = y;
- gbc.gridwidth = width;
- gbc.gridheight = height;
- gbc.weightx = 1;
- gbc.weighty = 1;
- // gbc.fill = GridBagConstraints.BOTH;
- gbc.anchor = GridBagConstraints.CENTER;
- gbc.insets = new Insets(1, 1, 1, 1);
- return gbc;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
+ * 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:
+ * Thomas Jung (initial contribution)
+ * Thomas Schuetz
+ *******************************************************************************/
+
+package org.eclipse.etrice.tutorials.simulators.trafficlight;
+
+import java.awt.Button;
+import java.awt.Frame;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.TextField;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+public class PedastrianLightWnd extends Frame {
+ private static final long serialVersionUID = 1L;
+
+ private TrafficLight3 carLights = null;
+ private TrafficLight2 pedLights = null;
+
+ ButtonActionListener buttonListener = null;
+
+ Button requestButton = null;
+ TextField statusLine = null;
+
+
+ public PedastrianLightWnd(int ipPort) {
+ super("PedestrianLightsGUI");
+ GridBagLayout layout = new GridBagLayout();
+ GridBagConstraints gbc;
+ carLights = new TrafficLight3(4);
+ pedLights = new TrafficLight2(2);
+ statusLine = new TextField();
+ requestButton = new Button("REQUEST");
+ requestButton.setEnabled(false);
+ addWindowListener(new WindowClosingAdapter(true));
+
+ setLayout(layout);
+
+ gbc = makeGbc(0, 1, 1, 1);
+ layout.setConstraints(carLights, gbc);
+ add(carLights);
+
+ gbc = makeGbc(1, 1, 1, 1);
+ layout.setConstraints(pedLights, gbc);
+ add(pedLights);
+
+ statusLine.setText("listening on TCP Port " + ipPort);
+ statusLine.setEditable(false);
+ statusLine.setFocusable(false);
+ gbc = makeGbc(0, 0, 2, 1);
+ gbc.fill = GridBagConstraints.BOTH;
+ layout.setConstraints(statusLine, gbc);
+ add(statusLine);
+
+ gbc = makeGbc(0, 2, 2, 1);
+ gbc.fill = GridBagConstraints.BOTH;
+ layout.setConstraints(requestButton, gbc);
+ add(requestButton);
+
+ pack();
+ setVisible(true);
+
+ loopSocket(ipPort); // blocking loop
+ }
+
+ private void loopSocket(int ipPort) {
+ while (true) {
+ // open and close socket endlessly
+ try {
+ // open Socket
+ ServerSocket socketServer = new ServerSocket(ipPort);
+
+ // wait blocking for client to connect
+ Socket socket = socketServer.accept();
+ statusLine.setText("socket connected !");
+
+ // prepare input and output streams
+ BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
+ OutputStream out = socket.getOutputStream();
+
+ // add listener for outgoing command
+ buttonListener = new ButtonActionListener(out);
+ requestButton.addActionListener(buttonListener);
+ requestButton.setEnabled(true);
+
+ resetLights();
+
+ // read blocking until socket is disconnected
+ String cmd;
+ while ((cmd = in.readLine()) != null) {
+ dispatchCommand(requestButton, cmd);
+ }
+ statusLine.setText("socket disconnected !");
+
+ // deactivate button
+ requestButton.removeActionListener(buttonListener);
+ requestButton.setEnabled(false);
+
+ resetLights();
+
+ // clean up socket
+ socket.close();
+ socketServer.close();
+
+ } catch (IOException e) {
+ System.err.println(e.toString());
+ System.exit(1);
+ }
+ }
+ }
+
+ private void dispatchCommand(Button requestButton, String cmd) {
+ // check carLights
+ if (cmd.equals("carLights=red")) {
+ carLights.setState(carLights.RED);
+ }
+ if (cmd.equals("carLights=yellowRed")) {
+ carLights.setState(carLights.YELLOWRED);
+ }
+ if (cmd.equals("carLights=green")) {
+ carLights.setState(carLights.GREEN);
+ }
+ if (cmd.equals("carLights=yellow")) {
+ carLights.setState(carLights.YELLOW);
+ }
+ if (cmd.equals("carLights=off")) {
+ carLights.setState(carLights.OFF);
+ }
+
+ // check pedLights
+ if (cmd.equals("pedLights=red")) {
+ pedLights.setState(pedLights.RED);
+ }
+ if (cmd.equals("pedLights=green")) {
+ pedLights.setState(pedLights.GREEN);
+ }
+ if (cmd.equals("pedLights=off")) {
+ pedLights.setState(pedLights.OFF);
+ }
+
+ // check button
+ if (cmd.equals("button=on")) {
+ requestButton.setEnabled(true);
+ }
+ if (cmd.equals("button=off")) {
+ requestButton.setEnabled(false);
+ }
+ }
+
+ private void resetLights() {
+ carLights.setState(carLights.OFF);
+ pedLights.setState(pedLights.OFF);
+ }
+
+ private GridBagConstraints makeGbc(int x, int y, int width, int height) {
+ GridBagConstraints gbc = new GridBagConstraints();
+ gbc.gridx = x;
+ gbc.gridy = y;
+ gbc.gridwidth = width;
+ gbc.gridheight = height;
+ gbc.weightx = 1;
+ gbc.weighty = 1;
+ // gbc.fill = GridBagConstraints.BOTH;
+ gbc.anchor = GridBagConstraints.CENTER;
+ gbc.insets = new Insets(1, 1, 1, 1);
+ return gbc;
+ }
+}
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight2.java b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight2.java
index 552906493..ff3d40fc1 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight2.java
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight2.java
@@ -1,86 +1,86 @@
-/*******************************************************************************
- * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
- * 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:
- * Thomas Jung (initial contribution)
- * Thomas Schuetz
- *******************************************************************************/
-
-
-package org.eclipse.etrice.tutorials.simulators.trafficlight;
-import java.awt.Canvas;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics;
-
-
-public class TrafficLight2 extends Canvas {
- private static final long serialVersionUID = 1L;
- // Traffic light has 4 states
- public final int RED = 0;
- public final int GREEN = 1;
- public final int OFF = 2;
-
- private int state;
-
- public TrafficLight2(int state){
- this.state = state;
- }
- public TrafficLight2(){
- this.state = 0;
- }
-
- private int singleLightSize = 20;
- private int xPosition = 5;
- private int gap = 5;
-
- public void paint(Graphics g){
- Color lightRed = new Color(255,0,0);
- Color darkRed = new Color (127,0,0);
- Color lightGreen = new Color (0,255,0);
- Color darkGreen = new Color (0,127,0);
-
- Color colors [][] = {
- {lightRed,darkGreen},
- {darkRed,lightGreen},
- {darkRed,darkGreen}
- };
-
- // set Background
- g.setColor(Color.lightGray);
- g.fillRect(0,0,getSize().width,getSize().height);
- // draw boarder
- g.setColor(Color.BLACK);
- g.drawRect(0,0,getSize().width-1,getSize().height-1);
-
- for (int i = 0; i<2; i++) {
- g.setColor(colors[state][i]);
- g.fillOval(xPosition,i*singleLightSize+gap,singleLightSize,singleLightSize);
- g.setColor(Color.black);
- g.drawOval(xPosition,i*singleLightSize+gap,singleLightSize-1,singleLightSize-1);
- }
- }
-
- public Dimension getPreferredSize(){
- return new Dimension(singleLightSize + 2 * gap, singleLightSize * 2 + 2 * gap);
- }
-
- public Dimension getMinimumSize()
- {
- return new Dimension(singleLightSize + 2 * gap, singleLightSize * 2 + 2 * gap);
- }
-
- public void setState(int state)
- {
- // avoid array error
- if (state < 3){
- this.state = state;
- repaint();
- }
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
+ * 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:
+ * Thomas Jung (initial contribution)
+ * Thomas Schuetz
+ *******************************************************************************/
+
+
+package org.eclipse.etrice.tutorials.simulators.trafficlight;
+import java.awt.Canvas;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+
+
+public class TrafficLight2 extends Canvas {
+ private static final long serialVersionUID = 1L;
+ // Traffic light has 4 states
+ public final int RED = 0;
+ public final int GREEN = 1;
+ public final int OFF = 2;
+
+ private int state;
+
+ public TrafficLight2(int state){
+ this.state = state;
+ }
+ public TrafficLight2(){
+ this.state = 0;
+ }
+
+ private int singleLightSize = 20;
+ private int xPosition = 5;
+ private int gap = 5;
+
+ public void paint(Graphics g){
+ Color lightRed = new Color(255,0,0);
+ Color darkRed = new Color (127,0,0);
+ Color lightGreen = new Color (0,255,0);
+ Color darkGreen = new Color (0,127,0);
+
+ Color colors [][] = {
+ {lightRed,darkGreen},
+ {darkRed,lightGreen},
+ {darkRed,darkGreen}
+ };
+
+ // set Background
+ g.setColor(Color.lightGray);
+ g.fillRect(0,0,getSize().width,getSize().height);
+ // draw boarder
+ g.setColor(Color.BLACK);
+ g.drawRect(0,0,getSize().width-1,getSize().height-1);
+
+ for (int i = 0; i<2; i++) {
+ g.setColor(colors[state][i]);
+ g.fillOval(xPosition,i*singleLightSize+gap,singleLightSize,singleLightSize);
+ g.setColor(Color.black);
+ g.drawOval(xPosition,i*singleLightSize+gap,singleLightSize-1,singleLightSize-1);
+ }
+ }
+
+ public Dimension getPreferredSize(){
+ return new Dimension(singleLightSize + 2 * gap, singleLightSize * 2 + 2 * gap);
+ }
+
+ public Dimension getMinimumSize()
+ {
+ return new Dimension(singleLightSize + 2 * gap, singleLightSize * 2 + 2 * gap);
+ }
+
+ public void setState(int state)
+ {
+ // avoid array error
+ if (state < 3){
+ this.state = state;
+ repaint();
+ }
+ }
+
+}
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight3.java b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight3.java
index afcc78176..7e3314b90 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight3.java
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight3.java
@@ -1,91 +1,91 @@
-/*******************************************************************************
- * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
- * 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:
- * Thomas Jung (initial contribution)
- * Thomas Schuetz
- *******************************************************************************/
-
-
-package org.eclipse.etrice.tutorials.simulators.trafficlight;
-import java.awt.Canvas;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics;
-
-
-public class TrafficLight3 extends Canvas {
- private static final long serialVersionUID = 1L;
- // Traffic light has 4 states
- public final int RED = 0;
- public final int YELLOWRED = 1;
- public final int GREEN = 2;
- public final int YELLOW = 3;
- public final int OFF = 4;
-
- private int state;
-
- public TrafficLight3(int state){
- this.state = state;
- }
- public TrafficLight3(){
- this.state = 0;
- }
-
- private int singleLightSize = 20;
- private int xPosition = 5;
- private int gap = 5;
-
- public void paint(Graphics g){
- Color lightRed = new Color(255,0,0);
- Color darkRed = new Color (127,0,0);
- Color lightGreen = new Color (0,255,0);
- Color darkGreen = new Color (0,127,0);
- Color lightYellow = new Color (255,255,0);
- Color darkYellow = new Color (127,127,0);
-
- Color colors [][] = {
- {lightRed,darkYellow,darkGreen},
- {lightRed,lightYellow,darkGreen},
- {darkRed,darkYellow,lightGreen},
- {darkRed,lightYellow,darkGreen},
- {darkRed,darkYellow,darkGreen}
- };
-
-
- // set Background
- g.setColor(Color.lightGray);
- g.fillRect(0,0,getSize().width,getSize().height);
- // draw boarder
- g.setColor(Color.BLACK);
- g.drawRect(0,0,getSize().width-1,getSize().height-1);
-
- for (int i = 0; i<3; i++) {
- g.setColor(colors[state][i]);
- g.fillOval(xPosition,i*singleLightSize+gap,singleLightSize,singleLightSize);
- g.setColor(Color.black);
- g.drawOval(xPosition,i*singleLightSize+gap,singleLightSize-1,singleLightSize-1);
- }
- }
-
- public Dimension getPreferredSize(){
- return new Dimension(singleLightSize + 2 * gap, singleLightSize * 3 + 2 * gap);
- }
-
- public Dimension getMinimumSize()
- {
- return new Dimension(singleLightSize + 2 * gap, singleLightSize * 3 + 2 * gap);
- }
-
- public void setState(int state)
- {
- if (state < 5){
- this.state = state;
- repaint();
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
+ * 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:
+ * Thomas Jung (initial contribution)
+ * Thomas Schuetz
+ *******************************************************************************/
+
+
+package org.eclipse.etrice.tutorials.simulators.trafficlight;
+import java.awt.Canvas;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+
+
+public class TrafficLight3 extends Canvas {
+ private static final long serialVersionUID = 1L;
+ // Traffic light has 4 states
+ public final int RED = 0;
+ public final int YELLOWRED = 1;
+ public final int GREEN = 2;
+ public final int YELLOW = 3;
+ public final int OFF = 4;
+
+ private int state;
+
+ public TrafficLight3(int state){
+ this.state = state;
+ }
+ public TrafficLight3(){
+ this.state = 0;
+ }
+
+ private int singleLightSize = 20;
+ private int xPosition = 5;
+ private int gap = 5;
+
+ public void paint(Graphics g){
+ Color lightRed = new Color(255,0,0);
+ Color darkRed = new Color (127,0,0);
+ Color lightGreen = new Color (0,255,0);
+ Color darkGreen = new Color (0,127,0);
+ Color lightYellow = new Color (255,255,0);
+ Color darkYellow = new Color (127,127,0);
+
+ Color colors [][] = {
+ {lightRed,darkYellow,darkGreen},
+ {lightRed,lightYellow,darkGreen},
+ {darkRed,darkYellow,lightGreen},
+ {darkRed,lightYellow,darkGreen},
+ {darkRed,darkYellow,darkGreen}
+ };
+
+
+ // set Background
+ g.setColor(Color.lightGray);
+ g.fillRect(0,0,getSize().width,getSize().height);
+ // draw boarder
+ g.setColor(Color.BLACK);
+ g.drawRect(0,0,getSize().width-1,getSize().height-1);
+
+ for (int i = 0; i<3; i++) {
+ g.setColor(colors[state][i]);
+ g.fillOval(xPosition,i*singleLightSize+gap,singleLightSize,singleLightSize);
+ g.setColor(Color.black);
+ g.drawOval(xPosition,i*singleLightSize+gap,singleLightSize-1,singleLightSize-1);
+ }
+ }
+
+ public Dimension getPreferredSize(){
+ return new Dimension(singleLightSize + 2 * gap, singleLightSize * 3 + 2 * gap);
+ }
+
+ public Dimension getMinimumSize()
+ {
+ return new Dimension(singleLightSize + 2 * gap, singleLightSize * 3 + 2 * gap);
+ }
+
+ public void setState(int state)
+ {
+ if (state < 5){
+ this.state = state;
+ repaint();
+ }
+ }
+}
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/WindowClosingAdapter.java b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/WindowClosingAdapter.java
index e37fdb029..e43b8a232 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/WindowClosingAdapter.java
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/WindowClosingAdapter.java
@@ -1,53 +1,53 @@
-/*******************************************************************************
- * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
- * 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:
- * Thomas Jung (initial contribution)
- *******************************************************************************/
-
-
-package org.eclipse.etrice.tutorials.simulators.trafficlight;
-
-
-/* WindowClosingAdapter.java */
-
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-
-public class WindowClosingAdapter
-extends WindowAdapter
-{
- private boolean exitSystem;
-
- /**
- * Erzeugt einen WindowClosingAdapter zum Schliessen
- * des Fensters. Ist exitSystem true, wird das komplette
- * Programm beendet.
- */
- public WindowClosingAdapter(boolean exitSystem)
- {
- this.exitSystem = exitSystem;
- }
-
- /**
- * Erzeugt einen WindowClosingAdapter zum Schliessen
- * des Fensters. Das Programm wird nicht beendet.
- */
- public WindowClosingAdapter()
- {
- this(false);
- }
-
- public void windowClosing(WindowEvent event)
- {
- event.getWindow().setVisible(false);
- event.getWindow().dispose();
- if (exitSystem) {
- System.exit(0);
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
+ * 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:
+ * Thomas Jung (initial contribution)
+ *******************************************************************************/
+
+
+package org.eclipse.etrice.tutorials.simulators.trafficlight;
+
+
+/* WindowClosingAdapter.java */
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+public class WindowClosingAdapter
+extends WindowAdapter
+{
+ private boolean exitSystem;
+
+ /**
+ * Erzeugt einen WindowClosingAdapter zum Schliessen
+ * des Fensters. Ist exitSystem true, wird das komplette
+ * Programm beendet.
+ */
+ public WindowClosingAdapter(boolean exitSystem)
+ {
+ this.exitSystem = exitSystem;
+ }
+
+ /**
+ * Erzeugt einen WindowClosingAdapter zum Schliessen
+ * des Fensters. Das Programm wird nicht beendet.
+ */
+ public WindowClosingAdapter()
+ {
+ this(false);
+ }
+
+ public void windowClosing(WindowEvent event)
+ {
+ event.getWindow().setVisible(false);
+ event.getWindow().dispose();
+ if (exitSystem) {
+ System.exit(0);
+ }
+ }
+}
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4441.launch b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4441.launch
index a39cce7fc..82afbbd0a 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4441.launch
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4441.launch
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.etrice.tutorials.simulators.trafficlight.Main"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="4441"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.tutorials.simulators.trafficlight"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.etrice.tutorials.simulators.trafficlight.Main"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="4441"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.tutorials.simulators.trafficlight"/>
+</launchConfiguration>
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4442.launch b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4442.launch
index 56ec1a32d..30b28c52f 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4442.launch
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4442.launch
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.etrice.tutorials.simulators.trafficlight.Main"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="4442"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.tutorials.simulators.trafficlight"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.etrice.tutorials.simulators.trafficlight.Main"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="4442"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.tutorials.simulators.trafficlight"/>
+</launchConfiguration>
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4443.launch b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4443.launch
index 2f99bc263..2d8f82d12 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4443.launch
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4443.launch
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.etrice.tutorials.simulators.trafficlight.Main"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="4443"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.tutorials.simulators.trafficlight"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.etrice.tutorials.simulators.trafficlight.Main"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="4443"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.tutorials.simulators.trafficlight"/>
+</launchConfiguration>
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4444.launch b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4444.launch
index 4131823f6..b3d579ff8 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4444.launch
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4444.launch
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.etrice.tutorials.simulators.trafficlight.Main"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="4444"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.tutorials.simulators.trafficlight"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.etrice.tutorials.simulators.trafficlight.Main"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="4444"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.tutorials.simulators.trafficlight"/>
+</launchConfiguration>

Back to the top