<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://sinelabore.com/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>SinelaboreRT - wiki:landing_pages</title>
        <description>Productivity for embedded software development</description>
        <link>https://sinelabore.com/</link>
        <lastBuildDate>Tue, 07 Apr 2026 22:19:21 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://sinelabore.com/lib/exe/fetch.php/favicon.ico</url>
            <title>SinelaboreRT</title>
            <link>https://sinelabore.com/</link>
        </image>
        <item>
            <title>Cadifra Video Tutorial</title>
            <link>https://sinelabore.com/doku.php/wiki/landing_pages/cadifra</link>
            <description>


&lt;h1 class=&quot;sectionedit1&quot; id=&quot;cadifra_video_tutorial&quot;&gt;Cadifra Video Tutorial&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Cadifra Video Tutorial&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;cadifra_video_tutorial&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;14-50&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;part_i&quot;&gt;Part I&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
In this video we show how easy it is to use the sinelabore&lt;em&gt;RT&lt;/em&gt; code generator in combination with the Cadifra &lt;abbr title=&quot;Unified Modeling Language&quot;&gt;UML&lt;/abbr&gt; editor. We create a small state diagram. The diagram is then converted into C-code using the code generator.
All development steps are shown.
&lt;/p&gt;

&lt;p&gt;
Then a basic main.c file is used to send events to the state machine and execute it.
&lt;/p&gt;

&lt;p&gt;
To follow the tutorial on your own download the demo version of sinelabore&lt;em&gt;RT&lt;/em&gt; and the Cadifra &lt;abbr title=&quot;Unified Modeling Language&quot;&gt;UML&lt;/abbr&gt; Editor from the download page. A C-compiler is needed (e.g. gcc) too to compile the C-code.
&lt;/p&gt;
&lt;iframe src=&quot;//www.youtube-nocookie.com/embed/zfFKAp-FvHA?&quot; width=&quot;425&quot; height=&quot;239&quot; style=&quot;width:425px;height:239px;&quot; class=&quot;vshare vshare__center&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot; data-domain=&quot;www.youtube-nocookie.com&quot; loading=&quot;lazy&quot;&gt;&lt;h3&gt;&lt;/h3&gt;&lt;/iframe&gt;
&lt;p&gt;
(5:17min)
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Part I&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;part_i&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;51-935&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;part_ii&quot;&gt;Part II&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
In the second part of the video tutorial we extend the first example. S1 is changed into a composite state (i.e. a state with children). Two child states and several transitions are added too.
&lt;/p&gt;
&lt;iframe src=&quot;//www.youtube-nocookie.com/embed/wbWJTUeSun0?&quot; width=&quot;425&quot; height=&quot;239&quot; style=&quot;width:425px;height:239px;&quot; class=&quot;vshare vshare__center&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot; data-domain=&quot;www.youtube-nocookie.com&quot; loading=&quot;lazy&quot;&gt;&lt;h3&gt;&lt;/h3&gt;&lt;/iframe&gt;
&lt;p&gt;
(5:40min)
&lt;/p&gt;

&lt;p&gt;
Then the state machine C-code is generated again using the code generator. In the next step the main.c file is extended to send one of the new events to the machine.
&lt;/p&gt;

&lt;p&gt;
Finally it is shown how to generate testcases from the state diagram. The automatically generated test cases provide a good basis for testing the state diagram.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://www.cadifra.com/&quot; class=&quot;urlextern&quot; title=&quot;http://www.cadifra.com/&quot; rel=&quot;ugc nofollow&quot;&gt;Cadifra&lt;/a&gt; is a fast and lightweight &lt;abbr title=&quot;Unified Modeling Language&quot;&gt;UML&lt;/abbr&gt; Diagram Editor for Windows. It supports the following kinds of &lt;abbr title=&quot;Unified Modeling Language&quot;&gt;UML&lt;/abbr&gt; diagrams: Class, Object, Sequence, State and Use Case. Each diagram is stored in an own file. The Sinelabore&lt;em&gt;RT&lt;/em&gt; codegen directly uses the state diagram model file. The state diagram editor is very good for designs with few hierarchy levels.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Part II&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;part_ii&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;936-&amp;quot;} --&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 03 May 2024 20:41:08 +0000</pubDate>
        </item>
        <item>
            <title>Generate production quality code from state diagrams created with Enterprise Architect</title>
            <link>https://sinelabore.com/doku.php/wiki/landing_pages/ea</link>
            <description>


