Graphical Simulation of SIGNAL programs

 

Aims:

 

Principles:

You have to write everything in SIGNAL, that means:

These processes are defined in a predefined library called libGraphics.LIB.

To use it, you have to include this library in your SIGNAL program by adding the line: "use libGraphics;"

You have no Java code to write, except if you want to complete the SIGNAL graphical library. For example, if you add a graphical component in the SIGNAL library, or if you add a color mechanism (that would not be useless), you will need to modify the Java code.

  1. Description of the graphic library libGraphics.LIB

The call to createFrame is obligatory; if you use the pacemaker, this call is already done.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Input parameters: the activation clock (type event)

 

Contrary to all the functions just defined that are external functions, PACE-MAKER is a process defined in Signal, and that calls some external functions above. The principle of the pace-maker is to be able to have 2 simulation mode:

 

  1. Example

Here is a very small example. This is the identity case: x:=a .

I advise you to open polychrony and to load the file VTIDENTITY.sig. The explanations will be clearer.

A model manage the entries and create all of the graphical objects for the simulation. This is the CONTEXT model; another one show the output: this is the SCREEN model.

 

We want to simulate this program graphically, that means to have a slider to enter the values of the entry a, a canvas to draw the curve of x, and a pace-maker to regulate the speed of the simulation and to have a manual and automatic mode.

This directory contains:

To run the simulation, type:

java -classpath $ADRPACKAGE simuSignal.Simu &, where ADRPACKAGE is the address of the directory that contains the simuSignal directory.