SinelaboreRT Header Logo


It's better when it's simple!

User Tools

Site Tools


UML-Tool specific Intro



Designers Toolbox

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

Tools supported by SinelaboreRT 2019/09/11 21:46 Peter Mueller  

This is an old revision of the document!

Version 3.1

Region support for the C++ backend

A UML state might be divided into regions. Each region contains sub-states. Regions are executed in parallel. You can think of regions as independent state machines displayed in one diagram.

For each region an own method is generated in the state machine class. Its name is automatically derived from the region name. If a state contains several regions they are called one after the other (in alphabetical order). If the event sent to the state machine was processed in one of the regions no further event handling happens in the parent state. Otherwise the event is processed in the parent state. This is similar to the event handling of normal hierarchical state machines.

To maintain consistency during execution of machine code a copy of the instance data is created at the beginning of the state machine code. All state machine internal tests are performed on the original instance data. All changes are done on the copy. This ensures that all regions see the same situation when running. At the end of the machine code the modified instance data is copied back to the original data.

Here is an example how the generated C++ code looks like:

// State machine event handler
int testcase::processEvent(TESTCASE_EVENT_T msg){
	int evConsumed = 0;
	if(m_initialized==false) return 0;
	//Create copy of statevar
	stateVarsCopy = stateVars;
	/* action code */
	printf("Outer test action\n");
	switch (stateVars.stateVar) {
		case S1:
			/* calling region code */
			evConsumed |= testcaseS1Region1(msg);
			evConsumed |= testcaseS1Region2(msg);
			/* Check if event was already processed  */
	} /* end switch stateVar_root */
	// Copy state variables back
	stateVars = stateVarsCopy;
	return evConsumed;
} // end processEvent
wiki/news/03jan2013.1357242044.txt.gz · Last modified: 2013/01/03 20:40 by pmueller