&lt;h1 class=&quot;sectionedit1&quot; id=&quot;generate_production_quality_code_from_state_diagrams_created_with_enterprise_architect&quot;&gt;Generate production quality code from state diagrams created with Enterprise Architect&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
Sinelabore&lt;em&gt;RT&lt;/em&gt; generates readable and maintainable code from hierarchical &lt;abbr title=&quot;Unified Modeling Language&quot;&gt;UML&lt;/abbr&gt; state machines. With its unique features and the C code generator the tool covers well the requirements of embedded real-time and low power application developers. With its C++, Python and Java  backend it is also a perfect tool for developers of server or desktop applications.
&lt;/p&gt;

&lt;p&gt;
Key Features:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Automated robustness checks before code generation&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; No run-time environment needed &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Can be used with any CPU and with or without &lt;abbr title=&quot;Operating System&quot;&gt;OS&lt;/abbr&gt;/&lt;abbr title=&quot;Real-Time Operating System&quot;&gt;RTOS&lt;/abbr&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Code generation especially for embedded real-time and high availability systems.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Fits well in different system designs (foreground/background, &lt;abbr title=&quot;Real-Time Operating System&quot;&gt;RTOS&lt;/abbr&gt;-based …)&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; No gap between design and code&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Support for automatic test-case generation&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Simulation in interactive or batch mode.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Optionally generating trace code&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Generated code creates no trouble when using static code checkers&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Generate production quality code from state diagrams created with Enterprise Architect&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;generate_production_quality_code_from_state_diagrams_created_with_enterprise_architect&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;23-1047&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit2&quot; id=&quot;watch_the_code_generator_in_action&quot;&gt;Watch the code generator in action&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
The following example shows how the code generator works by means of a simple microwave oven. 
&lt;/p&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/ea_landing_image_microwave_oven.png&quot; class=&quot;mediacenter&quot; loading=&quot;lazy&quot; title=&quot;microwave oven with requirements&quot; alt=&quot;microwave oven with requirements&quot; /&gt;
&lt;/p&gt;

&lt;p&gt;
Requirements:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Cooking time can be adjusted from 0s and 60s.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Cooking starts if the cooking time is &amp;gt; 0s and the door is closed. &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; If the door is opened during cooking the microwave generator is switched off. The cooking time stops.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Cooking continuous if the cooking time is not over and the door is closed again &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Cooking stops if the cooking time is over or the time is adjusted to zero. &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Cooking time and power can be changed at any time.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
The sate machine below shows a possible solution. 
&lt;/p&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/ea_landing_oven_sc.png&quot; class=&quot;mediacenter&quot; loading=&quot;lazy&quot; title=&quot;State machine of a simple microwave oven&quot; alt=&quot;State machine of a simple microwave oven&quot; /&gt;
&lt;/p&gt;

&lt;p&gt;
To generate for example C code just export your model to XMI and call the code generator as follows:
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;java&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-jar&lt;/span&gt; codegen.jar &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; EA &lt;span class=&quot;re5&quot;&gt;-t&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Model:Class Model:first_example_step3&amp;quot;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-o&lt;/span&gt; oven first_example_step3.xml&lt;/pre&gt;

&lt;p&gt;
After checking the model against a set of well-formedness rules (e.g. no double state names) the complete state machine code is generated.
&lt;/p&gt;

&lt;p&gt;
Done!
&lt;/p&gt;

