#include <sys/stream.h> #include <sundev/vuid_event.h> #include <sundev/dbio.h> #include <sys/time.h> #include <sys/ioctl.h> open("/dev/dialbox", O_RDWR); ioctl(fd, I_PUSH, ``db'');
The db STREAMS module processes the byte streams generated by the SunDials dial box. The dial box generates a stream of bytes that encode the identity of the dials and the amount by which they are turned.
Each dial sample in the byte stream consists of three bytes. The first byte identifies which dial was turned and the next two bytes return the delta in signed binary format. When bound to an application using the window system, Virtual User Input Device events are generated. An event from a dial is constrained to lie between 0x80 and 0x87.
A stream with db pushed into it can emit firm_events as specified by the protocol of a VUID. db understands the VUIDSFORMAT and VUIDGFORMAT ioctls (see reference below), as defined in /usr/include/sundev/dbio.h and /usr/include/sundev/vuid_event.h. All other ioctl() requests are passed downstream. db sets the parameters of a serial port when it is opened. No termios.4 ioctl() requests should be performed on a db STREAMS module, as db expects the device parameters to remain as it set them.
[a manual with the abbreviation SVSPG],
SunDials Programmers Guide
The SunDials dial box must be used with a serial port.
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97