This example is defined in the directory: /home/lbesnard/Polychrony/V4.19/Linux/Examples/usingGraphicalLibrary/Example2.
This example is a simple "watch" that produces seconds, minutes, hours and days. The days are not managed as in a calendar but as a simple (infinite) counter:
The screen-display is done using a graphical user interface. This interface uses the predefined Signal Library called "libGraphics" (defined in the signal lib directory of Polychrony distribution).
Add to the SIGNAL_LIBRARY_PATH environment variable (command for tcsh) :
setenv SIGNAL_LIBRARY_PATH ${SIGNAL_LIBRARY_PATH}:${SignalLibJava_graphical}:${SignalLib_Graphical}:${SignalLib_Java}
Compile the program with the command :
signal -tra -java vtSimpleWatch.SIG -par=vtSimpleWatch.PAR
It produces the results in the vtSimpleWatch sub-directory.
Goto vtSimpleWatch sub-directory.
The following data files are used for Graphical simulation:
Compiling the Java code: the generated code must be modified.
import Signal.lib.Java.graphical.Direction; import Signal.lib.Java.graphical.Simu;
Simu sim = new Simu();
Then