This example is defined in the directory: /home/lbesnard/Polychrony/V4.19/Linux/Examples/watch/COMPLETE.
add ../lib in SIGNAL_LIBRARY_PATH shell variable (command for linux: setenv SIGNAL_LIBRARY_PATH ${SIGNAL_LIBRARY_PATH}:../lib )
signal -tra -c VTSTOPWATCH.SIG -par=VTSTOPWATCH.PAR
The results of the compilation are produced in the sub-directory VTSTOPWATCH:
Go into the sub-directory VTSTOPWATCH and run the command:
make
The following files are necessary for graphical display (don't delete them!)
The watch has three main states: ->WATCH-->CHRONOMETER-->ALARM- in which one goes cyclically by pressing the key "b".
The initial state is the WATCH state. When one enters a main state, the current substate is the last active one at the previous visit of the state.
WATCH --a--> WATCH-SETTING-SECOND WATCH --b--> CHRONOMETER (in its current substate) WATCH --c--> WATCH action: stops the alarm. WATCH --d--> WATCH action: switch to display mode of hours. WATCH-SETTING-X --a--> WATCH WATCH-SETTING-X --b--> WATCH-SETTING-X' X' is the successor of X in the following cycle: ->SECOND-->MINUTE-->HOUR-->DAYWEEK- ->DAYMONTH-->MONTH-->YEAR- WATCH-SETTING-X --c--> WATCH-SETTING-X WATCH-SETTING-SECOND --d--> WATCH-SETTING-SECOND action: reset of the seconds. WATCH-SETTING-X --d--> WATCH-SETTING-X action: incrementation by 1 modulo the maximal current value.
CHRONOMETER --a--> CHRONOMETER CHRONOMETER --b--> ALARM (in its current substate) CHRONOMETER --c--> CHRONOMETER CHRONOMETER --d--> CHRONOMETER-RUN action: starts the chronometer, displays the current time at each hundredth of second. CHRONOMETER-X --a--> CHRONOMETER-X CHRONOMETER-X --b--> ALARM (in its current substate) CHRONOMETER-RUN --c--> CHRONOMETER-RUN-LAP action: freezes the display on the intermediate time. CHRONOMETER-RUN --d--> CHRONOMETER-STOP action: stops the chronometer. CHRONOMETER-RUN-LAP --c--> CHRONOMETER-RUN action: resumes the display of the current time at each hundredth of second. CHRONOMETER-RUN-LAP --d--> CHRONOMETER-LAP action: stops the chronometer. CHRONOMETER-LAP --c--> CHRONOMETER-STOP action: displays the current time. CHRONOMETER-LAP --d--> CHRONOMETER-RUN-LAP action: restarts the chronometer from the current time. CHRONOMETER-STOP --c--> CHRONOMETER action: reset of the chronometer. CHRONOMETER-STOP --d--> CHRONOMETER-RUN action: restarts the chronometer at the current time.
ALARM --a--> ALARM-SETTING-HOUR ALARM --b--> WATCH ALARM --c--> ALARM action: switch to activity of the chiming clock. ALARM --d--> ALARM action: switch to activity of the alarm. ALARM-SETTING-X --a--> ALARM ALARM-SETTING-X --b--> ALARM-SETTING-X' X' is the successor of X in the cycle: ->HOUR-->MINUTE- ALARM-SETTING-X --c--> ALARM-SETTING-X ALARM-SETTING-X --d--> ALARM-SETTING-X action: incrementation by 1 modulo the maximal current value.