diff options
Diffstat (limited to 'plugins/org.eclipse.etrice.doc/help/Createanewmodelfromscratch.html')
-rw-r--r-- | plugins/org.eclipse.etrice.doc/help/Createanewmodelfromscratch.html | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.doc/help/Createanewmodelfromscratch.html b/plugins/org.eclipse.etrice.doc/help/Createanewmodelfromscratch.html new file mode 100644 index 000000000..624d3596b --- /dev/null +++ b/plugins/org.eclipse.etrice.doc/help/Createanewmodelfromscratch.html @@ -0,0 +1,125 @@ +<html> +<head> +<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Create a new model from scratch</title> +<link href="book.css" rel="stylesheet" type="text/css"> +<meta content="DocBook XSL Stylesheets V1.75.1" name="generator"> +<link rel="home" href="index.html" title="eTrice User Guide"> +<link rel="up" href="TutorialHelloWorldforJava.html" title="Tutorial HelloWorld for Java"> +<link rel="prev" href="TutorialHelloWorldforJava.html" title="Tutorial HelloWorld for Java"> +<link rel="next" href="Createastatemachine.html" title="Create a state machine"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Create a new model from scratch</h1> +<div class="section" title="Create a new model from scratch"> +<div class="titlepage"> +<div> +<div> +<h2 class="title" style="clear: both"> +<a name="Createanewmodelfromscratch"></a>Create a new model from scratch</h2> +</div> +</div> +</div> +<p>The easiest way to create a new eTrice Project is to use the eclipse project wizard. From the eclipse file menu select + <span class="emphasis"><em>File->New->Project</em></span> and create a new eTrice project and name it + <span class="emphasis"><em>HelloWorld</em></span> + +</p> +<p> + +</p> +<div class="mediaobject"> +<img src="images/015-HelloWorld10.png"></div> +<p> + +</p> +<p>The wizard creates everything that is needed to create, build and run an eTrice model. The resulting project should look like this:</p> +<p> + +</p> +<div class="mediaobject"> +<img src="images/015-HelloWorld11.png"></div> +<p> + +</p> +<p>Within the model directory the model file + <span class="emphasis"><em>HelloWorld.room</em></span> was created. Open the + <span class="emphasis"><em>HelloWorld.room</em></span> file and delete the contents of the file. Open the content assist with Ctrl+Space and select + <span class="emphasis"><em>model skeleton</em></span>. + </p> +<p> + +</p> +<div class="mediaobject"> +<img src="images/015-HelloWorld12.png"></div> +<p> + +</p> +<p>Edit the template variables by typing the new names and jumping with Tab from name to name.</p> +<p>The resulting model code should look like this:</p> +<div class="literallayout"> +<p> +<code class="code">RoomModel HelloWorld {<br> + +<br> + LogicalSystem System_HelloWorld {<br> + SubSystemRef subsystem : SubSystem_HelloWorld<br> + }<br> + +<br> + SubSystemClass SubSystem_HelloWorld {<br> + ActorRef application : HelloWorldTop<br> + }<br> + +<br> + ActorClass HelloWorldTop {<br> + }<br> +} <br> + +</code> +</p> +</div> +<div class="blockquote"> +<blockquote class="blockquote"> +<p></p> +</blockquote> +</div> +<p>The goal of eTrice is to describe distributed systems on a logical level. In the current version not all elements will be used. But as prerequisite for further versions the following elements can be defined:</p> +<div class="itemizedlist"> +<ul class="itemizedlist" type="disc"> +<li class="listitem"> +<p>the + <span class="emphasis"><em>LogicalSystem</em></span> (currently optional) + </p> +</li> +<li class="listitem"> +<p>at least one + <span class="emphasis"><em>SubSystemClass</em></span> (mandatory) + </p> +</li> +<li class="listitem"> +<p>at least one + <span class="emphasis"><em>ActorClass</em></span> (mandatory) + </p> +</li> +</ul> +</div> +<p>The + <span class="emphasis"><em>LogicalSystem</em></span> represents the complete distributed system and contains at least one + <span class="emphasis"><em>SubSystemRef</em></span>. The + <span class="emphasis"><em>SubSystemClass</em></span> represents an address space and contains at least one + <span class="emphasis"><em>ActorRef</em></span>. The + <span class="emphasis"><em>ActorClass</em></span> is the building block of which an application will be built of. It is in general a good idea to define a top level actor that can be used as reference within the subsystem. + </p> +<p>The outline view of the textual ROOM editor shows the main modeling elements in an easy to navigate tree.</p> +<p> + +</p> +<div class="mediaobject"> +<img src="images/015-HelloWorld02.png"></div> +<p> + +</p> +</div> +</body> +</html> |