next up previous contents
Next: 4.2.3 gloverecord Up: 4.2 The Glove software Previous: 4.2.1 glovedata

4.2.2 gloveread

In order to isolate the hardware level to a particular program, gloveread was written. This takes a continuous stream of bytes and converts them into glovedata objects before outputting them by calling printglove. It was implemented as a finite state machine that received individual bytes. This gives maximum flexibility and also also graceful recovery from bad packets.

Typically this would be combined in the way shown below:

( stty raw -parity -echo ; gloveread ) < /dev/ttyd2

This sets up the second serial port on the SGI (/dev/ttyd2)gif before passing the data on to gloveread. Gloveread then prints the results to STDOUT, in a comma-separated list that can be read by calling readglove on the stream, but is also human-readable.



waleed@cse.unsw.edu.au