Lines Matching +full:reference +full:- +full:buffer

1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
6 <title>How to Write a Reference Clock Driver</title>
10 <h3>How to Write a Reference Clock Driver</h3>
14 <!-- #BeginDate format:En2m -->10-Mar-2014 05:08<!-- #EndDate -->
24 <li class="inline"><a href="#pps">Pulse-per-Second Interface</a></li>
28reference clock support maintains the fiction that the clock is actually an ordinary server in the…
29reference time maintained by the external radio and the system time maintained by NTP. The radio s…
42 …econd. This can be used for housekeeping functions. In the case with pulse-per-second (PPS) signal…
44-time timestamp to the <tt>refclock_process</tt> routine, which saves the computed offset in a 60-
45 …cture, which contains for most drivers the decoded timecode, on-time timestamp, reference timestam…
46reference clocks by convention have addresses of the form <tt>127.127.<i>t</i>.<i>u</i></tt>, wher…
47reference clock drivers are named in the form <tt>refclock_<i>xxxx</i>.c</tt>, where <tt><i>xxxx</…
52 <p>When a new reference clock driver is installed, the following files need to be edited. Note that…
55 …<dd>The reference clock type defines are used in many places. Each driver is assigned a unique typ…
57 …<dd>The <tt>./libntp/clktype</tt> array is used by certain display functions. A unique short-form …
59 …s. It should be initialized with the reference clock class assigned to the driver, as per the NTP …
65 <dt><tt>refclock_newpeer</tt> - initialize and start a reference clock.</dt>
66reference clock in the form of an ordinary NTP peer. A driver-specific support routine completes t…
67 <dt><tt>refclock_unpeer</tt> - shut down a clock</dt>
69 <dt><tt>refclock_transmit</tt> - simulate the transmit procedure</dt>
70 …<dd>This routine implements the NTP transmit procedure for a reference clock. This provides a mech…
71 <dt><tt>refclock_process</tt> - insert a sample in the circular buffer</dt>
72 …he offset computed from the on-time timestamp and the days, hours, minutes, seconds and nanosecond…
73 <dt><tt>refclock_receive</tt> - simulate the receive and packet procedures</dt>
74 …<dd>This routine simulates the NTP receive and packet procedures for a reference clock. This provi…
75 <dt><tt>refclock_gtraw</tt>, <tt>refclock_gtlin</tt> - read the buffer and on-time timestamp</dt>
76 …<dd>These routines return the data received from the clock and the on-time timestamp. The <tt>refc…
77 <dt><tt>refclock_open</tt> - open a serial port for reference clock</dt>
79 <dt><tt>refclock_ioctl</tt> - set serial port control functions</dt>
80 …<dd>This routine attempts to hide the internal, system-specific details of serial ports. It can ha…
82 <dd>This routine initializes the Pulse-per-Second interface (see below).</dd>
84 … once per second to read the latest PPS offset and save it in the circular buffer (see below).</dd>
86 <h4 id="pps">Pulse-per-Second Interface</h4>
87 <p>When the Pulse-per-Second Application Interface (RFC 2783) is present, a
99 sample will be save in the circular buffer and a bit set in the association
103 circular buffer and update the system clock.</p>