readString on SerialPort

Scott Jaderholm scott at jaderholm.com
Tue Aug 27 23:20:20 UTC 2002


Hi,

I just had a few questions on serial ports in squeak.  I read the code
for SerialPort>>readString but I'm not sure I understand it completely
yet.  I'm thinking that the serial port keeps a cache of all the data it
receives and then when you run readString it will give you up to the
last 1000 characters it has received.  Is that correct?

Then the next time you run readString it will only give you the
characters since the last time readString was run?

Say I am downloading data over the serial port and I run readString, get
part of my data, then 1005 characters of data comes in before I run
readString
again, I would have lost those 5 characters of data?  What kind of code
would I use so readString gets run at the right time during a large
download
process as to not lose any data?

I appreciate any help with this.

Sincerely,
Scott




More information about the Squeak-dev mailing list