[Lazarus] [LAZARUS] Any Free/Cheap Async Serial Port Component

Roberto P. padovani.r at gmail.com
Thu Apr 3 12:41:06 CEST 2014


I don't know AsyncPro, but a quick overview of CPortLaz code reveals the
usage of a TThread and WaitForMultipleObjects which is very Windows-centric.

R#รป


2014-04-03 11:14 GMT+02:00 Michael Schnell <mschnell at lumino.de>:

> On 04/02/2014 10:53 PM, Roberto P. wrote:
>
>> I'd like to point out that CPortLaz is multithreaded
>>
>
> Does it work similar to AsyncPro ?
>
> In fact, IMHO, it would be desirable to have a component that _internally_
> uses TThread to handle blocking ports (either using just a byte-FIDO - this
> is what AsyncPro does - and/or allowing the user to implement a protocol
> within the Thread's "Execute" ), and when some information from the port is
> received (at least one byte or when the protocol handler issues a "ready"),
> does an Event (aka queued callback) to the main thread.
>
> The main thread call of course needs to be "scheduled" using means such as
> TThread.Queue or Application.QueueAsyncCall. (As at the time when AsyncPro
> was released, Delphi did not provide either, AsyncPro uses Windows Messages
> by directly accessing the Windows API, which happily is not necessary with
> Lazarus).
>
> Unfortunately Thread -> Mainthread signaling is only easily provided in
> Lazarus in the GUI based Widget Types. (NoGUI still needs an appropriate
> enhancement.) But of course the user (or even a ComPort Unit) could provide
> a usable Main Loop implementation.
>
> -Michael
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140403/9229b990/attachment-0003.html>


More information about the Lazarus mailing list