|
@@ -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 ‚Execution Model’ 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 ‚Timer’ which contains the virtual methods ‚setTimer(EventID, Time in ms, periodic occurence?)’ and ‚resetTimer(event)’.
|
|
|
+ </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>
|