[fpc-pascal] Sending break on (Windows) serial comms

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Tue Apr 24 17:21:26 CEST 2012

Marco van de Voort wrote:
> In our previous episode, Mark Morgan Lloyd said:
>> Marco, I see you had a StackOverflow question on this a year or so ago. 
>> Did you ever get anywhere with it in practice?
> It was an idea to lower the overhead and improve the reliability of our
> serial protocol. (because of the out of band information is guaranteed
> unique and can't happen in the datastream)
> But if you can't insert the break cleanly into the character stream, it is
> useless for protocol purposes I guess. And it was not worth centering the
> rest of the application around it.
> I did't have any confidence in the solutions presented (just reset the
> connection and pauze) because both the pauze is not reliable in length on
> preemptive systems like Windows, and the damage to the FIFOs is a problem,
> since that would negate the size advantages.
> I never pursued it further.

OK. I'll start off with the standard API, with an explicit check that 
the output has drained by default, and a mSec parameter (which will get 
rounded up to something gross on unix).

I'm still hoping that at some point the units and test code will be 
bundled in place of the existing unix-only serial.pp.

Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

More information about the fpc-pascal mailing list