I/O to and from /dev/tty00 [message #1619] |
Thu, 13 January 1994 12:19 |
zawodny
Messages: 121 Registered: August 1992
|
Senior Member |
|
|
I'm in need of ideas on how to properly communicate to a tty port from
IDL. I have a device connected to a serial port on my DECStation 3000/400
which is assigned to /dev/tty00. I am able to write ascii to this device by
the following:
openu,1,'/dev/tty00'
printf,1,a
where "a" is an ascii string variable, or
openu,1,'/dev/tty00'
writeu,1,a
where "a" is a byte array of the converted ascii text and an appropriate
terminator byte (like 13B). When it comes to being able to read the ascii that
comes back from the device I run into problems. My best result have been
obtained by reading individual bytes, appending and converting them to string
variables. It appears that I do not catch all of the text that is being sent
from the device. It would be really nice if there was a way to buffer this
input and get it one line at a time. What is the proper way to do this sort of
I/O? Should I go to the /NOSTDIO keyword in the open statement? Should I get
tip working properly (no small feat) and access it via a file opened by a spawn
command? Any ideas are appreciated.
--
Joseph M. Zawodny (KO4LW) NASA Langley Research Center
Internet: zawodny@arbd0.larc.nasa.gov MS-475, Hampton VA, 23681-0001
Packet: ko4lw@n4hog.va.usa
|
|
|