[Lazarus] Thread based timer vs TTimer

Michael Schnell mschnell at lumino.de
Wed Jun 24 09:57:12 CEST 2015

On 06/23/2015 04:36 PM, Graeme Geldenhuys wrote:
> I don't use TCustomApplication anywhere in fpGUI or my applications. 
> I've also never had the need for QueueAsyncCall(), sorry. ;-)
My "easy" way to do (embedded) application for headless devices (hence 
obviously NopGUI) is to do the application first on a (Linux) PC 
including a GUI for monitoring states and introducing stimulus events, 
using a set of dedicated units for GUI stuff and another set of 
dedicated units for the "business logic". In the end, the GUI units can 
be replaced by noGUI workalikes with stripped-off debugging 
functionality, leaving the "business logic" units untouched. So if you 
face any problems with the running task, for debugging you easily can 
use the GUI enabled application, again.

As such embedded application often need to communicate with multiple 
partners via TCP/IP, serial interfaces etc, and need to do complex 
timing, it does make sense to use threads and TTimers.

Of course a complete cross-development with cross compiling and remote 
debugging (PC -> headless device) would be another decent option here. 
But I have not been able to make this work. (For C based project I use 
an Eclipse IDE for cross compiling and remote debugging every day.)

So IMHO, an "activeNoGUI" Widget Type that automates the process of 
porting would be nice to have.

In fact all this has become less priority during the last few years, as 
you rather easily at rather low additional cost you can plan your 
embedded device to be GUI enable (e.g. with a BeagleBone or an Odroid). 
But I e.g. needed to do software for a NAS device and here, no Graphic 
was available at all.

Nonetheless I hope to be able to publish the "activeNoGUI" Widget Type 
for Lazarus one day soon.


More information about the Lazarus mailing list