3
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
4
<META NAME="GENERATOR" CONTENT="Mozilla/4.01 [en] (Win95; I) [Netscape]">
5
<TITLE>Shared memoy Driver
11
Shared Memory Driver</H3>
16
Address: 127.127.28.<I>u</I>
17
<BR>Reference ID: <TT>SHM</TT>
18
<BR>Driver ID: <TT>SHM</TT>
21
This driver receives its reference clock info from a shared memory-segment.
22
The shared memory-segment is created with owner-only access for unit 0
23
and 1, and world access for unit 2 and 3
25
Structure of shared memory-segment</H4>
28
int mode; /* 0 - if valid set
29
* use values,
30
* clear valid
31
* 1 - if valid set
32
* if count before and after read of
33
* values is equal,
34
* use values
35
* clear valid
36
*/
37
int count;
38
time_t clockTimeStampSec; /* external clock */
39
int clockTimeStampUSec; /* external clock */
40
time_t receiveTimeStampSec; /* internal clock, when external value was received */
41
int receiveTimeStampUSec; /* internal clock, when external value was received */
42
int leap;
43
int precision;
44
int nsamples;
45
int valid;
46
int dummy[10];
51
When the poll-method of the driver is called, the valid-flag of the shared
52
memory-segment is checked:
54
<P>If set, the values in the record (clockTimeStampSec, clockTimeStampUSec,
55
receiveTimeStampSec, receiveTimeStampUSec, leap, precision) are passed
56
to ntp, and the valid-flag is cleared.
58
<P>If not set, a timeout is reported to ntp, nothing else happend
61
When the poll-method of the driver is called, the valid-flag of the shared
62
memory-segment is checked:
64
<P>If set, the count-field of the record is remembered, and the values
65
in the record (clockTimeStampSec, clockTimeStampUSec, receiveTimeStampSec,
66
receiveTimeStampUSec, leap, precision) are read. Then, the remembered count
67
is compared to the count now in the record. If both are equal, the values
68
read from the record are passed to ntp. If they differ, another process
69
has modified the record while it was read out (was not able to produce
70
this case), and failure is reported to ntp. The valid flag is cleared.
72
<P>If not set, a timeout is reported to ntp, nothing else happend
78
<TT>time1 <I>time</I></TT></DT>
81
Specifies the time offset calibration factor, in seconds and fraction,
82
with default 0.0.</DD>
85
<TT>time2 <I>time</I></TT></DT>
88
Not used by this driver.</DD>
91
<TT>stratum <I>number</I></TT></DT>
94
Specifies the driver stratum, in decimal from 0 to 15, with default 0.</DD>
97
<TT>refid <I>string</I></TT></DT>
100
Specifies the driver reference identifier, an ASCII string from one to
101
four characters, with default <TT>SHM</TT>.</DD>
104
<TT>flag1 0 | 1</TT></DT>
107
Not used by this driver.</DD>
110
<TT>flag2 0 | 1</TT></DT>
113
Not used by this driver.</DD>
116
<TT>flag3 0 | 1</TT></DT>
119
Not used by this driver.</DD>
122
<TT>flag4 0 | 1</TT></DT>
125
Not used by this driver.</DD>
128
<P>Additional Information
130
<P><A HREF="refclock.htm">Reference Clock Drivers</A></DL>