Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.doc/help/DefineActorStructureandBehavior.html')
-rw-r--r--plugins/org.eclipse.etrice.doc/help/DefineActorStructureandBehavior.html183
1 files changed, 183 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.doc/help/DefineActorStructureandBehavior.html b/plugins/org.eclipse.etrice.doc/help/DefineActorStructureandBehavior.html
new file mode 100644
index 000000000..826ea9445
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/DefineActorStructureandBehavior.html
@@ -0,0 +1,183 @@
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Define Actor Structure and Behavior</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="TutorialSendingData.html" title="Tutorial Sending Data">
+<link rel="prev" href="CreateMrPingandMrPongActors.html" title="Create MrPing and MrPong Actors">
+<link rel="next" href="Definethetoplevel.html" title="Define the top level">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Define Actor Structure and Behavior</h1>
+<div class="section" title="Define Actor Structure and Behavior">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="DefineActorStructureandBehavior"></a>Define Actor Structure and Behavior</h2>
+</div>
+</div>
+</div>
+<p>Save the model and visit the outline view. Within the outline view, right click on the
+ [<span class="citation">MrPong</span>] actor and select
+ [<span class="citation">Edit Structure</span>]. Select an
+ [<span class="citation">Interface Port</span>] from the toolbox and add it to MrPong. Name the Port
+ [<span class="citation">PingPongPort</span>] and select the
+ [<span class="citation">PingPongProtocol</span>]
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData02.png"></div>
+<p>
+
+</p>
+<p>Do the same with MrPing but mark the port as
+ [<span class="citation">conjugated</span>]
+ </p>
+<div class="section" title="Define MrPongs behavior">
+<div class="titlepage">
+<div>
+<div>
+<h3 class="title">
+<a name="DefineMrPongsbehavior"></a>Define MrPongs behavior</h3>
+</div>
+</div>
+</div>
+<p>Within the outline view, right click MrPong and select
+ [<span class="citation">Edit Behavior</span>]. Create the following state machine:
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData04.png"></div>
+<p>
+
+</p>
+<p>The transition dialogues should look like this:
+ For
+ [<span class="citation">ping</span>]:
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData05.png"></div>
+<p>
+
+</p>
+<p>For
+ [<span class="citation">pingSimple</span>]:
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData06.png"></div>
+<p>
+
+</p>
+</div>
+<div class="section" title="Define MrPing behavior">
+<div class="titlepage">
+<div>
+<div>
+<h3 class="title">
+<a name="DefineMrPingbehavior"></a>Define MrPing behavior</h3>
+</div>
+</div>
+</div>
+<p>Within the outline view double click MrPing. Navigate the cursor to the behavior of MrPing. With the help of content assist create a new operation.</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData07.png"></div>
+<p>
+
+</p>
+<p>Name the operation
+ [<span class="citation">printData</span>] and define the DemoData as a parameter.
+ </p>
+<p>Fill in the following code:</p>
+<div class="literallayout">
+<p>
+<code class="code">Operation&nbsp;printData(d:&nbsp;DemoData)&nbsp;:&nbsp;void&nbsp;{<br>
+ "System.out.printf(\"d.int32Val:&nbsp;%d\\n\",d.int32Val);"<br>
+ "System.out.printf(\"d.float64Val:&nbsp;%f\\n\",d.float64Val);"<br>
+ "System.out.printf(\"d.int8Array:&nbsp;\");"<br>
+ "for(int&nbsp;i&nbsp;=&nbsp;0;&nbsp;i&lt;d.int8Array.length;&nbsp;i++)&nbsp;{"<br>
+ "System.out.printf(\"%d&nbsp;\",d.int8Array[i]);}"<br>
+ "System.out.printf(\"\\nd.stringVal:&nbsp;%s\\n\",d.stringVal);"<br>
+ }<br>
+
+</code>
+</p>
+</div>
+<div class="blockquote">
+<blockquote class="blockquote">
+<p></p>
+</blockquote>
+</div>
+<p>For MrPing create the following state machine:</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData08.png"></div>
+<p>
+
+</p>
+<p>The transition dialogues should look like this:</p>
+<p>For
+ [<span class="citation">init</span>]:
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData09.png"></div>
+<p>
+
+</p>
+<p>For
+ [<span class="citation">wait1</span>]:
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData10.png"></div>
+<p>
+
+</p>
+<p>For
+ [<span class="citation">next</span>]:
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData11.png"></div>
+<p>
+
+</p>
+<p>For
+ [<span class="citation">wait2</span>]:
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData12.png"></div>
+<p>
+
+</p>
+</div>
+</div>
+</body>
+</html>

Back to the top