浏览代码

Added description of timer handler interface.

markus.muehlbrandt@itemis.de 13 年之前
父节点
当前提交
48995ce77c

+ 1 - 0
plugins/org.yakindu.sct.doc.user/help/04_C-Code_Generator/01_introduction.textile

@@ -1,4 +1,5 @@
 h1. Yakindu Statechart Generator
 
 h2. Introduction
+
 Within this documentation, we want to create a common view about the Yakindu Statechart Generator and a number of implementation variations.

+ 6 - 10
plugins/org.yakindu.sct.doc.user/help/04_C-Code_Generator/02_execution_model.textile

@@ -1,10 +1,6 @@
-
-h2. Example Scenario
-
-h2. Starting the Workflow
-
-h2. Code Integration into an Existing Project
-
-h2. State Machine Access
-
-h2. Operating System and Drivers for the Example Device
+
+h2. Description of the 'Execution Model' used in YAKINDU statechart environment
+
+The following figure shows the eCore model for the execution model (date 18:10:11):
+
+!../04_C-Code_Generator/images/execution_model.png! 

+ 3 - 0
plugins/org.yakindu.sct.doc.user/help/04_C-Code_Generator/05_multithreading.textile

@@ -0,0 +1,3 @@
+
+h2. Multithreading
+

+ 4 - 5
plugins/org.yakindu.sct.doc.user/help/04_C-Code_Generator/c_code_generator-toc.xml

@@ -2,10 +2,9 @@
 <toc topic="help/04_C-Code_Generator/c_code_generator.html" label="c_code_generator">
 	<topic href="help/04_C-Code_Generator/c_code_generator.html" label="Yakindu Statechart Generator">
 		<topic href="help/04_C-Code_Generator/c_code_generator.html#Introduction" label="Introduction"></topic>
-		<topic href="help/04_C-Code_Generator/c_code_generator.html#ExampleScenario" label="Example Scenario"></topic>
-		<topic href="help/04_C-Code_Generator/c_code_generator.html#StartingtheWorkflow" label="Starting the Workflow"></topic>
-		<topic href="help/04_C-Code_Generator/c_code_generator.html#CodeIntegrationintoanExistingProject" label="Code Integration into an Existing Project"></topic>
-		<topic href="help/04_C-Code_Generator/c_code_generator.html#StateMachineAccess" label="State Machine Access"></topic>
-		<topic href="help/04_C-Code_Generator/c_code_generator.html#OperatingSystemandDriversfortheExampleDevice" label="Operating System and Drivers for the Example Device"></topic>
+		<topic href="help/04_C-Code_Generator/c_code_generator.html#DescriptionoftheExecutionModelusedinYAKINDUstatechartenvironment" label="Description of the 'Execution Model' used in YAKINDU statechart environment">
+			<topic href="help/04_C-Code_Generator/c_code_generator.html#TimerhandlerInterface" label="Timerhandler Interface"></topic>
+		</topic>
+		<topic href="help/04_C-Code_Generator/c_code_generator.html#Multithreading" label="Multithreading"></topic>
 	</topic>
 </toc>

+ 38 - 5
plugins/org.yakindu.sct.doc.user/help/04_C-Code_Generator/c_code_generator.html

@@ -9,10 +9,43 @@
 	<body>
 		<h1 id="YakinduStatechartGenerator">Yakindu Statechart Generator</h1>
 		<h2 id="Introduction">Introduction</h2>
-		<h2 id="ExampleScenario">Example Scenario</h2>
-		<h2 id="StartingtheWorkflow">Starting the Workflow</h2>
-		<h2 id="CodeIntegrationintoanExistingProject">Code Integration into an Existing Project</h2>
-		<h2 id="StateMachineAccess">State Machine Access</h2>
-		<h2 id="OperatingSystemandDriversfortheExampleDevice">Operating System and Drivers for the Example Device</h2>
+		<p>Within this documentation, we want to create a common view about the Yakindu Statechart Generator and a number of implementation variations.</p>
+		<h2 id="DescriptionoftheExecutionModelusedinYAKINDUstatechartenvironment">Description of the &#8218;Execution Model&#8217; used in YAKINDU statechart environment</h2>
+		<p>The following figure shows the eCore model for the execution model (date 18:10:11):</p>
+		<p>
+			<img border="0" src="../04_C-Code_Generator/images/execution_model.png"/> 
+		</p>
+		<h3 id="TimerhandlerInterface">Timerhandler Interface</h3>
+		<p>The mechanism to generate and execute time-dependent events is the task of the specific implementation and not the task of the generated code. In default the code generator assumes that a concrete implementation is available. </p>
+		<p>The Interface should contain following methods:</p>
+		<table>
+			<tr>
+				<td>*</td>
+				<td>
+					<strong>setTimer(event, time, periodic?)</strong>
+				</td>
+			</tr>
+			<tr>
+				<td></td>
+				<td>Defines an event which will be triggered after the specified <Time>. The third parameter should be set if the event has to be periodically triggered. The time should be specified in milliseconds.</td>
+			</tr>
+		</table>
+		<table>
+			<tr>
+				<td>*</td>
+				<td>
+					<strong>resetTimer(event)</strong>
+				</td>
+			</tr>
+			<tr>
+				<td></td>
+				<td>Resets the timer of the event so it is not triggered anymore.</td>
+			</tr>
+		</table>
+		<p>Example:
+			<br/>The C++ code generator generates an abstract base class &#8218;Timer&#8217; which contains the virtual methods &#8218;setTimer(EventID, Time in ms, periodic occurence?)&#8217; and &#8218;resetTimer(event)&#8217;.
+		</p>
+		<p>A concrete implementation has to fill these methods to create an event with the given ID at the end of the assigned time and commit it to the statechart via the event interface. If a State is leaved by another event before the timer event is triggered, the timer event has to be resetted with the 'resetTimer(event) method. The concrete implementation has to ensure that the started timer is stopped.</p>
+		<h2 id="Multithreading">Multithreading</h2>
 	</body>
 </html>

