Re: Reading Serial Port
- From: clinisbut <clinisbut@xxxxxxxxx>
- Date: Thu, 31 Jan 2008 06:28:29 -0800 (PST)
On Jan 31, 3:15 pm, Joseph M. Newcomer <newco...@xxxxxxxxxxxx> wrote:
The problem with reading stale data is that if you have filled up the buffer with old
data, then new data might not have space, and information will be discarded. By the time
you call PurgeComm, you might have already had the overflow, so that's why you see no
effect.
But... is this buffer managed by the S.O. (Windows)? To my knowledge,
I use no buffer except that "buffer" unsigned char variable where I
put every byte I read.
Why is this buffer plenty of data when I open the port?
By the timeI use PurgeComm inmediately after I open the port, before myThread-
you call PurgeComm, you might have already had the overflow, so that's why you see no
effect.
PostThreadMessage( UWM_START_READING );
Your simulation suggest is very interesting, if I don't found any more
errors I will test it. Until then I have a lot of work to do! ;)
Very thanks to all that reply that post.
.
- Follow-Ups:
- Re: Reading Serial Port
- From: clinisbut
- Re: Reading Serial Port
- References:
- Reading Serial Port
- From: clinisbut
- Re: Reading Serial Port
- From: Joseph M . Newcomer
- Re: Reading Serial Port
- From: clinisbut
- Re: Reading Serial Port
- From: clinisbut
- Re: Reading Serial Port
- From: clinisbut
- Re: Reading Serial Port
- From: Joseph M . Newcomer
- Reading Serial Port
- Prev by Date: Re: Reading Serial Port
- Next by Date: Re: Reentrancy issue
- Previous by thread: Re: Reading Serial Port
- Next by thread: Re: Reading Serial Port
- Index(es):
Relevant Pages
|