7
来自「Unix/Linux 网络时间协议版本3 Network Time Proto」· 代码 · 共 527 行 · 第 1/2 页
TXT
527 行
<p>- direct DCF77 code input+<pre>+RAWDCF: end=TIMEOUT>1.5s, sync each char (any char),+ generate psuedo time codes, fixed format+ direct DCF77 code input+</pre> - <p>In Europe it is relatively easy/cheap the receive the german time code- transmitter DCF77. The simplest version to process its signal is to+ <p>In Europe it is relatively easy/cheap the receive the German time code+ transmitter DCF77. The simplest version to process its signal is to feed the 100/200ms pulse of the demodulated AM signal via a level- converter to an RS232 port at 50Baud. parse/clk_rawdcf.c holds all- necessary decoding logic for the time code which is transmitted each- minute for one minute. A bit of the time code is sent once a second.+ converter to an RS232 port at 50 Baud.+ <code>parse/clk_rawdcf.c</code> holds all necessary decoding logic for the+ time code which is transmitted in 59 bits every minute. One bit+ of the time code is sent once a second. <pre> The preferred tty setting is:@@ -154,7 +161,6 @@ <h2>DCF77 raw time code</h2> - <p>From "Zur Zeit", Physikalisch-Technische Bundesanstalt (PTB), Braunschweig und Berlin, M鋜z 1989 <br>@@ -163,17 +169,17 @@ AM: - time marks are send every second except for the second before the- next minute mark- time marks consist of a reduction of transmitter power to 25%- of the nominal level- the falling edge is the time indication (on time)- time marks of a 100ms duration constitute a logical 0- time marks of a 200ms duration constitute a logical 1+ * Time marks are sent every second except for the second before the+ next minute mark+ * Time marks consist of a reduction of transmitter power to 25%+ of the nominal level+ * The falling edge is the time indication (on time)+ * Time marks of a 100ms duration constitute a logical 0+ * Time marks of a 200ms duration constitute a logical 1 FM: - see the spec. (basically a (non-)inverted psuedo random phase shift)+ See the spec. (basically a (non-)inverted psuedo random phase shift) Encoding: @@ -203,15 +209,16 @@ 51 - 53 Y1 - BCD (lsb first) Years 54 - 57 Y10 - BCD (lsb first) 10 Years 58 P3 - Date Parity (even)- 59 - usually missing (minute indication), except for leap insertion+ 59 - usually missing (minute indication),+ except for leap insertion </pre> <hr> <h2>Schmid clock</h2> -<p>+<pre> Schmid clock: needs poll, binary input, end='\xFC', sync start-+</pre> <p> The Schmid clock is a DCF77 receiver that sends a binary time code at the reception of a flag byte. The contents@@ -223,7 +230,6 @@ IFLAG 0 OFLAG 0 LFLAG 0- </PRE> @@ -281,10 +287,10 @@ <hr> <h2>ELV DCF7000</h2>-<p>+<pre> ELV DCF7000: end='\r', pattern=" - - - - - - - \r"-<p>- The ELV DCF7000 is a cheap DCF77 receiver sending each second+</pre>+<p> The ELV DCF7000 is a cheap DCF77 receiver sending each second a time code (though not very precise!) delimited by '`r' <pre> Timecode@@ -295,10 +301,10 @@ FF&0x4 - unsynchronised </pre> <hr>-<h2>HOPF 6021 und Kompatible</h2>+<h2>HOPF 6021 and compatibles</h2> <p>- HOPF Funkuhr 6021 mit serieller Schnittstelle+ HOPF Funkuhr 6021 with serial interface Created by F.Schnekenbuehl <frank@comsys.dofn.de> from clk_rcc8000.c Nortel DASA Network Systems GmbH, Department: ND250 A Joint venture of Daimler-Benz Aerospace and Nortel.@@ -312,7 +318,7 @@ dataformat 6021 output time and date transmit with control characters- transmit evry second+ transmit every second Type 6021 Serial Output format @@ -333,7 +339,7 @@ x x x 0 - no announcement x x x 1 - Summertime - wintertime - summertime announcement x x 0 x - Wintertime- x x 1 x - Summertime+ x x 1 x - Summertime (daylight saving time) 0 0 x x - Time/Date invalid 0 1 x x - Internal clock used 1 0 x x - Radio clock@@ -371,3 +377,4 @@ CR Carriage return LF Linefeed </pre> +</body></html>--- /usr/doc/packages/xntpd/parsenew.html Tue Jun 24 19:28:38 1997+++ parsenew.html Thu Sep 4 22:19:04 1997@@ -1,5 +1,7 @@ <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">+<html><head> <TITLE>Making PARSE Clocks</TITLE>+</head><body> <h1>How to build new PARSE clocks</h1> <p>Here is an attempt to sketch out what you need to do in order to@@ -8,15 +10,14 @@ <p>Prerequisites: <ul>-<li>Does the system you want the clock connect to have the include files-termio.h or termios.h ? (You need that for the parse driver)+<li>Does the system you want the clock connect to have the include+files <code>termio.h</code> or <code>termios.h</code> ? (You need that+for the parse driver) </ul> - <p>What to do: --<p>Make a conversion module (libparse/clk_*.c)+<p>Make a conversion module (<code>libparse/clk_*.c</code>) <ol> <li>What ist the time code format ?@@ -76,9 +77,9 @@ usec value. The fields for date and time (down to second resolution) will be ignored. -- <p>Conversion is done in the cvt_* routine in parse/clk_*.c files. look in- them for examples. The basic structure is:+ <p>Conversion is done in the <code>cvt_*</code> routine in+ <code>parse/clk_*.c</code> files. look into them for examples.+ The basic structure is: <PRE> struct clockformat <yourclock>_format = {@@ -101,9 +102,9 @@ </PRE> -<p>The struct clockformat is the interface to the rest of the parse- driver - it holds all information necessary for finding the- clock message and doing the appropriate time stamping.+<p>The <code>struct clockformat</code> is the interface to the rest of+the parse driver - it holds all information necessary for finding the+clock message and doing the appropriate time stamping. <PRE> struct clockformat@@ -137,7 +138,6 @@ }; </PRE> - <p>The flags: <PRE> F_START use startsym to find the beginning of the clock data@@ -153,24 +153,24 @@ suitable for auto-configuration) </PRE> --<p>The above should have given you some hints on how to build a clk_*.c- file with the time code conversion. See the examples and pick a clock- closest to yours and tweak the code to match your clock.+ <p>The above should have given you some hints on how to build a+ <code>clk_*.c</code> file with the time code conversion. See the+ examples and pick a clock closest to yours and tweak the code to match+ your clock. <p>In order to make your clk_*.c file usable a reference to the clockformat structure must be put into parse_conf.c. </ul> <li>TTY setup and initialisation/configuration will be done in-xntpd/refclock_parse.c.+<code>xntpd/refclock_parse.c</code>. <ul> <li>Find out the exact tty settings for your clock (baud rate, parity, stop bits, character size, ...) and note them in terms of termio*.h c_cflag macros.-<li>in xntpd/refclock_parse.c fill out a new the struct clockinfo element-(that allocates a new "IP" address - see comments)-(see all the other clocks for example)+<li>in <code>xntpd/refclock_parse.c</code> fill out a new element for+<code>struct clockinfo</code> (that allocates a new "IP" address - see+comments) (see all the other clocks for example) <PRE> struct clockinfo {@@ -249,15 +249,18 @@ The best way is to look which clock comes closest to your and tweak that code. -<p>Two sorts of clocks are used with parse. Clocks that automatically send-their time code (once a second) do not need entries in the poll routines because-they send the data all the time. The second sort are the clocks that need a-command sent to them in order to reply with a time code (like the Trimble-clock).--<p>For questions: <a href="mailto: kardel@informatik.uni-erlangen.de">kardel@informatik.uni-erlangen.de</a>.--<p>Please include an exact description on how your clock works. (initialisation,-TTY modes, strings to be sent to it, responses received from the clock).+<p>Two sorts of clocks are used with parse. Clocks that automatically+send their time code (once a second) do not need entries in the poll+routines because they send the data all the time. The second sort are+the clocks that need a command sent to them in order to reply with a+time code (like the Trimble clock).++<p>For questions:+<a href="mailto:kardel@informatik.uni-erlangen.de">kardel@informatik.uni-erlangen.de</a>.++<p>Please include an exact description on how your clock+works. (initialisation, TTY modes, strings to be sent to it, responses+received from the clock). <hr><p> <a href="http://www4.informatik.uni-erlangen.de/~kardel">Frank Kardel</a>+</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?