[Git][NTPsec/ntpsec][master] 6 commits: modem: Fix a typo
Matt Selsky
gitlab at mg.gitlab.com
Fri Nov 22 06:38:47 UTC 2019
Matt Selsky pushed to branch master at NTPsec / ntpsec
Commits:
56f5079d by Richard Laager at 2019-11-19T03:12:21Z
modem: Fix a typo
- - - - -
c75126f4 by Richard Laager at 2019-11-19T03:12:21Z
modem: Remove last references to "NIST format A"
At some point in the past, NIST supposedly dropped the on-time marker.
A comment was added as was support for a second format without the
on-time marker. That was partially removeed in 2011 in commit
ef0eee67fc9d49c39e312e8ce7f7607ca87d16b1, but vestiges remained.
- - - - -
37a2c618 by Richard Laager at 2019-11-19T03:12:21Z
modem: Document the * to # change in the code
- - - - -
61485d8b by Richard Laager at 2019-11-19T03:12:21Z
modem: The minimum speed required is 1200 bps
- - - - -
fba43302 by Richard Laager at 2019-11-19T03:12:21Z
modem: Correct mode documentation
The documentation did not match the code: backup and auto were reversed.
Also, in the "Driver Options" section, "mode" was listed as "Not used by
this driver", which is incorrect.
- - - - -
9a85f93a by Richard Laager at 2019-11-19T23:48:30Z
modem: Expand the example
It took me a while to figure out how the "phone" bit worked, even with
the documentation. An example would have saved me time.
- - - - -
2 changed files:
- docs/driver_modem.adoc
- ntpd/refclock_modem.c
Changes:
=====================================
docs/driver_modem.adoc
=====================================
@@ -38,18 +38,18 @@ means. With these services variations from call to call and between
messages during a call are typically a few milliseconds, occasionally
higher.
-This driver requires a 9600 bps modem with a Hayes-compatible command
-set and control over the modem data terminal ready (DTR) control line.
-The actual line speed ranges from 1200 bps with USNO to 14,400 bps
+This driver requires a 1200 bps or faster modem with a Hayes-compatible
+command set and control over the modem data terminal ready (DTR) control
+line. The actual line speed ranges from 1200 bps with USNO to 14,400 bps
with NIST. The modem setup string is hard-coded in the driver and may
require changes for nonstandard modems or special circumstances. It
can be overridden by setting the extended system variable
"modemsetup" via ntpq.
There are three modes of operation selected by the +mode+ keyword in the
-+server+ configuration command. In auto mode (0) +flag1+ is set at each poll
-event. In backup mode (1) +flag1+ is set at each poll event, but only if
-no other synchronization sources are available. In manual mode (2) the
++server+ configuration command. In backup mode (0) +flag1+ is set at each
+poll event, but only if no other synchronization sources are available. In
+auto mode (1) +flag1+ is set at each poll event. In manual mode (2) the
calling program is initiated by setting the +flag1+ option. This can be done
manually using +ntpq+, or by a cron job.
@@ -165,7 +165,8 @@ with the Hayes connection and hang-up commands and result codes.
+subtype+::
Not used by this driver.
+mode+::
- Not used by this driver.
+ Controls when +flag1+ is set to initiate a call: as last resort (backup) if
+ 0 (default), each poll cycle (auto) if 1, never (manual) if 2.
+path+ 'filename'::
Overrides the default device path.
+ppspath+ 'filename'::
@@ -176,7 +177,8 @@ with the Hayes connection and hang-up commands and result codes.
== Configuration Example
----------------------------------------------------------------------------
-refclock modem
+refclock modem mode 1 minpoll 12 maxpoll 17
+phone ATDT13034944774 # NIST
----------------------------------------------------------------------------
== Author
=====================================
ntpd/refclock_modem.c
=====================================
@@ -87,9 +87,7 @@
*
* MJD, DST, DUT1 and UTC are not used by this driver. The "*" or "#" is
* the on-time markers echoed by the driver and used by NIST to measure
- * and correct for the propagation delay. Note: the ACTS timecode has
- * recently been changed to eliminate the * on-time indicator. The
- * reason for this and the long term implications are not clear.
+ * and correct for the propagation delay.
*
* US Naval Observatory (USNO)
*
@@ -153,7 +151,7 @@
* Service identifiers (message length)
*/
#define REFACTS "NIST" /* NIST reference ID */
-#define LENACTS 50 /* NIST format A */
+#define LENACTS 50 /* NIST format */
#define REFUSNO "USNO" /* USNO reference ID */
#define LENUSNO 20 /* USNO */
#define REFPTB "PTB\0" /* PTB/NPL reference ID */
@@ -785,8 +783,8 @@ modem_timecode(
return;
/*
- * ACTS format A: "jjjjj yy-mm-dd hh:mm:ss ds l uuu aaaaa
- * UTC(NIST) *".
+ * ACTS format: "jjjjj yy-mm-dd hh:mm:ss ds l uuu aaaaa UTC(NIST) *".
+ * The "*" changes to a "#" when the delay correction is valid.
*/
case LENACTS:
if (sscanf(str,
@@ -911,7 +909,7 @@ modem_timecode(
/*
* We have a valid timecode. The fudge time1 value is added to
* each sample by the main line routines. Note that in current
- * telephone networks the propatation time can be different for
+ * telephone networks the propagation time can be different for
* each call and can reach 200 ms for some calls.
*/
peer->refid = pp->refid;
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/90572187076a8630724ab0bbb1f75a2f1bfed49c...9a85f93af67bf8fee3de81ff4468f218ecad8f2f
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/90572187076a8630724ab0bbb1f75a2f1bfed49c...9a85f93af67bf8fee3de81ff4468f218ecad8f2f
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20191122/2813332a/attachment-0001.htm>
More information about the vc
mailing list