Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.doc/doc-tex/eTriceHTML/etrice-docse30.html')
-rw-r--r--plugins/org.eclipse.etrice.doc/doc-tex/eTriceHTML/etrice-docse30.html129
1 files changed, 129 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.doc/doc-tex/eTriceHTML/etrice-docse30.html b/plugins/org.eclipse.etrice.doc/doc-tex/eTriceHTML/etrice-docse30.html
new file mode 100644
index 000000000..2c74cfdf6
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/doc-tex/eTriceHTML/etrice-docse30.html
@@ -0,0 +1,129 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html >
+<head><title>Setup the model</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
+<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
+<!-- html,3,next -->
+<meta name="src" content="etrice-doc.tex">
+<meta name="date" content="2013-02-26 19:42:00">
+<link rel="stylesheet" type="text/css" href="etrice-doc.css">
+</head><body
+>
+<!--l. 25--><div class="crosslinks"><p class="noindent">[<a
+href="etrice-docse31.html" >next</a>] [<a
+href="etrice-docse29.html" >prev</a>] [<a
+href="etrice-docse29.html#tailetrice-docse29.html" >prev-tail</a>] [<a
+href="#tailetrice-docse30.html">tail</a>] [<a
+href="etrice-docch8.html#etrice-docse30.html" >up</a>] </p></div>
+<h3 class="sectionHead"><span class="titlemark">8.2 </span> <a
+ id="x40-560008.2"></a>Setup the model</h3>
+ <ul class="itemize1">
+ <li class="itemize">Use the <span
+class="ecti-1000">New Model Wizzard </span>to create a new eTrice project and name it
+ <span
+class="ecti-1000">PedLightsController</span>.
+ </li>
+ <li class="itemize">Copy the package <span
+class="ecti-1000">org.eclipse.etrice.tutorials.PedLightGUI </span>to your <span
+class="ecti-1000">src</span>
+ directory (see blinky tutorial).
+ </li>
+ <li class="itemize">In PedestrianLightWndNoTcp.jav uncomment line 15 (import), 36, 122
+ (usage) and 132-134 (registration). The error markers will disappear after
+ the code is generated from the model.
+ </li>
+ <li class="itemize">
+ <div class="flushleft"
+>
+<!--l. 31--><p class="noindent" >
+Copy the model from /org.eclipse.etrice.tutorials/model/PedLightsController
+to your model file, or run the model directly in the tutorial directory.</div>
+ </li>
+ <li class="itemize">Adapt the import statement to your path.</li></ul>
+
+
+
+<div class="verbatim" id="verbatim-17">
+import&#x00A0;room.basic.service.timing.*&#x00A0;from
+&#x00A0;<br />"../../org.eclipse.etrice.modellib/models/TimingService.room"
+</div>
+<!--l. 39--><p class="nopar" >
+ <ul class="itemize1">
+ <li class="itemize">Generate the code from the model.
+ </li>
+ <li class="itemize">Add the org.eclipse.etrice.modellib to the Java Class Path of your project.
+ </li>
+ <li class="itemize">All error markers should be disappeared and the model should be operable.
+ </li>
+ <li class="itemize">Arrange the Structure and the Statemachines to understand the model</li></ul>
+
+<!--l. 49--><p class="noindent" ><img
+src="images/030-PedLights01.png" alt="PIC"
+> The <span
+class="ecti-1000">GuiAdapter </span>represents the interface to the external code. It registers its
+<span
+class="ecti-1000">ControlPort </span>by the external code.
+<!--l. 53--><p class="noindent" ><img
+src="images/030-PedLights02.png" alt="PIC"
+> Visit the initial transition to understand the registration. The actor handles the
+incoming messages as usual and controls the traffic lights as known from
+blinky.
+<!--l. 57--><p class="noindent" ><img
+src="images/030-PedLights03.png" alt="PIC"
+> The <span
+class="ecti-1000">Controller </span>receives the <span
+class="ecti-1000">start </span>message and controls the timing of the lights.
+Note that the <span
+class="ecti-1000">start </span>message will be sent from the external code whenever the
+<span
+class="ecti-1000">REQUEST </span>button is pressed.
+ <ul class="itemize1">
+ <li class="itemize">Visit the model and take a closer look to the following elements:
+ <ol class="enumerate1" >
+ <li
+ class="enumerate" id="x40-56002x1">PedControlProtocol =&#x003E; notice that the start message is defined as
+ usual
+ </li>
+ <li
+ class="enumerate" id="x40-56004x2">Initial transition of the <span
+class="ecti-1000">GuiAdapter </span>=&#x003E; see the registration
+ </li>
+ <li
+ class="enumerate" id="x40-56006x3">The <span
+class="ecti-1000">Controller </span>=&#x003E; notice that the <span
+class="ecti-1000">Controller </span>receives the external
+ message (not the <span
+class="ecti-1000">GuiAdapter</span>). The <span
+class="ecti-1000">GuiAdapter </span>just provides its port
+ and handles the incoming messages.
+ </li>
+ <li
+ class="enumerate" id="x40-56008x4">Visit the hand written code =&#x003E; see the import statement of the
+ protocol class and the usage of the port.</li></ol>
+
+
+
+ </li>
+ <li class="itemize">Generate and test the model
+ </li>
+ <li class="itemize">Take a look at the generated MSC =&#x003E; notice that the start message will shown
+ as if the <span
+class="ecti-1000">GuiAdapter </span>had sent it.</li></ul>
+
+<!--l. 73--><p class="noindent" ><img
+src="images/030-PedLights04.png" alt="PIC"
+>
+
+
+
+<!--l. 76--><div class="crosslinks"><p class="noindent">[<a
+href="etrice-docse31.html" >next</a>] [<a
+href="etrice-docse29.html" >prev</a>] [<a
+href="etrice-docse29.html#tailetrice-docse29.html" >prev-tail</a>] [<a
+href="etrice-docse30.html" >front</a>] [<a
+href="etrice-docch8.html#etrice-docse30.html" >up</a>] </p></div>
+<!--l. 76--><p class="noindent" ><a
+ id="tailetrice-docse30.html"></a>
+</body></html>

Back to the top