SinelaboreRT Header Logo

SinelaboreRT

It's bettet when it's simple!

User Tools

Site Tools


Sidebar

Examples

Designers Toolbox

How-To

Tool Landing Pages

Integrated state-chart editor with auto-layout

Focus on modeling and not on moving states around to create a nice looking diagram! Syntax aware text fields offer a comfortable way to specify actions, guards etc. When the diagram passed the model checker it can be directly simulated. Connect the diagram to the real hardware to monitor the state machine in action.

There are better ways to model state machines than using spread sheets!

In the past different μC manufacturers have published application notes about the benefit of using state machines for the design of embedded software. An example is the application note SLAA402 from Texas Instruments (TI). It suggests to generate source code based on a spread sheet table. Nowadays several affordable UML modeling tools are available supporting the efficient design of state machines in a graphical way. SinelaboreRT generates production quality source code from state diagrams created with many different UML tools. Give it a try!

Latest Changes

start

Generate efficient source code from UML state diagrams and activity diagrams!

SinelaboreRT was built especially for embedded software developers. It focuses on just one task: Generation of readable and maintainable code from hierarchical UML state machines and from activity diagrams. 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.

Since version 3.6 initial support for activity diagrams was added!

How does it work?

From various UML tools your state-machine model can be directly converted into the selected target language. You can widely influence the generation process according to your needs. The generator supports all the major state diagram features like hierarchical states, regions, history, sub-machines and more.

Key Features

  • Automatic generation of production-quality code. The generated code is based on nested switch/case and if/then/else statements. It is easy to read and understand. The generated code will not create any headache when using static code analyzers.
  • Can be used with any 8-, 16- or 32-bit target, with or without OS/RTOS. There is no run-time environment needed.
  • Fits well in different system designs. The code-generator does not dictate how you design your system. Therefore it is no problem to use the generated code in the context of a real-time operating system or within an interrupt service routine or in a foreground / background system.
  • No gap between design and code
  • Use the UML tool of your choice:
    • Cadifra UML Editor
    • UModel
    • Magic Draw
    • Enterprise Architect
    • SSC
    • ArgoUML
    • astah*
    • Visual Paradigm
    • Modelio
    • Metamill
  • Use the code generator only for those parts of your software that benefit from state machine modeling and code generation. Use your existing development environment for all the other code. The code-generator does not dictate an “all or nothing” approach as many other commercial tools.
  • Automatic robustness tests, test-case generation, tracing and simulation
  • Extensive manual with getting started section

News

2014


15.11.2014 | New Screencast

There is a new screencast that shows the very first steps required on a new Debian installation to get started with the code generator: http://youtu.be/ZPvs_9jV7AE

09.11.2014 | New version 3.6.7

This update provides many improvements in the built-in editor. Namely support for undo/redo and drag/drop. Also a new parameter for the C++ backend was added which provides an easy way for state objects to call methods of the state machine object. Take a look into the “What's new section” of the manual. Update: a screencast of the editor is available here: http://youtu.be/4y7oF9kfluw

14.09.2014 | Need to design state diagrams on a Unix like OS?

Most UML tools can't be used on systems running Debian Linux, FreeBSD, … Due to the fact that the integrated state machine editor is based on Java we can offer a nice solution here. Go on reading ...

5.9.2014 | Do you develop for iOS or OS X and want to use Swift?

Swift is a new object-oriented programming language for iOS and OS X development. The latest beta version of the code generator supports code generation of Swift code. Read more ...

1.9.2014 | New version 3.6.6

Astah* users watch out! The code generator now supports regions. This allows to create code from even the most complex diagrams. Read more...

20.7.2014 | New version 3.6.5

This version contains some important optimisations in the activity generator. Read more...

24.06.2014 | Reading data from an energy meter via Modbus - Activity diagram in practise

For a data logger application the voltage and real power values should be read from an energy meter using the Modbus RTU protocol. The program is regularly called and prints out the requested values. The console output is stored in a round robin database (RRD). Read more about the application and how the program is modelled as activity here ...

16.6.2014 | Built examples using MinGW on Windows

MinGW, a contraction of “Minimalist GNU for Windows”, is a minimalist development environment for native Microsoft Windows applications. Samples ending with *_win32 in the tutorial folder can now be built with MinGW. The benefit is that no separate DLLs are required for execution of the generated binaries. The other benefit is that the examples use native Win32 functions e.g. for timing and keyboard interactions which makes it easier for Windows users to modify the examples. Have fun!

