summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Jung2011-11-01 16:58:47 (EDT)
committerThomas Jung2011-11-01 16:58:47 (EDT)
commit3b2412ec72bb32a4b6b8eb3eecadc48b7c621abb (patch)
tree12358aad0906e28893c0cc841bb0a200ece90a43
parent3c21aa5244e75ee8c5d8373aa44082a88dd8eecb (diff)
downloadorg.eclipse.etrice-3b2412ec72bb32a4b6b8eb3eecadc48b7c621abb.zip
org.eclipse.etrice-3b2412ec72bb32a4b6b8eb3eecadc48b7c621abb.tar.gz
org.eclipse.etrice-3b2412ec72bb32a4b6b8eb3eecadc48b7c621abb.tar.bz2
[doc.doc] all tutorials updated
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/025-tutorial-sending-data.textile9
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/030-tutorial-ped-lights.textile12
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData02.pngbin101519 -> 107195 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData04.pngbin54479 -> 79206 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData05.pngbin54109 -> 147304 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData06.pngbin39724 -> 156875 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData08.pngbin67862 -> 89193 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData09.pngbin100313 -> 106392 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData10.pngbin94082 -> 117875 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData11.pngbin124828 -> 142809 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData12.pngbin93978 -> 105775 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/025-SendingData13.pngbin57849 -> 63728 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/030-PedLights01.pngbin40586 -> 59189 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/030-PedLights02.pngbin59926 -> 89976 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/doc/images/030-PedLights03.pngbin91507 -> 123151 bytes
15 files changed, 16 insertions, 5 deletions
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
index 223699b..86ccdae 100644
--- a/plugins/org.eclipse.etrice.doc/doc/025-tutorial-sending-data.textile
+++ b/plugins/org.eclipse.etrice.doc/doc/025-tutorial-sending-data.textile
@@ -172,6 +172,7 @@ Operation printData(d: DemoData) : void {
bq.
For MrPing create the following state machine:
+(Remember that you can copy and paste the action code from the tutorial directory.)
!images/025-SendingData08.png!
@@ -203,7 +204,7 @@ The model is finished now and can be found in /org.eclipse.etrice.tutorials/mode
h2. Generate and run the model
-With the MWe2 workflow generate the code and run the model.
+Generate the code by right click to ??gen_SendingData.launch?? and run it as ??gen_SendingData??. Run the model.
The output should look like this:
bq..
@@ -260,9 +261,11 @@ h2. Summary
Within the first loop an integer value will be incremented from ??MrPong?? and sent back to ??MrPing??. As 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.
-However, for performance reasons some applications requires sending data by value. In this case the user is responsible for the life cycle of the object. In Java the VM takes care about the life cycle of an object. This is not the case for C/C++. Consider that a object which is created within a transition of a state machine will be destroyed when the transition is finished. The receiving FSM would receive an invalid reference. Therefore care must be taken by sending references.
+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. This type of data passing is called ??sending data by value??.
+However, for performance reasons some applications requires ??sending data by reference??. In this case the user is responsible for the life cycle of the object. In Java the VM takes care about the life cycle of an object. This is not the case for C/C++. Consider that a object which is created within a transition of a state machine will be destroyed when the transition is finished. The receiving FSM would receive an invalid reference. Therefore care must be taken by sending references.
For sending data by reference you simply have to add the keyword ??ref?? to the protocol definition.
bc. Message ping(data: DemoData ref)
+
+Make the test and inspect the console output.
diff --git a/plugins/org.eclipse.etrice.doc/doc/030-tutorial-ped-lights.textile b/plugins/org.eclipse.etrice.doc/doc/030-tutorial-ped-lights.textile
index 4ade466..7928994 100644
--- a/plugins/org.eclipse.etrice.doc/doc/030-tutorial-ped-lights.textile
+++ b/plugins/org.eclipse.etrice.doc/doc/030-tutorial-ped-lights.textile
@@ -23,8 +23,16 @@ h2. Setup the model
* Use the ??New Model Wizzard?? to create a new eTrice project and name it ??PedLightsController??.
* Copy the package ??de.protos.PedLightGUI?? to your ??src?? directory (see blinky tutorial).
-* In PedestrianLightWndNoTcp.jav uncomment line 15 (import), 36, 122 (usage) and 132-134 (registration).
-* Copy the model from /org.eclipse.etrice.tutorials/model/PedLightsController to your model file, or run the model directly in the tutorial directory:
+* In PedestrianLightWndNoTcp.jav uncomment line 15 (import), 36, 122 (usage) and 132-134 (registration). The error markers will disappear after the code is generated from the model.
+* Copy the model from /org.eclipse.etrice.tutorials/model/PedLightsController to your model file, or run the model directly in the tutorial directory.
+* Adapt the import statement to your path.
+bc..
+import room.basic.service.timing.* from "../../org.eclipse.etrice.modellib/models/TimingService.room"
+bq.
+
+* Generate the code from the model.
+* Add the org.eclipse.etrice.modellib to the Java Class Path of your project.
+* All error markers should be disappeared and the model should be operable.
* Arrange the Structure and the Statemachines to understand the model
!images/030-PedLights01.png!
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData02.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData02.png
index 19312cc..fe00fc5 100644
--- a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData02.png
+++ 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-SendingData04.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData04.png
index 4cccf84..45f75a7 100644
--- a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData04.png
+++ 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
index fd82549..454cf47 100644
--- a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData05.png
+++ 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
index ab03dd8..fa54fc7 100644
--- a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData06.png
+++ 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-SendingData08.png b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData08.png
index a2882c1..1a3f719 100644
--- a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData08.png
+++ 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
index e882d05..7a18a90 100644
--- a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData09.png
+++ 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
index 40fa0c8..ef7f41a 100644
--- a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData10.png
+++ 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
index 16ea1fb..9d24c7b 100644
--- a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData11.png
+++ 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
index 148bbd2..fff129e 100644
--- a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData12.png
+++ 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
index 7efefd3..4d8ef70 100644
--- a/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData13.png
+++ b/plugins/org.eclipse.etrice.doc/doc/images/025-SendingData13.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/030-PedLights01.png b/plugins/org.eclipse.etrice.doc/doc/images/030-PedLights01.png
index bc4fc10..f9788c1 100644
--- a/plugins/org.eclipse.etrice.doc/doc/images/030-PedLights01.png
+++ b/plugins/org.eclipse.etrice.doc/doc/images/030-PedLights01.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/030-PedLights02.png b/plugins/org.eclipse.etrice.doc/doc/images/030-PedLights02.png
index d1670a6..a163f1b 100644
--- a/plugins/org.eclipse.etrice.doc/doc/images/030-PedLights02.png
+++ b/plugins/org.eclipse.etrice.doc/doc/images/030-PedLights02.png
Binary files differ
diff --git a/plugins/org.eclipse.etrice.doc/doc/images/030-PedLights03.png b/plugins/org.eclipse.etrice.doc/doc/images/030-PedLights03.png
index bdf2514..b503b9a 100644
--- a/plugins/org.eclipse.etrice.doc/doc/images/030-PedLights03.png
+++ b/plugins/org.eclipse.etrice.doc/doc/images/030-PedLights03.png
Binary files differ