Class TModemDetectDlg (unit Detmodem) |
Inherits from
TForm
procedure Dial1Click(Sender: TObject);
Stores high baud for modems
procedure FormCreate(Sender: TObject);
procedure OKClick(Sender: TObject);
function GetBrand(Port : Word) : String;
TModemDetectDlg.
function GetHighBaud(Port : Word) : Word;
function OpenCommPort(Port : Word) : Boolean;
TModemDetectDlg.
function Query(Port : Word; Info : String) : String;
TModemDetectDlg.
function QueryBaud(Port : Word) : String;
TModemDetectDlg.
function TestPort(Port : Word) : Boolean;
TModemDetectDlg.
function WaitString(szString : String; dwTime : LongInt) : Boolean;
TModemDetectDlg.
property BaudRate : LongInt
Public declarations
property ComPort : LongInt
Label1 : TLabel;
Label2 : TLabel;
ListBox1 : TListBox;
OK : TButton;
Timer1 : TTimer;
FBaudRate : LongInt;
FComPort : LongInt;
idComDev : Integer;
Private declarations
procedure Dial1Click(Sender: TObject);
Stores high baud for modems
procedure FormCreate(Sender: TObject);
procedure OKClick(Sender: TObject);
function GetBrand(Port : Word) : String;
TModemDetectDlg.GetBrand
Returns the "Brand" of the modem (may not actually be the Brand)
function GetHighBaud(Port : Word) : Word;
function OpenCommPort(Port : Word) : Boolean;
TModemDetectDlg.OpenCommPort
Attempts to open a Comm port. Returns True if the open is successful,
False otherwise.
function Query(Port : Word; Info : String) : String;
TModemDetectDlg.Query
Send an AT command to the modem and return a one-line response.
Assumes that there is a modem attached to the port.
function QueryBaud(Port : Word) : String;
TModemDetectDlg.QueryBaud
Returns the high baud, according to the modem
function TestPort(Port : Word) : Boolean;
TModemDetectDlg.TestPort
Determines if a modem is connected to a port by sending a modem
initialization string to the port, and waiting for the 'OK'
response
function WaitString(szString : String; dwTime : LongInt) : Boolean;
TModemDetectDlg.WaitString
Waits for a string from the modem for dwTime milliseconds.
Returns True if the string is received, False otherwise
property BaudRate : LongInt
Public declarations
property ComPort : LongInt
Label1 : TLabel;
Label2 : TLabel;
ListBox1 : TListBox;
OK : TButton;
Timer1 : TTimer;
FBaudRate : LongInt;
FComPort : LongInt;
idComDev : Integer;
Private declarations