[ntp:questions] Re: Please demistify the SHM driver

David L. Mills mills at udel.edu
Tue Sep 16 15:59:15 UTC 2003


There is ample information in the NTP documentation on how to write a
reference clock driver and ample examples of practical implementations
in the driver collection. There is no need to layer another interface on
the SHM driver and much easier to maintain and debug if you do not. See
also the pages on debugging reference clocks.

>From this and other recent discussions in this group, it seems this
documentation is either overlooked or ignored as being TMI. It could
well be that an existing driver has all the features you need or could
be easily modified for that purpose, in which case the explosion in
drivers could be better contained. This has been done for the TrueTime
and Spectracom drivers and should also be the case for all NMEA drivers.
If a little twitch is necessary for an otherwise generic driver,
consider using bits in the mode member of the interface structure.


Jerome Oufella wrote:
> Hi everyone,
>         I'm writing an handler for a proprietary kind of GPS clock, using RS232
> signals and the SHM driver.
> The NTP documentation describes the structure of the memory segment, and
> says that :
> "[...] (clockTimeStampSec, clockTimeStampUSec,
>          receiveTimeStampSec,  receiveTimeStampUSec,
>          leap, precision) are passed to ntp
> [...]"
> What value(s) should I set, while my GPS clock only sends me the
> following values :
>   - Day
>   - Month
>   - Year
>   - Hour (local time)
>   - Minutes
>   - Seconds
> Once every minute. I use them to build a UNIX time_t. Should it be
> stored in clockTimeStampSec or receiveTimeStampSec ?
> What about leap & precision ?
> Thanks in advance.
> Jerome.

More information about the questions mailing list