]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Many files:
authorHarlan Stenn <stenn@ntp.org>
Wed, 1 Dec 1999 09:31:04 +0000 (09:31 -0000)
committerHarlan Stenn <stenn@ntp.org>
Wed, 1 Dec 1999 09:31:04 +0000 (09:31 -0000)
  * html/driver8.htm:
  * libparse/clk_computime.c:
  * libparse/clk_dcf7000.c:
  * libparse/clk_hopf6021.c:
  * libparse/clk_meinberg.c:
  * libparse/clk_rawdcf.c:
  * libparse/clk_rcc8000.c:
  * libparse/clk_schmid.c:
  * libparse/clk_trimtaip.c:
  * libparse/clk_trimtsip.c:
  * libparse/data_mbg.c:
  * libparse/kclk_computime.c:
  * libparse/kclk_dcf7000.c:
  * libparse/kclk_hopf6021.c:
  * libparse/kclk_meinberg.c:
  * libparse/kclk_rawdcf.c:
  * libparse/kclk_rcc8000.c:
  * libparse/kclk_schmid.c:
  * libparse/kclk_trimtaip.c:
  * libparse/kclk_trimtsip.c:
  * libparse/kparse.c:
  * libparse/kparse_conf.c:
  * libparse/parse.c:
  * libparse/parse_conf.c:
  * libparse/parsesolaris.c:
  * libparse/parsestreams.c:
  * ntpd/refclock_parse.c:
  Mods and updates
  From: Frank Kardel <kardel@acm.org>

bk: 3844ead8fMdIvh6BzKsdpPL_T4lbpg

28 files changed:
ChangeLog
html/driver8.htm
libparse/clk_computime.c
libparse/clk_dcf7000.c
libparse/clk_hopf6021.c
libparse/clk_meinberg.c
libparse/clk_rawdcf.c
libparse/clk_rcc8000.c
libparse/clk_schmid.c
libparse/clk_trimtaip.c
libparse/clk_trimtsip.c
libparse/data_mbg.c
libparse/kclk_computime.c
libparse/kclk_dcf7000.c
libparse/kclk_hopf6021.c
libparse/kclk_meinberg.c
libparse/kclk_rawdcf.c
libparse/kclk_rcc8000.c
libparse/kclk_schmid.c
libparse/kclk_trimtaip.c
libparse/kclk_trimtsip.c
libparse/kparse.c
libparse/kparse_conf.c
libparse/parse.c
libparse/parse_conf.c
libparse/parsesolaris.c
libparse/parsestreams.c
ntpd/refclock_parse.c

index 78091ea408872a5ebc577bd0d464556933b8a9bf..ff2e77f1157f2793829d9316964fa0cdd5b77020 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,35 @@
 1999-12-01  Harlan Stenn  <stenn@whimsy.udel.edu>
 
+       * html/driver8.htm: 
+       * libparse/clk_computime.c: 
+       * libparse/clk_dcf7000.c: 
+       * libparse/clk_hopf6021.c: 
+       * libparse/clk_meinberg.c: 
+       * libparse/clk_rawdcf.c: 
+       * libparse/clk_rcc8000.c: 
+       * libparse/clk_schmid.c: 
+       * libparse/clk_trimtaip.c: 
+       * libparse/clk_trimtsip.c: 
+       * libparse/data_mbg.c: 
+       * libparse/kclk_computime.c: 
+       * libparse/kclk_dcf7000.c: 
+       * libparse/kclk_hopf6021.c: 
+       * libparse/kclk_meinberg.c: 
+       * libparse/kclk_rawdcf.c: 
+       * libparse/kclk_rcc8000.c: 
+       * libparse/kclk_schmid.c: 
+       * libparse/kclk_trimtaip.c: 
+       * libparse/kclk_trimtsip.c: 
+       * libparse/kparse.c: 
+       * libparse/kparse_conf.c: 
+       * libparse/parse.c: 
+       * libparse/parse_conf.c: 
+       * libparse/parsesolaris.c: 
+       * libparse/parsestreams.c: 
+       * ntpd/refclock_parse.c: 
+       Mods and updates
+       From: Frank Kardel <kardel@acm.org>
+       
        * acconfig.h: PCF refclock
        * configure.in: 
        * html/driver35.htm: 
index 890b6c5e9706151f01075706386e865bc4eab09f..17ab6c357e0d5918ca29094d44dc6dcc9cdd7fb1 100644 (file)
@@ -82,7 +82,7 @@ available. refclock_ppstime lists then the PPS timestamp and
 refclock_ppsskew lists the difference between RS232
 derived timestamp and the PPS timestamp.
 
