Re: Events on Serial port



If you prefer polling, you may retrieve the number of received bytes using
fconfigure $chan -queue

Otherwise you may use fileevents, see
http://wiki.tcl.tk/1108

Regards, Rolf.

Derek wrote, On 03.07.2008 11:40:
Hi All

I have a tcl script that polls the serial port DSR line with the
fconfigure command every 3 - 8 ms, selectable by the user. I then know
I have data waiting on the embbeded device and can query it. The
processing of the data is plenty fast enough but getting it off the
remote device is a bit time consuming, I have little control over
that, I would prefer to know the data is available more precisley
with out putting load on the main CPU at the script level.

Is there any way to be more efficient, i.e. get an event/interrupt
perhaps with the new channel setup in 8.5, or am I overstepping the
domain of dynamic languages.

Thanks

Derek
.