YAKINDU statechart tools are a pretty nice tool to model statemachines. You can generate code for C/C++ and Java out of the model. Further you can validate and simulate your statemachine to verify the behaviour. If you want to integrate your statemachine into a Qt application the concept of signals and slots fits perfectly into the in and out events of the statechart definition language of the YAKINDU SCT. My new custom Qt generator links both concepts together. It generates a C++ class which links between the C++ class generated from the C++ generator of YAKINDU SCT and the custom implementation code which must be implemented for custom behaviour of your application.
The generated code implements the following methods of the statemachines base class:
- Initialisation of all SCT operation callbacks (so called OCB).
- A pure virtual method initializeValues() for custom value initialisation.
- In events as Qt slots.
- Out events as Qt signals.
- Respects internal events with an extra runCycle() call.
- Optional implementation of the TimerInterface.
- Implementation of all SCT operations.
There is a detailed documentation at the SourceForge project site. There is also a small example Qt application to show how the generator works: https://svn.code.sf.net/p/sctqtgen/code/trunk/de.morknet.sct.qt.example.calculator.
If you have a working YAKINDU SCT running you only need to add an update site to your Eclipse. You may choose between a scnapshot build or the release build.
- For a snapshot build use the following URL:
- For a release build use the following URL: