Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tb(4) [bsd man page]

TB(4)							     Kernel Interfaces Manual							     TB(4)

NAME
tb - line discipline for digitizing devices SYNOPSIS
/sys/conf/SYSTEM: NTB 1 # RS232 interface for Genisco/Hitachi tablets DESCRIPTION
This line discipline provides a polled interface to many common digitizing devices which are connected to a host through a serial line. When these devices stream data at high speed, the use of the line discipline is critical in minimizing the number of samples that would otherwise be lost due to buffer exhaustion in the tty(4) handler. The line discipline is enabled by a sequence: #include <sys/tablet.h> int ldisc = TBLDISC, fildes; ... ioctl(fildes, TIOCSETD, &ldisc); A typical application program then polls the digitizing device by reading a binary data structure which contains: the current X and Y posi- tions (in the device coordinate space), up-down status of the buttons or pen stylus, proximity information (when available), and a count of the number of samples received from the input device since it was opened. In addition, devices such as the GTCO append tilt and pressure information to the end of the aforementioned structure. For the Polhemus 3-D digitizer the structure read is completely different. Refer to the include file for a complete description. While in tablet mode, normal teletype input and output functions take place. Thus, if an 8 bit output data path is desired, it is neces- sary to prepare the output line by putting it into RAW mode using ioctl(2). This must be done before changing the discipline with TIOC- SETD, as most ioctl(2) calls are disabled while in tablet line-discipline mode. The line discipline supports ioctl(2) requests to get/set the operating mode, and to get/set the tablet type and operating mode by or-ing the two values together. The line discipline supports digitizing devices which are compatible with Hitachi, GTCO, or Polhemus protocol formats. For Hitachi there are several formats with that used in the newer model HDG-1111B the most common. SEE ALSO
tty(4) DIAGNOSTICS
None. 3rd Berkeley Distribution August 1, 1987 TB(4)

Check Out this Related Man Page

NG_H4(4)						   BSD Kernel Interfaces Manual 						  NG_H4(4)

NAME
ng_h4 -- Netgraph node type that is also an H4 line discipline SYNOPSIS
#include <sys/types.h> #include <netgraph/bluetooth/include/ng_h4.h> DESCRIPTION
The h4 node type is both a persistent Netgraph node type and a H4 line discipline. It implements a Bluetooth HCI UART transport layer as per chapter H4 of the Bluetooth Specification Book v1.1. A new node is created when the corresponding line discipline, H4DISC, is registered on a tty device (see tty(4)). The node has a single hook called hook. Incoming bytes received on the tty device are re-assembled into HCI frames (according to the length). Full HCI frames are sent out on the hook. HCI frames received on hook are transmitted out on the tty device. No modification to the data is performed in either direction. While the line discipline is installed on a tty, the normal read and write operations are unavailable, returning EIO. Information about the node is available via the netgraph ioctl(2) command NGIOCGINFO. This command returns a struct nodeinfo similar to the NGM_NODEINFO netgraph(4) control message. HOOKS
This node type supports the following hooks: hook single HCI frame contained in single mbuf structure. CONTROL MESSAGES
This node type supports the generic control messages, plus the following: NGM_H4_NODE_RESET Reset the node. NGM_H4_NODE_GET_STATE Returns current receiving state for the node. NGM_H4_NODE_GET_DEBUG Returns an integer containing the current debug level for the node. NGM_H4_NODE_SET_DEBUG This command takes an integer argument and sets current debug level for the node. NGM_H4_NODE_GET_QLEN Returns current length of outgoing queue for the node. NGM_H4_NODE_SET_QLEN This command takes an integer argument and sets maximum length of outgoing queue for the node. NGM_H4_NODE_GET_STAT Returns various statistic information for the node, such as: number of bytes (frames) sent, number of bytes (frames) received and number of input (output) errors. NGM_H4_NODE_RESET_STAT Reset all statistic counters to zero. SHUTDOWN
This node shuts down when the corresponding device is closed (or the line discipline is uninstalled on the device). SEE ALSO
ioctl(2), netgraph(4), tty(4), ngctl(8) HISTORY
The h4 node type was implemented in FreeBSD 5.0. AUTHORS
Maksim Yevmenkin <m_evmenkin@yahoo.com> BUGS
This node still uses spltty(9) to lock tty layer. This is wrong. BSD
June 14, 2002 BSD
Man Page