itemis Blog

YAKINDU Statechart Tools January release 2019 – new and noteworthy

Written by Andreas Mülder | Jan 22, 2019

Information: YAKINDU Statechart Tools Is Now itemis CREATE

Today we released YAKINDU Statechart Tools (is now itemis CREATE) Standard and Professional Editions in version 3.5.0. In total, 146 issues (Standard and Professional Edition) were fixed during the last 3 months. Moreover, we added a rich set of new and noteworthy features:

  • Deep Java integration (Professional Edition)
  • Tracing callbacks for C++ and Java (Standard Edition)
  • Qt C++ code generator (Labs)
  • In-event queue for C++ code generator (Standard Edition)

Eclipse platform

We upgraded the underlying Eclipse platform to the new Eclipse 09-2018 release. This will be the last release of YAKINDU Statechart Tools (is now itemis CREATE) that supports 32-bit versions since the Eclipse Foundation decided to drop 32-bit with the 12-2018 release.

However, you will still be able to install YAKINDU Statechart Tools (is now itemis CREATE) into an older 32-bit Eclipse version via our update site – only the bundled products won’t support 32-bit in the future.

Deep Java integration (beta)

 

After more than a year of work, we are proud to present the first beta release of deep Java integration in YAKINDU Statechart Tools (is now itemis CREATE). It allows you to directly access Java APIs in your statechart, and it hence facilitates an incorporation of state machine modeling in your Java development process. The beta version contains the following features:

  • You can import Java classes, interfaces and enums in your statechart and use them for your statechart variables.
  • You can access all public and static members, like variables and methods directly from the statechart. This avoids lots of boilerplate code.
  • Java methods that are used in your statechart will be called during simulation. This avoids the cumbersome mocking of return values in the simulation view.

You can read more and watch a video in the following blog post:
https://blogs.itemis.com/en/statechart-modeling-for-java-development.

Tracing callbacks for C++ and Java

The tracing feature enables the generation of tracing callback functions for Java and C++. We added a new feature to the generator model where you can configure the tracing events you are interested in:

feature Tracing {
    enterState = true
    exitState  = true
}

 

The enterState parameter specifies whether to generate a callback function that is used to notify about state-entering events, and the exitState parameter specifies whether to generate a callback that is used to notify about state-exiting events.

Qt C++ code generator

With the SCXML domain, we already have a powerful and flexible way to integrate YAKINDU Statechart Tools (is now itemis CREATE) into Qt applications. But there are still use cases where you can’t use the Qt SCXML Interpreter. That is why we started the development of a Qt C++ code generator and released a first version via our labs update site.

The Qt specific flavor of the C++ code generator makes use of Qt signals and slots. So the generated state machine can easily be integrated into Qt applications using this mechanism.

The generated statemachine inherits from QObject. A QTimer-based implementation of a timer service is generated, if the statechart makes use of time triggers.
An example of the Qt C++ code generator together with a simple QML user interface is available via our example wizard.

In-event queue support for C++ code generator

The C++ code generator now also supports an additional event queue for incoming events if the statechart is event-driven. To enable it, set the inEventQueue option of the GenerationOptions feature to true.

If an operation callback or function is executed by the state machine and that functions raises an event, this event will be appended to the in-event queue. The state machine's API will remain unchanged. After processing of the origin event is completed, all events in the in-events queue will be processed automatically in the order they were raised.

To enable the in-event queue, add the following generator option to your .sgen file:

feature GeneratorOptions {
    inEventQueue = true
}

Miscellaneous

  • We improved the generated code in terms of readability and removed superfluous parts (see issues #295 and #227).
  • For the C code generator, the definition of sc_null changed in sc_types.h since the existing definition clashes with certain C compilers. You will have to regenerate the sc_types.h file in your workspace to remove compile errors (see issue #2555).
  • We fixed several bugs in the SCXML domain and added a detection for endless loops for invalid models that contain dead locks.

 

You can update your existing version of YAKINDU Statechart Tools (is now itemis CREATE) via Help → Check for updates or download the latest version of YAKINDU Statechart Tools (is now itemis CREATE) here:

Information: YAKINDU Statechart Tools Is Now itemis CREATE