&lt;p&gt;
Look into the generated files:
&lt;a href=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/src_ea/oven.c&quot; class=&quot;media mediafile mf_c&quot; title=&quot;wiki:landing_pages:src_ea:oven.c (6.8 KB)&quot;&gt;oven.c&lt;/a&gt;
&lt;a href=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/src_ea/oven.h&quot; class=&quot;media mediafile mf_h&quot; title=&quot;wiki:landing_pages:src_ea:oven.h (2.9 KB)&quot;&gt;oven.h&lt;/a&gt;
&lt;a href=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/src_ea/oven_ext.h&quot; class=&quot;media mediafile mf_h&quot; title=&quot;wiki:landing_pages:src_ea:oven_ext.h (664 B)&quot;&gt;oven_ext.h&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
In the examples folder you will find the complete code ready to be tested and expanded by you.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Watch the code generator in action&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;watch_the_code_generator_in_action&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;1048-2530&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit3&quot; id=&quot;supported_state_machine_elements&quot;&gt;Supported State Machine Elements&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
The code-generator supports a subset of the design elements provided by Enterprise Architect. The supported elements are:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Hierarchical states&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; (Signal-)Events with event name, guard and action – Initial and final pseudo-states&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; History states (deep, flat)&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Choices&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Junctions&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Constraints&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Sub-machine states on various levels&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Entry and exit pseudo-states&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Regions on various levels&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Supported State Machine Elements&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;supported_state_machine_elements&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;2531-2988&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit4&quot; id=&quot;find_out_more_about_the_code_generator&quot;&gt;Find out more about the code generator&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; How sinelabore supports &lt;a href=&quot;https://sinelabore.com/doku.php/wiki/toolbox/model-based_testing_of_state_machines_i&quot; class=&quot;wikilink1&quot; title=&quot;wiki:toolbox:model-based_testing_of_state_machines_i&quot; data-wiki-id=&quot;wiki:toolbox:model-based_testing_of_state_machines_i&quot;&gt;model based testing&lt;/a&gt; of state diagrams&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; How to &lt;a href=&quot;https://sinelabore.com/doku.php/wiki/toolbox/model-based_testing_of_state_machines_ii&quot; class=&quot;wikilink1&quot; title=&quot;wiki:toolbox:model-based_testing_of_state_machines_ii&quot; data-wiki-id=&quot;wiki:toolbox:model-based_testing_of_state_machines_ii&quot;&gt;interactively simulate&lt;/a&gt; your state diagram and generating trace code&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Read section “Drawing State-Charts with Enterprise Architect” in the &lt;a href=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/downloads/sinelaborert.pdf&quot; class=&quot;media mediafile mf_pdf&quot; title=&quot;wiki:downloads:sinelaborert.pdf (6.9 MB)&quot;&gt;manual&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; How easy it is to add attributes and operations to the stateful class like shown below. Operations are mapped to C-functions. Attributes to members of the instance data of the state machine. This allows to add entry/exit code functions or other helper functions. Even the body code can be easily added with EA if you want. Presently attributes and operations are only generated in the C-backend.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
&lt;a href=&quot;https://sinelabore.com/lib/exe/detail.php/wiki/landing_pages/src_ea/ea_adding_features_to_class.jpg?id=wiki%3Alanding_pages%3Aea&quot; class=&quot;media&quot; title=&quot;wiki:landing_pages:src_ea:ea_adding_features_to_class.jpg&quot;&gt;&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/src_ea/ea_adding_features_to_class.jpg&quot; class=&quot;mediacenter&quot; loading=&quot;lazy&quot; title=&quot;Classes have attributes and operations&quot; alt=&quot;Classes have attributes and operations&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://sinelabore.com/doku.php/wiki/download&quot; class=&quot;wikilink1&quot; title=&quot;wiki:download&quot; data-wiki-id=&quot;wiki:download&quot;&gt;Download&lt;/a&gt; the demo version and try it right now. It includes many other examples.
&lt;/p&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;plugin_wrap_start&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;0-&amp;quot;} --&gt;&lt;div class=&quot;wrap_center wrap_round wrap_info plugin_wrap&quot; style=&quot;width: 60%;&quot;&gt;
&lt;p&gt;
Read the &lt;a href=&quot;https://sinelabore.com/doku.php/wiki/howto/enterprise_architect_how-to&quot; class=&quot;wikilink1&quot; title=&quot;wiki:howto:enterprise_architect_how-to&quot; data-wiki-id=&quot;wiki:howto:enterprise_architect_how-to&quot;&gt;EA Howto&lt;/a&gt; for tips and tricks
&lt;/p&gt;
&lt;/div&gt;&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;plugin_wrap_end&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;secid&amp;quot;:6,&amp;quot;range&amp;quot;:&amp;quot;0-&amp;quot;} --&gt;
&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Find out more about the code generator&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;find_out_more_about_the_code_generator&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;2989-&amp;quot;} --&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 04 Aug 2024 12:16:39 +0000</pubDate>
        </item>
        <item>
            <title>Generate production quality code from state diagrams created with Magic Draw</title>
            <link>https://sinelabore.com/doku.php/wiki/landing_pages/md</link>
            <description>


&lt;h1 class=&quot;sectionedit1&quot; id=&quot;generate_production_quality_code_from_state_diagrams_created_with_magic_draw&quot;&gt;Generate production quality code from state diagrams created with Magic Draw&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
Sinelabore&lt;em&gt;RT&lt;/em&gt; generates readable and maintainable code from hierarchical &lt;abbr title=&quot;Unified Modeling Language&quot;&gt;UML&lt;/abbr&gt; state machines. With its unique features and the C code generator the tool covers well the requirements of embedded real-time and low power application developers. With its C++, Python and Java  backend it is also a perfect tool for developers of server or desktop applications.
&lt;/p&gt;