-<P>Currently, fourteen clock types (devices /dev/refclock-0 -
+<P>Currently, eighteen clock types (devices /dev/refclock-0 -
 /dev/refclock-3) are supported by the PARSE driver.
 <BR>A note on the implementations:
 <UL><li>These implementations where mainly done <B><I>WITHOUT</I></B>
@@ -120,16 +120,16 @@ the vendors web pages. They are linked to the respective vendors.
 <B><TT>server 127.127.8.0-3 mode 0</TT></B>
 
 <p><B><TT><A HREF="http://www.meinberg.de">Meinberg </A>PZF535/<A
-HREF="http://www.meinberg.de/english/pzf509.htm">PZF509 receiver</A> (FM
+HREF="http://www.meinberg.de/english/products/pzf509.htm">PZF509 receiver</A> (FM
 demodulation/TCXO / 50us)</TT></B>
 <BR>
 <LI>
 <B><TT>server 127.127.8.0-3 mode 1</TT></B>
 
 <p><B><TT><A HREF="http://www.meinberg.de">Meinberg </A> PZF535/<A
-HREF="http://www.meinberg.de/english/pzf509.htm">PZF509
+HREF="http://www.meinberg.de/english/products/pzf509.htm">PZF509
 receiver</A> (FM demodulation/OCXO / 50us)</TT></B>
-<BR><A HREF="http://www.meinberg.de/english/pzf509.htm"><IMG
+<BR><A HREF="http://www.meinberg.de/english/products/pzf509.htm"><IMG
 SRC="pic/pzf509.jpg" ALT="BILD PZF509" HEIGHT=300 WIDTH=260
 ALIGN=TEXTTOP></A>
 <BR>
@@ -137,9 +137,9 @@ ALIGN=TEXTTOP></A>
 <B><TT>server 127.127.8.0-3 mode 2</TT></B>
 
 <p><B><TT><A HREF="http://www.meinberg.de">Meinberg </A> DCF U/A
-31/<A HREF="http://www.meinberg.de/english/c51.htm">DCF C51 receiver</A>
+31/<A HREF="http://www.meinberg.de/english/products/c51.htm">DCF C51 receiver</A>
 (AM demodulation / 4ms)</TT></B>
-<BR><A HREF="http://www.meinberg.de/english/c51.htm"><IMG
+<BR><A HREF="http://www.meinberg.de/english/products/c51.htm"><IMG
 SRC="pic/c51.jpg" ALT="BILD C51" HEIGHT=180 WIDTH=330 ALIGN=TEXTTOP></A>
 <BR>
 <LI>
@@ -171,9 +171,9 @@ demodulation
 <B><TT>server 127.127.8.0-3 mode 7</TT></B>
 
 <p><B><TT><A HREF="http://www.meinberg.de">Meinberg </A> <A
-HREF="http://www.meinberg.de/english/gps167.htm">GPS166/GPS167
+HREF="http://www.meinberg.de/english/products/gps167.htm">GPS166/GPS167
 receiver</A> (GPS / &lt;&lt;1us)</TT></B>
-<BR><A HREF="http://www.meinberg.de/english/gps167.htm"><IMG
+<BR><A HREF="http://www.meinberg.de/english/products/gps167.htm"><IMG
 SRC="pic/gps167.jpg" ALT="BILD GPS167" HEIGHT=300 WIDTH=280
 ALIGN=TEXTTOP></A>
 <BR>
@@ -237,6 +237,16 @@ ALIGN=TEXTTOP></A>
 
 <p><B><TT>WHARTON 400A Series Clocks with a 404.2 Serial
 Interface</TT></B>
+<LI>
+<B><TT>server 127.127.8.0-3 mode 16</TT></B>
+
+<p><B><TT>RAWDCF receiver (DTR=low/RTS=high)
+</TT></B>
+<LI>
+<B><TT>server 127.127.8.0-3 mode 17</TT></B>
+
+<p><B><TT>VARITEXT Receiver (MSF)
+</TT></B>
 </UL>
 <p>
 Actual data formats and set-up requirements of the various clocks can be
index 8e050c00fcadfc981f07656eb2911b663daa03a6..2b19392519fa5cd4fa311d4f3982d5b74f22f977 100644 (file)
@@ -4,9 +4,9 @@
 
 #if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_COMPUTIME)
 /*
- * /src/NTP/ntp-4/libparse/clk_computime.c,v 4.5 1998/06/14 21:09:34 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/clk_computime.c,v 4.6 1999/11/28 09:13:49 kardel RELEASE_19991128_A
  *
- * clk_computime.c,v 4.5 1998/06/14 21:09:34 kardel RELEASE_19990228_A
+ * clk_computime.c,v 4.6 1999/11/28 09:13:49 kardel RELEASE_19991128_A
  * 
  * Supports Diem's Computime Radio Clock
  * 
@@ -171,6 +171,9 @@ int clk_computime_bs;
 
 /*
  * clk_computime.c,v
+ * Revision 4.6  1999/11/28 09:13:49  kardel
+ * RECON_4_0_98F
+ *
  * Revision 4.5  1998/06/14 21:09:34  kardel
  * Sun acc cleanup
  *
index 845b46716d08753655d485731aa46fe318bb253d..c113ec7a7d90e692eb0ca5e3277007c1dd215bd4 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * /src/NTP/ntp-4/libparse/clk_dcf7000.c,v 4.5 1998/06/14 21:09:34 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/clk_dcf7000.c,v 4.6 1999/11/28 09:13:49 kardel RELEASE_19991128_A
  *  
- * clk_dcf7000.c,v 4.5 1998/06/14 21:09:34 kardel RELEASE_19990228_A
+ * clk_dcf7000.c,v 4.6 1999/11/28 09:13:49 kardel RELEASE_19991128_A
  *
  * ELV DCF7000 module
  *
@@ -165,6 +165,9 @@ int clk_dcf7000_bs;
  * History:
  *
  * clk_dcf7000.c,v
+ * Revision 4.6  1999/11/28 09:13:49  kardel
+ * RECON_4_0_98F
+ *
  * Revision 4.5  1998/06/14 21:09:34  kardel
  * Sun acc cleanup
  *
index 06efc6ff6dc2aa6462115a9f400e2a5926e96bbd..d55c111ab5d3cb4d02e67e480dd44aaaa7b201e1 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * /src/NTP/ntp-4/libparse/clk_hopf6021.c,v 4.6 1998/11/15 20:27:57 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/clk_hopf6021.c,v 4.7 1999/11/28 09:13:49 kardel RELEASE_19991128_A
  *
- * clk_hopf6021.c,v 4.6 1998/11/15 20:27:57 kardel RELEASE_19990228_A
+ * clk_hopf6021.c,v 4.7 1999/11/28 09:13:49 kardel RELEASE_19991128_A
  *
  * Radiocode Clocks HOPF Funkuhr 6021 mit serieller Schnittstelle
  * base code version from 24th Nov 1995 - history at end
@@ -254,6 +254,9 @@ int clk_hopf6021_bs;
  * History:
  *
  * clk_hopf6021.c,v
+ * Revision 4.7  1999/11/28 09:13:49  kardel
+ * RECON_4_0_98F
+ *
  * Revision 4.6  1998/11/15 20:27:57  kardel
  * Release 4.0.73e13 reconcilation
  *
index fdffa1bf33c6e4e88ef34bfe1defd19b215f1a75..2e58cf68f73d7e0950d65cee1d5bfcf04d26ab04 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * /src/NTP/ntp-4/libparse/clk_meinberg.c,v 4.7 1999/02/21 11:09:14 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/clk_meinberg.c,v 4.8 1999/11/28 09:13:50 kardel RELEASE_19991128_A
  *  
- * clk_meinberg.c,v 4.7 1999/02/21 11:09:14 kardel RELEASE_19990228_A
+ * clk_meinberg.c,v 4.8 1999/11/28 09:13:50 kardel RELEASE_19991128_A
  *
  * Meinberg clock support
  *
@@ -718,6 +718,9 @@ int clk_meinberg_bs;
  * History:
  *
  * clk_meinberg.c,v
+ * Revision 4.8  1999/11/28 09:13:50  kardel
+ * RECON_4_0_98F
+ *
  * Revision 4.7  1999/02/21 11:09:14  kardel
  * cleanup
  *
index ac854c57b2238f42711df32fd306cd4ae80a990e..a97bbbd2cc475ba48836764146dda67ea006c11f 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * /src/NTP/ntp-4/libparse/clk_rawdcf.c,v 4.6 1998/06/14 21:09:37 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/clk_rawdcf.c,v 4.8 1999/11/28 09:13:50 kardel RELEASE_19991128_A
  *  
- * clk_rawdcf.c,v 4.6 1998/06/14 21:09:37 kardel RELEASE_19990228_A
+ * clk_rawdcf.c,v 4.8 1999/11/28 09:13:50 kardel RELEASE_19991128_A
  *
  * Raw DCF77 pulse clock support
  *
@@ -88,6 +88,10 @@ static u_long pps_rawdcf P((parse_t *, int, timestamp_t *));
 static u_long cvt_rawdcf P((unsigned char *, int, struct format *, clocktime_t *, void *));
 static u_long inp_rawdcf P((parse_t *, unsigned int, timestamp_t  *));
 
+typedef struct last_tcode {
+       time_t tcode;   /* last converted time code */
+} last_tcode_t;
+
 clockformat_t clock_rawdcf =
 {
   inp_rawdcf,                  /* DCF77 input handling */
@@ -97,7 +101,7 @@ clockformat_t clock_rawdcf =
   "RAW DCF77 Timecode",                /* direct decoding / time synthesis */
 
   61,                          /* bit buffer */
-  0                            /* no private data (currently in input buffer) */
+  sizeof(last_tcode_t)
 };
 
 static struct dcfparam
@@ -316,11 +320,12 @@ cvt_rawdcf(
           void            *local
           )
 {
+                last_tcode_t  *t = (last_tcode_t *)local;
        register unsigned char *s = (unsigned char *)buffer;
        register unsigned char *e = s + size;
        register unsigned char *b = dcfparameter.onebits;
        register unsigned char *c = dcfparameter.zerobits;
-       register unsigned rtc = CVT_NONE;
+                u_long   rtc = CVT_NONE;
        register unsigned int i, lowmax, highmax, cutoff, span;
 #define BITS 9
        unsigned char     histbuf[BITS];
@@ -458,7 +463,30 @@ cvt_rawdcf(
                c++;
        }
 
-       return (rtc == CVT_NONE) ? convert_rawdcf(buffer, size, &dcfparameter, clock_time) : rtc;
+        if (rtc == CVT_NONE)
+        {
+              rtc = convert_rawdcf(buffer, size, &dcfparameter, clock_time);
+              if (rtc == CVT_OK)
+              {
+                       time_t newtime;
+
+                       newtime = parse_to_unixtime(clock_time, &rtc);
+                       if ((rtc == CVT_OK) && t)
+                       {
+                               if ((newtime - t->tcode) == 60) /* guard against multi bit errors */
+                               {
+                                       clock_time->utctime = newtime;
+                                       t->tcode            = newtime;
+                               }
+                               else
+                               {
+                                       rtc = CVT_FAIL|CVT_BADTIME;
+                               }
+                       }
+              }
+        }
+        
+       return rtc;
 }
 
 /*
@@ -555,6 +583,12 @@ int clk_rawdcf_bs;
  * History:
  *
  * clk_rawdcf.c,v
+ * Revision 4.8  1999/11/28 09:13:50  kardel
+ * RECON_4_0_98F
+ *
+ * Revision 4.7  1999/04/01 20:07:20  kardel
+ * added checking for minutie increment of timestamps in clk_rawdcf.c
+ *
  * Revision 4.6  1998/06/14 21:09:37  kardel
  * Sun acc cleanup
  *
index 09405c73d20e8e0ffe8512b8301496af5bf53f85..ecafbde37d98986a5bb262c58307d98514ecdf46 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * /src/NTP/ntp-4/libparse/clk_rcc8000.c,v 4.5 1998/06/14 21:09:38 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/clk_rcc8000.c,v 4.6 1999/11/28 09:13:51 kardel RELEASE_19991128_A
  *  
- * clk_rcc8000.c,v 4.5 1998/06/14 21:09:38 kardel RELEASE_19990228_A
+ * clk_rcc8000.c,v 4.6 1999/11/28 09:13:51 kardel RELEASE_19991128_A
  *
  * Radiocode Clocks Ltd RCC 8000 Intelligent Off-Air Master Clock support
  *
@@ -172,6 +172,9 @@ int clk_rcc8000_bs;
  * History:
  *
  * clk_rcc8000.c,v
+ * Revision 4.6  1999/11/28 09:13:51  kardel
+ * RECON_4_0_98F
+ *
  * Revision 4.5  1998/06/14 21:09:38  kardel
  * Sun acc cleanup
  *
index 049b4e49c02d211c0b14390e22773175ad523bd6..5fb426833a0e10e8c0c4b1d39e385629e5448e50 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * /src/NTP/ntp-4/libparse/clk_schmid.c,v 4.4 1998/06/13 12:06:03 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/clk_schmid.c,v 4.5 1999/11/28 09:13:51 kardel RELEASE_19991128_A
  *  
- * clk_schmid.c,v 4.4 1998/06/13 12:06:03 kardel RELEASE_19990228_A
+ * clk_schmid.c,v 4.5 1999/11/28 09:13:51 kardel RELEASE_19991128_A
  *
  * Schmid clock support
  *
@@ -211,6 +211,9 @@ int clk_schmid_bs;
  * History:
  *
  * clk_schmid.c,v
+ * Revision 4.5  1999/11/28 09:13:51  kardel
+ * RECON_4_0_98F
+ *
  * Revision 4.4  1998/06/13 12:06:03  kardel
  * fix SYSV clock name clash
  *
index 2fd1eab7469408f74f96151cea28e05f7ea4dc9a..f18aaa06704a5cb143e3c4b703aef0d2782f1532 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * /src/NTP/ntp-4/libparse/clk_trimtaip.c,v 4.6 1998/08/16 18:46:27 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/clk_trimtaip.c,v 4.7 1999/11/28 09:13:51 kardel RELEASE_19991128_A
  *
- * clk_trimtaip.c,v 4.6 1998/08/16 18:46:27 kardel RELEASE_19990228_A
+ * clk_trimtaip.c,v 4.7 1999/11/28 09:13:51 kardel RELEASE_19991128_A
  *
  * Trimble SV6 clock support - several collected codepieces
  */
@@ -161,6 +161,9 @@ int clk_trimtaip_bs;
  * History:
  *
  * clk_trimtaip.c,v
+ * Revision 4.7  1999/11/28 09:13:51  kardel
+ * RECON_4_0_98F
+ *
  * Revision 4.6  1998/08/16 18:46:27  kardel
  * (clock_trimtaip =): changed format name
  *
index 52a753649ea66281232c361a275058dbcc7bd3d8..54367f84909398ebc1c5ec0c7532965861bcc61d 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * /src/NTP/ntp-4/libparse/clk_trimtsip.c,v 4.12 1999/02/28 13:00:08 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/clk_trimtsip.c,v 4.13 1999/11/28 09:13:51 kardel RELEASE_19991128_A
  *
- * clk_trimtsip.c,v 4.12 1999/02/28 13:00:08 kardel RELEASE_19990228_A
+ * clk_trimtsip.c,v 4.13 1999/11/28 09:13:51 kardel RELEASE_19991128_A
  *
  * Trimble TSIP support - CURRENTLY VERY MUCH UNDER CONSTRUCTION
  */
@@ -372,6 +372,9 @@ int clk_trimtsip_bs;
  * History:
  *
  * clk_trimtsip.c,v
+ * Revision 4.13  1999/11/28 09:13:51  kardel
+ * RECON_4_0_98F
+ *
  * Revision 4.12  1999/02/28 13:00:08  kardel
  * *** empty log message ***
  *
index af7987d0714a36f348ce4109b411b6f69ebb8ed8..2545b98182ae0f007e0e51d002ca67c79b4221c4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * /src/NTP/ntp-4/libparse/data_mbg.c,v 4.3 1999/02/21 12:17:42 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/data_mbg.c,v 4.3 1999/02/21 12:17:42 kardel RELEASE_19991128_A
  *
  * $Created: Sun Jul 20 12:08:14 1997 $
  *
index 14707b98801fbf2b41646c8746f26572c98401ca..abafceea9851fcbb722e619a0ada304fed5f4ee3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * /src/NTP/ntp-4/libparse/kclk_computime.c,v 4.2 1998/07/11 10:05:27 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/kclk_computime.c,v 4.2 1998/07/11 10:05:27 kardel RELEASE_19991128_A
  *
  * $Created: Sat Jun 13 09:58:27 1998 $
  *
index e5d9436c565b2ee0a511f2355b46f77b2e14c8dc..1b6a69b25595c90e2f891bba5ca80b6424eabdef 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * /src/NTP/ntp-4/libparse/kclk_dcf7000.c,v 4.2 1998/07/11 10:05:27 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/kclk_dcf7000.c,v 4.2 1998/07/11 10:05:27 kardel RELEASE_19991128_A
  *
  * $Created: Sat Jun 13 09:59:11 1998 $
  *
index 2d51788b625e58ae9727435083ac53e9b18cf213..0c8db182dc112d054e7feeca2e2bafbeed06a127 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * /src/NTP/ntp-4/libparse/kclk_hopf6021.c,v 4.2 1998/07/11 10:05:28 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/kclk_hopf6021.c,v 4.2 1998/07/11 10:05:28 kardel RELEASE_19991128_A
  *
  * $Created: Sat Jun 13 09:59:57 1998 $
  *
index 7cdb3e17093ad470cebf88eb85d02f08a271a804..55ddbc68a0b8d7b2fdbc429599129b59a18d553f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * /src/NTP/ntp-4/libparse/kclk_meinberg.c,v 4.2 1998/07/11 10:05:28 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/kclk_meinberg.c,v 4.2 1998/07/11 10:05:28 kardel RELEASE_19991128_A
  *
  * $Created: Sat Jun 13 10:00:28 1998 $
  *
index 45ba743764f2150c45786c7560820f8d8b453e12..52aa643af65a00bc5e810c79d7cc3b7c616b872d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * /src/NTP/ntp-4/libparse/kclk_rawdcf.c,v 4.1 1998/06/13 12:07:55 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/kclk_rawdcf.c,v 4.1 1998/06/13 12:07:55 kardel RELEASE_19991128_A
  *
  * $Created: Sat Jun 13 10:03:35 1998 $
  *
index 67e6550b96c1398c145641e09fe5a8252816ea0a..2e80f83669315d50189f624ce0e58e38561bd754 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * /src/NTP/ntp-4/libparse/kclk_rcc8000.c,v 4.2 1998/07/11 10:05:28 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/kclk_rcc8000.c,v 4.2 1998/07/11 10:05:28 kardel RELEASE_19991128_A
  *
  * $Created: Sat Jun 13 10:01:11 1998 $
  *
index ee87b7eed059330801ae8d87482f1fb263c67ca4..bd0b13d747540d783809e62ec69a72238c9861fc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * /src/NTP/ntp-4/libparse/kclk_schmid.c,v 4.2 1998/07/11 10:05:28 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/kclk_schmid.c,v 4.2 1998/07/11 10:05:28 kardel RELEASE_19991128_A
  *
  * $Created: Sat Jun 13 10:01:42 1998 $
  *
index 20193f4e7b27546724d721a57232229c0b709238..47364d6f3c0f38904f7d12b75cb2e4e847231d19 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * /src/NTP/ntp-4/libparse/kclk_trimtaip.c,v 4.2 1998/07/11 10:05:29 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/kclk_trimtaip.c,v 4.2 1998/07/11 10:05:29 kardel RELEASE_19991128_A
  *
  * $Created: Sat Jun 13 10:02:35 1998 $
  *
index 1dcfec8029f8a5712326203c553849779be999e6..b52ea050edbc2fdaeda18f3a1d3ed5e102a6ade9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * /src/NTP/ntp-4/libparse/kclk_trimtsip.c,v 4.2 1998/07/11 10:05:29 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/kclk_trimtsip.c,v 4.2 1998/07/11 10:05:29 kardel RELEASE_19991128_A
  *
  * $Created: Sat Jun 13 10:04:12 1998 $
  *
index a79943d76d812562e32166231b8bde05115975f3..555ae96761585824e9ed1a25ea041bcb469a16f8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * /src/NTP/ntp-4/libparse/kparse.c,v 4.2 1998/07/11 10:05:29 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/kparse.c,v 4.2 1998/07/11 10:05:29 kardel RELEASE_19991128_A
  *
  * $Created: Sat Jun 13 10:04:47 1998 $
  *
index be8628e3e179782d42a2a96c52f68f0e2c6f9705..2b3be53c24f6f50e129021712656fbb0697768c0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * /src/NTP/ntp-4/libparse/kparse_conf.c,v 4.2 1998/07/11 10:05:30 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/kparse_conf.c,v 4.2 1998/07/11 10:05:30 kardel RELEASE_19991128_A
  *
  * $Created: Sat Jun 13 10:05:32 1998 $
  *
index 3d8485e142547c33c69403afecedc0e3ce76dd8a..869b70f8b96458ea4b3abef6bd24cb9ce3b1c2b3 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * /src/NTP/ntp-4/libparse/parse.c,v 4.13 1999/02/28 11:50:20 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/parse.c,v 4.14 1999/11/28 09:13:52 kardel RELEASE_19991128_A
  *  
- * parse.c,v 4.13 1999/02/28 11:50:20 kardel RELEASE_19990228_A
+ * parse.c,v 4.14 1999/11/28 09:13:52 kardel RELEASE_19991128_A
  *
  * Parser module for reference clock
  *
@@ -27,7 +27,7 @@
 #if defined(REFCLOCK) && defined(CLOCK_PARSE)
 
 #if    !(defined(lint) || defined(__GNUC__))
-static char rcsid[] = "parse.c,v 4.13 1999/02/28 11:50:20 kardel RELEASE_19990228_A";
+static char rcsid[] = "parse.c,v 4.14 1999/11/28 09:13:52 kardel RELEASE_19991128_A";
 #endif
 
 #include <sys/types.h>
@@ -869,6 +869,9 @@ int parse_bs;
  * History:
  *
  * parse.c,v
+ * Revision 4.14  1999/11/28 09:13:52  kardel
+ * RECON_4_0_98F
+ *
  * Revision 4.13  1999/02/28 11:50:20  kardel
  * (timepacket): removed unecessary code
  *
index 3333cd97d6e15c1d2e505364c11fe511689a147b..353775d01407e56ced9b504a442a33bef7a8e978 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * /src/NTP/ntp-4/libparse/parse_conf.c,v 4.4 1999/02/28 15:27:25 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/parse_conf.c,v 4.5 1999/11/28 09:13:53 kardel RELEASE_19991128_A
  *  
- * parse_conf.c,v 4.4 1999/02/28 15:27:25 kardel RELEASE_19990228_A
+ * parse_conf.c,v 4.5 1999/11/28 09:13:53 kardel RELEASE_19991128_A
  *
  * Parser configuration module for reference clocks
  *
@@ -131,6 +131,9 @@ int parse_conf_bs;
  * History:
  *
  * parse_conf.c,v
+ * Revision 4.5  1999/11/28 09:13:53  kardel
+ * RECON_4_0_98F
+ *
  * Revision 4.4  1999/02/28 15:27:25  kardel
  * wharton clock integration
  *
index e0e7c23bd382e0dbbefbb48c0484b447967d3467..ef56da570e96a2eebb3a13f19aec576052174a14 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * /src/NTP/ntp-4/libparse/parsesolaris.c,v 4.6 1998/11/15 21:56:08 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/parsesolaris.c,v 4.6 1998/11/15 21:56:08 kardel RELEASE_19991128_A
  *  
- * parsesolaris.c,v 4.6 1998/11/15 21:56:08 kardel RELEASE_19990228_A
+ * parsesolaris.c,v 4.6 1998/11/15 21:56:08 kardel RELEASE_19991128_A
  *
  * STREAMS module for reference clocks
  *
@@ -19,7 +19,7 @@
 #define _KERNEL                        /* it is a _KERNEL module */
 
 #ifndef lint
-static char rcsid[] = "parsesolaris.c,v 4.6 1998/11/15 21:56:08 kardel RELEASE_19990228_A";
+static char rcsid[] = "parsesolaris.c,v 4.6 1998/11/15 21:56:08 kardel RELEASE_19991128_A";
 #endif
 
 #include <sys/types.h>
index 1578229e19a81504ea3397fbb45e334056be8f3f..8510ea11472930c83b2835013d2c3f47d7c40471 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * /src/NTP/ntp-4/libparse/parsestreams.c,v 4.6 1998/12/20 23:45:31 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/libparse/parsestreams.c,v 4.7 1999/11/28 09:13:53 kardel RELEASE_19991128_A
  *  
- * parsestreams.c,v 4.6 1998/12/20 23:45:31 kardel RELEASE_19990228_A
+ * parsestreams.c,v 4.7 1999/11/28 09:13:53 kardel RELEASE_19991128_A
  *
  * STREAMS module for reference clocks
  * (SunOS4.x)
@@ -23,7 +23,7 @@
 #endif
 
 #ifndef lint
-static char rcsid[] = "parsestreams.c,v 4.6 1998/12/20 23:45:31 kardel RELEASE_19990228_A";
+static char rcsid[] = "parsestreams.c,v 4.7 1999/11/28 09:13:53 kardel RELEASE_19991128_A";
 #endif
 
 #ifndef KERNEL
@@ -239,7 +239,7 @@ xxxinit(
                }
                else
                {
-                       static char revision[] = "4.6";
+                       static char revision[] = "4.7";
                        char *s, *S, *t;
          
                        s = rcsid;              /* NOOP - keep compilers happy */
@@ -522,7 +522,7 @@ parseopen(
 #ifdef VDDRV
                        printf("%s: Copyright (C) 1991-1998, Frank Kardel\n", parsesync_vd.Drv_name);
 #else
-                       printf("%s: Copyright (C) 1991-1998, Frank Kardel\n", "parsestreams.c,v 4.6 1998/12/20 23:45:31 kardel RELEASE_19990228_A");
+                       printf("%s: Copyright (C) 1991-1998, Frank Kardel\n", "parsestreams.c,v 4.7 1999/11/28 09:13:53 kardel RELEASE_19991128_A");
 #endif
                        notice = 1;
                }
@@ -1307,6 +1307,9 @@ zs_xsisr(
  * History:
  *
  * parsestreams.c,v
+ * Revision 4.7  1999/11/28 09:13:53  kardel
+ * RECON_4_0_98F
+ *
  * Revision 4.6  1998/12/20 23:45:31  kardel
  * fix types and warnings
  *
index ea081e1517665cb84a13ce2163356c6bc8082b10..95b93aa2fce13c3667c449ef40b333794412b9a1 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * /src/NTP/ntp-4/ntpd/refclock_parse.c,v 4.29 1999/02/28 19:58:23 kardel RELEASE_19990228_A
+ * /src/NTP/ntp-4/ntpd/refclock_parse.c,v 4.36 1999/11/28 17:18:20 kardel RELEASE_19991128_A
  *
- * refclock_parse.c,v 4.29 1999/02/28 19:58:23 kardel RELEASE_19990228_A
+ * refclock_parse.c,v 4.36 1999/11/28 17:18:20 kardel RELEASE_19991128_A
  *
  * generic reference clock driver for receivers
  *
 #include "ascii.h"
 #include "ieee754io.h"
 
-static char rcsid[]="refclock_parse.c,v 4.29 1999/02/28 19:58:23 kardel RELEASE_19990228_A";
+static char rcsid[]="refclock_parse.c,v 4.36 1999/11/28 17:18:20 kardel RELEASE_19991128_A";
 
 /**===========================================================================
  ** external interface to ntp mechanism
@@ -341,7 +341,7 @@ struct parseunit
        u_char        flags;            /* flags (leap_control) */
        u_long        lastchange;       /* time (ntp) when last state change accured */
        u_long        statetime[CEVNT_MAX+1]; /* accumulated time of clock states */
-       u_char        pollneeddata;     /* 1 for receive sample expected in PPS mode */
+       u_long        pollneeddata;     /* current_time(!=0) for receive sample expected in PPS mode */
        u_short       lastformat;       /* last format used */
        u_long        lastsync;         /* time (ntp) when clock was last seen fully synchronized */
        u_long        lastmissed;       /* time (ntp) when poll didn't get data (powerup heuristic) */
@@ -609,16 +609,17 @@ static poll_info_t wsdcf_pollinfo = { WS_POLLRATE, WS_POLLCMD, WS_CMDSIZE };
  * RAWDCF receivers that need to be powered from DTR
  * (like Expert mouse clock)
  */
-static int     rawdcfdtr_init  P((struct parseunit *));
-#define RAWDCFDTR_DESCRIPTION  "RAW DCF77 CODE (DTR OPTION)"
-#define RAWDCFDTR_INIT                 rawdcfdtr_init
+static int     rawdcf_init_1   P((struct parseunit *));
+#define RAWDCFDTRSET_DESCRIPTION       "RAW DCF77 CODE (DTR SET/RTS CLR)"
+#define RAWDCFDTRSET_INIT              rawdcf_init_1
 
 /*
- * RAWDCF receivers that need to be powered from RTS
+ * RAWDCF receivers that need to be powered from
+ * DTR CLR and RTS SET
  */
-static int     rawdcfrts_init  P((struct parseunit *));
-#define RAWDCFRTS_DESCRIPTION  "RAW DCF77 CODE (RTS OPTION)"
-#define RAWDCFRTS_INIT                 rawdcfrts_init
+static int     rawdcf_init_2   P((struct parseunit *));
+#define RAWDCFDTRCLRRTSSET_DESCRIPTION "RAW DCF77 CODE (DTR CLR/RTS SET)"
+#define RAWDCFDTRCLRRTSSET_INIT        rawdcf_init_2
 
 /*
  * Trimble GPS receivers (TAIP and TSIP protocols)
@@ -766,6 +767,8 @@ static poll_info_t rcc8000_pollinfo = { RCC_POLLRATE, RCC_POLLCMD, RCC_CMDSIZE }
 #define COMPUTIME_SAMPLES     5
 #define COMPUTIME_KEEP        3
 
+static poll_info_t we400a_pollinfo = { 60, "T", 1 };
+
 /*
  * Varitext Radio Clock Receiver
  */
@@ -1144,7 +1147,7 @@ static struct parse_clockinfo
        {                               /* mode 14 */
                RAWDCF_FLAGS,
                NO_POLL,
-               RAWDCFDTR_INIT,
+               RAWDCFDTRSET_INIT,
                NO_EVENT,
                NO_END,
                NO_MESSAGE,
@@ -1152,7 +1155,7 @@ static struct parse_clockinfo
                RAWDCF_ROOTDELAY,
                RAWDCF_BASEDELAY,
                DCF_A_ID,
-               RAWDCFDTR_DESCRIPTION,
+               RAWDCFDTRSET_DESCRIPTION,
                RAWDCF_FORMAT,
                DCF_TYPE,
                RAWDCF_MAXUNSYNC,
@@ -1165,31 +1168,54 @@ static struct parse_clockinfo
                RAWDCF_KEEP
        },
        {                               /* mode 15 */
-       0,                              /* operation flags (io modes) */
-       NO_POLL,                        /* active poll routine */
-       NO_INIT,                        /* active poll init routine */
-       NO_EVENT,               /* special event handling (e.g. reset clock) */
-       NO_END,                         /* active poll end routine */
-       NO_MESSAGE,                     /* process a lower layer message */
-       NO_DATA,                /* local data area for "poll" mechanism */
-       0,                              /* rootdelay */
-       11.0 /* bits */ / 9600,         /* current offset by which the RS232
-                               time code is delayed from the actual time */
-       DCF_ID,                         /* ID code */
-       "WHARTON 400A Series clock",    /* device name */
-       "WHARTON 400A Series clock Output Format 1",    /* fixed format */
-               /* Must match a format-name in a libparse/clk_xxx.c file */
-       DCF_TYPE,                       /* clock type (ntp control) */
-       (1*60*60)/*?*/, /* time to trust oscillator after loosing synch */
-       B9600,                          /* terminal input & output baudrate */
-       (CS8|CREAD|PARENB|CLOCAL|HUPCL), /* terminal control flags */
-       0,                              /* terminal input flags */
-       0,                              /* terminal output flags */
-       0,                              /* terminal local flags */
-       5/*?*/,                         /* samples for median filter */
-       3/*?*/,                         /* samples for median filter to keep */
+               0,                              /* operation flags (io modes) */
+               poll_dpoll,                     /* active poll routine */
+               poll_init,                      /* active poll init routine */
+               NO_EVENT,                       /* special event handling (e.g. reset clock) */
+               NO_END,                         /* active poll end routine */
+               NO_MESSAGE,                     /* process a lower layer message */
+               ((void *)(&we400a_pollinfo)),   /* local data area for "poll" mechanism */
+               0,                              /* rootdelay */
+               1.0 / 960,                      /* current offset by which the RS232
+                                               time code is delayed from the actual time */
+               DCF_ID,                         /* ID code */
+               "WHARTON 400A Series clock",    /* device name */
+               "WHARTON 400A Series clock Output Format 5",    /* fixed format */
+                       /* Must match a format-name in a libparse/clk_xxx.c file */
+               DCF_TYPE,                       /* clock type (ntp control) */
+               (1*60*60),                      /* time to trust oscillator after loosing synch */
+               B9600,                          /* terminal input & output baudrate */
+               (CS8|CREAD|PARENB|CLOCAL|HUPCL),/* terminal control flags */
+               0,                              /* terminal input flags */
+               0,                              /* terminal output flags */
+               0,                              /* terminal local flags */
+               5,                              /* samples for median filter */
+               3,                              /* samples for median filter to keep */
        },
-        {                            /* mode 16 */
+       {                               /* mode 16 - RAWDCF RTS set, DTR clr */
+               RAWDCF_FLAGS,
+               NO_POLL,
+               RAWDCFDTRCLRRTSSET_INIT,
+               NO_EVENT,
+               NO_END,
+               NO_MESSAGE,
+               NO_DATA,
+               RAWDCF_ROOTDELAY,
+               RAWDCF_BASEDELAY,
+               DCF_A_ID,
+               RAWDCFDTRCLRRTSSET_DESCRIPTION,
+               RAWDCF_FORMAT,
+               DCF_TYPE,
+               RAWDCF_MAXUNSYNC,
+               RAWDCF_SPEED,
+               RAWDCF_CFLAG,
+               RAWDCF_IFLAG,
+               RAWDCF_OFLAG,
+               RAWDCF_LFLAG,
+               RAWDCF_SAMPLES,
+               RAWDCF_KEEP
+       },
+        {                            /* mode 17 */
                 VARITEXT_FLAGS,
                 NO_POLL,
                 NO_INIT,
@@ -1211,30 +1237,7 @@ static struct parse_clockinfo
                 VARITEXT_LFLAG,
                 VARITEXT_SAMPLES,
                 VARITEXT_KEEP
-        },
-       {                               /* mode 17 */
-               RAWDCF_FLAGS,
-               NO_POLL,
-               RAWDCFRTS_INIT,
-               NO_EVENT,
-               NO_END,
-               NO_MESSAGE,
-               NO_DATA,
-               RAWDCF_ROOTDELAY,
-               RAWDCF_BASEDELAY,
-               DCF_A_ID,
-               RAWDCFRTS_DESCRIPTION,
-               RAWDCF_FORMAT,
-               DCF_TYPE,
-               RAWDCF_MAXUNSYNC,
-               RAWDCF_SPEED,
-               RAWDCF_CFLAG,
-               RAWDCF_IFLAG,
-               RAWDCF_OFLAG,
-               RAWDCF_LFLAG,
-               RAWDCF_SAMPLES,
-               RAWDCF_KEEP
-       },
+        }
 };
 
 static int ncltypes = sizeof(parse_clockinfo) / sizeof(struct parse_clockinfo);
@@ -1554,9 +1557,9 @@ ppsclock_init(
            ioctl(parse->generic->io.fd, I_PUSH, (caddr_t)m2) == -1)
        {
                if (errno != EINVAL)
-       {
-               msyslog(LOG_ERR, "PARSE receiver #%d: ppsclock_init: ioctl(fd, I_PUSH, \"ppsclock\"): %m",
-                       CLK_UNIT(parse->peer));
+               {
+                       msyslog(LOG_ERR, "PARSE receiver #%d: ppsclock_init: ioctl(fd, I_PUSH, \"ppsclock\"): %m",
+                               CLK_UNIT(parse->peer));
                }
                return 0;
        }
@@ -1586,8 +1589,8 @@ stream_init(
        if (ioctl(parse->generic->io.fd, I_PUSH, (caddr_t)m1) == -1)
        {
                if (errno != EINVAL) /* accept non-existence */
-       {
-               msyslog(LOG_ERR, "PARSE receiver #%d: stream_init: ioctl(fd, I_PUSH, \"parse\"): %m", CLK_UNIT(parse->peer));
+               {
+                       msyslog(LOG_ERR, "PARSE receiver #%d: stream_init: ioctl(fd, I_PUSH, \"parse\"): %m", CLK_UNIT(parse->peer));
                }
                return 0;
        }
@@ -2032,10 +2035,10 @@ local_input(
                        }
                        else
                        {
-                       memmove((caddr_t)rbufp->recv_buffer,
-                               (caddr_t)&parse->parseio.parse_dtime,
-                               sizeof(parsetime_t));
-                       parse_iodone(&parse->parseio);
+                               memmove((caddr_t)rbufp->recv_buffer,
+                                       (caddr_t)&parse->parseio.parse_dtime,
+                                       sizeof(parsetime_t));
+                               parse_iodone(&parse->parseio);
                                rbufp->recv_length = sizeof(parsetime_t);
                                return 1; /* got something & in place return */
                        }
@@ -2132,18 +2135,18 @@ parsestate(
                const char *name;
        } flagstrings[] =
          {
-                 { PARSEB_ANNOUNCE, "DST SWITCH WARNING" },
-                 { PARSEB_POWERUP,  "NOT SYNCHRONIZED" },
-                 { PARSEB_NOSYNC,   "TIME CODE NOT CONFIRMED" },
-                 { PARSEB_DST,      "DST" },
-                 { PARSEB_UTC,      "UTC DISPLAY" },
-                 { PARSEB_LEAPADD,  "LEAP ADD WARNING" },
-                 { PARSEB_LEAPDEL,  "LEAP DELETE WARNING" },
+                 { PARSEB_ANNOUNCE,   "DST SWITCH WARNING" },
+                 { PARSEB_POWERUP,    "NOT SYNCHRONIZED" },
+                 { PARSEB_NOSYNC,     "TIME CODE NOT CONFIRMED" },
+                 { PARSEB_DST,        "DST" },
+                 { PARSEB_UTC,        "UTC DISPLAY" },
+                 { PARSEB_LEAPADD,    "LEAP ADD WARNING" },
+                 { PARSEB_LEAPDEL,    "LEAP DELETE WARNING" },
                  { PARSEB_LEAPSECOND, "LEAP SECOND" },
-                 { PARSEB_ALTERNATE,"ALTERNATE ANTENNA" },
-                 { PARSEB_TIMECODE, "TIME CODE" },
-                 { PARSEB_PPS,      "PPS" },
-                 { PARSEB_POSITION, "POSITION" },
+                 { PARSEB_ALTERNATE,  "ALTERNATE ANTENNA" },
+                 { PARSEB_TIMECODE,   "TIME CODE" },
+                 { PARSEB_PPS,        "PPS" },
+                 { PARSEB_POSITION,   "POSITION" },
                  { 0 }
          };
 
@@ -2538,9 +2541,6 @@ parse_start(
        peer->sstclktype      = parse->parse_type->cl_type;
        peer->precision       = sys_precision;
        
-       peer->burst           = NTP_SHIFT;
-       peer->flags          |= FLAG_BURST;
-       
        peer->stratum         = STRATUM_REFCLOCK;
        if (peer->stratum <= 1)
            memmove((char *)&parse->generic->refid, parse->parse_type->cl_id, 4);
@@ -2737,7 +2737,7 @@ parse_start(
        }
 #endif
 #endif
-  
+
        /*
         * try to do any special initializations
         */
@@ -2816,9 +2816,11 @@ parse_poll(
         */
        parse->generic->polls++;
 
-       if (parse->pollneeddata)
+       if (parse->pollneeddata && 
+           ((current_time - parse->pollneeddata) > (1<<(max(min(parse->peer->hpoll, parse->peer->ppoll), parse->peer->minpoll)))))
        {
                /*
+                * start worrying when exceeding a poll inteval
                 * bad news - didn't get a response last time
                 */
                parse->generic->noreply++;
@@ -2832,7 +2834,7 @@ parse_poll(
        /*
         * we just mark that we want the next sample for the clock filter
         */
-       parse->pollneeddata = 1;
+       parse->pollneeddata = current_time;
 
        if (parse->parse_type->cl_poll)
        {
@@ -3380,7 +3382,7 @@ parse_process(
                                        if (reftime.l_uf & (unsigned)0x80000000)
                                                reftime.l_ui++;
                                        reftime.l_uf = 0;
-                                       
+
                                        
                                        /*
                                         * implied on second offset
@@ -3535,7 +3537,7 @@ parse_process(
 
        refclock_receive(parse->peer);
 }
-
+\f
 /**===========================================================================
  ** special code for special clocks
  **/
@@ -4149,7 +4151,7 @@ poll_init(
 
        return 0;
 }
-
+\f
 /**===========================================================================
  ** Trimble support
  **/
@@ -4260,7 +4262,7 @@ trimbletaip_event(
  * of the PPS pulse for accurate timing. Where it is determined that
  * the offset is way off, when first starting up ntpd for example,
  * the timing of the data stream is used until the offset becomes low enough
- * (|offset| < clock_max), at which point the pps offset is used.
+ * (|offset| < CLOCK_MAX), at which point the pps offset is used.
  *
  * It can use either option for receiving PPS information - the 'ppsclock'
  * stream pushed onto the serial data interface to timestamp the Carrier
@@ -4447,7 +4449,7 @@ static int
 trimbletsip_setup(
                  struct parseunit *parse,
                  const char *reason
-       )
+                 )
 {
        u_char buffer[256];
        struct txbuf buf;
@@ -4455,34 +4457,34 @@ trimbletsip_setup(
        buf.txt = buffer;
   
        sendcmd(&buf, CMD_CVERSION);    /* request software versions */
-               sendetx(&buf, parse);
-
+       sendetx(&buf, parse);
+       
        sendcmd(&buf, CMD_COPERPARAM);  /* set operating parameters */
-               sendbyte(&buf, 4);      /* static */
-               sendflt(&buf, 5.0*D2R); /* elevation angle mask = 10 deg XXX */
-               sendflt(&buf, 4.0);     /* s/n ratio mask = 6 XXX */
-               sendflt(&buf, 12.0);    /* PDOP mask = 12 */
-               sendflt(&buf, 8.0);     /* PDOP switch level = 8 */
-               sendetx(&buf, parse);
-
+       sendbyte(&buf, 4);      /* static */
+       sendflt(&buf, 5.0*D2R); /* elevation angle mask = 10 deg XXX */
+       sendflt(&buf, 4.0);     /* s/n ratio mask = 6 XXX */
+       sendflt(&buf, 12.0);    /* PDOP mask = 12 */
+       sendflt(&buf, 8.0);     /* PDOP switch level = 8 */
+       sendetx(&buf, parse);
+       
        sendcmd(&buf, CMD_CMODESEL);    /* fix mode select */
-               sendbyte(&buf, 0);      /* automatic */
-               sendetx(&buf, parse);
-
+       sendbyte(&buf, 0);      /* automatic */
+       sendetx(&buf, parse);
+       
        sendcmd(&buf, CMD_CMESSAGE);    /* request system message */
-               sendetx(&buf, parse);
-
+       sendetx(&buf, parse);
+       
        sendcmd(&buf, CMD_CSUPER);      /* superpacket fix */
-               sendbyte(&buf, 0x2);    /* binary mode */
-               sendetx(&buf, parse);
-
+       sendbyte(&buf, 0x2);    /* binary mode */
+       sendetx(&buf, parse);
+       
        sendcmd(&buf, CMD_CIOOPTIONS);  /* set I/O options */
        sendbyte(&buf, TRIM_POS_OPT);   /* position output */
        sendbyte(&buf, 0x00);   /* no velocity output */
        sendbyte(&buf, TRIM_TIME_OPT);  /* UTC, compute on seconds */
        sendbyte(&buf, 0x00);   /* no raw measurements */
-               sendetx(&buf, parse);
-
+       sendetx(&buf, parse);
+       
        sendcmd(&buf, CMD_CUTCPARAM);   /* request UTC correction data */
        sendetx(&buf, parse);
 
@@ -4611,7 +4613,7 @@ trimbletsip_init(
 #ifdef VEOL2
                        tio.c_cc[VEOL2]  = DLE;
 #endif
-}
+               }
 
                if (TTY_SETATTR(parse->generic->io.fd, &tio) == -1)
                {
@@ -5139,11 +5141,12 @@ trimbletsip_message(
  **/
 
 /*--------------------------------------------------
- * rawdcfdtr_init - set up modem lines for RAWDCF receivers
+ * rawdcf_init_1 - set up modem lines for RAWDCF receivers
+ * SET DTR line
  */
 #if defined(TIOCMSET) && (defined(TIOCM_DTR) || defined(CIOCM_DTR))
 static int
-rawdcfdtr_init(
+rawdcf_init_1(
        struct parseunit *parse
        )
 {
@@ -5161,7 +5164,7 @@ rawdcfdtr_init(
 
        if (ioctl(parse->generic->io.fd, TIOCMSET, (caddr_t)&sl232) == -1)
        {
-               msyslog(LOG_NOTICE, "PARSE receiver #%d: rawdcf_init: WARNING: ioctl(fd, TIOCMSET, [C|T]IOCM_DTR): %m", CLK_UNIT(parse->peer));
+               msyslog(LOG_NOTICE, "PARSE receiver #%d: rawdcf_init_1: WARNING: ioctl(fd, TIOCMSET, [C|T]IOCM_DTR): %m", CLK_UNIT(parse->peer));
        }
        return 0;
 }
@@ -5171,47 +5174,49 @@ rawdcfdtr_init(
        struct parseunit *parse
        )
 {
-       msyslog(LOG_NOTICE, "PARSE receiver #%d: rawdcf_init: WARNING: OS interface incapable of setting DTR to power DCF modules", CLK_UNIT(parse->peer));
+       msyslog(LOG_NOTICE, "PARSE receiver #%d: rawdcf_init_1: WARNING: OS interface incapable of setting DTR to power DCF modules", CLK_UNIT(parse->peer));
        return 0;
 }
 #endif  /* DTR initialisation type */
 
 /*--------------------------------------------------
- * rawdcfrts_init - set up modem lines for RAWDCF receivers
+ * rawdcf_init_2 - set up modem lines for RAWDCF receivers
+ * CLR DTR line, SET RTS line
  */
-#if defined(TIOCMSET) && (defined(TIOCM_RTS) || defined(CIOCM_RTS))
+#if defined(TIOCMSET) &&  (defined(TIOCM_RTS) || defined(CIOCM_RTS))
 static int
-rawdcfrts_init(
+rawdcf_init_2(
        struct parseunit *parse
        )
 {
        /*
         * You can use the RS232 to supply the power for a DCF77 receiver.
-        * Here a voltage between the RTS and the DTR line is used.
+        * Here a voltage between the DTR and the RTS line is used. Unfortunately
+        * the name has changed from CIOCM_DTR to TIOCM_DTR recently.
         */
        
 #ifdef TIOCM_RTS
-       int sl232 = TIOCM_RTS;  /* turn on RTS for power supply */
+       int sl232 = TIOCM_RTS;  /* turn on RTS, clear DTR for power supply */
 #else
-       int sl232 = CIOCM_RTS;  /* turn on RTS for power supply */
+       int sl232 = CIOCM_RTS;  /* turn on DTR for power supply */
 #endif
 
        if (ioctl(parse->generic->io.fd, TIOCMSET, (caddr_t)&sl232) == -1)
        {
-               msyslog(LOG_NOTICE, "PARSE receiver #%d: rawdcf_init: WARNING: ioctl(fd, TIOCMSET, [C|T]IOCM_RTS): %m", CLK_UNIT(parse->peer));
+               msyslog(LOG_NOTICE, "PARSE receiver #%d: rawdcf_init_2: WARNING: ioctl(fd, TIOCMSET, [C|T]IOCM_RTS): %m", CLK_UNIT(parse->peer));
        }
        return 0;
 }
 #else
 static int
-rawdcfrts_init(
+rawdcf_init_2(
        struct parseunit *parse
        )
 {
-       msyslog(LOG_NOTICE, "PARSE receiver #%d: rawdcf_init: WARNING: OS interface incapable of setting RTS to power DCF modules", CLK_UNIT(parse->peer));
+       msyslog(LOG_NOTICE, "PARSE receiver #%d: rawdcf_init_2: WARNING: OS interface incapable of setting RTS to power DCF modules", CLK_UNIT(parse->peer));
        return 0;
 }
-#endif  /* RTS initialisation type */
+#endif  /* DTR initialisation type */
 
 #else  /* defined(REFCLOCK) && defined(PARSE) */
 int refclock_parse_bs;
@@ -5221,6 +5226,27 @@ int refclock_parse_bs;
  * History:
  *
  * refclock_parse.c,v
+ * Revision 4.36  1999/11/28 17:18:20  kardel
+ * disabled burst mode
+ *
+ * Revision 4.35  1999/11/28 09:14:14  kardel
+ * RECON_4_0_98F
+ *
+ * Revision 4.34  1999/05/14 06:08:05  kardel
+ * store current_time in a suitable container (u_long)
+ *
+ * Revision 4.33  1999/05/13 21:48:38  kardel
+ * double the no response timeout interval
+ *
+ * Revision 4.32  1999/05/13 20:09:13  kardel
+ * complain only about missing polls after a full poll interval
+ *
+ * Revision 4.31  1999/05/13 19:59:32  kardel
+ * add clock type 16 for RTS set DTR clr in RAWDCF
+ *
+ * Revision 4.30  1999/02/28 20:36:43  kardel
+ * fixed printf fmt
+ *
  * Revision 4.29  1999/02/28 19:58:23  kardel
  * updated copyright information
  *