
May 14th, 2004, 08:07 AM
|
 |
My beer is empty....
|
|
Join Date: Feb 2002
Location: South Africa
Posts: 73
Time spent in forums: 1 h 54 m 37 sec
Reputation Power: 12
|
|
|
event handler in console mode
I'm using the TurboPower Async Professional CLX in a console mode application. - Assigning an event handler in console mode
I need to assign an event handler. I know that in a TComponent/TForm you put the function in your private declarations and the assign it to the onEvent property:
procedure comPortTrigger(CP: TObject; Msg, TriggerHandle, Data: Word);
comPort.onTrigger := comPortTrigger;
When trying this in a console application I get:
[Error] Project1.dpr(19): Incompatible types: 'method pointer and regular procedure'
How do I get this right?
- Getting the components to work in console mode
The TurboPower Async Professional CLX components work like a charm as long as I coding a visual application. When coding a console application it does not work. The application I'm writing will run as a service on a Linux machine and must be able to read/write data from several devices (up to 32) connected via serial ports (multi port boards - using the Moxa CP114s at the moment). If you can tell me how to get it fixed it would be muched appreciated.
Alternatively please recommend (or guide me in writing) components that can read/write from serial ports coded in Kylix (or using DLL's). Must run in Linux though. The devices output under full load about 9.6kB(yte) per second per port and we need to write to that same port whilst reading (or stop reading, write, continue reading) without the system falling over.
Last edited by Domisedon : May 14th, 2004 at 08:14 AM.
|