• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

Does TnrGsm support Multi-Thread program developement

Started by weggin, July 17, 2010, 01:39:57 am

Previous topic - Next topic

weggin

Hi roman:
   I want to use a pc to control 4 GSM device to work individually,like sent and receive sms by the different GSM devices in one pc at the same time.
Could i use Multi-Thread program to initial the TnrGsm component?
so i can receive different events(like OnAfterInit,OnSmsReceived, OnSmsSent...etc) from different GSM devices.

Thanks!

weggin

Roman Novgorodov

Hello

You need 4 instances of TnrGsm object for work with 4 gsm devices.

Of course we implemented asynchronous way for control gsm device.
Every pair of TnrComm and TnrGsm will work in separated thread.

Please note that TnrComm has UseMainThread property.
It controls which thread will be used for call event handler.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

henry64

So, does UseMainThread have to be false when runtime created in a thread?

Roman Novgorodov

Hello

If UseMainThread is True, all events and data handling (gsm device replies, notifications etc.) will be executed in main form thread.
It can be necessary for correct working visual controls.

If you do not worry about controls you can use False for more correct multi-thread working.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.