Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Choose File > New > Project > General > Project (do never convert your project in an Xtext-project)
  2. The project is created and the model file is opened in an editor (This might take a few seconds)..
  3. Create a SCChart inside the project.
  4. Edit the model

Edit the Model:

Change the contents of the model file to the following code and save it.

Code Block
languagesct
themeEclipse
titleFloodlight.sct
scchart Flashlight {
    
    input bool @Wrapper@macro "TouchSensor", "S4" button
    input bool button
    
output bool @macro  @Wrapper "Floodlight", S1
    output bool"S1" light
    
    initial state lightOff
    if button do light = true go to lightOn
    
    state lightOn
    if !button do light = false go to lightOff
}

...