Skip to main content

Proposed Data-Tablet Input Protocols

Data tablet input can consist of anything from a single point (as would occur when something was being pointed at) to literally thousands of bytes representing a hand-drawn rendering of a picture or a line of text. In many instances, the raw data-tablet input is preprocessed before it is passed to the principal processing program. This preprocessing can consist of such things as a variety of smoothing algorithms, filtering for thinning and or redundancy removal, detection of certain operator actions such as uniquely marking each occurrence of placing the pen on the writing surface and raising it, and possibly other, more exotic processes such as corner detection, fitting straight-line segments, and the like. Most of these latter processes will not be considered for inclusion in the protocol, since they are usually unique to a particular investigator and his research.

Therefore, a data-tablet graphic protocol should permit the sender to specify, and the receiver to discriminate among, at least four types of data-tablet input:

  1. Single-shot data
  2. Unpreprocessed (raw) asynchronous data
  3. Unpreprocessed (raw) synchronous data
  4. Preprocessed data

We will define formats for the first three, then discuss the fourth in some detail before defining its format.

To reduce the number of bits transmitted, data-tablet information should be transmitted in incremental form: a first point, followed by the difference between each point and its predecessor. To eliminate the trailing zeros that may be required for compatibility with the standard network graphics screen, we have included provision for a scale factor by which all increments should be multiplied before use.

Single-Shot Data Input Format​

  • Byte 0: Data tablet input op code
  • Byte 1: Type, 0 = single shot
  • Byte 2-3: X - Coordinate
  • Byte 4-5: Y - Coordinate
            8          8            16             16
+----------+----------+---------------+---------------+
| Op code | 0 | X - coord. | Y coord. |
+----------+----------+---------------+---------------+
0 1 2 3 4 5

In the following proposal for other protocols, it is assumed that each "stroke" of the pen is sent as one entity, a stroke being the data generated (and processed) between the time that Z indicates that the stylus or pen is on the writing surface and the time it is lifted from the surface.

Unpreprocessed (Raw) Asynchronous Data Input Format​

  • Byte 0: Data tablet input op code
  • Byte 1: Type, 1 = raw asynchronous
  • Byte 2: Flags
  • Byte 3: Scale of deltas
  • Byte 4-5: Number of points
  • Byte 6-7: 1st X-coordinate
  • Byte 8-9: 1st Y-coordinate
  • Byte 10: delta X1
  • Byte 11: delta Y1
  • ...
  • Byte 2n+10: delta Xn
  • Byte 2n+11: delta Yn
 8   8    8     8      16      16      16     8     8        8     8
+--+---+-----+-----+---.---+---.---+---.---+-----+-----+ +-----+-----+
|Op| 1 |Flags|Scale| N.o | . | . |delta|delta|..|delta|delta|
| | | | |poi.nts| X0. | Y0. | X1 | Y2 | | Xn | Yn |
+--+---+-----+-----+-------+-------+-------+-----+-----+ +-----+-----+
0 1 2 3 4 5 6 7 8 9 10 11 2n+10 2n+11

Unpreprocessed (Raw) Synchronous Data Input Format​

  • Byte 0: Data tablet input op code
  • Byte 1: Type, 2 = raw synchronous
  • Byte 2: Flags
  • Byte 3: Scale of deltas
  • Byte 4: Sampling rate to the nearest 100 usec
  • Byte 5-6: Number of points
  • Byte 7-8: 1st X-coordinate
  • Byte 9-10: 1st Y-coordinate
  • Byte 11: delta X1 (sign magnitude code)
  • Byte 12: delta Y1
  • ...
  • Byte 2n+11: delta Xn
  • Byte 2n+12: delta Yn
 8  8   8     8    8     16      16    16    8     8        8     8
+--+-+-----+-----+----+---.---+---.-+---.-+-----+-----+ +-----+-----+
|Op|2|Flags|Scale|Rate| N.o | X0. | Y0. |delta|delta|..|delta|delta|
| | | | | |poi.nts| . | . | X1 | Y1 | | Xn | Yn |
+--+-+-----+-----+----+----------+--+-----+-----+-----+ +-----+-----+
0 1 2 3 4 5 6 7 8 9 10 11 12 2n+11 2n+12