On Wed, 12 Jan 2005 17:45:48 -0500, Peter Hansen <email@example.com> wrote:
Has anyone done a script that will rspond to the serial com port(s)
receive buffer interrupt, as opposed to polling and timeouts?
Win2000 is the main interest right now.
What problem do you hope to avoid by not using 'polling
and timeouts'? (Note that if you specify a sizable
read timeout, you're closer to being interrupt-driven
than you are to what is traditionally called 'polling'.)
Thanks for the reply. I'm working on a s/w test program using python
code. Com1 and com2 play a part. The problem is that the python code
has a lot of work to do..and the results from the hardware under test can
come from either com1 or com2..at any time. It may be a few milliseconds,
or several seconds, sometimes minutes, before a response is expected.
I'm not sure what timeout value I'd use. Using threads, and re-loading the
timeout values on the fly may be a solution, but I'm not experienced with
threads..and was hoping to avoid them.