&lt;p&gt;
Key Features:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Automated robustness checks before code generation&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; No run-time environment needed &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Can be used with any CPU and with or without &lt;abbr title=&quot;Operating System&quot;&gt;OS&lt;/abbr&gt;/&lt;abbr title=&quot;Real-Time Operating System&quot;&gt;RTOS&lt;/abbr&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Code generation especially for embedded real-time and high availability systems.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Fits well in different system designs (foreground/background, &lt;abbr title=&quot;Real-Time Operating System&quot;&gt;RTOS&lt;/abbr&gt;-based …)&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; No gap between design and code&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Support for automatic test-case generation&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Simulation in interactive or batch mode.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Optionally generating trace code&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Generated code creates no trouble when using static code checkers&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Generate production quality code from state diagrams created with Magic Draw&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;generate_production_quality_code_from_state_diagrams_created_with_magic_draw&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;23-1037&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit2&quot; id=&quot;watch_the_code_generator_in_action&quot;&gt;Watch the code generator in action&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
The following example shows how the code generator works by means of a simple microwave oven. 
&lt;/p&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/ea_landing_image_microwave_oven.png&quot; class=&quot;mediacenter&quot; loading=&quot;lazy&quot; title=&quot;microwave oven with requirements&quot; alt=&quot;microwave oven with requirements&quot; /&gt;
&lt;/p&gt;

