Lines Matching refs:peer

184 static	int	true_start	(int, struct peer *);
185 static void true_shutdown (int, struct peer *);
187 static void true_poll (int, struct peer *);
188 static void true_send (struct peer *, const char *);
189 static void true_doevent (struct peer *, enum true_event);
214 true_debug(struct peer *peer, const char *fmt, ...)
222 pp = peer->procptr;
266 struct peer *peer
278 fd = refclock_open(&peer->srcadr, device, SPEED232, LDISC_CLK);
286 pp = peer->procptr;
288 pp->io.srcclock = peer;
302 peer->precision = PRECISION;
314 true_send(peer, "\03\r");
316 true_doevent(peer, e_Init);
328 struct peer *peer
334 pp = peer->procptr;
353 struct peer *peer;
366 peer = rbufp->recv_peer;
367 pp = peer->procptr;
384 true_debug(peer, "receive(%s) [%d]\n", pp->a_lastcode,
388 record_clock_stats(&peer->srcadr, pp->a_lastcode);
403 true_doevent(peer, e_Huh);
442 /*refclock_report(peer, CEVNT_BADREPLY);*/
445 true_debug(peer, "GOES: station %s\n", label);
446 true_doevent(peer, e_Satellite);
457 true_doevent(peer, e_F50);
460 true_doevent(peer, e_F51);
463 true_debug(peer, "got F%02d - ignoring\n", i);
475 true_doevent(peer, e_TL3);
488 true_doevent(peer, e_F18);
504 true_doevent(peer, e_Location);
533 true_doevent(peer, e_TS);
548 refclock_report(peer, CEVNT_BADTIME);
572 pps_sample(peer, &off);
574 true_debug(peer, "true_sample720: %luus\n", pp->usec);
590 true_doevent(peer, e_Poll);
593 refclock_report(peer, CEVNT_BADTIME);
601 refclock_receive(peer);
602 refclock_report(peer, CEVNT_NOMINAL);
616 refclock_report(peer, CEVNT_BADREPLY);
626 struct peer *peer,
632 pp = peer->procptr;
636 true_debug(peer, "Send '%s'\n", cmd);
637 if (refclock_write(peer, cmd, len, NULL) != (ssize_t)len)
638 refclock_report(peer, CEVNT_FAULT);
650 struct peer *peer,
657 pp = peer->procptr;
667 true_debug(peer, "clock %s, state %s, event %s\n",
677 true_send(peer, "C");
684 true_send(peer, "P");
694 true_send(peer, "C");
699 true_send(peer, "\03\r");
711 true_send(peer, "F18\r");
715 true_send(peer, "F50\r");
722 true_doevent(peer, e_F18);
732 true_send(peer, "F51\r");
736 true_send(peer, "F08\r");
741 true_send(peer, "\03\r");
753 true_send(peer, "MD3\r"); /* GPS Synch'd Gen. */
754 true_send(peer, "TSU\r"); /* UTC, not GPS. */
755 true_send(peer, "AU\r"); /* Auto Timestamps. */
760 true_send(peer, "\03\r");
772 true_send(peer, "ST1"); /* Turn on continuous stream */
788 true_send(peer, "P\r");
795 true_doevent(peer, e_Init);
800 true_send(peer, "ST0"); /* turn off TL3 auto */
803 true_send(peer, "QV"); /* see if its a TL3 */
814 true_send(peer, "ST1"); /* Turn on 1/sec data */
819 true_send(peer, "C\r");
840 true_send(peer, "F18\r");
850 true_doevent(peer, e_Init);
854 true_send(peer, "PO\r");
867 true_doevent(peer, e_Init);
924 struct peer *peer
935 pp = peer->procptr;
940 true_doevent(peer, e_Init);
941 refclock_report(peer, CEVNT_TIMEOUT);