[Lazarus] Portiung Windows application to Linux, what about serial comm?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Portiung Windows application to Linux, what about serial comm?

Free Pascal - Lazarus mailing list
I am trying to port a Windows application written in Delphi7/2007 back
in 2004-2012 to FPC/Lazarus so it can later be moved to Linux.
THis application is used to talk via RS232 to a data collection system
for control and data retrieval.

Unfortunately there was no built-in support in Delphi for serial comm
so we used external components for this, at first a very simple
TSerial component from a developer in the UK and later Turbo Async
Pro.

The TSerial component is contained in a single source file whereas
AsyncPro is splitting its serial component in a large set of units,
very hard to navigate.

In both cases the application is written using the event model for
receiving data and non-blocking send functions.

I would rather not want to port these components (at least not Async
Pro) since they are inherently Windows centric.
Instead I want to use the built-in Serial component, but it needs to
be packaged with a wrapper such that an OnRxData event is added and
such that there is a non-blocking transmit.
Must be possible to set the RX/Tx buffer size too.

What is the best way to accomplish the move of serial comm to
FPC/Lazarus?

Is there a way to add receive events and non-blocking send to the
built-in serial object in FPC?
I mean if I make a custom component by inheriting from the built-in
serial, how can these extra features be added?

Maybe it has already been done?


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus