Clock (Time Client)
Configure Application
The program "Clock"
need not necessarily to be configured. It’s just listen to the time of the TimeKeeper over the network. Each pc, which is connected to the network, can start this program to show the current time of the TimeKeeper.
At program startup the clock.ini
file located in package root directory is loaded automatically and menus for slave clock output (serial and/or gpio) (de-)activation are created.
Via a cli option (see next section), an alternative configuration file can be used, which must have the same structure as the existing clock.ini
file, but can have different values than the standard configuration. See also these hints on the TimeKeeper page and example configuration below.
Run Application
Applications scripts are located in the bin
subfolder and can be configured by the following optional cli parameter: [-c <config file>] [-h] [-l <log file>] [-n]
-c,--config <config file> Configuration file (default: clock.ini)
containing setup for serial and/or gpio
output.
-h,--help Print help and usage.
-l,--logfile <log file> Log file name all programs output is streamed
to (default: tochteruhr.log)
Only available with option "-n"!
-n,--no-gui Start Tochteruhr without a window as console
application only.
The parameter -c
must point to a valid ini-file, which must be similar to the clock.ini
. If no file is committed automatically the clock.ini
will be used.
MS Windows
Execute the file tochteruhr.bat
to start the application.
Unix/Linux
Execute the file "tochteruhr"
to start the application.
Operation
After a short time the application window will be opened. If no TimeKeeper is running no time is displayed. Once the TimeKeeper is running the model time will be shown.
The program has a very extensive "Configuration"
menu and it’s entries are mainly self-explanatory.
Further explanation, however, is just needed for the "(Serial/GPIO) slave clock output"
menus and it’s entries. During program running these options can be activated or deactivated. Therefore several values from "clock.ini"
file or alternate configuration file given at startup are loaded and evaluated.
If an error occur on activating the program must be restarted.
Furthermore it can be switched to "Impulse operation mode"
and it is also possible to "Synchronize Slave Clocks to current TimeKeeper-Time"
as it can be done with the TimeKeeper program.
To exit the application just close the window or use the "Configuration>Exit"
menu.
Example for alternative configuration
For creation a separate configuration file it is recommended to copy the clock.ini
file to a new one for editing.
The new file name is exemplary clock-alt.ini
located in root directory of the program package with the following content, whereby not used or necessary entries should either be removed or comment out:
# Configuration for Clock (Tochteruhr)
# Output to serial interface: activate using true, deactivate using false
tochter=false
# Port to be used, os dependent, remove unused entries or comment out!
# Unix/Linux: USB-serial-adapater
port=/dev/ttyUSB0
# Unix/Linux: serial interface
#port=/dev/tty0
# MS Windows: serial interface
#port=COM3
# Output to RPI GPIO Pin: activate using true, deactivate using false
raspi=false
# The number is always the header pin number of the board!
# clock
raspiClockPin=8
# shortcut
raspiShortCutPin=10
# Impulse length in milli seconds
impulsDauer=2000
Running tochteruhr[.bat] -c clock-alt.ini
at the command line, the file is passed to the program during startup.