Realtime Status Exchange: Modifications *************************************** In order to simplify the realtime status exchange between the laser stations we have prepared a C program to be run under UNIX or on a Windows PC that directly connects to port 7810 on our system, sends a line of text and receives the current merged status messages. The program is called as follows: eurostat aiuli3.unibe.ch 7810 'n' [statusfile] The program reads from the standard input the locally generated status line and writes the received status to the standard output. The standard input (i.e., the local status line) can of course be piped into the program, the received merged status on the standard output can be piped into some display program if necessary. 'n' is the number of receive cycles to be run, a zero means an infinite number. Usually 'n' should be set to 1 and the program should be called in a loop every 15 to 30 seconds. The program can also be used to just receive the compiled status file indefinitely by omitting any standard input and by setting 'n' to zero. In order to recover if the server on our end is stopped temporarily or if some other error happens, you should embed the call to the program into a loop in a script or batch file in any case. The C source (eurostat.c) and the PC executable (eurostat.exe_dos) can be found on ftp.unibe.ch/aiub/slr. I would like to thank Martin Ploner of our institute for the generation of the C program. Please contact me if you have any problems or suggestions. Best regards, Werner Make File for PC (Borland C Compiler) ************************************** (Please modify paths according to your needs) INCLUDE_DIR=c:\Borland_C\bcc55\include LIB_DIR="c:\Program Files\Borland\bcc55\lib" TARGET_DIR=c:\eurostat eurostat: eurostat.c bcc32 -Dborland -I$(INCLUDE_DIR) -L$(LIB_DIR) -n$(TARGET_DIR) eurostat.c Compile/link under SUN UNIX **************************** cc -Xc -DSUN -o eurostat eurostat.c -lm -lsocket -lnsl Compile/link under LINUX ************************ gcc -DLINUX -o eurostat eurostat.c -lm