Sub Class_Globals
Private Comm As JavaObject
Private vportno As Int
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize
Comm.InitializeNewInstance("com.icpdas.comm.Comm",Null)
'Comm.InitializeStatic("com.icpdas.comm.Comm")
End Sub
' Initialize the COM port.
public Sub open(portno As Int,baudrate As Int,databit As Int,parity As Int,stopbit As Int) As Int
Return Comm.RunMethod("open",Array As Object(portno,baudrate,databit,parity,stopbit))
End Sub
' Free all the resources used by open. This method must be called
' before the program Exit.
public Sub close(portno As Int)
Comm.RunMethod("close",Array(portno))
End Sub
' Create a thread to send a command to module.
public Sub SetSendCmd(ioArg As JavaObject) As Int
Return Comm.RunMethod("setSendCmd",Array As Object(ioArg))
End Sub