itemisCREATE / statecharts

YAKINDU Statechart Tools (http://www.statecharts.org)
Eclipse Public License 1.0
175 stars 85 forks source link

Create minimum template for executing state machine code #2504

Open rherrmannr opened 5 years ago

rherrmannr commented 5 years ago

It would be nice, if we would have a generator feature for a minimum execution of the state machine, depending on which code generator has been used.

For example:

feature executeStateMachine{
     // TBD
}

This feature could generate for C or C++ the main method, include the required header, create a statechart object, and so on. Additionally, templates could be integrated, which show how to implement timer, operation callbacks, raise in events, handle out events, and so on.

The generated code must not compile, it could be used as a hint for the user, of how to call the state machine correctly.

For me, this steps repeats every time when I want to run some C, C++ or Java code: Create a statechart -> create the Generator -> implement some main method (define includes, define main method, call init, enter, runCycle, and so on) <<- This par could be supported.

rherrmannr commented 5 years ago

We already got this for Java -> RuntimeService in general features