1.\" $OpenBSD: endrun.4,v 1.3 2015/01/15 00:48:10 deraadt Exp $ 2.\" 3.\" Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org> 4.\" Copyright (c) 2009 Kevin Steves <stevesk@openbsd.org> 5.\" 6.\" Permission to use, copy, modify, and distribute this software for any 7.\" purpose with or without fee is hereby granted, provided that the above 8.\" copyright notice and this permission notice appear in all copies. 9.\" 10.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17.\" 18.Dd $Mdocdate: January 15 2015 $ 19.Dt ENDRUN 4 20.Os 21.Sh NAME 22.Nm endrun 23.Nd EndRun Technologies native time-of-day message timedelta sensor 24.Sh SYNOPSIS 25.Cd "pseudo-device endrun" Op Ar count 26.Sh DESCRIPTION 27This line discipline interfaces serial EndRun Technologies devices. 28.Pp 29The line discipline is enabled by the following sequence: 30.Bd -literal -offset indent 31#include <sys/ioctl.h> 32int ldisc = ENDRUNDISC, fildes; ... 33ioctl(fildes, TIOCSETD, &ldisc); 34.Ed 35.Pp 36The byte stream is unaltered by the line discipline which 37maintains a timedelta sensor using the EndRun data. 38The timedelta sensor will appear as endrun* in the list of sensors and the delta 39(in nanoseconds) between the received time information and the local time can 40be accessed through the 41.Xr sysctl 8 42interface. 43.Sh SENSOR STATES 44The quality of the timedelta is reported as the sensor status: 45.Bl -tag -width "CRITICALXX" -offset indent 46.It OK 47The time information is valid. 48The timedelta is safe to use for applications like 49.Xr ntpd 8 . 50.It WARN 51The attached receiver has been indicating a warning condition 52for at least the last ten minutes. 53The timedelta should be used with care. 54.It CRITICAL 55tty timestamping has been turned on but there is no PPS signal present or the 56receiver indicated a warning condition for at least the last twenty minutes. 57Check your hardware. 58.El 59.Pp 60The status of a second sensor is used to report the status of the 61device itself using the Time Figure Of Merit (TFOM) character: 62.Bl -tag -width "CRITICALXX" -offset indent 63.It OK 64The clock is synchronized. 65TFOM is 6-8. 66.It WARN 67The clock is synchronized and the time error is greater 68than 10ms or the clock is in the unsynchronized state. 69TFOM is 9. 70.It CRITICAL 71The TFOM is invalid. 72.El 73.Sh SEE ALSO 74.Xr tty 4 , 75.Xr ldattach 8 , 76.Xr ntpd 8 , 77.Xr sysctl 8 78.Sh HISTORY 79The 80.Nm 81interface first appeared in 82.Ox 4.6 . 83