[REBOL] Re: using wait on a serial device
From: dlhawley:home at: 3-Nov-2000 15:54
I am now using REBOL/core (Experimental) 2.4.37.22 which suports
the no-wait open refinment, but my open still return a port
with scheme set to `file. Is there an open refinment to open a serial
port? And how does one set the port settings?
Previously, you (Holger Kruse) wrote:
> On Thu, Nov 02, 2000 at 02:50:53PM -0800, David Hawley wrote:
> > I am building at least a prototype of an instrument which reports
> > it's data collection via e-mail using REBOL. Currently it runs on
> > QNX4, but probably will run on QNX RTP/Nto.
> >
> > I have several instruments which are connecteded via serial ports
> > as well as a LCD/keypad display. I have writing to the display working
> > and can read characters from the keypad, but am having trouble building
> > a loop around a wait statement.
> >
> > I open the lcd with the following:
> >
> > lcd-fp: open/mode %/dev/ser1 [ direct write read binary ]
> >
> > writing works as expected using insert. To read chars I use:
> >
> > char: first lcd-fp
> >
> > but doing a: wait [lcd-fp]
> >
> > I get:
> >
> > >> wait [lcd-fp]
> > ** Script Error: Invalid argument: ?port?.
> > ** Where: wait [lcd-fp]
> > >> type? lcd-fp
> > == port!
> > >>
>
> For file ports REBOL currently does not distinguish between streams
> and disk-based files. That's why 'wait does not work for them, and also
> why 'skip'ping is slow and only works in one direction. Both are issues
> that we plan to resolve in the future, by using different behaviors for
> streams and disk-based files.
>
> For serial i/o try one of the more recent experimental builds. They
> support "serial:" ports (currently for all operating systems except MacOS
> -- that to be supported soon). "serial:" ports support 'wait, and also
> let you adjust port setting such as flow control and transfer rate.
Is this documented any where?
--
David L. Hawley D.L. Hawley and Associates 1.503.274.2242
Software Engineer [David--L--Hawley--computer--org]