Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • E escet
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
    • Locked Files
  • Issues 87
    • Issues 87
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Eclipse ProjectsEclipse Projects
  • Eclipse ESCET (Supervisory Control Engineering Toolkit)
  • escet
  • Issues
  • #203
Closed
Open
Issue created Oct 06, 2021 by Ferdie Reijnen@freijnenDeveloper

CIF simulator should support input variables

Problem

For code generation, input variables are essential for connecting inputs of the controller to the actual supervisor 'logic'. Often we either use the state of the input variables directly, or we detect a change in value and translate that to an event. Problem is that there is no easy way to simulate a specification with input variables. Currently, the specification first has to be merged with another specification that merges the inputs with non-input variables or locations. This can be quite involved.

Solution

Using CIF/SVG input mappings, it should be possible to assign values to input variables in the SVG input mode. I propose the following syntax:

svgin id <svgElementName> input/assign/do <inputVariableName> := <expression>  

We can then model a button, using an input variable as follows:

input bool machineStartButton;

svgin id "button36" input machineStartButton := not machineStartButton;

As opposed to:

automaton machineStartButton:
  uncontrollable u_push, u_release;
  location Released:
    initial;
    edge u_push goto Pushed;
  location Pushed:
     edge u_release goto Released;
  svgin id "button36" event if Released: u_push else u_release end;
end

Remarks

Input variables do not have initial values. The CIF Simulator has an option to supply the initial values for variables. That we should be able to use for input variables as well, hopefully. Otherwise they should be initialized for their default initial value.

Edited Oct 06, 2021 by Ferdie Reijnen
Assignee
Assign to
Time tracking

Copyright © Eclipse Foundation, Inc. All Rights Reserved.     Privacy Policy | Terms of Use | Copyright Agent