--- In [EMAIL PROTECTED], "Aaron Ardiri" <[EMAIL PROTECTED]>
wrote:
> > In pre-OS 5.0:
> > FrmCustomAlert displays 1
> > In OS 5.0:
> > FrmCustomAlert displays 8
>
> are you getting the same results on PalmSim as well?
No, the code works fine on the OS 5 Simulator. SrmReceiveCheck()
works as expected.
Another interesting thing I found is that the Simulator also supports
the old serial manager, but the Tungsten T does not.
>
> > If the code is changed to the following:
> > // Find out if we have bytes in the queue
> > serNumBytes = 0;
> > error = SrmReceiveCheck(m_serRefNum, &serNumBytes);
> > if (!error)
> > {
> > char serNumBytesChar = serNumBytes + 0x30; // convert to ASCII
> > FrmCustomAlert(DebugAlert, &serNumBytesChar, NULL,
> > NULL); ..........................
> >
> > A zero is displayed in the Custom Alert. Therefore, if there
aren't
> > bytes in the queue, SrmReceiveCheck() will return immediately in
OS 5
> > as expected. But if there are bytes in the queue, SrmReceiveCheck
()
> > will wait until there are at least 8 before returning, which
isn't
> > good for my app, becuase it's too late to respond to the poll.
>
> so, best solution is to avoid SrmReceiveCheck() :) seems that is
> coded to thread block/return nothing until 8 bytes are in the
buffer.
That's what I'll have to do I guess.
> > > i found some old code that would grab one byte at a time from
the
> > > serial port, but, it made calls specific to XXXReceiveWait and
> > > XXXReceive.
> >
> > We haven't tried this method, but I'll try it out. Thanks for
> > your help!
>
> its old code :) but, technically should work the same way. since
> you are only looking for one byte, you can have a pretty low
> timeout value without slowing things down too much :)
>
> i had to dig deep in my archives for that code.. its a bit dusty.
Thanks again!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/