16.6.2014 | New version 3.6.4

This version fixes a problem in the C++ backend. If you use transitions from the initial pseudostate to a choice pseudostate wrong code was generated in the initialise() method. Upgrade to this version if you use the C++ backend (see also the news from 18.5. if you use the c backend). It also fixes a problem that the visual editor / simulator did not start on some system because of missing icons.

7.6.2014 | Generate code from Astah* activity diagrams (new version 3.6.3)

In the latest version of the SinelaboreRT code generator support for activity diagrams was added for astah* users. astah* is a UML modeling tool written in Java and can therefore run on various platforms like Windows or Mac. In opposite to some other tools it provides a Java API for direct access of the model file. Therefore it is not necessary to export the model (e.g. in XMI format) but the SinelaboreRT code generator can directly access the model file. This makes the development cycle very fast. Read more ...

24.5.2014 | New version 3.6.2

With this new version it is now possible to generate code from activity diagrams created with UModel. Read more ...

18.5.2014 | Update to 3.6.1 if using "init to choice"

If you use “init to choice” transitions in your models upgrade to the latest version of the code generator. The generated initialisation code is not correct in all cases in earlier versions of the generator.

18.5.2014 | Updated Microwave Example using Activities

In the manual a simplified microwave oven is used to explain the generation of source code from state machine diagrams. This example was updated here to show how to generate code also from activity diagrams. Read more

18.5.2014 | New release 3.6.1

A new version is available. The latest version of the sinelabore code generator can now also generate code from activity diagrams. In addition to version 3.6 the manual was updated to explain the new features! Read more ...

28.2.2014 | New release 3.51

This release improves error handling in case of incorrect models (e.g. transition from an initial state pointing into another region etc.).

2.1.2014 | New release 3.5 of the code generator

This release adds missed features in combination with the usage of regions. It is a recommended update for all users. For more information check the release notes in the manual.

2013


3.11.2013 | Version 3.5 beta1 with support for "init to choice"

Several users have asked for transitions going from an initial pseudo-state to a choice state. The latest beta supports this feature now. Read more ...

21.09.2013 | Version 3.4 is a bug fix release

Bug #78 was fixed. Update to this version if you use regions in regions in your models. The Enterprise Architect handbook section was updated.

21.9.2013 | Multiple instances of the same state machine?

This article explains how to run multiple instances of the state machine code and how to create own instance variables. Sounds like object orientation? Read more ...

10.9.2013 | Who needs regions in regions?

Version 3.31 supports the generation of code from even more complex models. Users who have the need for sub-machines, regions in regions etc. should check-out this latest version. See an example machine here ...

16.08.2013 | Version 3.3 with support for C# available

In an earlier version it was possible to generate C# code. This was not possible with the latest versions of the code generator, but is available now again with version 3.3. Read more ...

23.07.2013 | Version 3.2 with support for Metamill available

Metamill is a UML 2.3 modeling software, perfect for visual design of UML state diagrams. We are pleased to announce that the latest version of the code-generator now also supports C/C++/Java code generation from XMI files, exported from Metamill. For an example how state diagrams look like in Metamill take a look here. The demo version contains the fully working microwave oven example which is used in the manual.

20.04.2013 | Execution Order of Events

Now and then I get questions about the execution order of events. For UML state charts it is defined that events are handled from inside out. I.e. if there are two transitions ready to fire the transition starting from the innermost state will be taken first. Let's assume you have a state called Active with several child states. Whenever the emergency button is pressed (→ evEmergency is sent to the machine) you want the machine to leave state Active and enter state Sopped. If you use an event based model this is no problem. Just ensure that the event evEmergency is enqueued to the head of the queue.

This becomes more tricky if your model is based on conditions as triggers (see section A.4. in the handbook if you wander what conditional triggers are about). Let's assume the emergency button is connected to port pin P1.1 of our controller and your conditional trigger is defined as P1.1==TRUE/stopMotor(). In such a setup there is typically no event queue available. So we need another way to make sure that transition which might be ready to fire inside state Active prevents the handling of the outermost emergency stop transition. How to do this? There is no other way than to put the emergency condition into the guard of all the other transitions defined inside state Active. If you want to see more details: A fully worked out example is the PLCOpen function block available here.

