• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 
March 28, 2024, 06:08:40 am

News:

SMF - Just Installed!


TnrGsm component and GSM drivers

Started by Roman Novgorodov, May 30, 2008, 04:13:49 am

Previous topic - Next topic

Roman Novgorodov

Hello

Let me explain some internal TnrGsm component logic.

TnrGsm has several GSM drivers.
Our GSM drivers are built in (into binary resources) INF files.
This inf files have structure and syntax similar the windows INF files for modems.

If TnrGsm.Autodetect is True, component tries all this drivers for current connection.
If driver is not correct it shows ERROR in the LOG file.
If all GSM drivers return a error during autodetection process, component selects the default GSM driver for further work with device. The defualt GSM driver is first driver.

You can access to drivers of TnrGsm class from following public properties:


  • TnrGsm.Drivers[Index:integer]


  • TnrGsm.DriverCount:integer


  • TnrGsm.DriverIndex:integer


  • TnrGsm.Driver



You can turn off Autodetection mode and choose needed driver for work with your device:

nrGsm.Autodetect := False; // turn off autodetect mode
nrGsm.DriverIndex := 2;      // select driver

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

avatar


Roman Novgorodov

Hello

What do you mean?

TnrGsm works with a real GSM device.
Do you want to use GSM in several modes from separated threads at same time?
For example: one thread sens sms, other thread simultaneously reads sms and so on.
It is impossible of course :-) !

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.

avatar

I mean can I spawn an instance of TnrGsm on a separate thread so that I can read sms messages asynchronously and give the control back to the main program while its being read?

Roman Novgorodov

Hello

Yes of course.
The TnrGsm is thread independent class.
Please note that you can handle TnrGsm events for handle the various GSM occurrencies asynchronously.

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.

avatar

Thanks Roman!
I assumed that I had to use a timer to poll the component but after checking out the demo,
there are notification events available. I'm totally impressed :)