&lt;p&gt;
Requirements:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Cooking time can be adjusted from 0s and 60s.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Cooking starts if the cooking time is &amp;gt; 0s and the door is closed. &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; If the door is opened during cooking the microwave generator is switched off. The cooking time stops.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Cooking continuous if the cooking time is not over and the door is closed again &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Cooking stops if the cooking time is over or the time is adjusted to zero. &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Cooking time and power can be changed at any time.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
The sate machine and the class diagram below shows a possible solution. 
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/statemachine_md.png&quot; class=&quot;media&quot; title=&quot;wiki:landing_pages:statemachine_md.png&quot;&gt;&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/statemachine_md.png?w=600&amp;amp;tok=1fe2c0&quot; class=&quot;mediacenter&quot; loading=&quot;lazy&quot; title=&quot;State machine of a simple microwave oven&quot; alt=&quot;State machine of a simple microwave oven&quot; width=&quot;600&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/class_diagram_md.png&quot; class=&quot;media&quot; title=&quot;wiki:landing_pages:class_diagram_md.png&quot;&gt;&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/class_diagram_md.png?w=600&amp;amp;tok=23af86&quot; class=&quot;mediacenter&quot; loading=&quot;lazy&quot; title=&quot; Class that contains the state machine&quot; alt=&quot; Class that contains the state machine&quot; width=&quot;600&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
To generate for example C code call the code generator as follows:
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;java&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-cp&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;../../bin/*&amp;quot;&lt;/span&gt; codegen.Main-l cx &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; md &lt;span class=&quot;re5&quot;&gt;-t&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Model:oven_package:oven&amp;quot;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-o&lt;/span&gt; oven oven.xmi.xml&lt;/pre&gt;

&lt;p&gt;
After checking the model against a set of well-formedness rules (e.g. no double state names) the complete state machine code is generated.
&lt;/p&gt;

&lt;p&gt;
Done!
&lt;/p&gt;

&lt;p&gt;
Look into the generated files:
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/src_md/oven.c&quot; class=&quot;media mediafile mf_c&quot; title=&quot;wiki:landing_pages:src_md:oven.c (6.8 KB)&quot;&gt;oven.c&lt;/a&gt;
&lt;a href=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/src_md/oven.h&quot; class=&quot;media mediafile mf_h&quot; title=&quot;wiki:landing_pages:src_md:oven.h (3.6 KB)&quot;&gt;oven.h&lt;/a&gt;
&lt;a href=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/src_md/oven_ext.h&quot; class=&quot;media mediafile mf_h&quot; title=&quot;wiki:landing_pages:src_md:oven_ext.h (734 B)&quot;&gt;oven_ext.h&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
In the examples folder you will find the complete code ready to be tested and expanded by you.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Watch the code generator in action&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;watch_the_code_generator_in_action&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;1038-2600&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit3&quot; id=&quot;supported_state_machine_elements&quot;&gt;Supported State Machine Elements&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
The code-generator supports a relevant subset of the design elements provided by Magic Draw. The supported elements are:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Hierarchical states&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; (Signal-)Events with event name, guard and action &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Initial and final pseudo-states&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; History states (deep, flat)&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Choices&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Junctions&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Constraints&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Supported State Machine Elements&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;supported_state_machine_elements&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;2601-2954&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit4&quot; id=&quot;find_out_more_about_the_code_generator&quot;&gt;Find out more about the code generator&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; How sinelabore supports &lt;a href=&quot;https://sinelabore.com/doku.php/wiki/toolbox/model-based_testing_of_state_machines_i&quot; class=&quot;wikilink1&quot; title=&quot;wiki:toolbox:model-based_testing_of_state_machines_i&quot; data-wiki-id=&quot;wiki:toolbox:model-based_testing_of_state_machines_i&quot;&gt;model based testing&lt;/a&gt; of state diagrams&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; How to &lt;a href=&quot;https://sinelabore.com/doku.php/wiki/toolbox/model-based_testing_of_state_machines_ii&quot; class=&quot;wikilink1&quot; title=&quot;wiki:toolbox:model-based_testing_of_state_machines_ii&quot; data-wiki-id=&quot;wiki:toolbox:model-based_testing_of_state_machines_ii&quot;&gt;interactively simulate&lt;/a&gt; your state diagram and generating trace code&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Read section “Drawing State-Charts with Magic Draw” in the &lt;a href=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/downloads/sinelaborert.pdf&quot; class=&quot;media mediafile mf_pdf&quot; title=&quot;wiki:downloads:sinelaborert.pdf (6.9 MB)&quot;&gt;manual&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; How easy it is to add attributes and operations to the stateful class like shown below. Operations are mapped to C-functions. Attributes to members of the instance data of the state machine. This allows to add entry/exit code functions or other helper functions. Even the body code can be easily added with EA if you want. Presently attributes and operations are only generated in the C-backend.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
&lt;a href=&quot;https://sinelabore.com/doku.php/wiki/download&quot; class=&quot;wikilink1&quot; title=&quot;wiki:download&quot; data-wiki-id=&quot;wiki:download&quot;&gt;Download&lt;/a&gt; the demo version and try it right now. It includes many other examples.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Find out more about the code generator&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;find_out_more_about_the_code_generator&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;2955-3872&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit5&quot; id=&quot;magic_draw_howto&quot;&gt;Magic Draw HowTo&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/images/smileys/question.svg&quot; class=&quot;icon smiley&quot; alt=&quot;:?:&quot; /&gt;&lt;strong&gt;I don&amp;#039;t see the on-entry/on-exit/do code in my state diagram &lt;/strong&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/images/smileys/exclaim.svg&quot; class=&quot;icon smiley&quot; alt=&quot;:!:&quot; /&gt; Since MD version 19 (at least recognised it there) it is necessary to copy your code to the body text. See example below:
&lt;a href=&quot;https://sinelabore.com/lib/exe/detail.php/wiki/howto/md_19_hint1.png?id=wiki%3Alanding_pages%3Amd&quot; class=&quot;media&quot; title=&quot;wiki:howto:md_19_hint1.png&quot;&gt;&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/howto/md_19_hint1.png&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;Specification of action code for a state&quot; alt=&quot;Specification of action code for a state&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/images/smileys/question.svg&quot; class=&quot;icon smiley&quot; alt=&quot;:?:&quot; /&gt;&lt;strong&gt;Is it necessary to specify an action name for on-entry/on-exit/do code?&lt;/strong&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/images/smileys/exclaim.svg&quot; class=&quot;icon smiley&quot; alt=&quot;:!:&quot; /&gt; If there is text in the name fieled (as shown above) it will be considered for code generation. If the name field is left empty the body part is used for code generation. The body text can be longer than one line. An example is shown below.
&lt;a href=&quot;https://sinelabore.com/lib/exe/detail.php/wiki/howto/md_long_actions.png?id=wiki%3Alanding_pages%3Amd&quot; class=&quot;media&quot; title=&quot;wiki:howto:md_long_actions.png&quot;&gt;&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/howto/md_long_actions.png?w=300&amp;amp;tok=b77dab&quot; class=&quot;medialeft&quot; align=&quot;left&quot; loading=&quot;lazy&quot; title=&quot;Either specify code in the name filed or the body field.&quot; alt=&quot;Either specify code in the name filed or the body field.&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Magic Draw HowTo&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;magic_draw_howto&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;3873-&amp;quot;} --&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 03 May 2024 20:40:21 +0000</pubDate>
        </item>
        <item>
            <title>Generate production quality code from state diagrams created with Modelio</title>
            <link>https://sinelabore.com/doku.php/wiki/landing_pages/modelio</link>
            <description>


&lt;h1 class=&quot;sectionedit1&quot; id=&quot;generate_production_quality_code_from_state_diagrams_created_with_modelio&quot;&gt;Generate production quality code from state diagrams created with Modelio&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/logo_modeliosoft_4.png&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; alt=&quot;&quot; /&gt;
Sinelabore&lt;em&gt;RT&lt;/em&gt; generates readable and maintainable code from hierarchical &lt;abbr title=&quot;Unified Modeling Language&quot;&gt;UML&lt;/abbr&gt; state machines created with &lt;a href=&quot;http://wwww.modeliosoft.com&quot; class=&quot;urlextern&quot; title=&quot;http://wwww.modeliosoft.com&quot; rel=&quot;ugc nofollow&quot;&gt;Modelio&lt;/a&gt;. With its unique features the tool covers well the requirements of embedded real-time and low power application developers. 
With its new C++ and Java  backend it is also a perfect tool for developers of server or desktop applications.
&lt;/p&gt;

&lt;p&gt;
Key Features:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Automated robustness checks before code generation&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; No run-time environment needed &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Can be used with any CPU and with or without &lt;abbr title=&quot;Operating System&quot;&gt;OS&lt;/abbr&gt;/&lt;abbr title=&quot;Real-Time Operating System&quot;&gt;RTOS&lt;/abbr&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Code generation especially for embedded real-time and high availability systems.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Fits well in different system designs (foreground/background, &lt;abbr title=&quot;Real-Time Operating System&quot;&gt;RTOS&lt;/abbr&gt;-based …)&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; No gap between design and code&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Support for automatic test-case generation&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Simulation in interactive or batch mode.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Optionally generating trace code&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Generated code creates no trouble when using static code checkers&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Generate production quality code from state diagrams created with Modelio&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;generate_production_quality_code_from_state_diagrams_created_with_modelio&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;23-1115&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit2&quot; id=&quot;watch_the_code_generator_in_action&quot;&gt;Watch the code generator in action&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
The following example shows how the code generator works by means of a simple microwave oven. 
&lt;/p&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/ea_landing_image_microwave_oven.png&quot; class=&quot;mediacenter&quot; loading=&quot;lazy&quot; alt=&quot;&quot; /&gt;
&lt;/p&gt;

&lt;p&gt;
Requirements:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Cooking time can be adjusted from 0s and 60s.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Cooking starts if the cooking time is &amp;gt; 0s and the door is closed. &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; If the door is opened during cooking the microwave generator is switched off. The cooking time stops.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Cooking continuous if the cooking time is not over and the door is closed again &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Cooking stops if the cooking time is over or the time is adjusted to zero. &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Cooking time and power can be changed at any time.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
The sate machine below shows a possible solution. 
&lt;/p&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/modelio_landing_oven_model.png&quot; class=&quot;mediacenter&quot; loading=&quot;lazy&quot; alt=&quot;&quot; /&gt;
&lt;/p&gt;

&lt;p&gt;
To generate for example C code just export your model to XMI and call the code generator as follows:
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;java&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-jar&lt;/span&gt; codegen.jar &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; Modelio &lt;span class=&quot;re5&quot;&gt;-t&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Model:Class Model:first_example_step3&amp;quot;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-o&lt;/span&gt; oven first_example_step3.xml&lt;/pre&gt;

&lt;p&gt;
After checking the model against a set of well-formedness rules (e.g. no double state names) the complete state machine code is generated.
&lt;/p&gt;

&lt;p&gt;
Done!
&lt;/p&gt;

&lt;p&gt;
Look into the generated files:
&lt;a href=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/src_modelio/oven.c&quot; class=&quot;media mediafile mf_c&quot; title=&quot;wiki:landing_pages:src_modelio:oven.c (5.7 KB)&quot;&gt;oven.c&lt;/a&gt;
&lt;a href=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/src_modelio/oven.h&quot; class=&quot;media mediafile mf_h&quot; title=&quot;wiki:landing_pages:src_modelio:oven.h (3 KB)&quot;&gt;oven.h&lt;/a&gt;
&lt;a href=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/src_modelio/oven_ext.h&quot; class=&quot;media mediafile mf_h&quot; title=&quot;wiki:landing_pages:src_modelio:oven_ext.h (699 B)&quot;&gt;oven_ext.h&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
It is also possible to generate code from activity diagrams. As an example the &lt;code&gt;selftest()&lt;/code&gt; function was modeled as activity diagram. It shows the supported node types and has no other function.
&lt;/p&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/modelio_landing_oven_activity.png&quot; class=&quot;media&quot; loading=&quot;lazy&quot; alt=&quot;&quot; /&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Watch the code generator in action&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;watch_the_code_generator_in_action&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;1116-2727&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;more_complex_examples_to_generate_code_from&quot;&gt;More complex examples to generate code from&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/news/and_states_modelio.png&quot; class=&quot;mediacenter&quot; loading=&quot;lazy&quot; alt=&quot;&quot; /&gt;
Model with parallel regions.
&lt;/p&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/news/sub_machine_top_modelio.png&quot; class=&quot;mediacenter&quot; loading=&quot;lazy&quot; alt=&quot;&quot; /&gt;
Model with a sub-machine in state S2.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;More complex examples to generate code from&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;more_complex_examples_to_generate_code_from&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;2728-2954&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit4&quot; id=&quot;supported_state_diagram_features&quot;&gt;Supported state diagram features&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Hierarchical states&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Regions (CX language backend only)&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Sub-machines in a top level state&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; (Signal-)Events with event name, guard and action&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Initial and final pseudo-states&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; History states&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Choices&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Find out more about the code generator
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; How sinelabore supports &lt;a href=&quot;https://sinelabore.com/doku.php/wiki/toolbox/model-based_testing_of_state_machines_i&quot; class=&quot;wikilink1&quot; title=&quot;wiki:toolbox:model-based_testing_of_state_machines_i&quot; data-wiki-id=&quot;wiki:toolbox:model-based_testing_of_state_machines_i&quot;&gt;model based testing&lt;/a&gt; of state diagrams&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; How to &lt;a href=&quot;https://sinelabore.com/doku.php/wiki/toolbox/model-based_testing_of_state_machines_ii&quot; class=&quot;wikilink1&quot; title=&quot;wiki:toolbox:model-based_testing_of_state_machines_ii&quot; data-wiki-id=&quot;wiki:toolbox:model-based_testing_of_state_machines_ii&quot;&gt;interactively simulate&lt;/a&gt; your state diagram and generating trace code&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
&lt;a href=&quot;https://sinelabore.com/doku.php/wiki/download&quot; class=&quot;wikilink1&quot; title=&quot;wiki:download&quot; data-wiki-id=&quot;wiki:download&quot;&gt;Download&lt;/a&gt; the demo version and try it right now. It includes many other examples.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Supported state diagram features&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;supported_state_diagram_features&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;2955-3625&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit5&quot; id=&quot;modelio_howto&quot;&gt;Modelio HowTo&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/images/smileys/question.svg&quot; class=&quot;icon smiley&quot; alt=&quot;:?:&quot; /&gt;&lt;strong&gt;What options should I use for exporting a XMI file in Modelio 3&lt;/strong&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/images/smileys/exclaim.svg&quot; class=&quot;icon smiley&quot; alt=&quot;:!:&quot; /&gt; Select the following options:
&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/howto/modelio_xmi_export_2.png&quot; class=&quot;media&quot; loading=&quot;lazy&quot; alt=&quot;&quot; /&gt;
&lt;/p&gt;
&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;https://sinelabore.com/doku.php/tag/modelio?do=showtag&amp;amp;tag=%5BModelio%5D&quot; class=&quot;wikilink1&quot; title=&quot;tag:modelio&quot; rel=&quot;tag&quot;&gt;[Modelio]&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Modelio HowTo&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;modelio_howto&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;3626-&amp;quot;} --&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 03 May 2024 20:40:31 +0000</pubDate>
        </item>
        <item>
            <title>Generate production quality code from state diagrams created with Eclipse Papyrus™</title>
            <link>https://sinelabore.com/doku.php/wiki/landing_pages/papyrus</link>
            <description>


&lt;h1 class=&quot;sectionedit1&quot; id=&quot;generate_production_quality_code_from_state_diagrams_created_with_eclipse_papyrus&quot;&gt;Generate production quality code from state diagrams created with Eclipse Papyrus™&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;https://sinelabore.com/lib/exe/detail.php/wiki/landing_pages/apapyrusstatemachine.jpg?id=wiki%3Alanding_pages%3Apapyrus&quot; class=&quot;media&quot; title=&quot;wiki:landing_pages:apapyrusstatemachine.jpg&quot;&gt;&lt;img src=&quot;https://sinelabore.com/lib/exe/fetch.php/wiki/landing_pages/apapyrusstatemachine.jpg?w=600&amp;amp;tok=97846d&quot; class=&quot;media&quot; loading=&quot;lazy&quot; alt=&quot;&quot; width=&quot;600&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
Sinelabore&lt;em&gt;RT&lt;/em&gt; generates readable and maintainable code from hierarchical &lt;abbr title=&quot;Unified Modeling Language&quot;&gt;UML&lt;/abbr&gt; state machines created with &lt;a href=&quot;https://www.eclipse.org/papyrus/&quot; class=&quot;urlextern&quot; title=&quot;https://www.eclipse.org/papyrus/&quot; rel=&quot;ugc nofollow&quot;&gt;Eclipse Papyrus™&lt;/a&gt;. With its unique features Sinelabore&lt;em&gt;RT&lt;/em&gt; covers well the requirements of embedded real-time and low power application developers. 
With its other language backends it is also a perfect tool for developers of server or desktop applications.
&lt;/p&gt;

&lt;p&gt;
Key Features:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Automated robustness checks before code generation&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; No run-time environment needed &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Can be used with any CPU and with or without &lt;abbr title=&quot;Operating System&quot;&gt;OS&lt;/abbr&gt;/&lt;abbr title=&quot;Real-Time Operating System&quot;&gt;RTOS&lt;/abbr&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Code generation especially for embedded real-time and high availability systems.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Fits well in different system designs (foreground/background, &lt;abbr title=&quot;Real-Time Operating System&quot;&gt;RTOS&lt;/abbr&gt;-based …)&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; No gap between design and code&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Support for automatic test-case generation&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Simulation in interactive or batch mode.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Optionally generating trace code&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Generated code creates no trouble when using static code checkers&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Generate production quality code from state diagrams created with Eclipse Papyrus\u2122&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;generate_production_quality_code_from_state_diagrams_created_with_eclipse_papyrus&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;23-1149&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit2&quot; id=&quot;supported_state_machine_elements&quot;&gt;Supported State Machine Elements&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
The code-generator supports a subset of the design elements provided by Eclipse Papyrus. The supported elements are:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Hierarchical states&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; (Signal-)Events with event name, guard and action – Initial and final pseudo-states&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; History states (deep, flat)&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Choices&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Junctions&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Constraints&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Regions &lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
In addition methods defined in the class are added to the generated state machine header. And attributes are added to the state machine instance data. 
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Supported State Machine Elements&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;supported_state_machine_elements&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;1150-1665&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit3&quot; id=&quot;how_to_get_started&quot;&gt;How to get started ?&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Watch &lt;a href=&quot;https://youtu.be/F6vUxv-z-os&quot; class=&quot;urlextern&quot; title=&quot;https://youtu.be/F6vUxv-z-os&quot; rel=&quot;ugc nofollow&quot;&gt;this Youtube video&lt;/a&gt; to get a QuickStart in generating C-code from Eclipse Papyrus™ state machine diagrams.
&lt;/p&gt;

&lt;p&gt;
Download the code generator and use the Papyrus microwave example in the examples folder.
It shows a fully functional example of a microwave simulation in C. Make changes in the model, re-create the state machine code and then compile/run the example again. This is the fastest way to learn how to use the code generator.
&lt;/p&gt;
&lt;hr /&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;How to get started ?&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;how_to_get_started&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;1666-2174&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit4&quot; id=&quot;how_to&quot;&gt;How to&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/images/smileys/question.svg&quot; class=&quot;icon smiley&quot; alt=&quot;:?:&quot; /&gt; &lt;strong&gt; Opaque Behaviour is not shown in the state diagram inside the states &lt;/strong&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/images/smileys/exclaim.svg&quot; class=&quot;icon smiley&quot; alt=&quot;:!:&quot; /&gt; Check in “Preferences → Papyrus → Diagrams → PapyrusUMLStateMachineDiagram Diagram → Transition and behaviour options” that &lt;code&gt;Show number of lines for opaque expressions/behaviour&lt;/code&gt; has a value &amp;gt; 0.
&lt;/p&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/images/smileys/question.svg&quot; class=&quot;icon smiley&quot; alt=&quot;:?:&quot; /&gt; &lt;strong&gt; How do I create an inner transition in a state &lt;/strong&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;img src=&quot;https://sinelabore.com/lib/images/smileys/exclaim.svg&quot; class=&quot;icon smiley&quot; alt=&quot;:!:&quot; /&gt; Create a self transition and set the &lt;code&gt;kind&lt;/code&gt; property in the transition property dialog to &lt;code&gt;internal&lt;/code&gt;.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;How to&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;how_to&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;2175-&amp;quot;} --&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 03 May 2024 20:40:39 +0000</pubDate>
        </item>
    </channel>
</rss>
