Time in SCCharts. Alexander Schulz-Rosengarten and Reinhard von Hanxleden and Frédéric Mallet and Robert de Simone and Julien Deantoni. In Proc. Forum on Specification and Design Languages (FDL ’18), Munich, Germany, September 2018.
Clocks can be defined to gain access to real time and specify timed transitions.
This feature requires a dynamic tick environment to work. Then the time in all clocks will be automatically updated and the SCChart will requiest a sleep time such that it will wake up when a timed transition will be enabled.
Various annotations (for the root SCChart) can be used to modify the generated behavior.
|@NoSleep||Prevents declaration and calculation of sleepT.|
|@DefaultSleep||Sets the default sleep time, requested if there is no timed transition for the active state.|
|@SimulateSleep||Generates code that simulates the dynamic tick environment by assuming that between ticks always the requested sleep time passes.|
|@IntegerClockType||Switches from type float to int for the sleepT and deltaT variables and related calculations.|
|@ClocksUseSD||Enables support for concurrent and hierarchical usage of the clock variable. (experimental)|
Dynamic Ticks are based on an extended tick environment that provides deltaT and receives sleepT.
The simulation in KIELER supports a dynamic ticks mode to test models using this feature.
In the simulation view switch mode to Dynamic, see screenshot below.