xref: /csrg-svn/share/man/man4/man4.vax/tb.4 (revision 61600)
1*61600Sbostic.\" Copyright (c) 1986, 1991, 1993
2*61600Sbostic.\"	The Regents of the University of California.  All rights reserved.
327089Smckusick.\"
447674Scael.\" %sccs.include.redist.man%
527089Smckusick.\"
6*61600Sbostic.\"     @(#)tb.4	8.1 (Berkeley) 06/05/93
747674Scael.\"
847674Scael.Dd
947674Scael.Dt TB 4 vax
1047674Scael.Os BSD 4.3
1147674Scael.Sh NAME
1247674Scael.Nm tb
1347674Scael.Nd line discipline for digitizing devices
1447674Scael.Sh SYNOPSIS
1547674Scael.Cd pseudo-device tb
1647674Scael.Sh DESCRIPTION
1727089SmckusickThis line discipline provides a polled interface to many common
1827089Smckusickdigitizing devices which are connected to a host through a serial line.
1927089SmckusickWhen these devices stream data at high speed, the use of the
2028930Smisline discipline is critical in minimizing the number of samples
2127089Smckusickthat would otherwise be lost due to buffer exhaustion in the
2247674Scael.Xr tty 4
2327089Smckusickhandler.
2447674Scael.Pp
2527089SmckusickThe line discipline is enabled by a sequence:
2647674Scael.Bd -literal -offset indent
2747674Scael#include <sys/tablet.h>
2847674Scaelint ldisc = TBLDISC, fildes; ...
2947674Scaelioctl(fildes, TIOCSETD, &ldisc);
3047674Scael.Ed
3147674Scael.Pp
3227089SmckusickA typical application program then polls the digitizing device by
3327089Smckusickreading a binary data structure which contains: the current X and
3427089SmckusickY positions (in the device coordinate space),
3527089Smckusickup-down status of the buttons or pen stylus,
3627089Smckusickproximity information (when available), and a count
3727089Smckusickof the number of samples received from the input device
3827089Smckusicksince it was opened.  In addition, devices such as the
3947674Scael.Tn GTCO
4047674Scaelappend tilt and pressure information to the end of
4128930Smisthe aforementioned structure.  For the Polhemus 3-D digitizer
4228930Smisthe structure read is completely different. Refer to the
4327089Smckusickinclude file for a complete description.
4447674Scael.Pp
4527089SmckusickWhile in tablet mode, normal teletype input and output functions take place.
4627089SmckusickThus, if an 8 bit output data path is desired, it is necessary
4747674Scaelto prepare the output line by putting it into
4847674Scael.Tn RAW
4947674Scaelmode using
5047674Scael.Xr ioctl 2 .
5127089SmckusickThis must be done
5247674Scael.Em before
5347674Scaelchanging the discipline with
5447674Scael.Dv TIOCSETD ,
5547674Scaelas most
5647674Scael.Xr ioctl 2
5727198Ssamcalls are disabled while in tablet line-discipline mode.
5847674Scael.Pp
5927089SmckusickThe line discipline supports
6047674Scael.Xr ioctl 2
6127089Smckusickrequests to get/set the operating mode, and to get/set the tablet type
6247674Scaeland operating mode by
6347674Scael.Em or Ns -ing
6447674Scaelthe two values together.
6547674Scael.Pp
6628930SmisThe line discipline supports digitizing devices which are
6747674Scaelcompatible with Hitachi,
6847674Scael.Tn GTCO ,
6947674Scaelor Polhemus protocol formats.
7027089SmckusickFor Hitachi there are several formats with that used in the
7147674Scaelnewer model
7247674Scael.Tn HDG-1111B
7347674Scaelthe most common.
7447674Scael.Sh DIAGNOSTICS
7527089SmckusickNone.
7647674Scael.Sh SEE ALSO
7747674Scael.Xr tty 4
7847674Scael.Sh HISTORY
7947674ScaelThe
8047674Scael.Nm
8147674Scaelinterface appeared in
8247674Scael.Bx 4.3 .
83