RYA1 State Chart Simulator (YAKINDU)
Outline
YAKINDU Statechart Tools (itemis) offer an integrated modeling environment for the specification and development of reactive, event-driven systems based on the concept of state machines. The State Chart production simulates YAKINDU state chart models and generates a signal with the resulting state and variable information.
Platforms: |
|
|||
Requirements: |
|
|||
Known limitations: |
|
|||
Status: |
|
|||
Input signals: |
|
|||
Output signal: |
|
|||
Parameters: |
|
|||
Tutorials: |
Input Signal Configuration
The production accepts 0..N input signals.
In case of primitive signals (integer, float, text, enumeration), the signals are bound to (writeable) variables or events of the state chart model with the same name. In case of signals with an event content descriptor, the signals are used as event inputs with multiple events. Struct signals can be used to combine variables and events.
Output Signal Configuration
- Process type: Process type of the resulting signal. In case of continuous process type, the model will be simulated with the given rate. In case of discrete process type, the model is triggered with every change of the input signals.
- Signal type: Signal type of the resulting signal.
- Signal descriptor: Signal descriptor of the resulting signal.
- Domain base: Domain base of the resulting signal.
- Domain range: Domain range of the resulting signal.
The process type (discrete or continuous) defines how the model is simulated:
- Discrete: The model is simulated when input sample changes are made or at timed positions within the start/end range.
- Continuous: The model is simulated at fixed positions defined by the start, end and rate fields
The signal type may be:
- Struct: The output signals contain the state information plus all internal variables;
- Event (enumeration) or Text: The output signals contain the state information only.
Production Configuration
- Chart: Select the state chart defined in the preferences.
- Timeout[ms]: Increase the value in case of timeout events.
Select the chart from the combo box. Simulation may be time consuming depending of the model. To avoid system timeout, the timeout parameter may be set.
Scripting
Your state machine may refer to external functions. You may implement them in the scripting field (JAvaScript).
The script is executed before entering the simulation engine. Function will be called while simulation.
var i = 0.0; function get_sensor_measurement() { i = i + 1; console.println("Measure"); return i+4 ; } function square(val) { return val * val; } function root(val) { return Math.sqrt(val); } function calc_array_sum(comp, size) { var sum = 0; var slots = comp.getSlots(); for (var i = 0; i < slots.size(); i++) { slot = slots.get(i); sum = sum + slot.getValue(); console.print(i); } return sum; }