26.2.2013 | Version 3.11 available

The simulation engine now supports regions. This is a next important step towards full support of regions. A bunch of screenshots of the microwave oven is provided here ...

26.1.2013 | Thermostat example shows the power of regions

Thermostat interface

In this example a thermostat design is shown using regions to model parallel running parts of the controller. We explain under which circumstances regions are useful to use and how the generated code looks like. Read more how you can benefit from regions in your designs here ...

3.1.2013 | Version 3.1 available

Regions are now fully supported when generating C++ code. In addition two new parameters were added that helps when using the same state names in different parent states (e.g. multiple times On/Off) and when calling multiple state machines from within one C-file (e.g. main). Read more here here ...

2012


19.12.2012 | Good to know ...

… that the code generator works without any known problems on Windows 8/64Bit & Enterprise Architect 10. After installing Cygwin and Java the examples compiled without problems. EA10 loads existing projects, no incompatibilities have been found. Working with regions in EA10 is easier now.

07.12.2012 | Version 3.0 available

This new version brings support for Modelio an open source modeling tool based on Eclipse. For the C language backend also regions can be used now. Read more here ...

22.10.2012 | New Web-Site

The web-site has been moved from static html to a wiki basis. So far just some basic features of the wiki has been used. The new basis allows easier maintenance of the site but mainly it should help you as a user to easier find the things you look for e.g. by using the site search field. In future also other additions are possible like notifications on site changes, a user forum etc. Write me how you like the new site! Let me know what features you want to see added.

17.9.2012 | Version 2.9

This is a maintenance update and improves some details in the Editor/Simulator and the Java/C++ backend. The code input fields now support folding. Read more ...

05.8.2012 | Version 2.8 ... 2.8.3

This update of the SinelaboreRT code helps Magic Draw users to keep complex state diagrams with many transitions and/or states well-arranged. Read more ...

3.1.2012 | Version 2.7

Version 2.7 of sinelaboreRT extends the test case generation features using a breadth first search algorithm and makes the specification of multiline state action code in EA easier. Furthermore it adds support for sub-machine states in Enterprise Architect models. Read more ...

2011


6.10.2011 | Version 2.5: New features make testing of state machines more efficient.

Version 2.5 of sinelaboreRT adds some features important for the efficient testing of state-based code.

  • Visualization of the coverage percentage in simulation mode. This tells you how good your test is.
  • Visualization of the transitions that have not been taken so far and are required to take to achieve 100% test coverage. With this info at hand you can quickly improve your test script or test procedure.
  • Generation of an Excel sheet with all the test routes required for 100% transition coverage. This sheet can be the basis for your test instruction document.
  • Possibility to attach constraints to the states. This information is added to the test route Excel sheet and informs the tester about the expected behavior in this state. This information can be informal text like “all lights off” or more formal like “relay 0 := off”. Whatever is appropriate for your application.

06.10.2011 | Model-based testing of state machines part II

The second article about model based testing explains how SinelaboreRT helps you to visualize state state machine status graphically and display coverage information. Read more ...

23.08.2011 | Model-based testing of state machines part I

This article explains how SinelaboreRT can help you to getting started with model based testing. The basis of all is of course your state machine model. Read more ...

04.07.2011 | Visual Paradigm support added

The latests version 2.41 of sinelaboreRT now supports the generation of code from Visual Paradigm for UML.

30.06.2011 | New Enterprise Architect How-To

A new EA related How-To page is available here. If you have further hints let us know and we add them.

2010


★ 28.11.2010 | New C++ backend

In version 2.21 a new C++ backend was added. To select this backend call the code generator with the new command line flag ’-l cppx’. It has two additional features:

  • State machines are not limited to three hierarchy levels anymore but can have more levels of nesting (like cx) . This is an important feature if you want to model really complex things.
  • It is now possible to inline all entry/exit/action code into the main state machine code. So no state classes are generated at all. The new keyword ’SeparateStateClasses = No’ enables this feature.

★ 06.11.2010 | Support for Java added in version 2.2

It is now possible to generate Java code from your design. Just one class is created containing the whole logic. This has the benefit that your Java project does not become bloated with all kinds of helper classes.

start.txt · Last modified: 2014/11/15 20:51 by pmueller