Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.doc/help/TutorialPedestrianLights.html')
-rw-r--r--plugins/org.eclipse.etrice.doc/help/TutorialPedestrianLights.html84
1 files changed, 84 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.doc/help/TutorialPedestrianLights.html b/plugins/org.eclipse.etrice.doc/help/TutorialPedestrianLights.html
new file mode 100644
index 000000000..1fdf67df3
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/TutorialPedestrianLights.html
@@ -0,0 +1,84 @@
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Tutorial Pedestrian Lights</title>
+<link href="book.css" rel="stylesheet" type="text/css">
+<meta content="DocBook XSL Stylesheets V1.75.1" name="generator">
+<link rel="home" href="index.html" title="eTrice User Guide">
+<link rel="up" href="index.html" title="eTrice User Guide">
+<link rel="prev" href="Summary3.html" title="Summary">
+<link rel="next" href="Setupthemodel.html" title="Setup the model">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Tutorial Pedestrian Lights</h1>
+<div class="chapter" title="Tutorial Pedestrian Lights">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title">
+<a name="TutorialPedestrianLights"></a>Tutorial Pedestrian Lights</h2>
+</div>
+</div>
+</div>
+<div class="toc">
+<dl>
+<dt>
+<span class="section"><a href="TutorialPedestrianLights.html#Scope4">Scope</a></span>
+</dt>
+<dt>
+<span class="section"><a href="Setupthemodel.html">Setup the model</a></span>
+</dt>
+<dt>
+<span class="section"><a href="Whydoesitworkandwhyisitsafe.html">Why does it work and why is it safe?</a></span>
+</dt>
+</dl>
+</div>
+<div class="section" title="Scope">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Scope4"></a>Scope</h2>
+</div>
+</div>
+</div>
+<p>The scope of this tutorial is to demonstrate how to receive model messages from outside the model. Calling methods which are not part of the model is simple and you have already done this within the blinky tutorial (this is the other way round: model =&gt; external code). Receiving events from outside the model is a very common problem and a very frequently asked question. Therefore this tutorial shows how an external event (outside the model) can be received from the model.</p>
+<p>This tutorial is not like hello world or blinky. Being familiar with the basic tool features is mandatory for this tutorial. The goal is to understand the mechanism not to learn the tool features.</p>
+<p>The idea behind the exercise is, to control a Pedestrian crossing light. We will use the same GUI as for the blinky tutorial but now we will use the
+ [<span class="citation">REQUEST</span>] button to start a FSM, which controls the traffic lights.
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/020-Blinky08.PNG"></div>
+<p>
+
+</p>
+<p>The
+ [<span class="citation">REQUEST</span>] must lead to a model message which starts the activity of the lights.
+ </p>
+<p>There are several possibilities to receive external events (e.g. TCP/UDP Socket, using OS messaging mechanism), but the easiest way is, to make a port usable from outside the model. To do that a few steps are necessary:</p>
+<div class="orderedlist">
+<ol class="orderedlist" type="1">
+<li class="listitem">
+<p>specify the messages (within a protocol) which should be sent into the model</p>
+</li>
+<li class="listitem">
+<p>model an actor with a port (which uses the specified protocol) and connect the port to the receiver </p>
+</li>
+<li class="listitem">
+<p>the external code should know the port (import of the port class)</p>
+</li>
+<li class="listitem">
+<p>the external code should provide a registration method, so that the actor is able to allow access to this port</p>
+</li>
+<li class="listitem">
+<p>the port can be used from the external code</p>
+</li>
+</ol>
+</div>
+</div>
+</div>
+</body>
+</html>

Back to the top