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:
32/64bit 32/64bit 32/64bit
Requirements:
  • YAKINDU state charts (com.yakindu.sct.generator.image.feature). Will be installed automatically if not available.
Known limitations:
  • Simulation may be time consuming depending of the model. To avoid system timeout, the timeout parameter may be set.
Status:
  • Beta
Input signals:
  • 0..N inputs supported.
  • Integer, Float, String, Event(Enumeration), Logic, without "event" content descriptor : Will be mapped to writable variables with equal names.
  • String, Event(Enumeration) with "event" content descriptor : Will be feeded as input events.
  • Struct: Integer, Float, String, Boolean and Enumeration members without "event" content descriptor: Will be mapped to writable variables with equal names.
  • Struct: 1st members with "event" content descriptor will be feeded as input event.
  • Struct: 1st Integer, Float, String, Boolean or Enumeration members members with "eventparam" content descriptor will be feeded as event parameter.
Output signal:
  • String: State information.
  • Event(Enumeration): State information.
  • Struct: All variables that are not assigned to input signals plus state information.
Parameters:
  • 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.
  • Chart: Select the state chart defined in the preferences.
  • Timeout[ms]: Increase the value in case of timeout events.
  • script: Implement functions to be called from simulation.
Operation:


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 of the state chart model with the same name. In case of signals with an event content descriptor, the signals are used as event input.



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;
	}

toem

technical software and tooling

Company

Contact Us

This email address is being protected from spambots. You need JavaScript enabled to view it.