Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortjung2012-09-09 18:26:25 +0000
committertjung2012-09-09 18:26:25 +0000
commitc419d0001190244c0b9120510d6c768fdbdc6447 (patch)
tree6b47e49b82a57cc16b3893292c92270394e3dfa9 /plugins
parent6c6eefb16f57f3ddb6fe5110e551559cfefbf282 (diff)
downloadorg.eclipse.etrice-c419d0001190244c0b9120510d6c768fdbdc6447.tar.gz
org.eclipse.etrice-c419d0001190244c0b9120510d6c768fdbdc6447.tar.xz
org.eclipse.etrice-c419d0001190244c0b9120510d6c768fdbdc6447.zip
[doc] hello world finished
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.etrice.doc/build/etrice.textile109
-rw-r--r--plugins/org.eclipse.etrice.doc/build/etrice.xml221
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Buildandrunthemodel2.html35
-rw-r--r--plugins/org.eclipse.etrice.doc/help/CreatealaunchconfigurationtostarttheCcodegenerator.html81
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Createanewmodelfromscratch4.html2
-rw-r--r--plugins/org.eclipse.etrice.doc/help/CreatetheHelloWorldmodel.html13
-rw-r--r--plugins/org.eclipse.etrice.doc/help/DataClass.html2
-rw-r--r--plugins/org.eclipse.etrice.doc/help/FiniteStateMachines.html6
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Generatethecode.html20
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Layering2.html4
-rw-r--r--plugins/org.eclipse.etrice.doc/help/OpentheMessageSequenceChart2.html34
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Ports.html6
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Protocols.html4
-rw-r--r--plugins/org.eclipse.etrice.doc/help/ROOMConcepts.html310
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Runthemodel.html25
-rw-r--r--plugins/org.eclipse.etrice.doc/help/SettinguptheWorkspaceC.html14
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Setuptheincludepath.html24
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Summary4.html53
-rw-r--r--plugins/org.eclipse.etrice.doc/help/Summary5.html27
-rw-r--r--plugins/org.eclipse.etrice.doc/help/TutorialHelloWorldC.html24
-rw-r--r--plugins/org.eclipse.etrice.doc/html/etrice.html325
-rw-r--r--plugins/org.eclipse.etrice.doc/manual/etrice.pdfbin5745411 -> 6728345 bytes
-rw-r--r--plugins/org.eclipse.etrice.doc/toc.xml26
23 files changed, 623 insertions, 742 deletions
diff --git a/plugins/org.eclipse.etrice.doc/build/etrice.textile b/plugins/org.eclipse.etrice.doc/build/etrice.textile
index ab07f124c..e9fc4fe34 100644
--- a/plugins/org.eclipse.etrice.doc/build/etrice.textile
+++ b/plugins/org.eclipse.etrice.doc/build/etrice.textile
@@ -963,13 +963,15 @@ Before you can start with C, some preconditions must be fulfilled:
- A C compiler must be installed on your machine (all tests and tutorials are based on MinGW)
- The CDT-Eclipse plug in must be installed as the C development environment.
-Once the CDT is installed, the C runtime and model library must be imported.
+Once the CDT is installed, the C runtime and model library must be imported.
+(_File->New->Project->eTrice_ select _eTrice C runtime_ / _eTrice C modellib_)
The resulting workspace should look like this:
!images/032-SetupWorkspaceC01.png!
+
h2. Testing the environment
To verify the C tool chain you should generate and run the Hello World example program of the CDT.
@@ -997,7 +999,38 @@ Verify the output.
!images/032-SetupWorkspaceC07.png!
-Remember these steps. In the following Tutorials these steps will be referenced as _build and run_.
+Remember these steps. In the following Tutorials these steps will be referenced as _build and run_.
+
+
+h2. Building the C runtime system
+
+The C runtime system contains some basic functionalities to run the generated models. The so called runtime is common for all C projects. The requirements for several projects may differ depending on the functionality of the model or the resources of the different platforms. Therefore the runtime is configurable in terms of message queue size, frequency and memory alignment. The configuration file _etRuntimeConfig.h_ is located in _src/config_.
+
+After changing the configuration, the runtime must be built.
+
+Open the properties of the _org.eclipse.runtime.c_ project and select _C/C++ Build->Settins->Tool Settings_ and select _Includes_.
+
+!images/032-SetupWorkspaceC08.png!
+
+Verify the include paths
+
+_src/config_
+_src/common_
+_src/platforms/generic_
+
+Within the Setting dialog select the tab _Build Artefact_ and select _Static Library_
+
+!images/032-SetupWorkspaceC09.png!
+
+Build the runtime by clicking
+
+!images/032-SetupWorkspaceC10.png!
+
+The runtime library should be created.
+
+!images/032-SetupWorkspaceC11.png!
+
+For the tutorials one runtime library should be sufficient. For embedded projects it might be necessary to build project specific runtime libraries. In this case a separate project for the runtime should be created. Symbolic links to the sources might be used to avoid duplicate files. Just the configuration file must be duplicated. A specific library file must exist within the project. Such specific runtime libraries might be referenced from several applications.
h1. Tutorial HelloWorld ( C )
@@ -1009,6 +1042,7 @@ You will perform the following steps:
# create a new model from scratch for C
# create structure and behavior similar to Java
# create a launch configuration for the C code generator
+# setup the C environment
# generate the source code
# run the model
@@ -1038,7 +1072,7 @@ Add the model file to the folder. Right click on the new folder. Select _New->fi
!images/034-HelloWorldC03.png!
-Due to the file ending _.room_ the tool will ask you to add the Xtext nature. Answer with _Yes_.
+Due to the file ending _.room_, the tool will ask you to add the Xtext nature. Answer with _Yes_.
!images/034-HelloWorldC04.png!
@@ -1055,8 +1089,9 @@ Creating the model is not the focus of this tutorial. Therefore copy and paste t
Recognize the C specific parts:
- Import CTypes instead of JavaTypes
- The action code contains C instead of Java. Later versions will contain a common action language, but for the moment the action language is target specific.
+- The application must be shutdown on model level (see also _etRuntimeConfig.h_)
-ToDo: shutdown must be not depend on the subsystem.
+ToDo: shutdown must not depend on the subsystem.
bc..
RoomModel HelloWorldCModel {
@@ -1071,8 +1106,8 @@ RoomModel HelloWorldCModel {
Transition init: initial -> state0 { }
State state0 {
entry {
- "printf(\"HelloETrice !\\n\");"
- "HelloETriceSubSysClass_shutdown();//exit(0);"
+ "printf(\"HelloWorldC !\\n\");"
+ "HelloWorldCSubSysClass_shutdown();//exit(0);"
"\t\t\t\t\t\t"
}
}
@@ -1082,62 +1117,70 @@ RoomModel HelloWorldCModel {
}
bq.
-h2. Create a launch configuration to start the C codegenerator
+h2. Create a launch configuration to start the C code generator
-h2. Generate the code
+Other than in Java a launch configuration for the C code generator must be created.
-h2. Setup the include path
+From the _Run_ menu select _Run Configurations_
-h2. Run the model
+!images/034-HelloWorldC06.png!
-h2. Summary
+Within the dialog select _eTrice C Generator_ and click the _New_ button to create a new launch configuration.
+!images/034-HelloWorldC07.png!
-We will implement the Hello World code on the initial transition of the _HelloWorldTop_ actor. Therefore open the state machine editor by right clicking the _HelloWorldTop_ actor in the outline view and select _Edit Behavior_.
+A new configuration should be created. Name it _gen_HelloWorldC_ and add the model via one of the _add_ buttons.
-!images/015-HelloWorld03.png!
+!images/034-HelloWorldC08.png!
-The state machine editor will be opened. Drag and drop an _Initial Point_ from the tool box to the diagram into the top level state. Drag and drop a _State_ from the tool box to the diagram. Confirm the dialogue with _ok_. Select the _Transition_ in the tool box and draw the transition from the _Initial Point_ to the State. Open the transition dialogue by double clicking the transition arrow and fill in the action code.
+In the _Refresh_ tab select _The entire workspace_
-bc. System.out.println("Hello World !");
-
-The result should look like this:
+!images/034-HelloWorldC09.png!
-!images/015-HelloWorld04.png!
+In the _Common_ tab select _Shared file_ and add the _HelloWorldC_ project via the _Browse_ button.
-Save the diagram and inspect the model file. Note that the textual representation was created after saving the diagram.
+!images/034-HelloWorldC10.png!
-!images/015-HelloWorld05.png!
+Apply your changes. The new configuration should now exist in your workspace.
+!images/034-HelloWorldC11.png!
-h2. Build and run the model
-Now the model is finished and source code can be generated. The project wizard has created a launch configuration that is responsible for generating the source code. From _HelloWorld/_ right click *gen_HelloWorld.launch* and run it as gen_HelloWorld. All model files in the model directory will be generated.
+h2. Generate the code
-!images/015-HelloWorld06.png!
+Now you can generate the code as you know it from Java. Right click to the launch configuration and run it as _gen_HelloWorldC_.
-The code will be generated to the src-gen directory. The main function will be contained in *SubSystem_HelloWorldRunner.java*. Select this file and run it as Java application.
+!images/034-HelloWorldC12.png!
-!images/015-HelloWorld07.png!
+The code should be generated.
+!images/034-HelloWorldC13.png!
-The Hello World application starts and the string will be printed on the console window. To stop the application the user must type _quit_ in the console window.
+h2. Setup the include path
-!images/015-HelloWorld08.png!
+Before you can build the application you must setup the include path for the runtime system. Right click the project and select _Properties_. Add the include path as described in _setting up the workspace_.
-h2. Open the Message Sequence Chart
+!images/034-HelloWorldC14.png!
-During runtime the application produced a MSC and wrote it to a file. Open HelloWorld/tmp/log/SubSystem_HelloWorld_Async.seq using Trace2UML (it is open source and can be obtained from http://trace2uml.tigris.org/). You should see something like this:
+Add the runtime library.
-!images/015-HelloWorld09.png!
+!images/034-HelloWorldC15.png!
+
+Recognize the name of the library ("org.eclipse.etrice.runtime.c"). The library file on your disk is "liborg.eclipse.etrice.runtime.c.a".
+
+h2. Build and run the model
+
+Now you can build the application. Click the build button to build the application.
+Run the application as _Local C/C++ Application_.
+Verify the output.
+!images/034-HelloWorldC16.png!
h2. Summary
-Now you have generated your first eTrice model from scratch. You can switch between diagram editor and model (.room file) and you can see what will be generated during editing and saving the diagram files.
-You should take a look at the generated source files to understand how the state machine is generated and the life cycle of the application. The next tutorials will deal with more complex hierarchies in structure and behavior.
-
+You are now familiar with all necessary steps to create, build and run an eTrice C model from scratch. You are able to create a launch configuration to start the code generator and to perform all necessary settings to compile and link the application.
+The next tutorial provides an exercise to get more familiar with these working steps.
h1. ROOM Concepts
This chapter gives an overview over the ROOM language elements and their textual and graphical notation.
diff --git a/plugins/org.eclipse.etrice.doc/build/etrice.xml b/plugins/org.eclipse.etrice.doc/build/etrice.xml
index 79dad76de..1a9530d93 100644
--- a/plugins/org.eclipse.etrice.doc/build/etrice.xml
+++ b/plugins/org.eclipse.etrice.doc/build/etrice.xml
@@ -1718,7 +1718,12 @@ carLights.setState(TrafficLight3.OFF);
<para>Before you can start with C, some preconditions must be fulfilled:</para>
<para>- A C compiler must be installed on your machine (all tests and tutorials are based on MinGW)
- The CDT-Eclipse plug in must be installed as the C development environment.</para>
- <para>Once the CDT is installed, the C runtime and model library must be imported.</para>
+ <para>Once the CDT is installed, the C runtime and model library must be imported.
+ (
+ <emphasis>File-&gt;New-&gt;Project-&gt;eTrice</emphasis> select
+ <emphasis>eTrice C runtime</emphasis> /
+ <emphasis>eTrice C modellib</emphasis>)
+ </para>
<para>The resulting workspace should look like this:</para>
<para>
<mediaobject>
@@ -1791,9 +1796,65 @@ carLights.setState(TrafficLight3.OFF);
</mediaobject>
</para>
<para>Remember these steps. In the following Tutorials these steps will be referenced as
- <emphasis>build and run</emphasis>.
+ <emphasis>build and run</emphasis>.
</para>
</section>
+ <section id="BuildingtheCruntimesystem">
+ <title>Building the C runtime system</title>
+ <para>The C runtime system contains some basic functionalities to run the generated models. The so called runtime is common for all C projects. The requirements for several projects may differ depending on the functionality of the model or the resources of the different platforms. Therefore the runtime is configurable in terms of message queue size, frequency and memory alignment. The configuration file
+ <emphasis>etRuntimeConfig.h</emphasis> is located in
+ <emphasis>src/config</emphasis>.
+ </para>
+ <para>After changing the configuration, the runtime must be built.</para>
+ <para>Open the properties of the
+ <emphasis>org.eclipse.runtime.c</emphasis> project and select
+ <emphasis>C/C++ Build-&gt;Settins-&gt;Tool Settings</emphasis> and select
+ <emphasis>Includes</emphasis>.
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/032-SetupWorkspaceC08.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>Verify the include paths</para>
+ <para>
+ <emphasis>src/config</emphasis>
+
+ <emphasis>src/common</emphasis>
+
+ <emphasis>src/platforms/generic</emphasis>
+ </para>
+ <para>Within the Setting dialog select the tab
+ <emphasis>Build Artefact</emphasis> and select
+ <emphasis>Static Library</emphasis>
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/032-SetupWorkspaceC09.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>Build the runtime by clicking</para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/032-SetupWorkspaceC10.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>The runtime library should be created.</para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/032-SetupWorkspaceC11.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>For the tutorials one runtime library should be sufficient. For embedded projects it might be necessary to build project specific runtime libraries. In this case a separate project for the runtime should be created. Symbolic links to the sources might be used to avoid duplicate files. Just the configuration file must be duplicated. A specific library file must exist within the project. Such specific runtime libraries might be referenced from several applications. </para>
+ </section>
</chapter>
<chapter id="TutorialHelloWorldC">
<title>Tutorial HelloWorld ( C )</title>
@@ -1812,6 +1873,9 @@ carLights.setState(TrafficLight3.OFF);
<para>create a launch configuration for the C code generator</para>
</listitem>
<listitem>
+ <para>setup the C environment</para>
+ </listitem>
+ <listitem>
<para>generate the source code</para>
</listitem>
<listitem>
@@ -1870,7 +1934,7 @@ carLights.setState(TrafficLight3.OFF);
</mediaobject>
</para>
<para>Due to the file ending
- <emphasis>.room</emphasis> the tool will ask you to add the Xtext nature. Answer with
+ <emphasis>.room</emphasis>, the tool will ask you to add the Xtext nature. Answer with
<emphasis>Yes</emphasis>.
</para>
<para>
@@ -1895,8 +1959,11 @@ carLights.setState(TrafficLight3.OFF);
Creating the model is not the focus of this tutorial. Therefore copy and paste the following code into your model file. Optionally you can open and layout the diagrams.
Recognize the C specific parts:
- Import CTypes instead of JavaTypes
- - The action code contains C instead of Java. Later versions will contain a common action language, but for the moment the action language is target specific.</para>
- <para>ToDo: shutdown must be not depend on the subsystem.</para>
+ - The action code contains C instead of Java. Later versions will contain a common action language, but for the moment the action language is target specific.
+ - The application must be shutdown on model level (see also
+ <emphasis>etRuntimeConfig.h</emphasis>)
+ </para>
+ <para>ToDo: shutdown must not depend on the subsystem.</para>
<literallayout><code>RoomModel HelloWorldCModel {
import room.basic.types.c.* from "../../org.eclipse.etrice.modellib.c/model/CTypes.room"
SubSystemClass HelloWorldCSubSysClass {
@@ -1909,8 +1976,8 @@ carLights.setState(TrafficLight3.OFF);
Transition init: initial -&gt; state0 { }
State state0 {
entry {
- "printf(\"HelloETrice !\\n\");"
- "HelloETriceSubSysClass_shutdown();//exit(0);"
+ "printf(\"HelloWorldC !\\n\");"
+ "HelloWorldCSubSysClass_shutdown();//exit(0);"
"\t\t\t\t\t\t"
}
}
@@ -1924,114 +1991,140 @@ carLights.setState(TrafficLight3.OFF);
</blockquote>
</section>
<section id="CreatealaunchconfigurationtostarttheCcodegenerator">
- <title>Create a launch configuration to start the C codegenerator</title>
- </section>
- <section id="Generatethecode">
- <title>Generate the code</title>
- </section>
- <section id="Setuptheincludepath">
- <title>Setup the include path</title>
- </section>
- <section id="Runthemodel">
- <title>Run the model</title>
- </section>
- <section id="Summary4">
- <title>Summary</title>
- <para>We will implement the Hello World code on the initial transition of the
- <emphasis>HelloWorldTop</emphasis> actor. Therefore open the state machine editor by right clicking the
- <emphasis>HelloWorldTop</emphasis> actor in the outline view and select
- <emphasis>Edit Behavior</emphasis>.
+ <title>Create a launch configuration to start the C code generator</title>
+ <para>Other than in Java a launch configuration for the C code generator must be created.</para>
+ <para>From the
+ <emphasis>Run</emphasis> menu select
+ <emphasis>Run Configurations</emphasis>
</para>
<para>
<mediaobject>
<imageobject>
- <imagedata fileref="images/015-HelloWorld03.png"/>
+ <imagedata fileref="images/034-HelloWorldC06.png"/>
</imageobject>
</mediaobject>
</para>
- <para>The state machine editor will be opened. Drag and drop an
- <emphasis>Initial Point</emphasis> from the tool box to the diagram into the top level state. Drag and drop a
- <emphasis>State</emphasis> from the tool box to the diagram. Confirm the dialogue with
- <emphasis>ok</emphasis>. Select the
- <emphasis>Transition</emphasis> in the tool box and draw the transition from the
- <emphasis>Initial Point</emphasis> to the State. Open the transition dialogue by double clicking the transition arrow and fill in the action code.
+ <para>Within the dialog select
+ <emphasis>eTrice C Generator</emphasis> and click the
+ <emphasis>New</emphasis> button to create a new launch configuration.
</para>
- <literallayout><code>System.out.println("Hello World !");
-</code></literallayout>
- <para>The result should look like this:</para>
<para>
<mediaobject>
<imageobject>
- <imagedata fileref="images/015-HelloWorld04.png"/>
+ <imagedata fileref="images/034-HelloWorldC07.png"/>
</imageobject>
</mediaobject>
</para>
- <para>Save the diagram and inspect the model file. Note that the textual representation was created after saving the diagram.</para>
+ <para>A new configuration should be created. Name it _gen_HelloWorldC_ and add the model via one of the
+ <emphasis>add</emphasis> buttons.
+ </para>
<para>
<mediaobject>
<imageobject>
- <imagedata fileref="images/015-HelloWorld05.png"/>
+ <imagedata fileref="images/034-HelloWorldC08.png"/>
</imageobject>
</mediaobject>
</para>
- </section>
- <section id="Buildandrunthemodel2">
- <title>Build and run the model</title>
- <para>Now the model is finished and source code can be generated. The project wizard has created a launch configuration that is responsible for generating the source code. From
- <emphasis>HelloWorld/</emphasis> right click
- <emphasis role="bold">gen_HelloWorld.launch</emphasis> and run it as gen_HelloWorld. All model files in the model directory will be generated.
+ <para>In the
+ <emphasis>Refresh</emphasis> tab select
+ <emphasis>The entire workspace</emphasis>
</para>
<para>
<mediaobject>
<imageobject>
- <imagedata fileref="images/015-HelloWorld06.png"/>
+ <imagedata fileref="images/034-HelloWorldC09.png"/>
</imageobject>
</mediaobject>
</para>
- <para>The code will be generated to the src-gen directory. The main function will be contained in
- <emphasis role="bold">SubSystem_HelloWorldRunner.java</emphasis>. Select this file and run it as Java application.
+ <para>In the
+ <emphasis>Common</emphasis> tab select
+ <emphasis>Shared file</emphasis> and add the
+ <emphasis>HelloWorldC</emphasis> project via the
+ <emphasis>Browse</emphasis> button.
</para>
<para>
<mediaobject>
<imageobject>
- <imagedata fileref="images/015-HelloWorld07.png"/>
+ <imagedata fileref="images/034-HelloWorldC10.png"/>
</imageobject>
</mediaobject>
</para>
- <para>The Hello World application starts and the string will be printed on the console window. To stop the application the user must type
- <emphasis>quit</emphasis> in the console window.
+ <para>Apply your changes. The new configuration should now exist in your workspace.</para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/034-HelloWorldC11.png"/>
+ </imageobject>
+ </mediaobject>
</para>
+ </section>
+ <section id="Generatethecode">
+ <title>Generate the code</title>
+ <para>Now you can generate the code as you know it from Java. Right click to the launch configuration and run it as _gen_HelloWorldC_.</para>
<para>
<mediaobject>
<imageobject>
- <imagedata fileref="images/015-HelloWorld08.png"/>
+ <imagedata fileref="images/034-HelloWorldC12.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>The code should be generated.</para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/034-HelloWorldC13.png"/>
</imageobject>
</mediaobject>
</para>
</section>
- <section id="OpentheMessageSequenceChart2">
- <title>Open the Message Sequence Chart</title>
- <para>During runtime the application produced a MSC and wrote it to a file. Open HelloWorld/tmp/log/SubSystem_HelloWorld_Async.seq using Trace2UML (it is open source and can be obtained from http://trace2uml.tigris.org/). You should see something like this:</para>
+ <section id="Setuptheincludepath">
+ <title>Setup the include path</title>
+ <para>Before you can build the application you must setup the include path for the runtime system. Right click the project and select
+ <emphasis>Properties</emphasis>. Add the include path as described in
+ <emphasis>setting up the workspace</emphasis>.
+ </para>
<para>
<mediaobject>
<imageobject>
- <imagedata fileref="images/015-HelloWorld09.png"/>
+ <imagedata fileref="images/034-HelloWorldC14.png"/>
</imageobject>
</mediaobject>
</para>
+ <para>Add the runtime library.</para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/034-HelloWorldC15.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>Recognize the name of the library (&#8222;org.eclipse.etrice.runtime.c”). The library file on your disk is &#8222;liborg.eclipse.etrice.runtime.c.a”. </para>
</section>
- <section id="Summary5">
+ <section id="Buildandrunthemodel2">
+ <title>Build and run the model</title>
+ <para>Now you can build the application. Click the build button to build the application.
+ Run the application as
+ <emphasis>Local C/C++ Application</emphasis>.
+ Verify the output.
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/034-HelloWorldC16.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ </section>
+ <section id="Summary4">
<title>Summary</title>
- <para>Now you have generated your first eTrice model from scratch. You can switch between diagram editor and model (.room file) and you can see what will be generated during editing and saving the diagram files.
- You should take a look at the generated source files to understand how the state machine is generated and the life cycle of the application. The next tutorials will deal with more complex hierarchies in structure and behavior.</para>
+ <para>You are now familiar with all necessary steps to create, build and run an eTrice C model from scratch. You are able to create a launch configuration to start the code generator and to perform all necessary settings to compile and link the application. </para>
+ <para>The next tutorial provides an exercise to get more familiar with these working steps.
+ h1. ROOM Concepts</para>
+ <para>This chapter gives an overview over the ROOM language elements and their textual and graphical notation.
+ The formal ROOM grammar based on Xtext (EBNF) you can find here:
+ <ulink url="http://git.eclipse.org/c/etrice/org.eclipse.etrice.git/tree/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/Room.xtext">ROOM Grammar</ulink>
+ </para>
</section>
- </chapter>
- <chapter id="ROOMConcepts">
- <title>ROOM Concepts</title>
- <para>This chapter gives an overview over the ROOM language elements and their textual and graphical notation.
- The formal ROOM grammar based on Xtext (EBNF) you can find here:
- <ulink url="http://git.eclipse.org/c/etrice/org.eclipse.etrice.git/tree/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/Room.xtext">ROOM Grammar</ulink>
- </para>
<section id="Actors">
<title>Actors</title>
<section id="Description">
diff --git a/plugins/org.eclipse.etrice.doc/help/Buildandrunthemodel2.html b/plugins/org.eclipse.etrice.doc/help/Buildandrunthemodel2.html
index 883fcb934..ea2c52439 100644
--- a/plugins/org.eclipse.etrice.doc/help/Buildandrunthemodel2.html
+++ b/plugins/org.eclipse.etrice.doc/help/Buildandrunthemodel2.html
@@ -6,8 +6,8 @@
<meta content="DocBook XSL Stylesheets V1.75.1" name="generator">
<link rel="home" href="index.html" title="eTrice User Guide">
<link rel="up" href="TutorialHelloWorldC.html" title="Tutorial HelloWorld ( C )">
-<link rel="prev" href="Summary4.html" title="Summary">
-<link rel="next" href="OpentheMessageSequenceChart2.html" title="Open the Message Sequence Chart">
+<link rel="prev" href="Setuptheincludepath.html" title="Setup the include path">
+<link rel="next" href="Summary4.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">Build and run the model</h1>
@@ -20,37 +20,16 @@
</div>
</div>
</div>
-<p>Now the model is finished and source code can be generated. The project wizard has created a launch configuration that is responsible for generating the source code. From
- <span class="emphasis"><em>HelloWorld/</em></span> right click
- <span class="bold"><strong>gen_HelloWorld.launch</strong></span> and run it as gen_HelloWorld. All model files in the model directory will be generated.
+<p>Now you can build the application. Click the build button to build the application.
+ Run the application as
+ <span class="emphasis"><em>Local C/C++ Application</em></span>.
+ Verify the output.
</p>
<p>
</p>
<div class="mediaobject">
-<img src="images/015-HelloWorld06.png"></div>
-<p>
-
-</p>
-<p>The code will be generated to the src-gen directory. The main function will be contained in
- <span class="bold"><strong>SubSystem_HelloWorldRunner.java</strong></span>. Select this file and run it as Java application.
- </p>
-<p>
-
-</p>
-<div class="mediaobject">
-<img src="images/015-HelloWorld07.png"></div>
-<p>
-
-</p>
-<p>The Hello World application starts and the string will be printed on the console window. To stop the application the user must type
- <span class="emphasis"><em>quit</em></span> in the console window.
- </p>
-<p>
-
-</p>
-<div class="mediaobject">
-<img src="images/015-HelloWorld08.png"></div>
+<img src="images/034-HelloWorldC16.png"></div>
<p>
</p>
diff --git a/plugins/org.eclipse.etrice.doc/help/CreatealaunchconfigurationtostarttheCcodegenerator.html b/plugins/org.eclipse.etrice.doc/help/CreatealaunchconfigurationtostarttheCcodegenerator.html
index c76ab5ace..5bc1ac95d 100644
--- a/plugins/org.eclipse.etrice.doc/help/CreatealaunchconfigurationtostarttheCcodegenerator.html
+++ b/plugins/org.eclipse.etrice.doc/help/CreatealaunchconfigurationtostarttheCcodegenerator.html
@@ -1,7 +1,7 @@
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Create a launch configuration to start the C codegenerator</title>
+<title>Create a launch configuration to start the C code generator</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">
@@ -10,16 +10,89 @@
<link rel="next" href="Generatethecode.html" title="Generate the code">
</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 launch configuration to start the C codegenerator</h1>
-<div class="section" title="Create a launch configuration to start the C codegenerator">
+<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Create a launch configuration to start the C code generator</h1>
+<div class="section" title="Create a launch configuration to start the C code generator">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
-<a name="CreatealaunchconfigurationtostarttheCcodegenerator"></a>Create a launch configuration to start the C codegenerator</h2>
+<a name="CreatealaunchconfigurationtostarttheCcodegenerator"></a>Create a launch configuration to start the C code generator</h2>
</div>
</div>
</div>
+<p>Other than in Java a launch configuration for the C code generator must be created.</p>
+<p>From the
+ <span class="emphasis"><em>Run</em></span> menu select
+ <span class="emphasis"><em>Run Configurations</em></span>
+
+</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/034-HelloWorldC06.png"></div>
+<p>
+
+</p>
+<p>Within the dialog select
+ <span class="emphasis"><em>eTrice C Generator</em></span> and click the
+ <span class="emphasis"><em>New</em></span> button to create a new launch configuration.
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/034-HelloWorldC07.png"></div>
+<p>
+
+</p>
+<p>A new configuration should be created. Name it _gen_HelloWorldC_ and add the model via one of the
+ <span class="emphasis"><em>add</em></span> buttons.
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/034-HelloWorldC08.png"></div>
+<p>
+
+</p>
+<p>In the
+ <span class="emphasis"><em>Refresh</em></span> tab select
+ <span class="emphasis"><em>The entire workspace</em></span>
+
+</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/034-HelloWorldC09.png"></div>
+<p>
+
+</p>
+<p>In the
+ <span class="emphasis"><em>Common</em></span> tab select
+ <span class="emphasis"><em>Shared file</em></span> and add the
+ <span class="emphasis"><em>HelloWorldC</em></span> project via the
+ <span class="emphasis"><em>Browse</em></span> button.
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/034-HelloWorldC10.png"></div>
+<p>
+
+</p>
+<p>Apply your changes. The new configuration should now exist in your workspace.</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/034-HelloWorldC11.png"></div>
+<p>
+
+</p>
</div>
</body>
</html>
diff --git a/plugins/org.eclipse.etrice.doc/help/Createanewmodelfromscratch4.html b/plugins/org.eclipse.etrice.doc/help/Createanewmodelfromscratch4.html
index 1ef424634..d759ed6a4 100644
--- a/plugins/org.eclipse.etrice.doc/help/Createanewmodelfromscratch4.html
+++ b/plugins/org.eclipse.etrice.doc/help/Createanewmodelfromscratch4.html
@@ -70,7 +70,7 @@
</p>
<p>Due to the file ending
- <span class="emphasis"><em>.room</em></span> the tool will ask you to add the Xtext nature. Answer with
+ <span class="emphasis"><em>.room</em></span>, the tool will ask you to add the Xtext nature. Answer with
<span class="emphasis"><em>Yes</em></span>.
</p>
<p>
diff --git a/plugins/org.eclipse.etrice.doc/help/CreatetheHelloWorldmodel.html b/plugins/org.eclipse.etrice.doc/help/CreatetheHelloWorldmodel.html
index 7abbdb618..0405c7c00 100644
--- a/plugins/org.eclipse.etrice.doc/help/CreatetheHelloWorldmodel.html
+++ b/plugins/org.eclipse.etrice.doc/help/CreatetheHelloWorldmodel.html
@@ -7,7 +7,7 @@
<link rel="home" href="index.html" title="eTrice User Guide">
<link rel="up" href="TutorialHelloWorldC.html" title="Tutorial HelloWorld ( C )">
<link rel="prev" href="Createanewmodelfromscratch4.html" title="Create a new model from scratch">
-<link rel="next" href="CreatealaunchconfigurationtostarttheCcodegenerator.html" title="Create a launch configuration to start the C codegenerator">
+<link rel="next" href="CreatealaunchconfigurationtostarttheCcodegenerator.html" title="Create a launch configuration to start the C code generator">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Create the HelloWorld model</h1>
@@ -24,8 +24,11 @@
Creating the model is not the focus of this tutorial. Therefore copy and paste the following code into your model file. Optionally you can open and layout the diagrams.
Recognize the C specific parts:
- Import CTypes instead of JavaTypes
- - The action code contains C instead of Java. Later versions will contain a common action language, but for the moment the action language is target specific.</p>
-<p>ToDo: shutdown must be not depend on the subsystem.</p>
+ - The action code contains C instead of Java. Later versions will contain a common action language, but for the moment the action language is target specific.
+ - The application must be shutdown on model level (see also
+ <span class="emphasis"><em>etRuntimeConfig.h</em></span>)
+ </p>
+<p>ToDo: shutdown must not depend on the subsystem.</p>
<div class="literallayout">
<p>
<code class="code">RoomModel&nbsp;HelloWorldCModel&nbsp;{<br>
@@ -40,8 +43,8 @@
Transition&nbsp;init:&nbsp;initial&nbsp;-&gt;&nbsp;state0&nbsp;{&nbsp;}<br>
State&nbsp;state0&nbsp;{<br>
entry&nbsp;{<br>
- "printf(\"HelloETrice&nbsp;!\\n\");"<br>
- "HelloETriceSubSysClass_shutdown();//exit(0);"<br>
+ "printf(\"HelloWorldC&nbsp;!\\n\");"<br>
+ "HelloWorldCSubSysClass_shutdown();//exit(0);"<br>
"\t\t\t\t\t\t"<br>
}<br>
}<br>
diff --git a/plugins/org.eclipse.etrice.doc/help/DataClass.html b/plugins/org.eclipse.etrice.doc/help/DataClass.html
index 3516841f8..fddb2f50a 100644
--- a/plugins/org.eclipse.etrice.doc/help/DataClass.html
+++ b/plugins/org.eclipse.etrice.doc/help/DataClass.html
@@ -5,7 +5,7 @@
<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="ROOMConcepts.html" title="ROOM Concepts">
+<link rel="up" href="TutorialHelloWorldC.html" title="Tutorial HelloWorld ( C )">
<link rel="prev" href="Ports.html" title="Ports">
<link rel="next" href="Layering2.html" title="Layering">
</head>
diff --git a/plugins/org.eclipse.etrice.doc/help/FiniteStateMachines.html b/plugins/org.eclipse.etrice.doc/help/FiniteStateMachines.html
index 73c824e52..127a882c8 100644
--- a/plugins/org.eclipse.etrice.doc/help/FiniteStateMachines.html
+++ b/plugins/org.eclipse.etrice.doc/help/FiniteStateMachines.html
@@ -5,7 +5,7 @@
<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="ROOMConcepts.html" title="ROOM Concepts">
+<link rel="up" href="TutorialHelloWorldC.html" title="Tutorial HelloWorld ( C )">
<link rel="prev" href="Layering2.html" title="Layering">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -70,7 +70,7 @@
</div>
</div>
<p>The simpler flat finite state machines are composed of the following elements:</p>
-<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10E94">
+<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10F0A">
<tr>
<td align="center">
@@ -184,7 +184,7 @@
</div>
<p>The hierarchical finite state machine adds the notion of a sub state machine nested in a state.
A few modeling elements are added to the set listed above:</p>
-<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10F53">
+<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10FC9">
<tr>
<td align="center">
diff --git a/plugins/org.eclipse.etrice.doc/help/Generatethecode.html b/plugins/org.eclipse.etrice.doc/help/Generatethecode.html
index 4fd4950b3..0b26d62d6 100644
--- a/plugins/org.eclipse.etrice.doc/help/Generatethecode.html
+++ b/plugins/org.eclipse.etrice.doc/help/Generatethecode.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="TutorialHelloWorldC.html" title="Tutorial HelloWorld ( C )">
-<link rel="prev" href="CreatealaunchconfigurationtostarttheCcodegenerator.html" title="Create a launch configuration to start the C codegenerator">
+<link rel="prev" href="CreatealaunchconfigurationtostarttheCcodegenerator.html" title="Create a launch configuration to start the C code generator">
<link rel="next" href="Setuptheincludepath.html" title="Setup the include path">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,6 +20,24 @@
</div>
</div>
</div>
+<p>Now you can generate the code as you know it from Java. Right click to the launch configuration and run it as _gen_HelloWorldC_.</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/034-HelloWorldC12.png"></div>
+<p>
+
+</p>
+<p>The code should be generated.</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/034-HelloWorldC13.png"></div>
+<p>
+
+</p>
</div>
</body>
</html>
diff --git a/plugins/org.eclipse.etrice.doc/help/Layering2.html b/plugins/org.eclipse.etrice.doc/help/Layering2.html
index 7013249b2..f094f391f 100644
--- a/plugins/org.eclipse.etrice.doc/help/Layering2.html
+++ b/plugins/org.eclipse.etrice.doc/help/Layering2.html
@@ -5,7 +5,7 @@
<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="ROOMConcepts.html" title="ROOM Concepts">
+<link rel="up" href="TutorialHelloWorldC.html" title="Tutorial HelloWorld ( C )">
<link rel="prev" href="DataClass.html" title="DataClass">
<link rel="next" href="FiniteStateMachines.html" title="Finite State Machines">
</head>
@@ -53,7 +53,7 @@
</div>
</div>
</div>
-<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10DE4">
+<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10E5A">
<tr>
<td align="center">
diff --git a/plugins/org.eclipse.etrice.doc/help/OpentheMessageSequenceChart2.html b/plugins/org.eclipse.etrice.doc/help/OpentheMessageSequenceChart2.html
deleted file mode 100644
index c87e8150d..000000000
--- a/plugins/org.eclipse.etrice.doc/help/OpentheMessageSequenceChart2.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Open the Message Sequence Chart</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="TutorialHelloWorldC.html" title="Tutorial HelloWorld ( C )">
-<link rel="prev" href="Buildandrunthemodel2.html" title="Build and run the model">
-<link rel="next" href="Summary5.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">Open the Message Sequence Chart</h1>
-<div class="section" title="Open the Message Sequence Chart">
-<div class="titlepage">
-<div>
-<div>
-<h2 class="title" style="clear: both">
-<a name="OpentheMessageSequenceChart2"></a>Open the Message Sequence Chart</h2>
-</div>
-</div>
-</div>
-<p>During runtime the application produced a MSC and wrote it to a file. Open HelloWorld/tmp/log/SubSystem_HelloWorld_Async.seq using Trace2UML (it is open source and can be obtained from http://trace2uml.tigris.org/). You should see something like this:</p>
-<p>
-
-</p>
-<div class="mediaobject">
-<img src="images/015-HelloWorld09.png"></div>
-<p>
-
-</p>
-</div>
-</body>
-</html>
diff --git a/plugins/org.eclipse.etrice.doc/help/Ports.html b/plugins/org.eclipse.etrice.doc/help/Ports.html
index 4bea3c690..8e522207a 100644
--- a/plugins/org.eclipse.etrice.doc/help/Ports.html
+++ b/plugins/org.eclipse.etrice.doc/help/Ports.html
@@ -5,7 +5,7 @@
<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="ROOMConcepts.html" title="ROOM Concepts">
+<link rel="up" href="TutorialHelloWorldC.html" title="Tutorial HelloWorld ( C )">
<link rel="prev" href="Protocols.html" title="Protocols">
<link rel="next" href="DataClass.html" title="DataClass">
</head>
@@ -111,7 +111,7 @@
</li>
</ul>
</div>
-<table title="Class Port Notation" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10BE9">
+<table title="Class Port Notation" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10C5F">
<tr>
<td align="center">
@@ -309,7 +309,7 @@
</div>
</div>
<p>These symbols can only appear on the border of an ActorReference symbol. Since the type of port is defined in the ActorClass, no textual notation for the Reference Ports exists.</p>
-<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10D21">
+<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10D97">
<tr>
<td align="center">
diff --git a/plugins/org.eclipse.etrice.doc/help/Protocols.html b/plugins/org.eclipse.etrice.doc/help/Protocols.html
index 92caf7c37..f49ff3117 100644
--- a/plugins/org.eclipse.etrice.doc/help/Protocols.html
+++ b/plugins/org.eclipse.etrice.doc/help/Protocols.html
@@ -5,8 +5,8 @@
<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="ROOMConcepts.html" title="ROOM Concepts">
-<link rel="prev" href="ROOMConcepts.html" title="ROOM Concepts">
+<link rel="up" href="TutorialHelloWorldC.html" title="Tutorial HelloWorld ( C )">
+<link rel="prev" href="Actors.html" title="Actors">
<link rel="next" href="Ports.html" title="Ports">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
diff --git a/plugins/org.eclipse.etrice.doc/help/ROOMConcepts.html b/plugins/org.eclipse.etrice.doc/help/ROOMConcepts.html
deleted file mode 100644
index c5115ffee..000000000
--- a/plugins/org.eclipse.etrice.doc/help/ROOMConcepts.html
+++ /dev/null
@@ -1,310 +0,0 @@
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>ROOM Concepts</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="Summary5.html" title="Summary">
-<link rel="next" href="Protocols.html" title="Protocols">
-</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>
-<div class="chapter" title="ROOM Concepts">
-<div class="titlepage">
-<div>
-<div>
-<h2 class="title">
-<a name="ROOMConcepts"></a>ROOM Concepts</h2>
-</div>
-</div>
-</div>
-<div class="toc">
-<dl>
-<dt>
-<span class="section"><a href="ROOMConcepts.html#Actors">Actors</a></span>
-</dt>
-<dt>
-<span class="section"><a href="Protocols.html">Protocols</a></span>
-</dt>
-<dt>
-<span class="section"><a href="Ports.html">Ports</a></span>
-</dt>
-<dt>
-<span class="section"><a href="DataClass.html">DataClass</a></span>
-</dt>
-<dt>
-<span class="section"><a href="Layering2.html">Layering</a></span>
-</dt>
-<dt>
-<span class="section"><a href="FiniteStateMachines.html">Finite State Machines</a></span>
-</dt>
-</dl>
-</div>
-<p>This chapter gives an overview over the ROOM language elements and their textual and graphical notation.
- The formal ROOM grammar based on Xtext (EBNF) you can find here:
- <a class="ulink" href="http://git.eclipse.org/c/etrice/org.eclipse.etrice.git/tree/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/Room.xtext" target="_new">ROOM Grammar</a>
-
-</p>
-<div class="section" title="Actors">
-<div class="titlepage">
-<div>
-<div>
-<h2 class="title" style="clear: both">
-<a name="Actors"></a>Actors</h2>
-</div>
-</div>
-</div>
-<div class="section" title="Description">
-<div class="titlepage">
-<div>
-<div>
-<h3 class="title">
-<a name="Description"></a>Description</h3>
-</div>
-</div>
-</div>
-<p>The actor is the basic structural building block for building systems with ROOM. An actor can be refined hierarchically and thus can be of arbitrarily large scope. Ports define the interface of an actor. An Actor can also have a behavior usually defined by a finite state machine.</p>
-</div>
-<div class="section" title="Motivation">
-<div class="titlepage">
-<div>
-<div>
-<h3 class="title">
-<a name="Motivation"></a>Motivation</h3>
-</div>
-</div>
-</div>
-<div class="itemizedlist">
-<ul class="itemizedlist" type="disc">
-<li class="listitem">
-<p>Actors enable the construction of hierarchical structures by composition and layering</p>
-</li>
-<li class="listitem">
-<p>Actors have their own logical thread of execution</p>
-</li>
-<li class="listitem">
-<p>Actors can be freely deployed</p>
-</li>
-<li class="listitem">
-<p>Actors define potentially reusable blocks</p>
-</li>
-</ul>
-</div>
-</div>
-<div class="section" title="Notation">
-<div class="titlepage">
-<div>
-<div>
-<h3 class="title">
-<a name="Notation"></a>Notation</h3>
-</div>
-</div>
-</div>
-<table title="Actor Class Notation" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10A5D">
-<tr>
-
-<td align="center">
- <span class="bold"><strong>Element</strong></span></td>
- <td align="center">
- <span class="bold"><strong>Graphical Notation</strong></span></td>
- <td align="center">
- <span class="bold"><strong>Textual Notation</strong></span></td>
-
-</tr>
-<tr>
-
-<td>ActorClass</td>
- <td>
-
-<div class="mediaobject">
-<img src="images/040-ActorClassNotation.png"></div>
-</td>
- <td>
-
-<div class="mediaobject">
-<img src="images/040-ActorClassTextualNotation.png"></div>
-</td>
-
-</tr>
-<tr>
-
-<td>ActorRef</td>
- <td>
-
-<div class="mediaobject">
-<img src="images/040-ActorReferenceNotation.png"></div>
-</td>
- <td>
-
-<div class="mediaobject">
-<img src="images/040-ActorReferenceTextualNotation.png"></div>
-</td>
-
-</tr>
-</table>
-<p>
-
-</p>
-</div>
-<div class="section" title="Details">
-<div class="titlepage">
-<div>
-<div>
-<h3 class="title">
-<a name="Details"></a>Details</h3>
-</div>
-</div>
-</div>
-<div class="section" title="Actor Classes, Actor References, Ports and Bindings">
-<div class="titlepage">
-<div>
-<div>
-<h4 class="title">
-<a name="ActorClassesActorReferencesPortsandBindings"></a>Actor Classes, Actor References, Ports and Bindings</h4>
-</div>
-</div>
-</div>
-<p>An
- <span class="bold"><strong>ActorClass</strong></span> defines the type (or blueprint) of an actor. Hierarchies are built by ActorClasses that contain
- <span class="bold"><strong>ActorReferences</strong></span> which have another ActorClass as type. The interface of an ActorClass is always defined by Ports. The ActorClass can also contain Attributes, Operations and a finite state machine.
- </p>
-<p>
-
-<span class="bold"><strong>External Ports</strong></span> define the external interface of an actor and are defined in the
- <span class="bold"><strong>Interface</strong></span> section of the ActorClass.
- </p>
-<p>
-
-<span class="bold"><strong>Internal Ports</strong></span> define the internal interface of an actor and are defined in the
- <span class="bold"><strong>Structure</strong></span> section of the ActorClass.
- </p>
-<p>
-
-<span class="bold"><strong>Bindings</strong></span> connect Ports inside an ActorClass.
- </p>
-<p>Example:</p>
-<table title="Actor Class Example" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10AE2">
-<tr>
-
-<td align="center">
- <span class="bold"><strong>Graphical Notation</strong></span></td>
- <td align="center">
- <span class="bold"><strong>Textual Notation</strong></span></td>
-
-</tr>
-<tr>
-
-<td>
-
-<div class="mediaobject">
-<img src="images/040-ActorClass.png"></div>
-</td>
- <td>
-
-<div class="mediaobject">
-<img src="images/040-ActorClassExampleTextualNotation.png"></div>
-</td>
-
-</tr>
-</table>
-<p>
-
-</p>
-<div class="itemizedlist">
-<ul class="itemizedlist" type="disc">
-<li class="listitem">
-<p>
-
-<span class="emphasis"><em>ActorClass1</em></span> contains two ActorReferences (of ActorClass2 and ActorClass3)
- </p>
-</li>
-<li class="listitem">
-<p>
-
-<span class="emphasis"><em>port1</em></span> is a
- <span class="bold"><strong>External End Port</strong></span>. Since it connects external Actors with the behavior of the ActorClass, it is defined in the
- <span class="bold"><strong>Interface</strong></span> section and the
- <span class="bold"><strong>Structure</strong></span> section of the ActorClass.
- </p>
-</li>
-<li class="listitem">
-<p>
-
-<span class="emphasis"><em>port2</em></span> and
- <span class="emphasis"><em>port3</em></span> are
- <span class="bold"><strong>Internal End Ports</strong></span> and can only be connected to the ports of contained ActorReferences. Internal End Ports connect the Behavior of an ActorClass with its contained ActorReferences.
- </p>
-</li>
-<li class="listitem">
-<p>
-
-<span class="emphasis"><em>port4</em></span> is a relay port and connects external Actors to contained ActorReferences. This port can not be accessed by the behavior of the ActorClass.
- </p>
-</li>
-<li class="listitem">
-<p>
-
-<span class="emphasis"><em>port5</em></span> through
- <span class="emphasis"><em>port9</em></span> are Ports of contained ActorReferences.
- <span class="emphasis"><em>port8</em></span> and
- <span class="emphasis"><em>port9</em></span> can communicate without interference with the containing ActorClass.
- </p>
-</li>
-<li class="listitem">
-<p>
-
-<span class="bold"><strong>Bindings</strong></span> can connect ports of the ActorClass and its contained ActorReferences.
- </p>
-</li>
-</ul>
-</div>
-</div>
-<div class="section" title="Attributes">
-<div class="titlepage">
-<div>
-<div>
-<h4 class="title">
-<a name="Attributes"></a>Attributes</h4>
-</div>
-</div>
-</div>
-<p>Attributes are part of the Structure of an ActorClass. They can be of a PrimitiveType or a DataClass.</p>
-<p>Example:</p>
-<p>
-
-</p>
-<div class="mediaobject">
-<img src="images/040-ActorClassAttributes.png"></div>
-<p>
-
-</p>
-</div>
-<div class="section" title="Operations">
-<div class="titlepage">
-<div>
-<div>
-<h4 class="title">
-<a name="Operations"></a>Operations</h4>
-</div>
-</div>
-</div>
-<p>Operations are part of the Behavior of an ActorClass. Arguments and return values can be of a PrimitiveType or a DataClass. DataClasses can be passed by value (implicit) or by reference (keyword
- <span class="bold"><strong>ref</strong></span>).
- </p>
-<p>Example:</p>
-<p>
-
-</p>
-<div class="mediaobject">
-<img src="images/040-ActorClassOperations.png"></div>
-<p>
-
-</p>
-</div>
-</div>
-</div>
-</div>
-</body>
-</html>
diff --git a/plugins/org.eclipse.etrice.doc/help/Runthemodel.html b/plugins/org.eclipse.etrice.doc/help/Runthemodel.html
deleted file mode 100644
index cf0d3c500..000000000
--- a/plugins/org.eclipse.etrice.doc/help/Runthemodel.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>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="TutorialHelloWorldC.html" title="Tutorial HelloWorld ( C )">
-<link rel="prev" href="Setuptheincludepath.html" title="Setup the include path">
-<link rel="next" href="Summary4.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">Run the model</h1>
-<div class="section" title="Run the model">
-<div class="titlepage">
-<div>
-<div>
-<h2 class="title" style="clear: both">
-<a name="Runthemodel"></a>Run the model</h2>
-</div>
-</div>
-</div>
-</div>
-</body>
-</html>
diff --git a/plugins/org.eclipse.etrice.doc/help/SettinguptheWorkspaceC.html b/plugins/org.eclipse.etrice.doc/help/SettinguptheWorkspaceC.html
index ed1e8cfc4..f8e3186b9 100644
--- a/plugins/org.eclipse.etrice.doc/help/SettinguptheWorkspaceC.html
+++ b/plugins/org.eclipse.etrice.doc/help/SettinguptheWorkspaceC.html
@@ -7,7 +7,7 @@
<link rel="home" href="index.html" title="eTrice User Guide">
<link rel="up" href="index.html" title="eTrice User Guide">
<link rel="prev" href="Whydoesitworkandwhyisitsafe.html" title="Why does it work and why is it safe?">
-<link rel="next" href="TutorialHelloWorldC.html" title="Tutorial HelloWorld ( C )">
+<link rel="next" href="BuildingtheCruntimesystem.html" title="Building the C runtime system">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Setting up the Workspace ( C )</h1>
@@ -25,12 +25,20 @@
<dt>
<span class="section"><a href="SettinguptheWorkspaceC.html#Testingtheenvironment">Testing the environment</a></span>
</dt>
+<dt>
+<span class="section"><a href="BuildingtheCruntimesystem.html">Building the C runtime system</a></span>
+</dt>
</dl>
</div>
<p>Before you can start with C, some preconditions must be fulfilled:</p>
<p>- A C compiler must be installed on your machine (all tests and tutorials are based on MinGW)
- The CDT-Eclipse plug in must be installed as the C development environment.</p>
-<p>Once the CDT is installed, the C runtime and model library must be imported.</p>
+<p>Once the CDT is installed, the C runtime and model library must be imported.
+ (
+ <span class="emphasis"><em>File-&gt;New-&gt;Project-&gt;eTrice</em></span> select
+ <span class="emphasis"><em>eTrice C runtime</em></span> /
+ <span class="emphasis"><em>eTrice C modellib</em></span>)
+ </p>
<p>The resulting workspace should look like this:</p>
<p>
@@ -118,7 +126,7 @@
</p>
<p>Remember these steps. In the following Tutorials these steps will be referenced as
- <span class="emphasis"><em>build and run</em></span>.
+ <span class="emphasis"><em>build and run</em></span>.
</p>
</div>
</div>
diff --git a/plugins/org.eclipse.etrice.doc/help/Setuptheincludepath.html b/plugins/org.eclipse.etrice.doc/help/Setuptheincludepath.html
index 5db9886bd..30009b5e4 100644
--- a/plugins/org.eclipse.etrice.doc/help/Setuptheincludepath.html
+++ b/plugins/org.eclipse.etrice.doc/help/Setuptheincludepath.html
@@ -7,7 +7,7 @@
<link rel="home" href="index.html" title="eTrice User Guide">
<link rel="up" href="TutorialHelloWorldC.html" title="Tutorial HelloWorld ( C )">
<link rel="prev" href="Generatethecode.html" title="Generate the code">
-<link rel="next" href="Runthemodel.html" title="Run the model">
+<link rel="next" href="Buildandrunthemodel2.html" title="Build 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">Setup the include path</h1>
@@ -20,6 +20,28 @@
</div>
</div>
</div>
+<p>Before you can build the application you must setup the include path for the runtime system. Right click the project and select
+ <span class="emphasis"><em>Properties</em></span>. Add the include path as described in
+ <span class="emphasis"><em>setting up the workspace</em></span>.
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/034-HelloWorldC14.png"></div>
+<p>
+
+</p>
+<p>Add the runtime library.</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/034-HelloWorldC15.png"></div>
+<p>
+
+</p>
+<p>Recognize the name of the library (&bdquo;org.eclipse.etrice.runtime.c&rdquo;). The library file on your disk is &bdquo;liborg.eclipse.etrice.runtime.c.a&rdquo;. </p>
</div>
</body>
</html>
diff --git a/plugins/org.eclipse.etrice.doc/help/Summary4.html b/plugins/org.eclipse.etrice.doc/help/Summary4.html
index 122180f6d..37643db66 100644
--- a/plugins/org.eclipse.etrice.doc/help/Summary4.html
+++ b/plugins/org.eclipse.etrice.doc/help/Summary4.html
@@ -6,8 +6,8 @@
<meta content="DocBook XSL Stylesheets V1.75.1" name="generator">
<link rel="home" href="index.html" title="eTrice User Guide">
<link rel="up" href="TutorialHelloWorldC.html" title="Tutorial HelloWorld ( C )">
-<link rel="prev" href="Runthemodel.html" title="Run the model">
-<link rel="next" href="Buildandrunthemodel2.html" title="Build and run the model">
+<link rel="prev" href="Buildandrunthemodel2.html" title="Build and run the model">
+<link rel="next" href="Actors.html" title="Actors">
</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>
@@ -20,49 +20,12 @@
</div>
</div>
</div>
-<p>We will implement the Hello World code on the initial transition of the
- <span class="emphasis"><em>HelloWorldTop</em></span> actor. Therefore open the state machine editor by right clicking the
- <span class="emphasis"><em>HelloWorldTop</em></span> actor in the outline view and select
- <span class="emphasis"><em>Edit Behavior</em></span>.
- </p>
-<p>
-
-</p>
-<div class="mediaobject">
-<img src="images/015-HelloWorld03.png"></div>
-<p>
-
-</p>
-<p>The state machine editor will be opened. Drag and drop an
- <span class="emphasis"><em>Initial Point</em></span> from the tool box to the diagram into the top level state. Drag and drop a
- <span class="emphasis"><em>State</em></span> from the tool box to the diagram. Confirm the dialogue with
- <span class="emphasis"><em>ok</em></span>. Select the
- <span class="emphasis"><em>Transition</em></span> in the tool box and draw the transition from the
- <span class="emphasis"><em>Initial Point</em></span> to the State. Open the transition dialogue by double clicking the transition arrow and fill in the action code.
- </p>
-<div class="literallayout">
-<p>
-<code class="code">System.out.println("Hello&nbsp;World&nbsp;!");<br>
-
-</code>
-</p>
-</div>
-<p>The result should look like this:</p>
-<p>
-
-</p>
-<div class="mediaobject">
-<img src="images/015-HelloWorld04.png"></div>
-<p>
-
-</p>
-<p>Save the diagram and inspect the model file. Note that the textual representation was created after saving the diagram.</p>
-<p>
-
-</p>
-<div class="mediaobject">
-<img src="images/015-HelloWorld05.png"></div>
-<p>
+<p>You are now familiar with all necessary steps to create, build and run an eTrice C model from scratch. You are able to create a launch configuration to start the code generator and to perform all necessary settings to compile and link the application. </p>
+<p>The next tutorial provides an exercise to get more familiar with these working steps.
+ h1. ROOM Concepts</p>
+<p>This chapter gives an overview over the ROOM language elements and their textual and graphical notation.
+ The formal ROOM grammar based on Xtext (EBNF) you can find here:
+ <a class="ulink" href="http://git.eclipse.org/c/etrice/org.eclipse.etrice.git/tree/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/Room.xtext" target="_new">ROOM Grammar</a>
</p>
</div>
diff --git a/plugins/org.eclipse.etrice.doc/help/Summary5.html b/plugins/org.eclipse.etrice.doc/help/Summary5.html
deleted file mode 100644
index 01b1f7df8..000000000
--- a/plugins/org.eclipse.etrice.doc/help/Summary5.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<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="TutorialHelloWorldC.html" title="Tutorial HelloWorld ( C )">
-<link rel="prev" href="OpentheMessageSequenceChart2.html" title="Open the Message Sequence Chart">
-<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="Summary5"></a>Summary</h2>
-</div>
-</div>
-</div>
-<p>Now you have generated your first eTrice model from scratch. You can switch between diagram editor and model (.room file) and you can see what will be generated during editing and saving the diagram files.
- You should take a look at the generated source files to understand how the state machine is generated and the life cycle of the application. The next tutorials will deal with more complex hierarchies in structure and behavior.</p>
-</div>
-</body>
-</html>
diff --git a/plugins/org.eclipse.etrice.doc/help/TutorialHelloWorldC.html b/plugins/org.eclipse.etrice.doc/help/TutorialHelloWorldC.html
index b1fbad928..bae1158ab 100644
--- a/plugins/org.eclipse.etrice.doc/help/TutorialHelloWorldC.html
+++ b/plugins/org.eclipse.etrice.doc/help/TutorialHelloWorldC.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="SettinguptheWorkspaceC.html" title="Setting up the Workspace ( C )">
+<link rel="prev" href="BuildingtheCruntimesystem.html" title="Building the C runtime system">
<link rel="next" href="Createanewmodelfromscratch4.html" title="Create a new model from scratch">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -32,7 +32,7 @@
<span class="section"><a href="CreatetheHelloWorldmodel.html">Create the HelloWorld model</a></span>
</dt>
<dt>
-<span class="section"><a href="CreatealaunchconfigurationtostarttheCcodegenerator.html">Create a launch configuration to start the C codegenerator</a></span>
+<span class="section"><a href="CreatealaunchconfigurationtostarttheCcodegenerator.html">Create a launch configuration to start the C code generator</a></span>
</dt>
<dt>
<span class="section"><a href="Generatethecode.html">Generate the code</a></span>
@@ -41,19 +41,28 @@
<span class="section"><a href="Setuptheincludepath.html">Setup the include path</a></span>
</dt>
<dt>
-<span class="section"><a href="Runthemodel.html">Run the model</a></span>
+<span class="section"><a href="Buildandrunthemodel2.html">Build and run the model</a></span>
</dt>
<dt>
<span class="section"><a href="Summary4.html">Summary</a></span>
</dt>
<dt>
-<span class="section"><a href="Buildandrunthemodel2.html">Build and run the model</a></span>
+<span class="section"><a href="Actors.html">Actors</a></span>
+</dt>
+<dt>
+<span class="section"><a href="Protocols.html">Protocols</a></span>
+</dt>
+<dt>
+<span class="section"><a href="Ports.html">Ports</a></span>
+</dt>
+<dt>
+<span class="section"><a href="DataClass.html">DataClass</a></span>
</dt>
<dt>
-<span class="section"><a href="OpentheMessageSequenceChart2.html">Open the Message Sequence Chart</a></span>
+<span class="section"><a href="Layering2.html">Layering</a></span>
</dt>
<dt>
-<span class="section"><a href="Summary5.html">Summary</a></span>
+<span class="section"><a href="FiniteStateMachines.html">Finite State Machines</a></span>
</dt>
</dl>
</div>
@@ -80,6 +89,9 @@
<p>create a launch configuration for the C code generator</p>
</li>
<li class="listitem">
+<p>setup the C environment</p>
+</li>
+<li class="listitem">
<p>generate the source code</p>
</li>
<li class="listitem">
diff --git a/plugins/org.eclipse.etrice.doc/html/etrice.html b/plugins/org.eclipse.etrice.doc/html/etrice.html
index 8651a3c02..80cf207de 100644
--- a/plugins/org.eclipse.etrice.doc/html/etrice.html
+++ b/plugins/org.eclipse.etrice.doc/html/etrice.html
@@ -170,6 +170,9 @@
<dt>
<span class="section"><a href="#Testingtheenvironment">Testing the environment</a></span>
</dt>
+<dt>
+<span class="section"><a href="#BuildingtheCruntimesystem">Building the C runtime system</a></span>
+</dt>
</dl>
</dd>
<dt>
@@ -187,7 +190,7 @@
<span class="section"><a href="#CreatetheHelloWorldmodel">Create the HelloWorld model</a></span>
</dt>
<dt>
-<span class="section"><a href="#CreatealaunchconfigurationtostarttheCcodegenerator">Create a launch configuration to start the C codegenerator</a></span>
+<span class="section"><a href="#CreatealaunchconfigurationtostarttheCcodegenerator">Create a launch configuration to start the C code generator</a></span>
</dt>
<dt>
<span class="section"><a href="#Generatethecode">Generate the code</a></span>
@@ -196,27 +199,11 @@
<span class="section"><a href="#Setuptheincludepath">Setup the include path</a></span>
</dt>
<dt>
-<span class="section"><a href="#Runthemodel">Run the model</a></span>
-</dt>
-<dt>
-<span class="section"><a href="#Summary4">Summary</a></span>
-</dt>
-<dt>
<span class="section"><a href="#Buildandrunthemodel2">Build and run the model</a></span>
</dt>
<dt>
-<span class="section"><a href="#OpentheMessageSequenceChart2">Open the Message Sequence Chart</a></span>
-</dt>
-<dt>
-<span class="section"><a href="#Summary5">Summary</a></span>
-</dt>
-</dl>
-</dd>
-<dt>
-<span class="chapter"><a href="#ROOMConcepts">11. ROOM Concepts</a></span>
+<span class="section"><a href="#Summary4">Summary</a></span>
</dt>
-<dd>
-<dl>
<dt>
<span class="section"><a href="#Actors">Actors</a></span>
</dt>
@@ -2613,7 +2600,12 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
<p>Before you can start with C, some preconditions must be fulfilled:</p>
<p>- A C compiler must be installed on your machine (all tests and tutorials are based on MinGW)
- The CDT-Eclipse plug in must be installed as the C development environment.</p>
-<p>Once the CDT is installed, the C runtime and model library must be imported.</p>
+<p>Once the CDT is installed, the C runtime and model library must be imported.
+ (
+ <span class="emphasis"><em>File-&gt;New-&gt;Project-&gt;eTrice</em></span> select
+ <span class="emphasis"><em>eTrice C runtime</em></span> /
+ <span class="emphasis"><em>eTrice C modellib</em></span>)
+ </p>
<p>The resulting workspace should look like this:</p>
<p>
@@ -2701,9 +2693,79 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
</p>
<p>Remember these steps. In the following Tutorials these steps will be referenced as
- <span class="emphasis"><em>build and run</em></span>.
+ <span class="emphasis"><em>build and run</em></span>.
</p>
</div>
+<div class="section" title="Building the C runtime system">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="BuildingtheCruntimesystem"></a>Building the C runtime system</h2>
+</div>
+</div>
+</div>
+<p>The C runtime system contains some basic functionalities to run the generated models. The so called runtime is common for all C projects. The requirements for several projects may differ depending on the functionality of the model or the resources of the different platforms. Therefore the runtime is configurable in terms of message queue size, frequency and memory alignment. The configuration file
+ <span class="emphasis"><em>etRuntimeConfig.h</em></span> is located in
+ <span class="emphasis"><em>src/config</em></span>.
+ </p>
+<p>After changing the configuration, the runtime must be built.</p>
+<p>Open the properties of the
+ <span class="emphasis"><em>org.eclipse.runtime.c</em></span> project and select
+ <span class="emphasis"><em>C/C++ Build-&gt;Settins-&gt;Tool Settings</em></span> and select
+ <span class="emphasis"><em>Includes</em></span>.
+ </p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/032-SetupWorkspaceC08.png"></div>
+<p>
+
+</p>
+<p>Verify the include paths</p>
+<p>
+
+<span class="emphasis"><em>src/config</em></span>
+
+ <span class="emphasis"><em>src/common</em></span>
+
+ <span class="emphasis"><em>src/platforms/generic</em></span>
+
+</p>
+<p>Within the Setting dialog select the tab
+ <span class="emphasis"><em>Build Artefact</em></span> and select
+ <span class="emphasis"><em>Static Library</em></span>
+
+</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/032-SetupWorkspaceC09.png"></div>
+<p>
+
+</p>
+<p>Build the runtime by clicking</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/032-SetupWorkspaceC10.png"></div>
+<p>
+
+</p>
+<p>The runtime library should be created.</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/032-SetupWorkspaceC11.png"></div>
+<p>
+
+</p>
+<p>For the tutorials one runtime library should be sufficient. For embedded projects it might be necessary to build project specific runtime libraries. In this case a separate project for the runtime should be created. Symbolic links to the sources might be used to avoid duplicate files. Just the configuration file must be duplicated. A specific library file must exist within the project. Such specific runtime libraries might be referenced from several applications. </p>
+</div>
</div>
<div class="chapter" title="Chapter&nbsp;10.&nbsp;Tutorial HelloWorld ( C )">
<div class="titlepage">
@@ -2737,6 +2799,9 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
<p>create a launch configuration for the C code generator</p>
</li>
<li class="listitem">
+<p>setup the C environment</p>
+</li>
+<li class="listitem">
<p>generate the source code</p>
</li>
<li class="listitem">
@@ -2807,7 +2872,7 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
</p>
<p>Due to the file ending
- <span class="emphasis"><em>.room</em></span> the tool will ask you to add the Xtext nature. Answer with
+ <span class="emphasis"><em>.room</em></span>, the tool will ask you to add the Xtext nature. Answer with
<span class="emphasis"><em>Yes</em></span>.
</p>
<p>
@@ -2841,8 +2906,11 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
Creating the model is not the focus of this tutorial. Therefore copy and paste the following code into your model file. Optionally you can open and layout the diagrams.
Recognize the C specific parts:
- Import CTypes instead of JavaTypes
- - The action code contains C instead of Java. Later versions will contain a common action language, but for the moment the action language is target specific.</p>
-<p>ToDo: shutdown must be not depend on the subsystem.</p>
+ - The action code contains C instead of Java. Later versions will contain a common action language, but for the moment the action language is target specific.
+ - The application must be shutdown on model level (see also
+ <span class="emphasis"><em>etRuntimeConfig.h</em></span>)
+ </p>
+<p>ToDo: shutdown must not depend on the subsystem.</p>
<div class="literallayout">
<p>
<code class="code">RoomModel&nbsp;HelloWorldCModel&nbsp;{<br>
@@ -2857,8 +2925,8 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
Transition&nbsp;init:&nbsp;initial&nbsp;-&gt;&nbsp;state0&nbsp;{&nbsp;}<br>
State&nbsp;state0&nbsp;{<br>
entry&nbsp;{<br>
- "printf(\"HelloETrice&nbsp;!\\n\");"<br>
- "HelloETriceSubSysClass_shutdown();//exit(0);"<br>
+ "printf(\"HelloWorldC&nbsp;!\\n\");"<br>
+ "HelloWorldCSubSysClass_shutdown();//exit(0);"<br>
"\t\t\t\t\t\t"<br>
}<br>
}<br>
@@ -2876,160 +2944,168 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
</blockquote>
</div>
</div>
-<div class="section" title="Create a launch configuration to start the C codegenerator">
-<div class="titlepage">
-<div>
-<div>
-<h2 class="title" style="clear: both">
-<a name="CreatealaunchconfigurationtostarttheCcodegenerator"></a>Create a launch configuration to start the C codegenerator</h2>
-</div>
-</div>
-</div>
-</div>
-<div class="section" title="Generate the code">
-<div class="titlepage">
-<div>
-<div>
-<h2 class="title" style="clear: both">
-<a name="Generatethecode"></a>Generate the code</h2>
-</div>
-</div>
-</div>
-</div>
-<div class="section" title="Setup the include path">
-<div class="titlepage">
-<div>
-<div>
-<h2 class="title" style="clear: both">
-<a name="Setuptheincludepath"></a>Setup the include path</h2>
-</div>
-</div>
-</div>
-</div>
-<div class="section" title="Run the model">
-<div class="titlepage">
-<div>
-<div>
-<h2 class="title" style="clear: both">
-<a name="Runthemodel"></a>Run the model</h2>
-</div>
-</div>
-</div>
-</div>
-<div class="section" title="Summary">
+<div class="section" title="Create a launch configuration to start the C code generator">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
-<a name="Summary4"></a>Summary</h2>
+<a name="CreatealaunchconfigurationtostarttheCcodegenerator"></a>Create a launch configuration to start the C code generator</h2>
</div>
</div>
</div>
-<p>We will implement the Hello World code on the initial transition of the
- <span class="emphasis"><em>HelloWorldTop</em></span> actor. Therefore open the state machine editor by right clicking the
- <span class="emphasis"><em>HelloWorldTop</em></span> actor in the outline view and select
- <span class="emphasis"><em>Edit Behavior</em></span>.
+<p>Other than in Java a launch configuration for the C code generator must be created.</p>
+<p>From the
+ <span class="emphasis"><em>Run</em></span> menu select
+ <span class="emphasis"><em>Run Configurations</em></span>
+
+</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/034-HelloWorldC06.png"></div>
+<p>
+
+</p>
+<p>Within the dialog select
+ <span class="emphasis"><em>eTrice C Generator</em></span> and click the
+ <span class="emphasis"><em>New</em></span> button to create a new launch configuration.
</p>
<p>
</p>
<div class="mediaobject">
-<img src="images/015-HelloWorld03.png"></div>
+<img src="images/034-HelloWorldC07.png"></div>
<p>
</p>
-<p>The state machine editor will be opened. Drag and drop an
- <span class="emphasis"><em>Initial Point</em></span> from the tool box to the diagram into the top level state. Drag and drop a
- <span class="emphasis"><em>State</em></span> from the tool box to the diagram. Confirm the dialogue with
- <span class="emphasis"><em>ok</em></span>. Select the
- <span class="emphasis"><em>Transition</em></span> in the tool box and draw the transition from the
- <span class="emphasis"><em>Initial Point</em></span> to the State. Open the transition dialogue by double clicking the transition arrow and fill in the action code.
+<p>A new configuration should be created. Name it _gen_HelloWorldC_ and add the model via one of the
+ <span class="emphasis"><em>add</em></span> buttons.
</p>
-<div class="literallayout">
<p>
-<code class="code">System.out.println("Hello&nbsp;World&nbsp;!");<br>
-
-</code>
+
+</p>
+<div class="mediaobject">
+<img src="images/034-HelloWorldC08.png"></div>
+<p>
+
+</p>
+<p>In the
+ <span class="emphasis"><em>Refresh</em></span> tab select
+ <span class="emphasis"><em>The entire workspace</em></span>
+
</p>
-</div>
-<p>The result should look like this:</p>
<p>
</p>
<div class="mediaobject">
-<img src="images/015-HelloWorld04.png"></div>
+<img src="images/034-HelloWorldC09.png"></div>
<p>
</p>
-<p>Save the diagram and inspect the model file. Note that the textual representation was created after saving the diagram.</p>
+<p>In the
+ <span class="emphasis"><em>Common</em></span> tab select
+ <span class="emphasis"><em>Shared file</em></span> and add the
+ <span class="emphasis"><em>HelloWorldC</em></span> project via the
+ <span class="emphasis"><em>Browse</em></span> button.
+ </p>
<p>
</p>
<div class="mediaobject">
-<img src="images/015-HelloWorld05.png"></div>
+<img src="images/034-HelloWorldC10.png"></div>
+<p>
+
+</p>
+<p>Apply your changes. The new configuration should now exist in your workspace.</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/034-HelloWorldC11.png"></div>
<p>
</p>
</div>
-<div class="section" title="Build and run the model">
+<div class="section" title="Generate the code">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
-<a name="Buildandrunthemodel2"></a>Build and run the model</h2>
+<a name="Generatethecode"></a>Generate the code</h2>
</div>
</div>
</div>
-<p>Now the model is finished and source code can be generated. The project wizard has created a launch configuration that is responsible for generating the source code. From
- <span class="emphasis"><em>HelloWorld/</em></span> right click
- <span class="bold"><strong>gen_HelloWorld.launch</strong></span> and run it as gen_HelloWorld. All model files in the model directory will be generated.
- </p>
+<p>Now you can generate the code as you know it from Java. Right click to the launch configuration and run it as _gen_HelloWorldC_.</p>
<p>
</p>
<div class="mediaobject">
-<img src="images/015-HelloWorld06.png"></div>
+<img src="images/034-HelloWorldC12.png"></div>
<p>
</p>
-<p>The code will be generated to the src-gen directory. The main function will be contained in
- <span class="bold"><strong>SubSystem_HelloWorldRunner.java</strong></span>. Select this file and run it as Java application.
- </p>
+<p>The code should be generated.</p>
<p>
</p>
<div class="mediaobject">
-<img src="images/015-HelloWorld07.png"></div>
+<img src="images/034-HelloWorldC13.png"></div>
<p>
</p>
-<p>The Hello World application starts and the string will be printed on the console window. To stop the application the user must type
- <span class="emphasis"><em>quit</em></span> in the console window.
+</div>
+<div class="section" title="Setup the include path">
+<div class="titlepage">
+<div>
+<div>
+<h2 class="title" style="clear: both">
+<a name="Setuptheincludepath"></a>Setup the include path</h2>
+</div>
+</div>
+</div>
+<p>Before you can build the application you must setup the include path for the runtime system. Right click the project and select
+ <span class="emphasis"><em>Properties</em></span>. Add the include path as described in
+ <span class="emphasis"><em>setting up the workspace</em></span>.
</p>
<p>
</p>
<div class="mediaobject">
-<img src="images/015-HelloWorld08.png"></div>
+<img src="images/034-HelloWorldC14.png"></div>
+<p>
+
+</p>
+<p>Add the runtime library.</p>
+<p>
+
+</p>
+<div class="mediaobject">
+<img src="images/034-HelloWorldC15.png"></div>
<p>
</p>
+<p>Recognize the name of the library (&bdquo;org.eclipse.etrice.runtime.c&rdquo;). The library file on your disk is &bdquo;liborg.eclipse.etrice.runtime.c.a&rdquo;. </p>
</div>
-<div class="section" title="Open the Message Sequence Chart">
+<div class="section" title="Build and run the model">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
-<a name="OpentheMessageSequenceChart2"></a>Open the Message Sequence Chart</h2>
+<a name="Buildandrunthemodel2"></a>Build and run the model</h2>
</div>
</div>
</div>
-<p>During runtime the application produced a MSC and wrote it to a file. Open HelloWorld/tmp/log/SubSystem_HelloWorld_Async.seq using Trace2UML (it is open source and can be obtained from http://trace2uml.tigris.org/). You should see something like this:</p>
+<p>Now you can build the application. Click the build button to build the application.
+ Run the application as
+ <span class="emphasis"><em>Local C/C++ Application</em></span>.
+ Verify the output.
+ </p>
<p>
</p>
<div class="mediaobject">
-<img src="images/015-HelloWorld09.png"></div>
+<img src="images/034-HelloWorldC16.png"></div>
<p>
</p>
@@ -3039,28 +3115,19 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
<div>
<div>
<h2 class="title" style="clear: both">
-<a name="Summary5"></a>Summary</h2>
-</div>
-</div>
-</div>
-<p>Now you have generated your first eTrice model from scratch. You can switch between diagram editor and model (.room file) and you can see what will be generated during editing and saving the diagram files.
- You should take a look at the generated source files to understand how the state machine is generated and the life cycle of the application. The next tutorials will deal with more complex hierarchies in structure and behavior.</p>
-</div>
-</div>
-<div class="chapter" title="Chapter&nbsp;11.&nbsp;ROOM Concepts">
-<div class="titlepage">
-<div>
-<div>
-<h2 class="title">
-<a name="ROOMConcepts"></a>Chapter&nbsp;11.&nbsp;ROOM Concepts</h2>
+<a name="Summary4"></a>Summary</h2>
</div>
</div>
</div>
+<p>You are now familiar with all necessary steps to create, build and run an eTrice C model from scratch. You are able to create a launch configuration to start the code generator and to perform all necessary settings to compile and link the application. </p>
+<p>The next tutorial provides an exercise to get more familiar with these working steps.
+ h1. ROOM Concepts</p>
<p>This chapter gives an overview over the ROOM language elements and their textual and graphical notation.
- The formal ROOM grammar based on Xtext (EBNF) you can find here:
- <a class="ulink" href="http://git.eclipse.org/c/etrice/org.eclipse.etrice.git/tree/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/Room.xtext" target="_new">ROOM Grammar</a>
-
+ The formal ROOM grammar based on Xtext (EBNF) you can find here:
+ <a class="ulink" href="http://git.eclipse.org/c/etrice/org.eclipse.etrice.git/tree/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/Room.xtext" target="_new">ROOM Grammar</a>
+
</p>
+</div>
<div class="section" title="Actors">
<div class="titlepage">
<div>
@@ -3116,7 +3183,7 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
</div>
</div>
</div>
-<table title="Actor Class Notation" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10A5D">
+<table title="Actor Class Notation" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10AD3">
<tr>
<td align="center">
@@ -3199,7 +3266,7 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
<span class="bold"><strong>Bindings</strong></span> connect Ports inside an ActorClass.
</p>
<p>Example:</p>
-<table title="Actor Class Example" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10AE2">
+<table title="Actor Class Example" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10B58">
<tr>
<td align="center">
@@ -3481,7 +3548,7 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
</li>
</ul>
</div>
-<table title="Class Port Notation" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10BE9">
+<table title="Class Port Notation" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10C5F">
<tr>
<td align="center">
@@ -3679,7 +3746,7 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
</div>
</div>
<p>These symbols can only appear on the border of an ActorReference symbol. Since the type of port is defined in the ActorClass, no textual notation for the Reference Ports exists.</p>
-<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10D21">
+<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10D97">
<tr>
<td align="center">
@@ -3836,7 +3903,7 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
</div>
</div>
</div>
-<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10DE4">
+<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10E5A">
<tr>
<td align="center">
@@ -3967,7 +4034,7 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
</div>
</div>
<p>The simpler flat finite state machines are composed of the following elements:</p>
-<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10E94">
+<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10F0A">
<tr>
<td align="center">
@@ -4081,7 +4148,7 @@ carLights.setState(TrafficLight3.OFF);&nbsp;<br>
</div>
<p>The hierarchical finite state machine adds the notion of a sub state machine nested in a state.
A few modeling elements are added to the set listed above:</p>
-<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10F53">
+<table title="Title" frame="box" border="2" cellpadding="3" cellspacing="0" id="N10FC9">
<tr>
<td align="center">
diff --git a/plugins/org.eclipse.etrice.doc/manual/etrice.pdf b/plugins/org.eclipse.etrice.doc/manual/etrice.pdf
index dafdb71e1..cf466ca86 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 09d2bbf0a..1609ac32c 100644
--- a/plugins/org.eclipse.etrice.doc/toc.xml
+++ b/plugins/org.eclipse.etrice.doc/toc.xml
@@ -68,29 +68,25 @@
</topic>
<topic href="help/SettinguptheWorkspaceC.html" label="Setting up the Workspace ( C )">
<topic href="help/SettinguptheWorkspaceC.html#Testingtheenvironment" label="Testing the environment"></topic>
+<topic href="help/BuildingtheCruntimesystem.html" label="Building the C runtime system"></topic>
</topic>
<topic href="help/TutorialHelloWorldC.html" label="Tutorial HelloWorld ( C )">
<topic href="help/TutorialHelloWorldC.html#Scope5" label="Scope"></topic>
<topic href="help/Createanewmodelfromscratch4.html" label="Create a new model from scratch"></topic>
<topic href="help/CreatetheHelloWorldmodel.html" label="Create the HelloWorld model"></topic>
-<topic href="help/CreatealaunchconfigurationtostarttheCcodegenerator.html" label="Create a launch configuration to start the C codegenerator"></topic>
+<topic href="help/CreatealaunchconfigurationtostarttheCcodegenerator.html" label="Create a launch configuration to start the C code generator"></topic>
<topic href="help/Generatethecode.html" label="Generate the code"></topic>
<topic href="help/Setuptheincludepath.html" label="Setup the include path"></topic>
-<topic href="help/Runthemodel.html" label="Run the model"></topic>
-<topic href="help/Summary4.html" label="Summary"></topic>
<topic href="help/Buildandrunthemodel2.html" label="Build and run the model"></topic>
-<topic href="help/OpentheMessageSequenceChart2.html" label="Open the Message Sequence Chart"></topic>
-<topic href="help/Summary5.html" label="Summary"></topic>
-</topic>
-<topic href="help/ROOMConcepts.html" label="ROOM Concepts">
-<topic href="help/ROOMConcepts.html#Actors" label="Actors">
-<topic href="help/ROOMConcepts.html#Description" label="Description"></topic>
-<topic href="help/ROOMConcepts.html#Motivation" label="Motivation"></topic>
-<topic href="help/ROOMConcepts.html#Notation" label="Notation"></topic>
-<topic href="help/ROOMConcepts.html#Details" label="Details">
-<topic href="help/ROOMConcepts.html#ActorClassesActorReferencesPortsandBindings" label="Actor Classes, Actor References, Ports and Bindings"></topic>
-<topic href="help/ROOMConcepts.html#Attributes" label="Attributes"></topic>
-<topic href="help/ROOMConcepts.html#Operations" label="Operations"></topic>
+<topic href="help/Summary4.html" label="Summary"></topic>
+<topic href="help/Actors.html" label="Actors">
+<topic href="help/Actors.html#Description" label="Description"></topic>
+<topic href="help/Actors.html#Motivation" label="Motivation"></topic>
+<topic href="help/Actors.html#Notation" label="Notation"></topic>
+<topic href="help/Actors.html#Details" label="Details">
+<topic href="help/Actors.html#ActorClassesActorReferencesPortsandBindings" label="Actor Classes, Actor References, Ports and Bindings"></topic>
+<topic href="help/Actors.html#Attributes" label="Attributes"></topic>
+<topic href="help/Actors.html#Operations" label="Operations"></topic>
</topic>
</topic>
<topic href="help/Protocols.html" label="Protocols">

Back to the top