SinelaboreRT Header Logo

SinelaboreRT

It's better when it's simple!

User Tools

Site Tools


Sidebar

Tool Landing Pages

Examples

Designers Toolbox

How-To

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

wiki:landing_pages:metamill

Generate production quality code from state diagrams created with Metamill

SinelaboreRT generates readable and maintainable code from hierarchical UML state machines created with Metamill. With its unique features the code-generator 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.

Key Features:

  • Automated robustness checks before code generation
  • No run-time environment needed
  • Can be used with any CPU and with or without OS/RTOS
  • Code generation especially for embedded real-time and high availability systems.
  • Fits well in different system designs (foreground/background, RTOS-based …)
  • No gap between design and code
  • Support for automatic test-case generation
  • Simulation in interactive or batch mode.
  • Optionally generating trace code
  • Generated code creates no trouble when using static code checkers

Watch the code generator in action

The following example shows how the code generator works by means of a simple microwave oven.

Requirements:

  • Cooking time can be adjusted from 0s and 60s.
  • Cooking starts if the cooking time is > 0s and the door is closed.
  • If the door is opened during cooking the microwave generator is switched off. The cooking time stops.
  • Cooking continuous if the cooking time is not over and the door is closed again
  • Cooking stops if the cooking time is over or the time is adjusted to zero.
  • Cooking time and power can be changed at any time.

The sate machine below shows a possible solution.

To generate for example C code just export your model to XMI and call the code generator as follows:

java -jar codegen.jar -p MM -t "ImplementationView:Oven"  -o oven oven.xmi

After checking the model against a set of well-formedness rules (e.g. no double state names, all transitions have an event) the complete state machine code is generated.

Done!

Look into the generated files: oven.c oven.h oven_ext.h

What next?

Download a free 30 days evaluation version and test the code-generator and read some of the articles from the Designers Toolbox to get a deep understanding of the various generator features.

Feel free to send us questions if you get stuck.

wiki/landing_pages/metamill.txt · Last modified: 2013/07/23 19:46 by pmueller