Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

State Scope

State Scopes allow to define interface declarations and reactions

Interface Declarations

Declarations in a state interface scope are visible in this state and its descendant states.

+

Declarations

Within State Scopes there can be declarations of variables (and signals)?.

A Variable:

  • has an optional (not direction for local variables) direction, 
  • can be static, 
  • has a datatype (integer, boolean, real, string, void)
  • an optional initial value
  • has a CombineOperator (-, +, *, max, min, or, and, host).

Examples:

Signals

4 views to implement signals

  • don't use signals. Use only variables
  • Boolean variables are interpreted as signals (no Boolean variables available)
  • Yakindu events are interpreted as signals
  • declare a new declarations type named signal

 

 advantagedisadvantage
Don't use signals
  • no need to be implemented
  • no signals
Boolean variables as signals
  • implementation in a short time
  • a short form declaration:

    in I instead of in I:boolean

  • a short form of use:
    I / O instead of [I==true] / O = false
  • no more possible to use of Boolean variables
Yakindu events as signals
  • use of already implemented features
  • differ between Signals and Boolean Variables

Declaration: in signal I;

  • signals are implemented as events
New declaration type
  • differ between Signals and Boolean Variables

Declaration: in signal I;

  • expensive

 

 

 

  • No labels