The IsConnected property gets a Boolean value indicating if mCore
is connected to the GSM Modem through serial communication port.
Namespace: mCore
Assembly: mCoreLib (in mCoreLib.dll)
| Visual Basic |
| Public Class MyClass Public WithEvents objSMS As New mCore.SMS Public Sub ModemConnect() Try 'The following message box will display False MsgBox(objSMS.IsConnected.ToString()) objSMS.Port = "COM1" objSMS.BaudRate = mCore.BaudRate.BaudRate_19200 objSMS.DataBits = mCore.DataBits.Eight objSMS.StopBits = mCore.StopBits.One objSMS.Parity = mCore.Parity.None objSMS.FlowControl = mCore.FlowControl.RTS_CTS objSMS.Connect() 'The following message box will display True MsgBox(objSMS.IsConnected.ToString()) Catch ex As mCore.GeneralException MsgBox(ex.Message, MsgBoxStyle.Critical, "mCore Demo") Catch ex As Exception End Try End Function End Class |
| C# |
| class MyClass { public mCore.SMS objSMS = new mCore.SMS(); public static void ModemConnect() { try { //The following message box will display false MessageBox.Show(objSMS.IsConnected.ToString()) objSMS.Port = "COM1"; objSMS.BaudRate = mCore.BaudRate.BaudRate_19200; objSMS.DataBits = mCore.DataBits.Eight; objSMS.StopBits = mCore.StopBits.One; objSMS.Parity = mCore.Parity.None; objSMS.FlowControl = mCore.FlowControl.RTS_CTS; objSMS.Connect(); //The following message box will display false MessageBox.Show(objSMS.IsConnected.ToString()) } catch
(mCore.GeneralException e) |
mCore.SMS.Port Property
mCore.SMS.BaudRate Property
mCore.SMS.DataBits Property
mCore.SMS.StopBits Property
mCore.SMS.Parity Property
mCore.SMS.FlowControl Property
mCore.SMS.Timeout Property
mCore.SMS.Connect Method
mCore.SMS.Disconnect Method