[ntp:hackers] PPS, PPSAPI and pps_sample()

Mark Martinec Mark.Martinec at ijs.si
Mon Dec 13 11:59:58 PST 2004


Dave,

> I diddled the atom driver to use the mode keyord value as PPSAPI mode 
> (decimal), which overrides flag2. Mark, have fun.

Actually it is not ok (looking at ntp-dev-4.2.0a-20041212)

The atom_start() passes a correct mode (obtained from the mode keyword)
to the atom_ppsapi(), but then the atom_control() runs, recomputes
the mode according to its own idea (flag2), and calls atom_ppsapi again,
clobbering the already correctly configured ppsapi.


Another thing: If I understand correctly, there could be multiple
instances of atom refclocks, each given its own unit number.
I'm running two of them (one on a parallel i/f, the other on DCD), yet
the comments in the code like "int unit, /* unit number (not used) */"
makes me a bit concerned, and the syslog messages are not clear to
which instance they pertain.

I would appreciate if the logged messages would report the atom
unit number in question, e.g.

@@ -256,3 +261,3 @@
                msyslog(LOG_ERR,
-                   "refclock_atom: time_pps_setparams failed: %m");
+                   "refclock_atom%d: time_pps_setparams failed: %m", unit);
                return (0);

Btw, if some other refclock calls a (deprecated) pps_sample(),
to which atom driver instance (unit number) is the sample fed?

  Mark



More information about the hackers mailing list