+ 30 - 10
plugins/org.yakindu.sct.doc.user/help/04_C-Code_Generator/c_code_generator.textile

@@ -2,14 +2,34 @@ h1. Yakindu Statechart Generator
 
 h2. Introduction
 
-
-h2. Example Scenario
-
-h2. Starting the Workflow
-
-h2. Code Integration into an Existing Project
-
-h2. State Machine Access
-
-h2. Operating System and Drivers for the Example Device
+Within this documentation, we want to create a common view about the Yakindu Statechart Generator and a number of implementation variations.
+
+h2. Description of the 'Execution Model' used in YAKINDU statechart environment
+
+The following figure shows the eCore model for the execution model (date 18:10:11):
+
+!../04_C-Code_Generator/images/execution_model.png! 
+
+h3. Timerhandler Interface
+
+The mechanism to generate and execute time-dependent events is the task of the specific implementation and not the task of the generated code. In default the code generator assumes that a concrete implementation is available. 
+
+The Interface should contain following methods:
+
+
+|*|*setTimer(event, time, periodic?)*|
+| |Defines an event which will be triggered after the specified <Time>. The third parameter should be set if the event has to be periodically triggered. The time should be specified in milliseconds.|
+
+|*|*resetTimer(event)*|
+| |Resets the timer of the event so it is not triggered anymore.|
+
+Example:
+The C++ code generator generates an abstract base class 'Timer' which contains the virtual methods 'setTimer(EventID, Time in ms, periodic occurence?)' and 'resetTimer(event)'.
+
+A concrete implementation has to fill these methods to create an event with the given ID at the end of the assigned time and commit it to the statechart via the event interface. If a State is leaved by another event before the timer event is triggered, the timer event has to be resetted with the 'resetTimer(event) method. The concrete implementation has to ensure that the started timer is stopped.
+
+
+
+h2. Multithreading
+
 

二进制
plugins/org.yakindu.sct.doc.user/help/04_C-Code_Generator/images/execution_model.png


二进制
plugins/org.yakindu.sct.doc.user/help/04_C-Code_Generator/images/timing_example01.png


二进制
plugins/org.yakindu.sct.doc.user/help/04_C-Code_Generator/images/transition_example01.png


+ 2 - 0
plugins/org.yakindu.sct.doc.user/help/04_C-Code_Generator/index.txt

@@ -1,4 +1,6 @@
 01_introduction.textile
 02_execution_model.textile
+timerhandler_interface.textile
 03_statechart_runtime.textile
 04_statechart_interfaces.textile
+05_multithreading.textile

+ 18 - 0
plugins/org.yakindu.sct.doc.user/help/04_C-Code_Generator/timerhandler_interface.textile

@@ -0,0 +1,18 @@
+
+h3. Timerhandler Interface
+
+The mechanism to generate and execute time-dependent events is the task of the specific implementation and not the task of the generated code. In default the code generator assumes that a concrete implementation is available. 
+
+The Interface should contain following methods:
+
+
+|*|*setTimer(event, time, periodic?)*|
+| |Defines an event which will be triggered after the specified <Time>. The third parameter should be set if the event has to be periodically triggered. The time should be specified in milliseconds.|
+
+|*|*resetTimer(event)*|
+| |Resets the timer of the event so it is not triggered anymore.|
+
+Example:
+The C++ code generator generates an abstract base class 'Timer' which contains the virtual methods 'setTimer(EventID, Time in ms, periodic occurence?)' and 'resetTimer(event)'.
+
+A concrete implementation has to fill these methods to create an event with the given ID at the end of the assigned time and commit it to the statechart via the event interface. If a State is leaved by another event before the timer event is triggered, the timer event has to be resetted with the 'resetTimer(event) method. The concrete implementation has to ensure that the started timer is stopped.