Mentions légales du service

Skip to content
Snippets Groups Projects
runstar_example.runstar 2.95 KiB
RunStaR configuration
// The following configuration file is an example for the Lingua Franca DSL.
// We first need to import the language model & semantics in order to be able to use them
import "platform:/plugin/org.lflang/model/generated/LF.ecore";
import "platform:/plugin/fr.univcotedazur.kairos.linguafranca.semantics.dse/ecl/LinguaFranca.ecl";

// We declare our concept variables 
// For instance : we have a concept lf.Output, and we want to track its current Value & buffered Values
// However, this element is updated before a step is executed in the gemoc engine
let Variable('currentValue', 'bufferedValues' for lf.Output BEFORE updates) be outputValue;
let Variable('currentValue' for lf.Input AFTER updates) be inputValue;
let Variable('currentTime' for lf.Model) be currentTime;
let Variable('offset' for lf.Timer AFTER releases) be timer;

// We also want to have a time series, representing the lf.Input current Value as a
// function of the current Time
// We provide the path of the folder in which the charts will be stored
let Chart(x=currentTime, y=inputValue, path="/home/ryana/eclipse-workspaces/runtime-EclipseXtext/iconstest") with {
    title='currentValue';
    nbValues=30; // We will display the last 30 values taken by the input
    xLabel='currentTime';
    yLabel='currentValue';
    lineStyle=DIGITAL;
} be inputGraph;

let Chart(x=currentTime, y=outputValue, path="/home/ryana/eclipse-workspaces/runtime-EclipseXtext/iconstest") with {
    title='currentValue';
    nbValues=30; // We will display the last 30 values taken by the input
    xLabel='currentTime';
    yLabel='currentValue';
    lineStyle=DIGITAL;
} be outputGraph;

// When text about an output is displayed, we want it to be displayed with the following parameters
let DecoratedText (outputValue) with {
    prefix='outputPrefix: ';
    color=(0,0,255);
    errorColor=(120,120,120);
} be decoratedOutputValue;
create: Paint((255,0,255), type=BACKGROUND) for lf.Output BEFORE updates; //Our outputs will be highlighted when updated
create: Comment(decoratedOutputValue); //A text will appear next to the output in the editor
create: Hover(image = outputGraph); // A hover displaying text will appear when the proper user action is executed (double click)
create: Mark(outputValue, type=WARNING); // A marker displaying information will appear in the margin

create: Paint((255,255,0), type=BACKGROUND) for lf.Input AFTER updates;
create: Comment(inputValue);
create: Hover(image = inputGraph); //this hover displays a graph
create: Mark(inputValue, type=INFORMATION);

create: Paint((0,255,255), type=BACKGROUND) for lf.Timer AFTER releases; //here, the timer line in the editor changes text color
create: Mark(timer, type=INFORMATION);

let DecoratedText (currentTime) with {
    color=(125,0,255);
    fontSize=5;
    fontStyle=ITALIC;
} be decoratedCurrentTimeValue;
create: Mark(currentTime, type=ERROR);
create: Hover(decoratedCurrentTimeValue, fromStart=TRUE); //this hover is visible as soon as the debugger starts