summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Jung2011-07-21 15:26:44 (EDT)
committerThomas Jung2011-07-21 15:26:44 (EDT)
commit46f0732744202647ab012d864445a4074410e438 (patch)
tree69bb9835c264a96b941cfb2005217c3cdad4ef99
parenteab7b3140639a35268d72c0dffeb61c0c122c0cf (diff)
downloadorg.eclipse.etrice-46f0732744202647ab012d864445a4074410e438.zip
org.eclipse.etrice-46f0732744202647ab012d864445a4074410e438.tar.gz
org.eclipse.etrice-46f0732744202647ab012d864445a4074410e438.tar.bz2
[doc]a new tutorial "sending data" added
-rw-r--r--plugins/org.eclipse.etrice.doc/build/etrice.textile406
-rw-r--r--plugins/org.eclipse.etrice.doc/build/etrice.xml518
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/025-tutorial-sending-data.textile404
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/etrice-index.txt1
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData01.pngbin0 -> 49191 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData02.pngbin0 -> 101519 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData03.pngbin0 -> 9756 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData04.pngbin0 -> 54479 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData05.pngbin0 -> 54109 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData06.pngbin0 -> 39724 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData07.pngbin0 -> 40343 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData08.pngbin0 -> 67862 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData09.pngbin0 -> 100313 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData10.pngbin0 -> 94082 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData11.pngbin0 -> 124828 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData12.pngbin0 -> 93978 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData13.pngbin0 -> 57849 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Addadataclass.html60
-rw-r--r--plugins/org.eclipse.etrice.doc/help/CreateMrPingandMrPongActors.html101
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Createanewmodelfromscratch3.html53
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Createanewprotocol2.html51
-rw-r--r--plugins/org.eclipse.etrice.doc/help/DefinetheActorsStructureandBehavior.html183
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Definethetoplevel.html195
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Generateandrunthemodel.html74
-rw-r--r--plugins/org.eclipse.etrice.doc/help/ROOMConcepts.html2
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Summary2.html2
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Summary3.html36
-rw-r--r--plugins/org.eclipse.etrice.doc/help/TutorialSendingData.html91
-rw-r--r--plugins/org.eclipse.etrice.doc/help/images/025-SendigData03.pngbin0 -> 9756 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/help/images/025-SendingData01.pngbin0 -> 49191 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/help/images/025-SendingData02.pngbin0 -> 101519 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/help/images/025-SendingData03.pngbin0 -> 9756 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/help/images/025-SendingData04.pngbin0 -> 54479 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/help/images/025-SendingData05.pngbin0 -> 54109 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/help/images/025-SendingData06.pngbin0 -> 39724 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/help/images/025-SendingData07.pngbin0 -> 40343 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/help/images/025-SendingData08.pngbin0 -> 67862 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/help/images/025-SendingData09.pngbin0 -> 100313 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/help/images/025-SendingData10.pngbin0 -> 94082 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/help/images/025-SendingData11.pngbin0 -> 124828 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/help/images/025-SendingData12.pngbin0 -> 93978 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/help/images/025-SendingData13.pngbin0 -> 57849 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/html/etrice.html718
-rw-r--r--plugins/org.eclipse.etrice.doc/html/images/025-SendigData03.pngbin0 -> 9756 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/html/images/025-SendingData01.pngbin0 -> 49191 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/html/images/025-SendingData02.pngbin0 -> 101519 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/html/images/025-SendingData03.pngbin0 -> 9756 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/html/images/025-SendingData04.pngbin0 -> 54479 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/html/images/025-SendingData05.pngbin0 -> 54109 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/html/images/025-SendingData06.pngbin0 -> 39724 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/html/images/025-SendingData07.pngbin0 -> 40343 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/html/images/025-SendingData08.pngbin0 -> 67862 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/html/images/025-SendingData09.pngbin0 -> 100313 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/html/images/025-SendingData10.pngbin0 -> 94082 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/html/images/025-SendingData11.pngbin0 -> 124828 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/html/images/025-SendingData12.pngbin0 -> 93978 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/html/images/025-SendingData13.pngbin0 -> 57849 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/manual/etrice.pdfbin1836162 -> 2701349 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/toc.xml14
59 files changed, 2904 insertions, 5 deletions
diff --git a/plugins/org.eclipse.etrice.doc/build/etrice.textile b/plugins/org.eclipse.etrice.doc/build/etrice.textile
index 0fb3809..059f854 100644
--- a/plugins/org.eclipse.etrice.doc/build/etrice.textile
+++ b/plugins/org.eclipse.etrice.doc/build/etrice.textile
@@ -483,6 +483,412 @@ h2. Summary
Run the model and take look at the generated MSCs. Inspect the generated code to understand the runtime model of eTrice. Within this tutorial you have learned how to create a hierarchical FSM with group transitions and history transitions and you have used entry code. You are now familiar with the basic features of eTrice. The further tutorials will take this knowledge as a precondition.
+h1. Tutorial Sending Data
+
+h2. Scope
+
+This tutorial shows how data will be sent in a eTrice model. Within the example you will create two actors (MrPing and MrPong). MrPong will simply loop back every data it received.
+MrPing will sent data and verify the result.
+
+You will perform the following steps:
+
+# create a new model from scratch
+# create a data class
+# define a protocol with attached data
+# create an actor structure
+# create two simple state machines
+# build and run the model
+
+h2. Create a new model from scratch
+
+Remember exercise ??HelloWorld??.
+Create a new eTrice project and name it ??SendingData??
+Open the ??SendingData.room?? file and copy the following code into the file or use content assist to create the model.
+
+bc..
+RoomModel SendingData {
+ LogicalSystem SendingData_LogSystem {
+ SubSystemRef SendingDataAppl:SendingData_SubSystem
+ }
+ SubSystemClass SendingData_SubSystem {
+ ActorRef SendigDataTopRef:SendingDataTop
+ }
+ ActorClass SendingDataTop {
+ }
+ }
+bq.
+
+h2. Add a data class
+
+Position the cursor outside any class definition and right click the mouse within the editor window. From the context menu select ??Content Assist?? (or Ctrl+Space).
+
+!images/025-SendingData01.png!
+
+Select ??DataClass - data class skeleton?? and name it ??DemoData??.
+Remove the operations and ass the following Attributes:
+
+bc..
+ DataClass DemoData {
+ Attribute int32Val: int32 = "4711"
+ Attribute int8Array [ 10 ]: int8 = "{1,2,3,4,5,6,7,8,9,10}"
+ Attribute float64Val: float64 = "0.0"
+ Attribute stringVal: string = "\"empty\""
+ }
+bq.
+
+Save the model and visit the outline view.
+Note that the outline view contains all data elements as defined in the model.
+
+h2. Create a new protocol
+
+With the help of ??Content Assist?? create a ??ProtocolClass?? and name it ??PingPongProtocol??. Create the following messages:
+
+bc..
+ProtocolClass PingPongProtocol {
+ incoming {
+ Message ping(data: DemoData)
+ Message pingSimple(data:int32)
+ }
+ outgoing {
+ Message pong(data: DemoData)
+ Message pongSimple(data:int32)
+ }
+ }
+bq.
+
+h2. Create MrPing and MrPong Actors
+
+With the help of ??Content Assist?? create two new actor classes and name them ??MrPing?? and ??MrPong??. The resulting model should look like this:
+
+bc..
+RoomModel SendingData {
+
+ LogicalSystem SendingData_LogSystem {
+ SubSystemRef SendingDataAppl: SendingData_SubSystem
+ }
+
+ SubSystemClass SendingData_SubSystem {
+ ActorRef SendigDataTopRef: SendingDataTop
+ }
+
+ ActorClass SendingDataTop { }
+
+ DataClass DemoData {
+ Attribute int32Val: int32 = "4711"
+ Attribute int8Array [ 10 ]: int8 = "{1,2,3,4,5,6,7,8,9,10}"
+ Attribute float64Val: float64 = "0.0"
+ Attribute stringVal: string = "\"empty\""
+ }
+
+ ProtocolClass PingPongProtocol {
+ incoming {
+ Message ping(data: DemoData)
+ Message pingSimple(data: int32)
+ }
+ outgoing {
+ Message pong(data: DemoData)
+ Message pongSimple(data: int32)
+ }
+ }
+
+ ActorClass MrPing {
+ Interface { }
+ Structure { }
+ Behavior { }
+ }
+
+ ActorClass MrPong {
+ Interface { }
+ Structure { }
+ Behavior { }
+ }
+}
+
+bq.
+
+The outline view should look like this:
+
+!images/025-SendingData03.png!
+
+h2. Define the Actors Structure and Behavior
+
+Save the model and visit the outline view. Within the outline view, right click on the ??MrPong?? actor and select ??Edit Structure??. Select an ??Interface Port?? from the toolbox and add it to MrPong. Name the Port ??PingPongPort?? and select the ??PingPongProtocol??
+
+!images/025-SendingData02.png!
+
+Do the same with MrPing but mark the port as ??conjugated??
+
+h3. Define MrPongs behavior
+
+Within the outline view, right click MrPong and select ??Edit Behavior??. Create the following state machine:
+
+!images/025-SendingData04.png!
+
+The transition dialogues should look like this:
+For ??ping??:
+
+!images/025-SendingData05.png!
+
+For ??pingSimple??:
+
+!images/025-SendingData06.png!
+
+
+h3. Define MrPing behavior
+
+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.
+
+!images/025-SendingData07.png!
+
+Name the operation ??printData?? and define the DemoData as a parameter.
+
+Fill in the following code:
+
+bc..
+Operation printData(d: DemoData) : void {
+ "System.out.printf(\"d.int32Val: %d\\n\",d.int32Val);"
+ "System.out.printf(\"d.float64Val: %f\\n\",d.float64Val);"
+ "System.out.printf(\"d.int8Array: \");"
+ "for(int i = 0; i<d.int8Array.length; i++) {"
+ "System.out.printf(\"%d \",d.int8Array[i]);}"
+ "System.out.printf(\"\\nd.stringVal: %s\\n\",d.stringVal);"
+ }
+bq.
+
+For MrPing create the following state machine:
+
+!images/025-SendingData08.png!
+
+The transition dialogues should look like this:
+
+For ??init??:
+
+!images/025-SendingData09.png!
+
+For ??wait1??:
+
+!images/025-SendingData10.png!
+
+For ??next??:
+
+!images/025-SendingData11.png!
+
+For ??wait2??:
+
+!images/025-SendingData12.png!
+
+h2. Define the top level
+
+Open the Structure from SendingDataTop and add MrPing and MrPong as a reference. Connect the ports.
+
+!images/025-SendingData13.png!
+
+The model is finished now and the model file should look like this:
+
+pre..
+bc..
+RoomModel SendingData {
+
+ LogicalSystem SendingData_LogSystem {
+ SubSystemRef SendingDataAppl: SendingData_SubSystem
+ }
+
+ SubSystemClass SendingData_SubSystem {
+ ActorRef SendigDataTopRef: SendingDataTop
+ }
+
+ ActorClass SendingDataTop {
+ Structure {
+ ActorRef ref0: MrPing
+ ActorRef ref1: MrPong
+ Binding ref0.PingPongPort and ref1.PingPongPort
+ }
+ Behavior { }
+ }
+
+ ActorClass MrPing {
+ Interface {
+ conjugated Port PingPongPort: PingPongProtocol
+ }
+ Structure {
+ external Port PingPongPort
+ }
+ Behavior {
+
+ Operation printData(d: DemoData) : void {
+ "System.out.printf(\"d.int32Val: %d\\n\",d.int32Val);"
+ "System.out.printf(\"d.float64Val: %f\\n\",d.float64Val);"
+ "System.out.printf(\"d.int8Array: \");"
+ "for(int i = 0; i<d.int8Array.length; i++) {"
+ "System.out.printf(\"%d \",d.int8Array[i]);}"
+ "System.out.printf(\"\\nd.stringVal: %s\\n\",d.stringVal);"
+ }
+
+ StateMachine {
+ Transition wait2: waitForPong -> waitForPong {
+ triggers {
+ <pong: PingPongPort>
+ }
+ action {
+ "printData(data);"
+ }
+ }
+ Transition wait1: waitForPongSimple -> waitForPongSimple {
+ triggers {
+ <pongSimple: PingPongPort guard {
+ "data < 10"
+ }>
+ }
+ action {
+ "// keep in mind that MrPong increments"
+ "PingPongPort.pingSimple(data);"
+ "System.out.printf(\"data: %d\\n\",data);"
+ }
+ }
+ Transition next: waitForPongSimple -> waitForPong {
+ triggers {
+ <pongSimple: PingPongPort>
+ }
+ action {
+ "System.out.printf(\"data: %d\\n\",data);"
+ ""
+ "DemoData d = new DemoData();"
+ "// send the default values"
+ "PingPongPort.ping(d);"
+ "d.int32Val=815;"
+ "for (int i = 0; i<d.int8Array.length;i++){"
+ "\td.int8Array[i]=(byte)(i+100);"
+ "\t}"
+ "d.stringVal=\"some contents\";"
+ "d.float64Val=3.141234;"
+ "PingPongPort.ping(d);"
+ }
+ }
+ Transition init0: initial -> waitForPongSimple {
+ action {
+ "PingPongPort.pingSimple(0);"
+ }
+ }
+ State waitForPong
+ State waitForPongSimple
+ }
+ }
+ }
+
+ ActorClass MrPong {
+ Interface {
+ Port PingPongPort: PingPongProtocol
+ }
+ Structure {
+ external Port PingPongPort
+ }
+ Behavior {
+ StateMachine {
+ Transition init: initial -> looping { }
+ Transition tr0: looping -> looping {
+ triggers {
+ <ping: PingPongPort>
+ }
+ action {
+ "PingPongPort.pong(data);"
+ }
+ }
+ Transition tr1: looping -> looping {
+ triggers {
+ <pingSimple: PingPongPort>
+ }
+ action {
+ "PingPongPort.pongSimple(data+1);"
+ }
+ }
+ State looping
+ }
+ }
+ }
+
+ ProtocolClass PingPongProtocol {
+ incoming {
+ Message ping(data: DemoData)
+ Message pingSimple(data: int32)
+ }
+ outgoing {
+ Message pong(data: DemoData)
+ Message pongSimple(data: int32)
+ }
+ }
+
+ DataClass DemoData {
+ Attribute int32Val: int32 = "4711"
+ Attribute int8Array [ 10 ]: int8 = "{1,2,3,4,5,6,7,8,9,10}"
+ Attribute float64Val: float64 = "0.0"
+ Attribute stringVal: string = "\"empty\""
+ }
+}
+bq.
+
+h2. Generate and run the model
+
+With the MWe2 workflow generate the code and run the model.
+The output should look like this:
+
+
+type 'quit' to exit
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 1
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 2
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 3
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 4
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 5
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 6
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 7
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 8
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 9
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 10
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPong
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+d.int32Val: 4711
+d.float64Val: 0,000000
+d.int8Array: 1 2 3 4 5 6 7 8 9 10
+d.stringVal: empty
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPong
+d.int32Val: 815
+d.float64Val: 3,141234
+d.int8Array: 100 101 102 103 104 105 106 107 108 109
+d.stringVal: some contents
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPong
+quit
+echo: quit
+
+h2. Summary
+
+Within the first loop a integer value will be incremented from ??MrPong?? and sent back to ??MrPing??. Is long as the guard is true ??MrPing?? sends back the value.
+
+Within the ??next?? transition, ??MrPing?? creates a data class and sends the default values. Than ??MrPing?? changes the values and sends the class again. At this point you should note that during the send operation, a copy of the data class will be created and sent. Otherwise it would not be possible to send the same object two times, even more it would not be possible to send a stack object at all.
+In later versions of eTrice a additional mechanism to send references will be implemented. However, keep in mind that sending references takes the responsibility of the life cycle of the sent object to the user. It looks simple but is a very common source of failures.
+
+
+
h1. ROOM Concepts
h2. Main Concepts
diff --git a/plugins/org.eclipse.etrice.doc/build/etrice.xml b/plugins/org.eclipse.etrice.doc/build/etrice.xml
index 310d4fe..3ee57b6 100644
--- a/plugins/org.eclipse.etrice.doc/build/etrice.xml
+++ b/plugins/org.eclipse.etrice.doc/build/etrice.xml
@@ -782,6 +782,524 @@ carLights.setState(TrafficLight3.OFF);
<para>Run the model and take look at the generated MSCs. Inspect the generated code to understand the runtime model of eTrice. Within this tutorial you have learned how to create a hierarchical FSM with group transitions and history transitions and you have used entry code. You are now familiar with the basic features of eTrice. The further tutorials will take this knowledge as a precondition.</para>
</section>
</chapter>
+ <chapter id="TutorialSendingData">
+ <title>Tutorial Sending Data</title>
+ <section id="Scope3">
+ <title>Scope</title>
+ <para>This tutorial shows how data will be sent in a eTrice model. Within the example you will create two actors (MrPing and MrPong). MrPong will simply loop back every data it received.
+ MrPing will sent data and verify the result. </para>
+ <para>You will perform the following steps:</para>
+ <orderedlist>
+ <listitem>
+ <para>create a new model from scratch</para>
+ </listitem>
+ <listitem>
+ <para>create a data class</para>
+ </listitem>
+ <listitem>
+ <para>define a protocol with attached data</para>
+ </listitem>
+ <listitem>
+ <para>create an actor structure</para>
+ </listitem>
+ <listitem>
+ <para>create two simple state machines</para>
+ </listitem>
+ <listitem>
+ <para>build and run the model</para>
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="Createanewmodelfromscratch3">
+ <title>Create a new model from scratch</title>
+ <para>Remember exercise
+ <citation>HelloWorld</citation>.
+ Create a new eTrice project and name it
+ <citation>SendingData</citation>
+ Open the
+ <citation>SendingData.room</citation> file and copy the following code into the file or use content assist to create the model.
+ </para>
+ <literallayout><code>RoomModel SendingData {
+ LogicalSystem SendingData_LogSystem {
+ SubSystemRef SendingDataAppl:SendingData_SubSystem
+ }
+ SubSystemClass SendingData_SubSystem {
+ ActorRef SendigDataTopRef:SendingDataTop
+ }
+ ActorClass SendingDataTop {
+ }
+ }
+</code></literallayout>
+ <blockquote>
+ <para></para>
+ </blockquote>
+ </section>
+ <section id="Addadataclass">
+ <title>Add a data class</title>
+ <para>Position the cursor outside any class definition and right click the mouse within the editor window. From the context menu select
+ <citation>Content Assist</citation> (or Ctrl+Space).
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/025-SendingData01.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>Select
+ <citation>DataClass – data class skeleton</citation> and name it
+ <citation>DemoData</citation>.
+ Remove the operations and ass the following Attributes:
+ </para>
+ <literallayout><code> DataClass DemoData {
+ Attribute int32Val: int32 = "4711"
+ Attribute int8Array [ 10 ]: int8 = "{1,2,3,4,5,6,7,8,9,10}"
+ Attribute float64Val: float64 = "0.0"
+ Attribute stringVal: string = "\"empty\""
+ }
+</code></literallayout>
+ <blockquote>
+ <para></para>
+ </blockquote>
+ <para>Save the model and visit the outline view.
+ Note that the outline view contains all data elements as defined in the model. </para>
+ </section>
+ <section id="Createanewprotocol2">
+ <title>Create a new protocol</title>
+ <para>With the help of
+ <citation>Content Assist</citation> create a
+ <citation>ProtocolClass</citation> and name it
+ <citation>PingPongProtocol</citation>. Create the following messages:
+ </para>
+ <literallayout><code>ProtocolClass PingPongProtocol {
+ incoming {
+ Message ping(data: DemoData)
+ Message pingSimple(data:int32)
+ }
+ outgoing {
+ Message pong(data: DemoData)
+ Message pongSimple(data:int32)
+ }
+ }
+</code></literallayout>
+ <blockquote>
+ <para></para>
+ </blockquote>
+ </section>
+ <section id="CreateMrPingandMrPongActors">
+ <title>Create MrPing and MrPong Actors</title>
+ <para>With the help of
+ <citation>Content Assist</citation> create two new actor classes and name them
+ <citation>MrPing</citation> and
+ <citation>MrPong</citation>. The resulting model should look like this:
+ </para>
+ <literallayout><code>RoomModel SendingData {
+
+ LogicalSystem SendingData_LogSystem {
+ SubSystemRef SendingDataAppl: SendingData_SubSystem
+ }
+
+ SubSystemClass SendingData_SubSystem {
+ ActorRef SendigDataTopRef: SendingDataTop
+ }
+
+ ActorClass SendingDataTop { }
+
+ DataClass DemoData {
+ Attribute int32Val: int32 = "4711"
+ Attribute int8Array [ 10 ]: int8 = "{1,2,3,4,5,6,7,8,9,10}"
+ Attribute float64Val: float64 = "0.0"
+ Attribute stringVal: string = "\"empty\""
+ }
+
+ ProtocolClass PingPongProtocol {
+ incoming {
+ Message ping(data: DemoData)
+ Message pingSimple(data: int32)
+ }
+ outgoing {
+ Message pong(data: DemoData)
+ Message pongSimple(data: int32)
+ }
+ }
+
+ ActorClass MrPing {
+ Interface { }
+ Structure { }
+ Behavior { }
+ }
+
+ ActorClass MrPong {
+ Interface { }
+ Structure { }
+ Behavior { }
+ }
+}
+
+</code></literallayout>
+ <blockquote>
+ <para></para>
+ </blockquote>
+ <para>The outline view should look like this:</para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/025-SendingData03.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ </section>
+ <section id="DefinetheActorsStructureandBehavior">
+ <title>Define the Actors Structure and Behavior</title>
+ <para>Save the model and visit the outline view. Within the outline view, right click on the
+ <citation>MrPong</citation> actor and select
+ <citation>Edit Structure</citation>. Select an
+ <citation>Interface Port</citation> from the toolbox and add it to MrPong. Name the Port
+ <citation>PingPongPort</citation> and select the
+ <citation>PingPongProtocol</citation>
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/025-SendingData02.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>Do the same with MrPing but mark the port as
+ <citation>conjugated</citation>
+ </para>
+ <section id="DefineMrPongsbehavior">
+ <title>Define MrPongs behavior</title>
+ <para>Within the outline view, right click MrPong and select
+ <citation>Edit Behavior</citation>. Create the following state machine:
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/025-SendingData04.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>The transition dialogues should look like this:
+ For
+ <citation>ping</citation>:
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/025-SendingData05.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>For
+ <citation>pingSimple</citation>:
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/025-SendingData06.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ </section>
+ <section id="DefineMrPingbehavior">
+ <title>Define MrPing behavior</title>
+ <para>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.</para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/025-SendingData07.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>Name the operation
+ <citation>printData</citation> and define the DemoData as a parameter.
+ </para>
+ <para>Fill in the following code:</para>
+ <literallayout><code>Operation printData(d: DemoData) : void {
+ "System.out.printf(\"d.int32Val: %d\\n\",d.int32Val);"
+ "System.out.printf(\"d.float64Val: %f\\n\",d.float64Val);"
+ "System.out.printf(\"d.int8Array: \");"
+ "for(int i = 0; i&lt;d.int8Array.length; i++) {"
+ "System.out.printf(\"%d \",d.int8Array[i]);}"
+ "System.out.printf(\"\\nd.stringVal: %s\\n\",d.stringVal);"
+ }
+</code></literallayout>
+ <blockquote>
+ <para></para>
+ </blockquote>
+ <para>For MrPing create the following state machine:</para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/025-SendingData08.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>The transition dialogues should look like this:</para>
+ <para>For
+ <citation>init</citation>:
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/025-SendingData09.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>For
+ <citation>wait1</citation>:
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/025-SendingData10.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>For
+ <citation>next</citation>:
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/025-SendingData11.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>For
+ <citation>wait2</citation>:
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/025-SendingData12.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ </section>
+ </section>
+ <section id="Definethetoplevel">
+ <title>Define the top level</title>
+ <para>Open the Structure from SendingDataTop and add MrPing and MrPong as a reference. Connect the ports.</para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/025-SendingData13.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>The model is finished now and the model file should look like this:</para>
+ <literallayout></literallayout>
+ <literallayout><code>RoomModel SendingData {
+
+ LogicalSystem SendingData_LogSystem {
+ SubSystemRef SendingDataAppl: SendingData_SubSystem
+ }
+
+ SubSystemClass SendingData_SubSystem {
+ ActorRef SendigDataTopRef: SendingDataTop
+ }
+
+ ActorClass SendingDataTop {
+ Structure {
+ ActorRef ref0: MrPing
+ ActorRef ref1: MrPong
+ Binding ref0.PingPongPort and ref1.PingPongPort
+ }
+ Behavior { }
+ }
+
+ ActorClass MrPing {
+ Interface {
+ conjugated Port PingPongPort: PingPongProtocol
+ }
+ Structure {
+ external Port PingPongPort
+ }
+ Behavior {
+
+ Operation printData(d: DemoData) : void {
+ "System.out.printf(\"d.int32Val: %d\\n\",d.int32Val);"
+ "System.out.printf(\"d.float64Val: %f\\n\",d.float64Val);"
+ "System.out.printf(\"d.int8Array: \");"
+ "for(int i = 0; i&lt;d.int8Array.length; i++) {"
+ "System.out.printf(\"%d \",d.int8Array[i]);}"
+ "System.out.printf(\"\\nd.stringVal: %s\\n\",d.stringVal);"
+ }
+
+ StateMachine {
+ Transition wait2: waitForPong -&gt; waitForPong {
+ triggers {
+ &lt;pong: PingPongPort&gt;
+ }
+ action {
+ "printData(data);"
+ }
+ }
+ Transition wait1: waitForPongSimple -&gt; waitForPongSimple {
+ triggers {
+ &lt;pongSimple: PingPongPort guard {
+ "data &lt; 10"
+ }&gt;
+ }
+ action {
+ "// keep in mind that MrPong increments"
+ "PingPongPort.pingSimple(data);"
+ "System.out.printf(\"data: %d\\n\",data);"
+ }
+ }
+ Transition next: waitForPongSimple -&gt; waitForPong {
+ triggers {
+ &lt;pongSimple: PingPongPort&gt;
+ }
+ action {
+ "System.out.printf(\"data: %d\\n\",data);"
+ ""
+ "DemoData d = new DemoData();"
+ "// send the default values"
+ "PingPongPort.ping(d);"
+ "d.int32Val=815;"
+ "for (int i = 0; i&lt;d.int8Array.length;i++){"
+ "\td.int8Array[i]=(byte)(i+100);"
+ "\t}"
+ "d.stringVal=\"some contents\";"
+ "d.float64Val=3.141234;"
+ "PingPongPort.ping(d);"
+ }
+ }
+ Transition init0: initial -&gt; waitForPongSimple {
+ action {
+ "PingPongPort.pingSimple(0);"
+ }
+ }
+ State waitForPong
+ State waitForPongSimple
+ }
+ }
+ }
+
+ ActorClass MrPong {
+ Interface {
+ Port PingPongPort: PingPongProtocol
+ }
+ Structure {
+ external Port PingPongPort
+ }
+ Behavior {
+ StateMachine {
+ Transition init: initial -&gt; looping { }
+ Transition tr0: looping -&gt; looping {
+ triggers {
+ &lt;ping: PingPongPort&gt;
+ }
+ action {
+ "PingPongPort.pong(data);"
+ }
+ }
+ Transition tr1: looping -&gt; looping {
+ triggers {
+ &lt;pingSimple: PingPongPort&gt;
+ }
+ action {
+ "PingPongPort.pongSimple(data+1);"
+ }
+ }
+ State looping
+ }
+ }
+ }
+
+ ProtocolClass PingPongProtocol {
+ incoming {
+ Message ping(data: DemoData)
+ Message pingSimple(data: int32)
+ }
+ outgoing {
+ Message pong(data: DemoData)
+ Message pongSimple(data: int32)
+ }
+ }
+
+ DataClass DemoData {
+ Attribute int32Val: int32 = "4711"
+ Attribute int8Array [ 10 ]: int8 = "{1,2,3,4,5,6,7,8,9,10}"
+ Attribute float64Val: float64 = "0.0"
+ Attribute stringVal: string = "\"empty\""
+ }
+}
+</code></literallayout>
+ <blockquote>
+ <para></para>
+ </blockquote>
+ </section>
+ <section id="Generateandrunthemodel">
+ <title>Generate and run the model</title>
+ <para>With the MWe2 workflow generate the code and run the model.
+ The output should look like this:</para>
+ <para>type &#8218;quit’ to exit
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 1
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 2
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 3
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 4
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 5
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 6
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 7
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 8
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 9
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 10
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPong
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ d.int32Val: 4711
+ d.float64Val: 0,000000
+ d.int8Array: 1 2 3 4 5 6 7 8 9 10
+ d.stringVal: empty
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPong
+ d.int32Val: 815
+ d.float64Val: 3,141234
+ d.int8Array: 100 101 102 103 104 105 106 107 108 109
+ d.stringVal: some contents
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPong
+ quit
+ echo: quit</para>
+ </section>
+ <section id="Summary3">
+ <title>Summary</title>
+ <para>Within the first loop a integer value will be incremented from
+ <citation>MrPong</citation> and sent back to
+ <citation>MrPing</citation>. Is long as the guard is true
+ <citation>MrPing</citation> sends back the value.
+ </para>
+ <para>Within the
+ <citation>next</citation> transition,
+ <citation>MrPing</citation> creates a data class and sends the default values. Than
+ <citation>MrPing</citation> changes the values and sends the class again. At this point you should note that during the send operation, a copy of the data class will be created and sent. Otherwise it would not be possible to send the same object two times, even more it would not be possible to send a stack object at all.
+ In later versions of eTrice a additional mechanism to send references will be implemented. However, keep in mind that sending references takes the responsibility of the life cycle of the sent object to the user. It looks simple but is a very common source of failures.
+ </para>
+ </section>
+ </chapter>
<chapter id="ROOMConcepts">
<title>ROOM Concepts</title>
<section id="MainConcepts">
diff --git a/plugins/org.eclipse.etrice.doc/doc/025-tutorial-sending-data.textile b/plugins/org.eclipse.etrice.doc/doc/025-tutorial-sending-data.textile
new file mode 100644
index 0000000..5a46d9b
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/doc/025-tutorial-sending-data.textile
@@ -0,0 +1,404 @@
+h1. Tutorial Sending Data
+
+h2. Scope
+
+This tutorial shows how data will be sent in a eTrice model. Within the example you will create two actors (MrPing and MrPong). MrPong will simply loop back every data it received.
+MrPing will sent data and verify the result.
+
+You will perform the following steps:
+
+# create a new model from scratch
+# create a data class
+# define a protocol with attached data
+# create an actor structure
+# create two simple state machines
+# build and run the model
+
+h2. Create a new model from scratch
+
+Remember exercise ??HelloWorld??.
+Create a new eTrice project and name it ??SendingData??
+Open the ??SendingData.room?? file and copy the following code into the file or use content assist to create the model.
+
+bc..
+RoomModel SendingData {
+ LogicalSystem SendingData_LogSystem {
+ SubSystemRef SendingDataAppl:SendingData_SubSystem
+ }
+ SubSystemClass SendingData_SubSystem {
+ ActorRef SendigDataTopRef:SendingDataTop
+ }
+ ActorClass SendingDataTop {
+ }
+ }
+bq.
+
+h2. Add a data class
+
+Position the cursor outside any class definition and right click the mouse within the editor window. From the context menu select ??Content Assist?? (or Ctrl+Space).
+
+!images/025-SendingData01.png!
+
+Select ??DataClass - data class skeleton?? and name it ??DemoData??.
+Remove the operations and ass the following Attributes:
+
+bc..
+ DataClass DemoData {
+ Attribute int32Val: int32 = "4711"
+ Attribute int8Array [ 10 ]: int8 = "{1,2,3,4,5,6,7,8,9,10}"
+ Attribute float64Val: float64 = "0.0"
+ Attribute stringVal: string = "\"empty\""
+ }
+bq.
+
+Save the model and visit the outline view.
+Note that the outline view contains all data elements as defined in the model.
+
+h2. Create a new protocol
+
+With the help of ??Content Assist?? create a ??ProtocolClass?? and name it ??PingPongProtocol??. Create the following messages:
+
+bc..
+ProtocolClass PingPongProtocol {
+ incoming {
+ Message ping(data: DemoData)
+ Message pingSimple(data:int32)
+ }
+ outgoing {
+ Message pong(data: DemoData)
+ Message pongSimple(data:int32)
+ }
+ }
+bq.
+
+h2. Create MrPing and MrPong Actors
+
+With the help of ??Content Assist?? create two new actor classes and name them ??MrPing?? and ??MrPong??. The resulting model should look like this:
+
+bc..
+RoomModel SendingData {
+
+ LogicalSystem SendingData_LogSystem {
+ SubSystemRef SendingDataAppl: SendingData_SubSystem
+ }
+
+ SubSystemClass SendingData_SubSystem {
+ ActorRef SendigDataTopRef: SendingDataTop
+ }
+
+ ActorClass SendingDataTop { }
+
+ DataClass DemoData {
+ Attribute int32Val: int32 = "4711"
+ Attribute int8Array [ 10 ]: int8 = "{1,2,3,4,5,6,7,8,9,10}"
+ Attribute float64Val: float64 = "0.0"
+ Attribute stringVal: string = "\"empty\""
+ }
+
+ ProtocolClass PingPongProtocol {
+ incoming {
+ Message ping(data: DemoData)
+ Message pingSimple(data: int32)
+ }
+ outgoing {
+ Message pong(data: DemoData)
+ Message pongSimple(data: int32)
+ }
+ }
+
+ ActorClass MrPing {
+ Interface { }
+ Structure { }
+ Behavior { }
+ }
+
+ ActorClass MrPong {
+ Interface { }
+ Structure { }
+ Behavior { }
+ }
+}
+
+bq.
+
+The outline view should look like this:
+
+!images/025-SendingData03.png!
+
+h2. Define the Actors Structure and Behavior
+
+Save the model and visit the outline view. Within the outline view, right click on the ??MrPong?? actor and select ??Edit Structure??. Select an ??Interface Port?? from the toolbox and add it to MrPong. Name the Port ??PingPongPort?? and select the ??PingPongProtocol??
+
+!images/025-SendingData02.png!
+
+Do the same with MrPing but mark the port as ??conjugated??
+
+h3. Define MrPongs behavior
+
+Within the outline view, right click MrPong and select ??Edit Behavior??. Create the following state machine:
+
+!images/025-SendingData04.png!
+
+The transition dialogues should look like this:
+For ??ping??:
+
+!images/025-SendingData05.png!
+
+For ??pingSimple??:
+
+!images/025-SendingData06.png!
+
+
+h3. Define MrPing behavior
+
+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.
+
+!images/025-SendingData07.png!
+
+Name the operation ??printData?? and define the DemoData as a parameter.
+
+Fill in the following code:
+
+bc..
+Operation printData(d: DemoData) : void {
+ "System.out.printf(\"d.int32Val: %d\\n\",d.int32Val);"
+ "System.out.printf(\"d.float64Val: %f\\n\",d.float64Val);"
+ "System.out.printf(\"d.int8Array: \");"
+ "for(int i = 0; i<d.int8Array.length; i++) {"
+ "System.out.printf(\"%d \",d.int8Array[i]);}"
+ "System.out.printf(\"\\nd.stringVal: %s\\n\",d.stringVal);"
+ }
+bq.
+
+For MrPing create the following state machine:
+
+!images/025-SendingData08.png!
+
+The transition dialogues should look like this:
+
+For ??init??:
+
+!images/025-SendingData09.png!
+
+For ??wait1??:
+
+!images/025-SendingData10.png!
+
+For ??next??:
+
+!images/025-SendingData11.png!
+
+For ??wait2??:
+
+!images/025-SendingData12.png!
+
+h2. Define the top level
+
+Open the Structure from SendingDataTop and add MrPing and MrPong as a reference. Connect the ports.
+
+!images/025-SendingData13.png!
+
+The model is finished now and the model file should look like this:
+
+bc..
+RoomModel SendingData {
+
+ LogicalSystem SendingData_LogSystem {
+ SubSystemRef SendingDataAppl: SendingData_SubSystem
+ }
+
+ SubSystemClass SendingData_SubSystem {
+ ActorRef SendigDataTopRef: SendingDataTop
+ }
+
+ ActorClass SendingDataTop {
+ Structure {
+ ActorRef ref0: MrPing
+ ActorRef ref1: MrPong
+ Binding ref0.PingPongPort and ref1.PingPongPort
+ }
+ Behavior { }
+ }
+
+ ActorClass MrPing {
+ Interface {
+ conjugated Port PingPongPort: PingPongProtocol
+ }
+ Structure {
+ external Port PingPongPort
+ }
+ Behavior {
+
+ Operation printData(d: DemoData) : void {
+ "System.out.printf(\"d.int32Val: %d\\n\",d.int32Val);"
+ "System.out.printf(\"d.float64Val: %f\\n\",d.float64Val);"
+ "System.out.printf(\"d.int8Array: \");"
+ "for(int i = 0; i<d.int8Array.length; i++) {"
+ "System.out.printf(\"%d \",d.int8Array[i]);}"
+ "System.out.printf(\"\\nd.stringVal: %s\\n\",d.stringVal);"
+ }
+
+ StateMachine {
+ Transition wait2: waitForPong -> waitForPong {
+ triggers {
+ <pong: PingPongPort>
+ }
+ action {
+ "printData(data);"
+ }
+ }
+ Transition wait1: waitForPongSimple -> waitForPongSimple {
+ triggers {
+ <pongSimple: PingPongPort guard {
+ "data < 10"
+ }>
+ }
+ action {
+ "// keep in mind that MrPong increments"
+ "PingPongPort.pingSimple(data);"
+ "System.out.printf(\"data: %d\\n\",data);"
+ }
+ }
+ Transition next: waitForPongSimple -> waitForPong {
+ triggers {
+ <pongSimple: PingPongPort>
+ }
+ action {
+ "System.out.printf(\"data: %d\\n\",data);"
+ ""
+ "DemoData d = new DemoData();"
+ "// send the default values"
+ "PingPongPort.ping(d);"
+ "d.int32Val=815;"
+ "for (int i = 0; i<d.int8Array.length;i++){"
+ "\td.int8Array[i]=(byte)(i+100);"
+ "\t}"
+ "d.stringVal=\"some contents\";"
+ "d.float64Val=3.141234;"
+ "PingPongPort.ping(d);"
+ }
+ }
+ Transition init0: initial -> waitForPongSimple {
+ action {
+ "PingPongPort.pingSimple(0);"
+ }
+ }
+ State waitForPong
+ State waitForPongSimple
+ }
+ }
+ }
+
+ ActorClass MrPong {
+ Interface {
+ Port PingPongPort: PingPongProtocol
+ }
+ Structure {
+ external Port PingPongPort
+ }
+ Behavior {
+ StateMachine {
+ Transition init: initial -> looping { }
+ Transition tr0: looping -> looping {
+ triggers {
+ <ping: PingPongPort>
+ }
+ action {
+ "PingPongPort.pong(data);"
+ }
+ }
+ Transition tr1: looping -> looping {
+ triggers {
+ <pingSimple: PingPongPort>
+ }
+ action {
+ "PingPongPort.pongSimple(data+1);"
+ }
+ }
+ State looping
+ }
+ }
+ }
+
+ ProtocolClass PingPongProtocol {
+ incoming {
+ Message ping(data: DemoData)
+ Message pingSimple(data: int32)
+ }
+ outgoing {
+ Message pong(data: DemoData)
+ Message pongSimple(data: int32)
+ }
+ }
+
+ DataClass DemoData {
+ Attribute int32Val: int32 = "4711"
+ Attribute int8Array [ 10 ]: int8 = "{1,2,3,4,5,6,7,8,9,10}"
+ Attribute float64Val: float64 = "0.0"
+ Attribute stringVal: string = "\"empty\""
+ }
+}
+bq.
+
+h2. Generate and run the model
+
+With the MWe2 workflow generate the code and run the model.
+The output should look like this:
+
+
+type 'quit' to exit
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 1
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 2
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 3
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 4
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 5
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 6
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 7
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 8
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 9
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPongSimple
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+data: 10
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPong
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+/SendingData_SubSystem/SendigDataTopRef/ref1 -> looping
+d.int32Val: 4711
+d.float64Val: 0,000000
+d.int8Array: 1 2 3 4 5 6 7 8 9 10
+d.stringVal: empty
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPong
+d.int32Val: 815
+d.float64Val: 3,141234
+d.int8Array: 100 101 102 103 104 105 106 107 108 109
+d.stringVal: some contents
+/SendingData_SubSystem/SendigDataTopRef/ref0 -> waitForPong
+quit
+echo: quit
+
+h2. Summary
+
+Within the first loop a integer value will be incremented from ??MrPong?? and sent back to ??MrPing??. Is long as the guard is true ??MrPing?? sends back the value.
+
+Within the ??next?? transition, ??MrPing?? creates a data class and sends the default values. Than ??MrPing?? changes the values and sends the class again. At this point you should note that during the send operation, a copy of the data class will be created and sent. Otherwise it would not be possible to send the same object two times, even more it would not be possible to send a stack object at all.
+In later versions of eTrice a additional mechanism to send references will be implemented. However, keep in mind that sending references takes the responsibility of the life cycle of the sent object to the user. It looks simple but is a very common source of failures.
+
+
diff --git a/plugins/org.eclipse.etrice.doc/doc/etrice-index.txt b/plugins/org.eclipse.etrice.doc/doc/etrice-index.txt
index 4acbc24..df4774b 100644
--- a/plugins/org.eclipse.etrice.doc/doc/etrice-index.txt
+++ b/plugins/org.eclipse.etrice.doc/doc/etrice-index.txt
@@ -3,5 +3,6 @@
015-getting-started.textile
020-tutorial-blinky.textile
+025-tutorial-sending-data.textile
040-room-concepts.textile
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData01.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData01.png
new file mode 100644
index 0000000..6c1b135
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData01.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData02.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData02.png
new file mode 100644
index 0000000..19312cc
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData02.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData03.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData03.png
new file mode 100644
index 0000000..b178015
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData03.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData04.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData04.png
new file mode 100644
index 0000000..4cccf84
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData04.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData05.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData05.png
new file mode 100644
index 0000000..fd82549
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData05.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData06.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData06.png
new file mode 100644
index 0000000..ab03dd8
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData06.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData07.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData07.png
new file mode 100644
index 0000000..e672882
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData07.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData08.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData08.png
new file mode 100644
index 0000000..a2882c1
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData08.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData09.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData09.png
new file mode 100644
index 0000000..e882d05
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData09.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData10.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData10.png
new file mode 100644
index 0000000..40fa0c8
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData10.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData11.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData11.png
new file mode 100644
index 0000000..16ea1fb
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData11.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData12.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData12.png
new file mode 100644
index 0000000..148bbd2
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData12.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData13.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData13.png
new file mode 100644
index 0000000..7efefd3
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData13.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/help/Addadataclass.html b/plugins/org.eclipse.etrice.doc/help/Addadataclass.html
new file mode 100644
index 0000000..796c4b8
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/Addadataclass.html
@@ -0,0 +1,60 @@
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Add a data class</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="Createanewmodelfromscratch3.html" title="Create a new model from scratch">
+<link rel="next" href="Createanewprotocol2.html" title="Create a new protocol">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Add a data class</h1>
+<div class="section" title="Add a data class">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Addadataclass"></a>Add a data class</h2>
+</div>
+</div>
+</div>
+<p>Position the cursor outside any class definition and right click the mouse within the editor window. From the context menu select
+ [<span class="citation">Content Assist</span>] (or Ctrl+Space).
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData01.png"></div>
+<p>
+
+</p>
+<p>Select
+ [<span class="citation">DataClass &ndash; data class skeleton</span>] and name it
+ [<span class="citation">DemoData</span>].
+ Remove the operations and ass the following Attributes:
+ </p>
+<div class="literallayout">
+<p>
+<code class="code"> DataClass&nbsp;DemoData&nbsp;{<br>
+ Attribute&nbsp;int32Val:&nbsp;int32&nbsp;=&nbsp;"4711"<br>
+ Attribute&nbsp;int8Array&nbsp;[&nbsp;10&nbsp;]:&nbsp;int8&nbsp;=&nbsp;"{1,2,3,4,5,6,7,8,9,10}"<br>
+ Attribute&nbsp;float64Val:&nbsp;float64&nbsp;=&nbsp;"0.0"<br>
+ Attribute&nbsp;stringVal:&nbsp;string&nbsp;=&nbsp;"\"empty\""<br>
+ }<br>
+
+</code>
+</p>
+</div>
+<div class="blockquote">
+<blockquote class="blockquote">
+<p></p>
+</blockquote>
+</div>
+<p>Save the model and visit the outline view.
+ Note that the outline view contains all data elements as defined in the model. </p>
+</div>
+</body>
+</html>
diff --git a/plugins/org.eclipse.etrice.doc/help/CreateMrPingandMrPongActors.html b/plugins/org.eclipse.etrice.doc/help/CreateMrPingandMrPongActors.html
new file mode 100644
index 0000000..e0b253b
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/CreateMrPingandMrPongActors.html
@@ -0,0 +1,101 @@
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Create MrPing and MrPong Actors</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="Createanewprotocol2.html" title="Create a new protocol">
+<link rel="next" href="DefinetheActorsStructureandBehavior.html" title="Define the Actors Structure and Behavior">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Create MrPing and MrPong Actors</h1>
+<div class="section" title="Create MrPing and MrPong Actors">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="CreateMrPingandMrPongActors"></a>Create MrPing and MrPong Actors</h2>
+</div>
+</div>
+</div>
+<p>With the help of
+ [<span class="citation">Content Assist</span>] create two new actor classes and name them
+ [<span class="citation">MrPing</span>] and
+ [<span class="citation">MrPong</span>]. The resulting model should look like this:
+ </p>
+<div class="literallayout">
+<p>
+<code class="code">RoomModel&nbsp;SendingData&nbsp;{<br>
+
+<br>
+ LogicalSystem&nbsp;SendingData_LogSystem&nbsp;{<br>
+ SubSystemRef&nbsp;SendingDataAppl:&nbsp;SendingData_SubSystem<br>
+ }<br>
+
+<br>
+ SubSystemClass&nbsp;SendingData_SubSystem&nbsp;{<br>
+ ActorRef&nbsp;SendigDataTopRef:&nbsp;SendingDataTop<br>
+ }<br>
+
+<br>
+ ActorClass&nbsp;SendingDataTop&nbsp;{&nbsp;}<br>
+
+<br>
+ DataClass&nbsp;DemoData&nbsp;{<br>
+ Attribute&nbsp;int32Val:&nbsp;int32&nbsp;=&nbsp;"4711"<br>
+ Attribute&nbsp;int8Array&nbsp;[&nbsp;10&nbsp;]:&nbsp;int8&nbsp;=&nbsp;"{1,2,3,4,5,6,7,8,9,10}"<br>
+ Attribute&nbsp;float64Val:&nbsp;float64&nbsp;=&nbsp;"0.0"<br>
+ Attribute&nbsp;stringVal:&nbsp;string&nbsp;=&nbsp;"\"empty\""<br>
+ }<br>
+
+<br>
+ ProtocolClass&nbsp;PingPongProtocol&nbsp;{<br>
+ incoming&nbsp;{<br>
+ Message&nbsp;ping(data:&nbsp;DemoData)<br>
+ Message&nbsp;pingSimple(data:&nbsp;int32)<br>
+ }<br>
+ outgoing&nbsp;{<br>
+ Message&nbsp;pong(data:&nbsp;DemoData)<br>
+ Message&nbsp;pongSimple(data:&nbsp;int32)<br>
+ }<br>
+ }<br>
+
+<br>
+ ActorClass&nbsp;MrPing&nbsp;{<br>
+ Interface&nbsp;{&nbsp;}<br>
+ Structure&nbsp;{&nbsp;}<br>
+ Behavior&nbsp;{&nbsp;}<br>
+ }<br>
+
+<br>
+ ActorClass&nbsp;MrPong&nbsp;{<br>
+ Interface&nbsp;{&nbsp;}<br>
+ Structure&nbsp;{&nbsp;}<br>
+ Behavior&nbsp;{&nbsp;}<br>
+ }<br>
+}&nbsp;<br>
+
+<br>
+
+</code>
+</p>
+</div>
+<div class="blockquote">
+<blockquote class="blockquote">
+<p></p>
+</blockquote>
+</div>
+<p>The outline view should look like this:</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData03.png"></div>
+<p>
+
+</p>
+</div>
+</body>
+</html>
diff --git a/plugins/org.eclipse.etrice.doc/help/Createanewmodelfromscratch3.html b/plugins/org.eclipse.etrice.doc/help/Createanewmodelfromscratch3.html
new file mode 100644
index 0000000..15a5a52
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/Createanewmodelfromscratch3.html
@@ -0,0 +1,53 @@
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Create a new model from scratch</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="TutorialSendingData.html" title="Tutorial Sending Data">
+<link rel="next" href="Addadataclass.html" title="Add a data class">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Create a new model from scratch</h1>
+<div class="section" title="Create a new model from scratch">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Createanewmodelfromscratch3"></a>Create a new model from scratch</h2>
+</div>
+</div>
+</div>
+<p>Remember exercise
+ [<span class="citation">HelloWorld</span>].
+ Create a new eTrice project and name it
+ [<span class="citation">SendingData</span>]
+ Open the
+ [<span class="citation">SendingData.room</span>] file and copy the following code into the file or use content assist to create the model.
+ </p>
+<div class="literallayout">
+<p>
+<code class="code">RoomModel&nbsp;SendingData&nbsp;{<br>
+ LogicalSystem&nbsp;SendingData_LogSystem&nbsp;{<br>
+ SubSystemRef&nbsp;SendingDataAppl:SendingData_SubSystem&nbsp;<br>
+ }<br>
+ SubSystemClass&nbsp;SendingData_SubSystem&nbsp;{<br>
+ ActorRef&nbsp;SendigDataTopRef:SendingDataTop&nbsp;<br>
+ }<br>
+ ActorClass&nbsp;SendingDataTop&nbsp;{<br>
+ }<br>
+ }<br>
+
+</code>
+</p>
+</div>
+<div class="blockquote">
+<blockquote class="blockquote">
+<p></p>
+</blockquote>
+</div>
+</div>
+</body>
+</html>
diff --git a/plugins/org.eclipse.etrice.doc/help/Createanewprotocol2.html b/plugins/org.eclipse.etrice.doc/help/Createanewprotocol2.html
new file mode 100644
index 0000000..86ef1d9
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/Createanewprotocol2.html
@@ -0,0 +1,51 @@
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Create a new protocol</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="Addadataclass.html" title="Add a data class">
+<link rel="next" href="CreateMrPingandMrPongActors.html" title="Create MrPing and MrPong Actors">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Create a new protocol</h1>
+<div class="section" title="Create a new protocol">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Createanewprotocol2"></a>Create a new protocol</h2>
+</div>
+</div>
+</div>
+<p>With the help of
+ [<span class="citation">Content Assist</span>] create a
+ [<span class="citation">ProtocolClass</span>] and name it
+ [<span class="citation">PingPongProtocol</span>]. Create the following messages:
+ </p>
+<div class="literallayout">
+<p>
+<code class="code">ProtocolClass&nbsp;PingPongProtocol&nbsp;{<br>
+ incoming&nbsp;{<br>
+ Message&nbsp;ping(data:&nbsp;DemoData)<br>
+ Message&nbsp;pingSimple(data:int32)<br>
+ }<br>
+ outgoing&nbsp;{<br>
+ Message&nbsp;pong(data:&nbsp;DemoData)<br>
+ Message&nbsp;pongSimple(data:int32)<br>
+ }<br>
+ } <br>
+
+</code>
+</p>
+</div>
+<div class="blockquote">
+<blockquote class="blockquote">
+<p></p>
+</blockquote>
+</div>
+</div>
+</body>
+</html>
diff --git a/plugins/org.eclipse.etrice.doc/help/DefinetheActorsStructureandBehavior.html b/plugins/org.eclipse.etrice.doc/help/DefinetheActorsStructureandBehavior.html
new file mode 100644
index 0000000..f551ce3
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/DefinetheActorsStructureandBehavior.html
@@ -0,0 +1,183 @@
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Define the Actors 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 the Actors Structure and Behavior</h1>
+<div class="section" title="Define the Actors Structure and Behavior">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="DefinetheActorsStructureandBehavior"></a>Define the Actors 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>
diff --git a/plugins/org.eclipse.etrice.doc/help/Definethetoplevel.html b/plugins/org.eclipse.etrice.doc/help/Definethetoplevel.html
new file mode 100644
index 0000000..390b779
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/Definethetoplevel.html
@@ -0,0 +1,195 @@
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Define the top level</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="DefinetheActorsStructureandBehavior.html" title="Define the Actors Structure and Behavior">
+<link rel="next" href="Generateandrunthemodel.html" title="Generate and run 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">Define the top level</h1>
+<div class="section" title="Define the top level">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Definethetoplevel"></a>Define the top level</h2>
+</div>
+</div>
+</div>
+<p>Open the Structure from SendingDataTop and add MrPing and MrPong as a reference. Connect the ports.</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData13.png"></div>
+<p>
+
+</p>
+<p>The model is finished now and the model file should look like this:</p>
+<div class="literallayout">
+<p></p>
+</div>
+<div class="literallayout">
+<p>
+<code class="code">RoomModel&nbsp;SendingData&nbsp;{<br>
+
+<br>
+ LogicalSystem&nbsp;SendingData_LogSystem&nbsp;{<br>
+ SubSystemRef&nbsp;SendingDataAppl:&nbsp;SendingData_SubSystem<br>
+ }<br>
+
+<br>
+ SubSystemClass&nbsp;SendingData_SubSystem&nbsp;{<br>
+ ActorRef&nbsp;SendigDataTopRef:&nbsp;SendingDataTop<br>
+ }<br>
+
+<br>
+ ActorClass&nbsp;SendingDataTop&nbsp;{<br>
+ Structure&nbsp;{<br>
+ ActorRef&nbsp;ref0:&nbsp;MrPing<br>
+ ActorRef&nbsp;ref1:&nbsp;MrPong<br>
+ Binding&nbsp;ref0.PingPongPort&nbsp;and&nbsp;ref1.PingPongPort<br>
+ }<br>
+ Behavior&nbsp;{&nbsp;}<br>
+ }<br>
+
+<br>
+ ActorClass&nbsp;MrPing&nbsp;{<br>
+ Interface&nbsp;{<br>
+ conjugated&nbsp;Port&nbsp;PingPongPort:&nbsp;PingPongProtocol<br>
+ }<br>
+ Structure&nbsp;{<br>
+ external&nbsp;Port&nbsp;PingPongPort<br>
+ }<br>
+ Behavior&nbsp;{<br>
+
+<br>
+ 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>
+
+<br>
+ StateMachine&nbsp;{<br>
+ Transition&nbsp;wait2:&nbsp;waitForPong&nbsp;-&gt;&nbsp;waitForPong&nbsp;{<br>
+ triggers&nbsp;{<br>
+ &lt;pong:&nbsp;PingPongPort&gt;<br>
+ }<br>
+ action&nbsp;{<br>
+ "printData(data);"<br>
+ }<br>
+ }<br>
+ Transition&nbsp;wait1:&nbsp;waitForPongSimple&nbsp;-&gt;&nbsp;waitForPongSimple&nbsp;{<br>
+ triggers&nbsp;{<br>
+ &lt;pongSimple:&nbsp;PingPongPort&nbsp;guard&nbsp;{<br>
+ "data&nbsp;&lt;&nbsp;10"<br>
+ }&gt;<br>
+ }<br>
+ action&nbsp;{<br>
+ "//&nbsp;keep&nbsp;in&nbsp;mind&nbsp;that&nbsp;MrPong&nbsp;increments"<br>
+ "PingPongPort.pingSimple(data);"<br>
+ "System.out.printf(\"data:&nbsp;%d\\n\",data);"<br>
+ }<br>
+ }<br>
+ Transition&nbsp;next:&nbsp;waitForPongSimple&nbsp;-&gt;&nbsp;waitForPong&nbsp;{<br>
+ triggers&nbsp;{<br>
+ &lt;pongSimple:&nbsp;PingPongPort&gt;<br>
+ }<br>
+ action&nbsp;{<br>
+ "System.out.printf(\"data:&nbsp;%d\\n\",data);"<br>
+ ""<br>
+ "DemoData&nbsp;d&nbsp;=&nbsp;new&nbsp;DemoData();"<br>
+ "//&nbsp;send&nbsp;the&nbsp;default&nbsp;values"<br>
+ "PingPongPort.ping(d);"<br>
+ "d.int32Val=815;"<br>
+ "for&nbsp;(int&nbsp;i&nbsp;=&nbsp;0;&nbsp;i&lt;d.int8Array.length;i++){"<br>
+ "\td.int8Array[i]=(byte)(i+100);"<br>
+ "\t}"<br>
+ "d.stringVal=\"some&nbsp;contents\";"<br>
+ "d.float64Val=3.141234;"<br>
+ "PingPongPort.ping(d);"<br>
+ }<br>
+ }<br>
+ Transition&nbsp;init0:&nbsp;initial&nbsp;-&gt;&nbsp;waitForPongSimple&nbsp;{<br>
+ action&nbsp;{<br>
+ "PingPongPort.pingSimple(0);"<br>
+ }<br>
+ }<br>
+ State&nbsp;waitForPong<br>
+ State&nbsp;waitForPongSimple<br>
+ }<br>
+ }<br>
+ }<br>
+
+<br>
+ ActorClass&nbsp;MrPong&nbsp;{<br>
+ Interface&nbsp;{<br>
+ Port&nbsp;PingPongPort:&nbsp;PingPongProtocol<br>
+ }<br>
+ Structure&nbsp;{<br>
+ external&nbsp;Port&nbsp;PingPongPort<br>
+ }<br>
+ Behavior&nbsp;{<br>
+ StateMachine&nbsp;{<br>
+ Transition&nbsp;init:&nbsp;initial&nbsp;-&gt;&nbsp;looping&nbsp;{&nbsp;}<br>
+ Transition&nbsp;tr0:&nbsp;looping&nbsp;-&gt;&nbsp;looping&nbsp;{<br>
+ triggers&nbsp;{<br>
+ &lt;ping:&nbsp;PingPongPort&gt;<br>
+ }<br>
+ action&nbsp;{<br>
+ "PingPongPort.pong(data);"<br>
+ }<br>
+ }<br>
+ Transition&nbsp;tr1:&nbsp;looping&nbsp;-&gt;&nbsp;looping&nbsp;{<br>
+ triggers&nbsp;{<br>
+ &lt;pingSimple:&nbsp;PingPongPort&gt;<br>
+ }<br>
+ action&nbsp;{<br>
+ "PingPongPort.pongSimple(data+1);"<br>
+ }<br>
+ }<br>
+ State&nbsp;looping<br>
+ }<br>
+ }<br>
+ }<br>
+
+<br>
+ ProtocolClass&nbsp;PingPongProtocol&nbsp;{<br>
+ incoming&nbsp;{<br>
+ Message&nbsp;ping(data:&nbsp;DemoData)<br>
+ Message&nbsp;pingSimple(data:&nbsp;int32)<br>
+ }<br>
+ outgoing&nbsp;{<br>
+ Message&nbsp;pong(data:&nbsp;DemoData)<br>
+ Message&nbsp;pongSimple(data:&nbsp;int32)<br>
+ }<br>
+ }<br>
+
+<br>
+ DataClass&nbsp;DemoData&nbsp;{<br>
+ Attribute&nbsp;int32Val:&nbsp;int32&nbsp;=&nbsp;"4711"<br>
+ Attribute&nbsp;int8Array&nbsp;[&nbsp;10&nbsp;]:&nbsp;int8&nbsp;=&nbsp;"{1,2,3,4,5,6,7,8,9,10}"<br>
+ Attribute&nbsp;float64Val:&nbsp;float64&nbsp;=&nbsp;"0.0"<br>
+ Attribute&nbsp;stringVal:&nbsp;string&nbsp;=&nbsp;"\"empty\""<br>
+ }<br>
+}<br>
+
+</code>
+</p>
+</div>
+<div class="blockquote">
+<blockquote class="blockquote">
+<p></p>
+</blockquote>
+</div>
+</div>
+</body>
+</html>
diff --git a/plugins/org.eclipse.etrice.doc/help/Generateandrunthemodel.html b/plugins/org.eclipse.etrice.doc/help/Generateandrunthemodel.html
new file mode 100644
index 0000000..bf08789
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/Generateandrunthemodel.html
@@ -0,0 +1,74 @@
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Generate and run the model</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="Definethetoplevel.html" title="Define the top level">
+<link rel="next" href="Summary3.html" title="Summary">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Generate and run the model</h1>
+<div class="section" title="Generate and run the model">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Generateandrunthemodel"></a>Generate and run the model</h2>
+</div>
+</div>
+</div>
+<p>With the MWe2 workflow generate the code and run the model.
+ The output should look like this:</p>
+<p>type &sbquo;quit&rsquo; to exit
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 1
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 2
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 3
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 4
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 5
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 6
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 7
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 8
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 9
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 10
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPong
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ d.int32Val: 4711
+ d.float64Val: 0,000000
+ d.int8Array: 1 2 3 4 5 6 7 8 9 10
+ d.stringVal: empty
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPong
+ d.int32Val: 815
+ d.float64Val: 3,141234
+ d.int8Array: 100 101 102 103 104 105 106 107 108 109
+ d.stringVal: some contents
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPong
+ quit
+ echo: quit</p>
+</div>
+</body>
+</html>
diff --git a/plugins/org.eclipse.etrice.doc/help/ROOMConcepts.html b/plugins/org.eclipse.etrice.doc/help/ROOMConcepts.html
index a8c299c..f0b4e56 100644
--- a/plugins/org.eclipse.etrice.doc/help/ROOMConcepts.html
+++ b/plugins/org.eclipse.etrice.doc/help/ROOMConcepts.html
@@ -6,7 +6,7 @@
<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="Summary2.html" title="Summary">
+<link rel="prev" href="Summary3.html" title="Summary">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">ROOM Concepts</h1>
diff --git a/plugins/org.eclipse.etrice.doc/help/Summary2.html b/plugins/org.eclipse.etrice.doc/help/Summary2.html
index 7efa90b..28ef397 100644
--- a/plugins/org.eclipse.etrice.doc/help/Summary2.html
+++ b/plugins/org.eclipse.etrice.doc/help/Summary2.html
@@ -7,7 +7,7 @@
<link rel="home" href="index.html" title="eTrice User Guide">
<link rel="up" href="TutorialBlinky.html" title="Tutorial Blinky">
<link rel="prev" href="ImplementtheBehavior.html" title="Implement the Behavior">
-<link rel="next" href="ROOMConcepts.html" title="ROOM Concepts">
+<link rel="next" href="TutorialSendingData.html" title="Tutorial Sending Data">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Summary</h1>
diff --git a/plugins/org.eclipse.etrice.doc/help/Summary3.html b/plugins/org.eclipse.etrice.doc/help/Summary3.html
new file mode 100644
index 0000000..feb52d2
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/Summary3.html
@@ -0,0 +1,36 @@
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Summary</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="Generateandrunthemodel.html" title="Generate and run the model">
+<link rel="next" href="ROOMConcepts.html" title="ROOM Concepts">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Summary</h1>
+<div class="section" title="Summary">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Summary3"></a>Summary</h2>
+</div>
+</div>
+</div>
+<p>Within the first loop a integer value will be incremented from
+ [<span class="citation">MrPong</span>] and sent back to
+ [<span class="citation">MrPing</span>]. Is long as the guard is true
+ [<span class="citation">MrPing</span>] sends back the value.
+ </p>
+<p>Within the
+ [<span class="citation">next</span>] transition,
+ [<span class="citation">MrPing</span>] creates a data class and sends the default values. Than
+ [<span class="citation">MrPing</span>] changes the values and sends the class again. At this point you should note that during the send operation, a copy of the data class will be created and sent. Otherwise it would not be possible to send the same object two times, even more it would not be possible to send a stack object at all.
+ In later versions of eTrice a additional mechanism to send references will be implemented. However, keep in mind that sending references takes the responsibility of the life cycle of the sent object to the user. It looks simple but is a very common source of failures.
+ </p>
+</div>
+</body>
+</html>
diff --git a/plugins/org.eclipse.etrice.doc/help/TutorialSendingData.html b/plugins/org.eclipse.etrice.doc/help/TutorialSendingData.html
new file mode 100644
index 0000000..6a87e64
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/TutorialSendingData.html
@@ -0,0 +1,91 @@
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Tutorial Sending Data</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="Summary2.html" title="Summary">
+<link rel="next" href="Createanewmodelfromscratch3.html" title="Create a new model from scratch">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Tutorial Sending Data</h1>
+<div class="chapter" title="Tutorial Sending Data">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title">
+<a name="TutorialSendingData"></a>Tutorial Sending Data</h2>
+</div>
+</div>
+</div>
+<div class="toc">
+<dl>
+<dt>
+<span class="section"><a href="TutorialSendingData.html#Scope3">Scope</a></span>
+</dt>
+<dt>
+<span class="section"><a href="Createanewmodelfromscratch3.html">Create a new model from scratch</a></span>
+</dt>
+<dt>
+<span class="section"><a href="Addadataclass.html">Add a data class</a></span>
+</dt>
+<dt>
+<span class="section"><a href="Createanewprotocol2.html">Create a new protocol</a></span>
+</dt>
+<dt>
+<span class="section"><a href="CreateMrPingandMrPongActors.html">Create MrPing and MrPong Actors</a></span>
+</dt>
+<dt>
+<span class="section"><a href="DefinetheActorsStructureandBehavior.html">Define the Actors Structure and Behavior</a></span>
+</dt>
+<dt>
+<span class="section"><a href="Definethetoplevel.html">Define the top level</a></span>
+</dt>
+<dt>
+<span class="section"><a href="Generateandrunthemodel.html">Generate and run the model</a></span>
+</dt>
+<dt>
+<span class="section"><a href="Summary3.html">Summary</a></span>
+</dt>
+</dl>
+</div>
+<div class="section" title="Scope">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Scope3"></a>Scope</h2>
+</div>
+</div>
+</div>
+<p>This tutorial shows how data will be sent in a eTrice model. Within the example you will create two actors (MrPing and MrPong). MrPong will simply loop back every data it received.
+ MrPing will sent data and verify the result. </p>
+<p>You will perform the following steps:</p>
+<div class="orderedlist">
+<ol class="orderedlist" type="1">
+<li class="listitem">
+<p>create a new model from scratch</p>
+</li>
+<li class="listitem">
+<p>create a data class</p>
+</li>
+<li class="listitem">
+<p>define a protocol with attached data</p>
+</li>
+<li class="listitem">
+<p>create an actor structure</p>
+</li>
+<li class="listitem">
+<p>create two simple state machines</p>
+</li>
+<li class="listitem">
+<p>build and run the model</p>
+</li>
+</ol>
+</div>
+</div>
+</div>
+</body>
+</html>
diff --git a/plugins/org.eclipse.etrice.doc/help/images/025-SendigData03.png b/plugins/org.eclipse.etrice.doc/help/images/025-SendigData03.png
new file mode 100644
index 0000000..b178015
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/images/025-SendigData03.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/help/images/025-SendingData01.png b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData01.png
new file mode 100644
index 0000000..6c1b135
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData01.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/help/images/025-SendingData02.png b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData02.png
new file mode 100644
index 0000000..19312cc
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData02.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/help/images/025-SendingData03.png b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData03.png
new file mode 100644
index 0000000..b178015
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData03.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/help/images/025-SendingData04.png b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData04.png
new file mode 100644
index 0000000..4cccf84
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData04.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/help/images/025-SendingData05.png b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData05.png
new file mode 100644
index 0000000..fd82549
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData05.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/help/images/025-SendingData06.png b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData06.png
new file mode 100644
index 0000000..ab03dd8
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData06.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/help/images/025-SendingData07.png b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData07.png
new file mode 100644
index 0000000..e672882
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData07.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/help/images/025-SendingData08.png b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData08.png
new file mode 100644
index 0000000..a2882c1
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData08.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/help/images/025-SendingData09.png b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData09.png
new file mode 100644
index 0000000..e882d05
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData09.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/help/images/025-SendingData10.png b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData10.png
new file mode 100644
index 0000000..40fa0c8
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData10.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/help/images/025-SendingData11.png b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData11.png
new file mode 100644
index 0000000..16ea1fb
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData11.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/help/images/025-SendingData12.png b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData12.png
new file mode 100644
index 0000000..148bbd2
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData12.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/help/images/025-SendingData13.png b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData13.png
new file mode 100644
index 0000000..7efefd3
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/help/images/025-SendingData13.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/html/etrice.html b/plugins/org.eclipse.etrice.doc/html/etrice.html
index 4696be6..a31da93 100644
--- a/plugins/org.eclipse.etrice.doc/html/etrice.html
+++ b/plugins/org.eclipse.etrice.doc/html/etrice.html
@@ -100,7 +100,41 @@
</dl>
</dd>
<dt>
-<span class="chapter"><a href="#ROOMConcepts">5. ROOM Concepts</a></span>
+<span class="chapter"><a href="#TutorialSendingData">5. Tutorial Sending Data</a></span>
+</dt>
+<dd>
+<dl>
+<dt>
+<span class="section"><a href="#Scope3">Scope</a></span>
+</dt>
+<dt>
+<span class="section"><a href="#Createanewmodelfromscratch3">Create a new model from scratch</a></span>
+</dt>
+<dt>
+<span class="section"><a href="#Addadataclass">Add a data class</a></span>
+</dt>
+<dt>
+<span class="section"><a href="#Createanewprotocol2">Create a new protocol</a></span>
+</dt>
+<dt>
+<span class="section"><a href="#CreateMrPingandMrPongActors">Create MrPing and MrPong Actors</a></span>
+</dt>
+<dt>
+<span class="section"><a href="#DefinetheActorsStructureandBehavior">Define the Actors Structure and Behavior</a></span>
+</dt>
+<dt>
+<span class="section"><a href="#Definethetoplevel">Define the top level</a></span>
+</dt>
+<dt>
+<span class="section"><a href="#Generateandrunthemodel">Generate and run the model</a></span>
+</dt>
+<dt>
+<span class="section"><a href="#Summary3">Summary</a></span>
+</dt>
+</dl>
+</dd>
+<dt>
+<span class="chapter"><a href="#ROOMConcepts">6. ROOM Concepts</a></span>
</dt>
<dd>
<dl>
@@ -1151,12 +1185,690 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
<p>Run the model and take look at the generated MSCs. Inspect the generated code to understand the runtime model of eTrice. Within this tutorial you have learned how to create a hierarchical FSM with group transitions and history transitions and you have used entry code. You are now familiar with the basic features of eTrice. The further tutorials will take this knowledge as a precondition.</p>
</div>
</div>
-<div class="chapter" title="Chapter&nbsp;5.&nbsp;ROOM Concepts">
+<div class="chapter" title="Chapter&nbsp;5.&nbsp;Tutorial Sending Data">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title">
+<a name="TutorialSendingData"></a>Chapter&nbsp;5.&nbsp;Tutorial Sending Data</h2>
+</div>
+</div>
+</div>
+<div class="section" title="Scope">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Scope3"></a>Scope</h2>
+</div>
+</div>
+</div>
+<p>This tutorial shows how data will be sent in a eTrice model. Within the example you will create two actors (MrPing and MrPong). MrPong will simply loop back every data it received.
+ MrPing will sent data and verify the result. </p>
+<p>You will perform the following steps:</p>
+<div class="orderedlist">
+<ol class="orderedlist" type="1">
+<li class="listitem">
+<p>create a new model from scratch</p>
+</li>
+<li class="listitem">
+<p>create a data class</p>
+</li>
+<li class="listitem">
+<p>define a protocol with attached data</p>
+</li>
+<li class="listitem">
+<p>create an actor structure</p>
+</li>
+<li class="listitem">
+<p>create two simple state machines</p>
+</li>
+<li class="listitem">
+<p>build and run the model</p>
+</li>
+</ol>
+</div>
+</div>
+<div class="section" title="Create a new model from scratch">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Createanewmodelfromscratch3"></a>Create a new model from scratch</h2>
+</div>
+</div>
+</div>
+<p>Remember exercise
+ [<span class="citation">HelloWorld</span>].
+ Create a new eTrice project and name it
+ [<span class="citation">SendingData</span>]
+ Open the
+ [<span class="citation">SendingData.room</span>] file and copy the following code into the file or use content assist to create the model.
+ </p>
+<div class="literallayout">
+<p>
+<code class="code">RoomModel&nbsp;SendingData&nbsp;{<br>
+ LogicalSystem&nbsp;SendingData_LogSystem&nbsp;{<br>
+ SubSystemRef&nbsp;SendingDataAppl:SendingData_SubSystem&nbsp;<br>
+ }<br>
+ SubSystemClass&nbsp;SendingData_SubSystem&nbsp;{<br>
+ ActorRef&nbsp;SendigDataTopRef:SendingDataTop&nbsp;<br>
+ }<br>
+ ActorClass&nbsp;SendingDataTop&nbsp;{<br>
+ }<br>
+ }<br>
+
+</code>
+</p>
+</div>
+<div class="blockquote">
+<blockquote class="blockquote">
+<p></p>
+</blockquote>
+</div>
+</div>
+<div class="section" title="Add a data class">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Addadataclass"></a>Add a data class</h2>
+</div>
+</div>
+</div>
+<p>Position the cursor outside any class definition and right click the mouse within the editor window. From the context menu select
+ [<span class="citation">Content Assist</span>] (or Ctrl+Space).
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData01.png"></div>
+<p>
+
+</p>
+<p>Select
+ [<span class="citation">DataClass &ndash; data class skeleton</span>] and name it
+ [<span class="citation">DemoData</span>].
+ Remove the operations and ass the following Attributes:
+ </p>
+<div class="literallayout">
+<p>
+<code class="code"> DataClass&nbsp;DemoData&nbsp;{<br>
+ Attribute&nbsp;int32Val:&nbsp;int32&nbsp;=&nbsp;"4711"<br>
+ Attribute&nbsp;int8Array&nbsp;[&nbsp;10&nbsp;]:&nbsp;int8&nbsp;=&nbsp;"{1,2,3,4,5,6,7,8,9,10}"<br>
+ Attribute&nbsp;float64Val:&nbsp;float64&nbsp;=&nbsp;"0.0"<br>
+ Attribute&nbsp;stringVal:&nbsp;string&nbsp;=&nbsp;"\"empty\""<br>
+ }<br>
+
+</code>
+</p>
+</div>
+<div class="blockquote">
+<blockquote class="blockquote">
+<p></p>
+</blockquote>
+</div>
+<p>Save the model and visit the outline view.
+ Note that the outline view contains all data elements as defined in the model. </p>
+</div>
+<div class="section" title="Create a new protocol">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Createanewprotocol2"></a>Create a new protocol</h2>
+</div>
+</div>
+</div>
+<p>With the help of
+ [<span class="citation">Content Assist</span>] create a
+ [<span class="citation">ProtocolClass</span>] and name it
+ [<span class="citation">PingPongProtocol</span>]. Create the following messages:
+ </p>
+<div class="literallayout">
+<p>
+<code class="code">ProtocolClass&nbsp;PingPongProtocol&nbsp;{<br>
+ incoming&nbsp;{<br>
+ Message&nbsp;ping(data:&nbsp;DemoData)<br>
+ Message&nbsp;pingSimple(data:int32)<br>
+ }<br>
+ outgoing&nbsp;{<br>
+ Message&nbsp;pong(data:&nbsp;DemoData)<br>
+ Message&nbsp;pongSimple(data:int32)<br>
+ }<br>
+ } <br>
+
+</code>
+</p>
+</div>
+<div class="blockquote">
+<blockquote class="blockquote">
+<p></p>
+</blockquote>
+</div>
+</div>
+<div class="section" title="Create MrPing and MrPong Actors">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="CreateMrPingandMrPongActors"></a>Create MrPing and MrPong Actors</h2>
+</div>
+</div>
+</div>
+<p>With the help of
+ [<span class="citation">Content Assist</span>] create two new actor classes and name them
+ [<span class="citation">MrPing</span>] and
+ [<span class="citation">MrPong</span>]. The resulting model should look like this:
+ </p>
+<div class="literallayout">
+<p>
+<code class="code">RoomModel&nbsp;SendingData&nbsp;{<br>
+
+<br>
+ LogicalSystem&nbsp;SendingData_LogSystem&nbsp;{<br>
+ SubSystemRef&nbsp;SendingDataAppl:&nbsp;SendingData_SubSystem<br>
+ }<br>
+
+<br>
+ SubSystemClass&nbsp;SendingData_SubSystem&nbsp;{<br>
+ ActorRef&nbsp;SendigDataTopRef:&nbsp;SendingDataTop<br>
+ }<br>
+
+<br>
+ ActorClass&nbsp;SendingDataTop&nbsp;{&nbsp;}<br>
+
+<br>
+ DataClass&nbsp;DemoData&nbsp;{<br>
+ Attribute&nbsp;int32Val:&nbsp;int32&nbsp;=&nbsp;"4711"<br>
+ Attribute&nbsp;int8Array&nbsp;[&nbsp;10&nbsp;]:&nbsp;int8&nbsp;=&nbsp;"{1,2,3,4,5,6,7,8,9,10}"<br>
+ Attribute&nbsp;float64Val:&nbsp;float64&nbsp;=&nbsp;"0.0"<br>
+ Attribute&nbsp;stringVal:&nbsp;string&nbsp;=&nbsp;"\"empty\""<br>
+ }<br>
+
+<br>
+ ProtocolClass&nbsp;PingPongProtocol&nbsp;{<br>
+ incoming&nbsp;{<br>
+ Message&nbsp;ping(data:&nbsp;DemoData)<br>
+ Message&nbsp;pingSimple(data:&nbsp;int32)<br>
+ }<br>
+ outgoing&nbsp;{<br>
+ Message&nbsp;pong(data:&nbsp;DemoData)<br>
+ Message&nbsp;pongSimple(data:&nbsp;int32)<br>
+ }<br>
+ }<br>
+
+<br>
+ ActorClass&nbsp;MrPing&nbsp;{<br>
+ Interface&nbsp;{&nbsp;}<br>
+ Structure&nbsp;{&nbsp;}<br>
+ Behavior&nbsp;{&nbsp;}<br>
+ }<br>
+
+<br>
+ ActorClass&nbsp;MrPong&nbsp;{<br>
+ Interface&nbsp;{&nbsp;}<br>
+ Structure&nbsp;{&nbsp;}<br>
+ Behavior&nbsp;{&nbsp;}<br>
+ }<br>
+}&nbsp;<br>
+
+<br>
+
+</code>
+</p>
+</div>
+<div class="blockquote">
+<blockquote class="blockquote">
+<p></p>
+</blockquote>
+</div>
+<p>The outline view should look like this:</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData03.png"></div>
+<p>
+
+</p>
+</div>
+<div class="section" title="Define the Actors Structure and Behavior">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="DefinetheActorsStructureandBehavior"></a>Define the Actors 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>
+<div class="section" title="Define the top level">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Definethetoplevel"></a>Define the top level</h2>
+</div>
+</div>
+</div>
+<p>Open the Structure from SendingDataTop and add MrPing and MrPong as a reference. Connect the ports.</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/025-SendingData13.png"></div>
+<p>
+
+</p>
+<p>The model is finished now and the model file should look like this:</p>
+<div class="literallayout">
+<p></p>
+</div>
+<div class="literallayout">
+<p>
+<code class="code">RoomModel&nbsp;SendingData&nbsp;{<br>
+
+<br>
+ LogicalSystem&nbsp;SendingData_LogSystem&nbsp;{<br>
+ SubSystemRef&nbsp;SendingDataAppl:&nbsp;SendingData_SubSystem<br>
+ }<br>
+
+<br>
+ SubSystemClass&nbsp;SendingData_SubSystem&nbsp;{<br>
+ ActorRef&nbsp;SendigDataTopRef:&nbsp;SendingDataTop<br>
+ }<br>
+
+<br>
+ ActorClass&nbsp;SendingDataTop&nbsp;{<br>
+ Structure&nbsp;{<br>
+ ActorRef&nbsp;ref0:&nbsp;MrPing<br>
+ ActorRef&nbsp;ref1:&nbsp;MrPong<br>
+ Binding&nbsp;ref0.PingPongPort&nbsp;and&nbsp;ref1.PingPongPort<br>
+ }<br>
+ Behavior&nbsp;{&nbsp;}<br>
+ }<br>
+
+<br>
+ ActorClass&nbsp;MrPing&nbsp;{<br>
+ Interface&nbsp;{<br>
+ conjugated&nbsp;Port&nbsp;PingPongPort:&nbsp;PingPongProtocol<br>
+ }<br>
+ Structure&nbsp;{<br>
+ external&nbsp;Port&nbsp;PingPongPort<br>
+ }<br>
+ Behavior&nbsp;{<br>
+
+<br>
+ 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>
+
+<br>
+ StateMachine&nbsp;{<br>
+ Transition&nbsp;wait2:&nbsp;waitForPong&nbsp;-&gt;&nbsp;waitForPong&nbsp;{<br>
+ triggers&nbsp;{<br>
+ &lt;pong:&nbsp;PingPongPort&gt;<br>
+ }<br>
+ action&nbsp;{<br>
+ "printData(data);"<br>
+ }<br>
+ }<br>
+ Transition&nbsp;wait1:&nbsp;waitForPongSimple&nbsp;-&gt;&nbsp;waitForPongSimple&nbsp;{<br>
+ triggers&nbsp;{<br>
+ &lt;pongSimple:&nbsp;PingPongPort&nbsp;guard&nbsp;{<br>
+ "data&nbsp;&lt;&nbsp;10"<br>
+ }&gt;<br>
+ }<br>
+ action&nbsp;{<br>
+ "//&nbsp;keep&nbsp;in&nbsp;mind&nbsp;that&nbsp;MrPong&nbsp;increments"<br>
+ "PingPongPort.pingSimple(data);"<br>
+ "System.out.printf(\"data:&nbsp;%d\\n\",data);"<br>
+ }<br>
+ }<br>
+ Transition&nbsp;next:&nbsp;waitForPongSimple&nbsp;-&gt;&nbsp;waitForPong&nbsp;{<br>
+ triggers&nbsp;{<br>
+ &lt;pongSimple:&nbsp;PingPongPort&gt;<br>
+ }<br>
+ action&nbsp;{<br>
+ "System.out.printf(\"data:&nbsp;%d\\n\",data);"<br>
+ ""<br>
+ "DemoData&nbsp;d&nbsp;=&nbsp;new&nbsp;DemoData();"<br>
+ "//&nbsp;send&nbsp;the&nbsp;default&nbsp;values"<br>
+ "PingPongPort.ping(d);"<br>
+ "d.int32Val=815;"<br>
+ "for&nbsp;(int&nbsp;i&nbsp;=&nbsp;0;&nbsp;i&lt;d.int8Array.length;i++){"<br>
+ "\td.int8Array[i]=(byte)(i+100);"<br>
+ "\t}"<br>
+ "d.stringVal=\"some&nbsp;contents\";"<br>
+ "d.float64Val=3.141234;"<br>
+ "PingPongPort.ping(d);"<br>
+ }<br>
+ }<br>
+ Transition&nbsp;init0:&nbsp;initial&nbsp;-&gt;&nbsp;waitForPongSimple&nbsp;{<br>
+ action&nbsp;{<br>
+ "PingPongPort.pingSimple(0);"<br>
+ }<br>
+ }<br>
+ State&nbsp;waitForPong<br>
+ State&nbsp;waitForPongSimple<br>
+ }<br>
+ }<br>
+ }<br>
+
+<br>
+ ActorClass&nbsp;MrPong&nbsp;{<br>
+ Interface&nbsp;{<br>
+ Port&nbsp;PingPongPort:&nbsp;PingPongProtocol<br>
+ }<br>
+ Structure&nbsp;{<br>
+ external&nbsp;Port&nbsp;PingPongPort<br>
+ }<br>
+ Behavior&nbsp;{<br>
+ StateMachine&nbsp;{<br>
+ Transition&nbsp;init:&nbsp;initial&nbsp;-&gt;&nbsp;looping&nbsp;{&nbsp;}<br>
+ Transition&nbsp;tr0:&nbsp;looping&nbsp;-&gt;&nbsp;looping&nbsp;{<br>
+ triggers&nbsp;{<br>
+ &lt;ping:&nbsp;PingPongPort&gt;<br>
+ }<br>
+ action&nbsp;{<br>
+ "PingPongPort.pong(data);"<br>
+ }<br>
+ }<br>
+ Transition&nbsp;tr1:&nbsp;looping&nbsp;-&gt;&nbsp;looping&nbsp;{<br>
+ triggers&nbsp;{<br>
+ &lt;pingSimple:&nbsp;PingPongPort&gt;<br>
+ }<br>
+ action&nbsp;{<br>
+ "PingPongPort.pongSimple(data+1);"<br>
+ }<br>
+ }<br>
+ State&nbsp;looping<br>
+ }<br>
+ }<br>
+ }<br>
+
+<br>
+ ProtocolClass&nbsp;PingPongProtocol&nbsp;{<br>
+ incoming&nbsp;{<br>
+ Message&nbsp;ping(data:&nbsp;DemoData)<br>
+ Message&nbsp;pingSimple(data:&nbsp;int32)<br>
+ }<br>
+ outgoing&nbsp;{<br>
+ Message&nbsp;pong(data:&nbsp;DemoData)<br>
+ Message&nbsp;pongSimple(data:&nbsp;int32)<br>
+ }<br>
+ }<br>
+
+<br>
+ DataClass&nbsp;DemoData&nbsp;{<br>
+ Attribute&nbsp;int32Val:&nbsp;int32&nbsp;=&nbsp;"4711"<br>
+ Attribute&nbsp;int8Array&nbsp;[&nbsp;10&nbsp;]:&nbsp;int8&nbsp;=&nbsp;"{1,2,3,4,5,6,7,8,9,10}"<br>
+ Attribute&nbsp;float64Val:&nbsp;float64&nbsp;=&nbsp;"0.0"<br>
+ Attribute&nbsp;stringVal:&nbsp;string&nbsp;=&nbsp;"\"empty\""<br>
+ }<br>
+}<br>
+
+</code>
+</p>
+</div>
+<div class="blockquote">
+<blockquote class="blockquote">
+<p></p>
+</blockquote>
+</div>
+</div>
+<div class="section" title="Generate and run the model">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Generateandrunthemodel"></a>Generate and run the model</h2>
+</div>
+</div>
+</div>
+<p>With the MWe2 workflow generate the code and run the model.
+ The output should look like this:</p>
+<p>type &sbquo;quit&rsquo; to exit
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 1
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 2
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 3
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 4
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 5
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 6
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 7
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 8
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 9
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPongSimple
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ data: 10
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPong
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ /SendingData_SubSystem/SendigDataTopRef/ref1 -&gt; looping
+ d.int32Val: 4711
+ d.float64Val: 0,000000
+ d.int8Array: 1 2 3 4 5 6 7 8 9 10
+ d.stringVal: empty
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPong
+ d.int32Val: 815
+ d.float64Val: 3,141234
+ d.int8Array: 100 101 102 103 104 105 106 107 108 109
+ d.stringVal: some contents
+ /SendingData_SubSystem/SendigDataTopRef/ref0 -&gt; waitForPong
+ quit
+ echo: quit</p>
+</div>
+<div class="section" title="Summary">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Summary3"></a>Summary</h2>
+</div>
+</div>
+</div>
+<p>Within the first loop a integer value will be incremented from
+ [<span class="citation">MrPong</span>] and sent back to
+ [<span class="citation">MrPing</span>]. Is long as the guard is true
+ [<span class="citation">MrPing</span>] sends back the value.
+ </p>
+<p>Within the
+ [<span class="citation">next</span>] transition,
+ [<span class="citation">MrPing</span>] creates a data class and sends the default values. Than
+ [<span class="citation">MrPing</span>] changes the values and sends the class again. At this point you should note that during the send operation, a copy of the data class will be created and sent. Otherwise it would not be possible to send the same object two times, even more it would not be possible to send a stack object at all.
+ In later versions of eTrice a additional mechanism to send references will be implemented. However, keep in mind that sending references takes the responsibility of the life cycle of the sent object to the user. It looks simple but is a very common source of failures.
+ </p>
+</div>
+</div>
+<div class="chapter" title="Chapter&nbsp;6.&nbsp;ROOM Concepts">
<div class="titlepage">
<div>
<div>
<h2 class="title">
-<a name="ROOMConcepts"></a>Chapter&nbsp;5.&nbsp;ROOM Concepts</h2>
+<a name="ROOMConcepts"></a>Chapter&nbsp;6.&nbsp;ROOM Concepts</h2>
</div>
</div>
</div>
diff --git a/plugins/org.eclipse.etrice.doc/html/images/025-SendigData03.png b/plugins/org.eclipse.etrice.doc/html/images/025-SendigData03.png
new file mode 100644
index 0000000..b178015
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/html/images/025-SendigData03.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/html/images/025-SendingData01.png b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData01.png
new file mode 100644
index 0000000..6c1b135
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData01.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/html/images/025-SendingData02.png b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData02.png
new file mode 100644
index 0000000..19312cc
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData02.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/html/images/025-SendingData03.png b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData03.png
new file mode 100644
index 0000000..b178015
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData03.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/html/images/025-SendingData04.png b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData04.png
new file mode 100644
index 0000000..4cccf84
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData04.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/html/images/025-SendingData05.png b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData05.png
new file mode 100644
index 0000000..fd82549
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData05.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/html/images/025-SendingData06.png b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData06.png
new file mode 100644
index 0000000..ab03dd8
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData06.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/html/images/025-SendingData07.png b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData07.png
new file mode 100644
index 0000000..e672882
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData07.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/html/images/025-SendingData08.png b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData08.png
new file mode 100644
index 0000000..a2882c1
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData08.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/html/images/025-SendingData09.png b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData09.png
new file mode 100644
index 0000000..e882d05
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData09.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/html/images/025-SendingData10.png b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData10.png
new file mode 100644
index 0000000..40fa0c8
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData10.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/html/images/025-SendingData11.png b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData11.png
new file mode 100644
index 0000000..16ea1fb
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData11.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/html/images/025-SendingData12.png b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData12.png
new file mode 100644
index 0000000..148bbd2
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData12.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/html/images/025-SendingData13.png b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData13.png
new file mode 100644
index 0000000..7efefd3
--- /dev/null
+++ b/plugins/org.eclipse.etrice.doc/html/images/025-SendingData13.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/manual/etrice.pdf b/plugins/org.eclipse.etrice.doc/manual/etrice.pdf
index 7e53b88..029584d 100644
--- a/plugins/org.eclipse.etrice.doc/manual/etrice.pdf
+++ b/plugins/org.eclipse.etrice.doc/manual/etrice.pdf
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/toc.xml b/plugins/org.eclipse.etrice.doc/toc.xml
index 97cd1b6..2f69395 100644
--- a/plugins/org.eclipse.etrice.doc/toc.xml
+++ b/plugins/org.eclipse.etrice.doc/toc.xml
@@ -24,6 +24,20 @@
<topic href="help/ImplementtheBehavior.html" label="Implement the Behavior"></topic>
<topic href="help/Summary2.html" label="Summary"></topic>
</topic>
+<topic href="help/TutorialSendingData.html" label="Tutorial Sending Data">
+<topic href="help/TutorialSendingData.html#Scope3" label="Scope"></topic>
+<topic href="help/Createanewmodelfromscratch3.html" label="Create a new model from scratch"></topic>
+<topic href="help/Addadataclass.html" label="Add a data class"></topic>
+<topic href="help/Createanewprotocol2.html" label="Create a new protocol"></topic>
+<topic href="help/CreateMrPingandMrPongActors.html" label="Create MrPing and MrPong Actors"></topic>
+<topic href="help/DefinetheActorsStructureandBehavior.html" label="Define the Actors Structure and Behavior">
+<topic href="help/DefinetheActorsStructureandBehavior.html#DefineMrPongsbehavior" label="Define MrPongs behavior"></topic>
+<topic href="help/DefinetheActorsStructureandBehavior.html#DefineMrPingbehavior" label="Define MrPing behavior"></topic>
+</topic>
+<topic href="help/Definethetoplevel.html" label="Define the top level"></topic>
+<topic href="help/Generateandrunthemodel.html" label="Generate and run the model"></topic>
+<topic href="help/Summary3.html" label="Summary"></topic>
+</topic>
<topic href="help/ROOMConcepts.html" label="ROOM Concepts">
<topic href="help/ROOMConcepts.html#MainConcepts" label="Main Concepts"></topic>
</topic>