[fpc-pascal] SerReadTimeout question

James Richters james.richters at productionautomation.net
Mon Sep 19 03:18:20 CEST 2022


I can't seem to find any documentation or SerRead or SerReadTimeout..
searching for either along with Freepascal doesn't get me any results.  
If it exists somewhere and I am just missing it, can someone tell me where
it is?

Anyway, what I'm trying to figure out is when the timeout timer starts...
does the timeout timer start when I call the funciton, or does it start when
there is no data to read... waiting for a certain amount of time to see if
there is more data?  Of course it will also stop when the requested number
of bytes is satisfied.

I'm trying to read as fast as reliable, but I don't always know how many
bytes I'm expecting.  So it would be handy it the timer started when there
was nothing to read.. then I could have a very small timeout and as long as
data was coming in, I would get it, until the requested number of bytes is
reached... but if the timer stated when I call the function, I will have to
caclculate how long it should take and add a little in case the data isn't
ready when I ask for it.

James



More information about the fpc-pascal mailing list