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

PageDateUserTags
Generate efficient source code from UML state diagrams and activity diagrams! 2017/03/20 19:35 Peter Mueller  
Navigation 2017/03/18 16:39 Peter Mueller  
History 2017/03/18 16:38 Peter Mueller  
wiki:news:7june2014

Generate code from Astah* activity diagrams

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. Give it a try!

The following figure shows an extended version of the microwave oven example. A simple hardware selftest function was added to the transition leaving the initial state. In case this test is ok the software enters the normal operation states. Otherwise an error state.

The hardware selftest function was modelled as activity. The activity itself is trivial but enough to show the new possibilities. The code of each action forming the activity is available in the properties dialog of the actions. Take a look into the manual what other diagram elements can be used.

To generate code from the activity diagram use the following commands (command line on a Mac):

java -Djava.ext.dirs=“../../bin/”:“/Applications/astah community/astah community.app/Contents/Java/” -Djava.awt.headless=true -jar ../../bin/codegen.jar -l cx -A -v -p ASTAH -o oven -t “final:oven:selftest”

The -D options tells java where to look for the jar files. The new option -A enables code generation for activity diagrams.

In case of questions, problems or suggestions please contact us.

Have fun! Peter

wiki/news/7june2014.txt · Last modified: 2014/06/07 11:44 by pmueller