CONST HOSTDEV=1
CONST COMDEV=2
CONST BARDEV=3
DIM Shared CDState As Integer
DIM Shared CDLast As Integer
DIM Shared ModemInit As String
Dim Shared Symbol As String
DIM Shared Symbol2 As String
DIM Shared Need2InitModem As Integer
Dim Shared BadgeSwipe As String
'----------------------------------
'Function to detect the state of CD
'----------------------------------
Function GetCDState%
Dim s As String
s=Right$(IOCTL$(ComDev),1)
If s="1" Then
GetCDState%=TRUE
symbol2 = "H"
Else
GetCDState%=FALSE
symbol2 = "L"
End If
End Function
'----------------------------------
'Function to determine if term is online
'----------------------------------
Function Online%
Dim s As String
s=Left$(Ioctl$(hostDev),1)
If s="1" Then
Online%=TRUE
Symbol="+"
Else
Online%=FALSE
Symbol="-"
End If
End Function
'----------------------------------
'Initialize
'----------------------------------
'
'Note- The init string utilized here is for the MT2834 Multitech Modem
' this is the modem currently recommended by LINX Data Terminals.
' If you choose another vendor of modems you will need to contact
' the modem mfg. for the appropriate init command string.
ModemInit="AT$MB9600Q2$SB9600&W0"
'Explanation of settings
'AT Get Modem's Attention
'MB9600 Use 9600bps on the line
'Q2 Supress result codes
'SB9600 Set com port to 9600 only!
'&W0 Save the settings to non-volatile RAM #0
'Dip switches on Modem
'1-UP, 2-UP, 3-DW, 4-UP, 5-UP, 6-UP, 7-DW, 8-DW
'9-DW, 10-UP, 11-UP, 12-DW, 13-DW, 14-DW, 15-UP, 16-DW
'Open all devices to be used
Open "Host" For Random As #HostDev
Open "Com" For Output As #ComDev
Open "Bar" For Input As #BarDev
CDState=GetCDState%
Comments to this Manuals