]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Add support for the JJY receiver.
authorHarlan Stenn <stenn@ntp.org>
Sat, 22 Sep 2001 06:31:31 +0000 (02:31 -0400)
committerHarlan Stenn <stenn@ntp.org>
Sat, 22 Sep 2001 06:31:31 +0000 (02:31 -0400)
From: Takao Abe <abetakao@bea.hi-ho.ne.jp>

bk: 3bac3043ALO8l_IpNEcjdxj3qO-upA

acconfig.h
configure.in
html/driver40.htm [new file with mode: 0644]
html/qth.htm
html/refclock.htm
include/ntp.h
libntp/clocktypes.c
ntpd/Makefile.am
ntpd/ntp_control.c
ntpd/refclock_conf.c

index 6e01af3644be3c9c35dffcb31f007c51dee4314e..a53ba82e408b8c19101ffcbdd3b97cf4b43c7491 100644 (file)
@@ -82,6 +82,9 @@
 /* Sun IRIG audio decoder */
 #undef CLOCK_IRIG
 
+/* JJY receiver */
+#undef CLOCK_JJY
+
 /* Rockwell Jupiter GPS clock */
 #undef CLOCK_JUPITER
 
index 1317f1a87706d7b66cf82d121d453119487f4672..9c876c3c89c4d669648899236f4d6e99174f1b35 100644 (file)
@@ -1557,7 +1557,6 @@ AC_ARG_ENABLE(HOPFSERIAL,         [  --enable-HOPFSERIAL     + hopf serial clock device
   fi
   AC_MSG_RESULT($ntp_ok)
 
-
 AC_MSG_CHECKING(for hopf PCI clock 6039)
 AC_ARG_ENABLE(HOPFPCI,         [  --enable-HOPFPCI        + hopf 6039 PCI board],
       [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
@@ -1795,6 +1794,15 @@ case "$ntp_ok$ntp_canaudio" in
  yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
 esac
 
+AC_MSG_CHECKING(for JJY receiver)
+AC_ARG_ENABLE(JJY,             [  --enable-JJY            + JJY receiver],
+      [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
+if test "$ntp_ok" = "yes"; then
+    ntp_refclock=yes
+    AC_DEFINE(CLOCK_JJY)
+fi
+AC_MSG_RESULT($ntp_ok)
+
 AC_MSG_CHECKING(Leitch CSD 5300 Master Clock System Driver)
 AC_ARG_ENABLE(LEITCH,          [  --enable-LEITCH         + Leitch CSD 5300 Master Clock System Driver],
     [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
diff --git a/html/driver40.htm b/html/driver40.htm
new file mode 100644 (file)
index 0000000..2fcc181
--- /dev/null
@@ -0,0 +1,232 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+
+<head>
+
+<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<meta http-equiv="Content-Script-Type" content="text/javascript">
+
+<title>JJY Receivers</title>
+
+<style type="text/css">
+<!--
+body      { line-height:110%; font-family:sans-serif; }
+a         { color:#0000D0; text-decoration:none; }
+a:link    { color:#0000D0; }
+a:visited { color:#0000D0; }
+a:active  { color:#0000D0; }
+a:hover   { color:#C00040; text-decoration:underline;}
+h1        { font-size:x-large; }
+h2        { font-size:large; }
+h3        { font-size:medium; }
+h4        { font-size:medium; }
+h5        { font-size:small; }
+h6        { font-size:small; }
+img       { border-style:none; border-width:0px; }
+.bold       { font-weight:bold; }
+.italic     { font-style:italic; }
+.bolditalic { font-weight:bold;; font-style:italic; }
+.monospace  { font-family:monospace; }
+.indent     { margin-left:4em; }
+-->
+</style>
+
+</head>
+
+<body>
+
+<h1>JJY Receiver</h1>
+
+<hr>
+
+<h2>Synopsis</h2>
+
+<table cellpadding="2" cellspacing="0" border="0">
+<tr><td>Address      </td><td>:&nbsp;</td><td class="monospace">127.127.40.<span class="italic">X</span></td></tr>
+<tr><td>Reference ID </td><td>:&nbsp;</td><td class="monospace">JJY</td></tr>
+<tr><td>Driver ID    </td><td>:&nbsp;</td><td class="monospace">JJY</td></tr>
+<tr><td>Serial Device</td><td>:&nbsp;</td><td class="monospace">/dev/jjy<span class="italic">X</span></td></tr>
+<tr><td>Serial Port  </td><td>:&nbsp;</td><td class="monospace">9600 BPS, 8-bits, No parity, 1-stop-bit</td></tr>
+</table>
+
+<h2>Description</h2>
+
+<p>
+This driver supports following JJY receivers sold in Japan.<br>
+</p>
+
+<ul>
+
+<li><span class="bold">Tristate Ltd. JJY01</span><br><br>
+Information<br>
+<a href="http://www.tristate.ne.jp/rf-clock.htm">http://www.tristate.ne.jp/rf-clock.htm</a> &nbsp; ( Written in Japanese only )<br>
+<br>
+Time code format<br>
+<table cellpadding="2" cellspacing="0" border="1">
+<tr><td>Command</td><td>Reply</td></tr>
+<tr class="monospace"><td>date&lt;CR&gt;&lt;LF&gt;</td><td>YYYY/MM/DD WWW&lt;CR&gt;&lt;LF&gt;</td></tr>
+<tr class="monospace"><td>stim&lt;CR&gt;&lt;LF&gt;</td><td>HH:MM:SS&lt;CR&gt;&lt;LF&gt;</td></tr>
+</table>
+<br><br>
+</li>
+
+<li><span class="bold">C-DEX Co.,Ltd. JST2000</span><br><br>
+Information<br>
+<a href="http://www.c-dex.co.jp/">http://www.c-dex.co.jp/</a> &nbsp; ( Written in Japanese only )<br>
+<br>
+Time code format<br>
+<table cellpadding="2" cellspacing="0" border="1">
+<tr><td>Command</td><td>Reply</td></tr>
+<tr class="monospace"><td>&lt;ENQ&gt;1J&lt;ETX&gt;</td><td>&lt;STX&gt;JYYMMDD HHMMSSS&lt;ETX&gt;</td></tr>
+</table>
+<br><br>
+</li>
+
+</ul>
+
+<p>
+The JJY is the radio station which transmites the JST ( Japan Standard Time ) in long wave radio.<br>
+The station JJY is operated by the Communication Research Laboratory.<br>
+An operating announcement and some information are avaiable from as follows;<br>
+<a href="http://www.crl.go.jp/">http://www.crl.go.jp/</a> &nbsp; ( English and Japanese )<br>
+<a href="http://jjy.crl.go.jp/">http://jjy.crl.go.jp/</a> &nbsp; ( Written in Japanese only )<br>
+</p>
+
+<h2>Serial Port Configuration</h2>
+
+<p>
+The driver attempts to open the device <span class="bold">/dev/jjy</span><span class="bolditalic">X</span> 
+where <span class="bolditalic">X</span> is the NTP refclock unit number as defined by the LSB of the refclock address.<br>
+Valid refclock unit numbers are 0 - 3.
+</p>
+<p>
+The user is expected to provide a symbolic link to an available serial port device.<br>
+This is typically performed by a command such as:
+</p>
+<p class="monospace">ln -s /dev/ttyS0 /dev/jjy0</p>
+<p>
+Windows NT does not support symbolic links to device files. <br>
+COM<span class="italic">X</span>: is used by the driver, based on the refclock unit number, 
+where unit 1 corresponds to COM1: and unit 3 corresponds to COM3:
+</p>
+
+<h2>NTP Configuration</h2>
+
+<p>
+The server command is used to configure the JJY receiver, where the address argument in that command is the "127.127.40.<span class="italic">X</span>".<br>
+The mode option must be added for the supported JJY receiver.<br>
+</p>
+<pre class="monospace">
+# JJY receiver 
+server 127.127.40.<span class="italic">X</span> mode <span class="italic">N</span>
+#
+#   Where
+#       X = 0 to 3
+#       N = 1 for Tristate TS-JJY01
+#           2 for C-DEX JST2000
+
+# Drift file
+driftfile /var/ntp/ntp.drift
+
+# Monitor data ( Optional )
+statsdir /var/ntp/
+filegen peerstats  file  peerstats  type day enable
+filegen loopstats  file  loopstats  type day enable
+filegen clockstats file  clockstats type day enable
+</pre>
+
+<p>
+Samples of the configuration file "<span class="bold">ntp.conf</span>" for the JJY receiver.
+</p>
+
+<ul>
+
+<li><span class="bold">Tristate Ltd. JJY01</span><br><br>
+<table cellpadding="5" cellspacing="0" border="1">
+<tr>
+<td>
+<pre class="monospace">
+
+# JJY receiver ( Tristate JJY01 )
+server <span class="bold">127.127.40.0</span> mode <span class="bold">1</span>
+
+# Drift file
+driftfile /var/ntp/ntp.drift
+</pre>
+</td>
+</tr>
+</table><br>
+</li>
+
+<li><span class="bold">C-DEX Co.,Ltd. JST2000</span><br><br>
+<table cellpadding="5" cellspacing="0" border="1">
+<tr>
+<td>
+<pre class="monospace">
+
+# JJY receiver ( C-DEX JST2000 )
+server <span class="bold">127.127.40.0</span> mode <span class="bold">2</span>
+
+# Drift file
+driftfile /var/ntp/ntp.drift
+</pre>
+</td>
+</tr>
+</table><br>
+</li>
+
+</ul>
+
+
+<h2>Fudge Factors</h2>
+<dl>
+
+<dt>time1 time</dt>
+<dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
+
+<dt>time2 time</dt>
+<dd>Not used by this driver.</dd>
+
+<dt>stratum number</dt>
+<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
+
+<dt>refid string</dt>
+<dd>Specifies the driver reference identifier, an ASCII string, with default JJY.</dd>
+
+<dt>flag1 0 | 1</dt>
+<dd>Not used by this driver.</dd>
+
+<dt>flag2 0 | 1</dt>
+<dd>Not used by this driver.</dd>
+
+<dt>flag3 0 | 1</dt>
+<dd>Not used by this driver.</dd>
+
+<dt>flag4 0 | 1</dt>
+<dd>Not used by this driver.</dd>
+
+</dl>
+
+<h2>Monitor Data</h2>
+
+<p>
+A timecode is written to the <span class="bold">clockstats</span> file, if the ntpd is configured to enable writing of statistics records<br>
+</p>
+
+<hr>
+
+<p>
+Copyright (C) 2001, Takao Abe.  All rights reserved.<br>
+Questions or Comments : <a href="mailto:abetakao@bea.hi-ho.ne.jp">abetakao@bea.hi-ho.ne.jp</a>
+</p>
+
+<p>
+This driver is developed in my private time, and is opened as voluntary contributions for the NTP.<br>
+The manufacturer of the JJY receiver has not participated in a development of this driver.<br>
+The manufacturer does not warrant anything about this driver, and is not liable for anything about this driver.
+</p>
+
+</body>
+
+</html>
index 200d3fb1f67b86491151b7290146cd8e02a75d6f..47a29f33ebdecc7b5a8f4861654d4d8066802b25 100644 (file)
@@ -1,6 +1,20 @@
-<html><head><title>
+<html>
+<head>
+<meta http-equiv="Content-Style-Type" content="text/css">
+<title>
 Stations, Frequencies and Geographic Coordinates
-</title></head><body><h3>
+</title>
+<style type="text/css">
+<!--
+a.StationInfo:link    { color:#0000D0; text-decoration:none; }
+a.StationInfo:visited { color:#0000D0; text-decoration:none; }
+a.StationInfo:active  { color:#0000D0; text-decoration:none; }
+a.StationInfo:hover   { color:#C00040; text-decoration:underline; }
+-->
+</style>
+</head>
+
+<body><h3>
 Stations, Frequencies and Geographic Coordinates
 </h3><hr>
 
@@ -57,6 +71,18 @@ published by the ITU and other sources.
 <td>47:10N 2:12E</td>
 </tr>
 
+<tr>
+<td><a class="StationInfo" href="http://jjy.crl.go.jp/">JJY</a> ( Fukushima, JAPAN )</td>
+<td>40 KHz</td>
+<td>37:22 N &nbsp; 140:51 E</td>
+</tr>
+
+<tr>
+<td><a class="StationInfo" href="http://jjy.crl.go.jp/">JJY</a> ( Saga, JAPAN )</td>
+<td>60 KHz</td>
+<td>33:28 N &nbsp; 130:11 E</td>
+</tr>
+
 </table>
 
 <hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a
index 4b2611d7e38e2d053a5612e8e123f621023f4620..50ceef8568ea777895c256ed13f4d86368b28298 100644 (file)
@@ -221,7 +221,10 @@ Demodulator/Decoder(<tt>WWV</tt>)<br>
 <a href="driver38.htm">Type 38</a> hopf GPS/DCF77 6021/komp for
 Serial Line (<tt>HOPF_S</tt>)<br>
 <a href="driver39.htm">Type 39</a> hopf GPS/DCF77 6039 for PCI-Bus
-(<tt>HOPF_P</tt>)</p>
+(<tt>HOPF_P</tt>)<br>
+<a href="driver40.htm">Type 40</a> The Tristate Ltd. JJY receiver
+(<tt>JJY</tt>)<br>
+</p>
 
 <p>* All TrueTime receivers are now supported by one driver, type
 5. Types 15 and 25 will be retained only for a limited time and may
index f7ade0dd382445368f0e36b62da5affa54bc971d..eaf9228e108b3f1492ced33d48442706ce75c1e1 100644 (file)
@@ -457,7 +457,8 @@ struct peer {
 #define REFCLK_FG              37      /* Forum Graphic GPS */
 #define REFCLK_HOPF_SERIAL     38      /* hopf DCF77/GPS serial line receiver  */
 #define REFCLK_HOPF_PCI                39      /* hopf DCF77/GPS PCI receiver  */
-#define REFCLK_MAX             39      /* Grow as needed... */
+#define REFCLK_JJY             40      /* JJY receiver  */
+#define REFCLK_MAX             40      /* Grow as needed... */
 
 /*
  * We tell reference clocks from real peers by giving the reference
index cdfe3564b20e0d0df3753209f3141b90074cac51..69250aa5a1015a5191769734fc640a26a5c6593a 100644 (file)
@@ -90,6 +90,8 @@ struct clktype clktypes[] = {
          "HOPF_S"},
        { REFCLK_HOPF_PCI,      "hopf Elektronic PCI receiver (39)",
          "HOPF_P"},
+       { REFCLK_JJY,   "JJY receiver (40)",
+         "JJY" },
        { -1,                   "", "" }
 };
 
index 718d9969fec4f360419ebba47b19646e8785537f..176189f265d00cba3e8e2c510e8a725da9edb0d5 100644 (file)
@@ -30,7 +30,7 @@ ntpd_SOURCES = cmd_args.c jupiter.h map_vme.c ntp_config.c ntp_control.c \
        refclock_chronolog.c refclock_chu.c refclock_conf.c refclock_datum.c \
        refclock_dumbclock.c refclock_fg.c refclock_gpsvme.c refclock_heath.c \
        refclock_hopfser.c refclock_hopfpci.c \
-       refclock_hpgps.c refclock_irig.c refclock_jupiter.c refclock_leitch.c \
+       refclock_hpgps.c refclock_irig.c refclock_jjy.c refclock_jupiter.c refclock_leitch.c \
        refclock_local.c refclock_msfees.c refclock_mx4200.c refclock_nmea.c \
        refclock_oncore.c refclock_palisade.c refclock_palisade.h \
        refclock_parse.c refclock_pcf.c refclock_pst.c refclock_ptbacts.c \
index 570e2f90f781d8a877fc2ec3efb338924a5c08ab..a423d9a89f93fa15478751202e7e6e7f7d4189a0 100644 (file)
@@ -395,6 +395,7 @@ static u_char clocktypes[] = {
        CTL_SST_TS_LF,          /* REFCLK_FG (37) */
        CTL_SST_TS_UHF,         /* REFCLK_HOPF_SERIAL (38) */
        CTL_SST_TS_UHF,         /* REFCLK_HOPF_PCI (39) */
+       CTL_SST_TS_LF,          /* REFCLK_JJY (40) */
 };
 
 
index 0e6c927ee0f7d038842f9d0171ead81a993eb7d7..2c8b1beb3fa26462e2e6ba0ce0d167ac9074d03d 100644 (file)
@@ -240,6 +240,12 @@ extern     struct refclock refclock_hopfpci;
 #define        refclock_hopfpci refclock_none
 #endif
 
+#ifdef CLOCK_JJY
+extern struct refclock refclock_jjy;
+#else
+#define        refclock_jjy refclock_none
+#endif
+
 /*
  * Order is clock_start(), clock_shutdown(), clock_poll(),
  * clock_control(), clock_init(), clock_buginfo, clock_flags;
@@ -286,7 +292,8 @@ struct refclock *refclock_conf[] = {
        &refclock_wwv,          /* 36 REFCLOCK_WWV_AUDIO */
        &refclock_fg,           /* 37 REFCLOCK_FG */
        &refclock_hopfser,      /* 38 REFCLK_HOPF_SERIAL */
-       &refclock_hopfpci       /* 39 REFCLK_HOPF_PCI */
+       &refclock_hopfpci,      /* 39 REFCLK_HOPF_PCI */
+       &refclock_jjy           /* 40 REFCLK_JJY */
 };
 
 u_char num_refclock_conf = sizeof(refclock_conf)/sizeof(struct refclock *);