I have an application that receives serial data from an external device via
the Ir port. The external device logs data, so I get a number telling me how
many records will follow followed by a set of records (each record is 32
bytes), I can get anywhere from 1 to 995 records.
I currently have an application that receives up to about 850 ( +/- 20 )
records when I try and receive 995 records. (the application works just fine
for less then 850 records). I noticed this paragraph in the Palm Programmers
Companion book
"Applications should not loop indefinitely on the
SrmReceiveCheck and SrmReceiveWait functions, waiting for
serial data to arrive on the port, without allowing the Palm OS to
obtain time to execute other tasks running in the same thread (by
calling EvtGetEvent and SysHandleEvent). Virtual devices
often run in the same thread as applications and this can prevent
virtual devices and other serial related code from properly handling
received data."
could anyone clear up whether looping for 995 times would be close enough to
"indefinitely" to cause this type of behavior? The device that is sending me
data has no flow control, it just sends until it's done so I've always
assumed I just had to loop for the number of records to follow and things
would work just fine.
Thanks
Thomas
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/