home *** CD-ROM | disk | FTP | other *** search
/ nisttime.carsoncity.k12.mi.us / nisttime.carsoncity.k12.mi.us.tar / nisttime.carsoncity.k12.mi.us / pub / lockclock / gettck.h < prev    next >
C/C++ Source or Header  |  1996-11-18  |  2KB  |  66 lines

  1. /*
  2.         include file gettck.h
  3.  
  4.         this file is used to define the constants
  5.         that govern the compilation of subroutine gettck
  6.     which is used to get the local time whenever
  7.     a pulse is received via the CTS line of
  8.     a serial port.
  9.  
  10.     If the constant SUN is defined, then the port
  11.     is specified as a character string of the 
  12.     form /dev/ ...
  13.  
  14.     if the constant IBMPC is defined, then the port
  15.     is specified as COM1, COM2, etc.
  16.  
  17.  
  18.     This software was developed with US Government support
  19.     and it may not be sold, restricted or licensed.  You 
  20.     may duplicate this program provided that this notice
  21.     remains in all of the copies, and you may give it to
  22.     others provided they understand and agree to this
  23.     condition.
  24.  
  25.     This program and the time protocol it uses are under 
  26.     development and the implementation may change without 
  27.     notice.
  28.  
  29.     For questions or additional information, contact:
  30.  
  31.     Judah Levine
  32.     Time and Frequency Division
  33.     NIST/847
  34.     325 Broadway
  35.     Boulder, Colorado 80303
  36.     (303) 492 7785
  37.     judah@india.colorado.edu
  38. */
  39. #define SUN   1
  40. #ifdef IBMPC
  41. #define lcreg  3        /* line control register */
  42. #define modreg 4        /* modem control register */
  43. #define lsreg  5        /* line status register   */
  44. #define msreg  6        /* modem status register  */
  45. int cmport;        /* comport to use, 1= COM1, etc. */
  46. int cmadr;        /* hardware address of this comport*/
  47. #endif
  48. /*
  49.     if this is the UNIX version then parameter tickus
  50.     gives the time interval between ticks in microseconds.
  51.     typical values are 20 ms for a SUN, 10 ms for a VAX 
  52.     and 3906 usec for a DEC ULTRIX/RISC machine like the 5000
  53.     series.  this value is used in the interpolation routine.
  54.     If this parameter is specified as 0 then the interpolation 
  55.     between ticks is disabled and the comparison will use the 
  56.     integer tick value as read from the system clock.
  57.     this constant is not needed in the MS-DOS environment
  58.     since all of those machines use a constant value of
  59.     18.2 ticks/second or about 55 milliseconds between ticks.
  60. */
  61. #ifdef SUN
  62. #include "sizint.h"
  63. LONG tickus = 3906;            /*value for DEC 5000/240 */
  64. char *dv     = "/dev/tty01";        /*serial port to use */
  65. #endif
  66.