serial
Class SerialModem
java.lang.Object
|
+--serial.Serial
|
+--serial.SerialModem
- Direct Known Subclasses:
- SerialModemTest
- public class SerialModem
- extends Serial
- implements javax.comm.SerialPortEventListener
Methods inherited from class serial.Serial |
addEventListener,
close,
getNewInstance,
open,
open,
open,
openNoParams,
processSerialEvent,
read,
readBytes,
readString,
ready,
send,
send,
sendSynch,
sendSynch,
sendSynch,
setFlowControlMode |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DATA_MODE
public static int DATA_MODE
FAX1_MODE
public static int FAX1_MODE
FAX2_MODE
public static int FAX2_MODE
VOICE_MODE
public static int VOICE_MODE
debug
protected boolean debug
lastCommand
protected String lastCommand
listener
protected ModemEventListener listener
ringCounter
protected int ringCounter
ringTimeStamp
protected long ringTimeStamp
SerialModem
public SerialModem()
SerialModem
public SerialModem(String in_device)
openModem
public void openModem(String in_device)
modemSend
public void modemSend(String cmd)
init
public void init()
dial
public void dial(String number)
setMode
public void setMode(int mode)
- Allows you to set data, fax or voice mode
pickUp
public void pickUp()
hangUp
public void hangUp()
answer
public void answer()
setDebugMode
public void setDebugMode(boolean d)
modemSays
protected void modemSays(String in)
setModemEventListener
public void setModemEventListener(ModemEventListener mel)
serialEvent
public void serialEvent(javax.comm.SerialPortEvent spe)
- Description copied from class: Serial
- This method is called from the serial port controller when
there is a serial port event
- Specified by:
- serialEvent in interface javax.comm.SerialPortEventListener
- Overrides:
- serialEvent in class Serial
- Tags copied from class: Serial
- Parameters:
spe
- a SerialPortEvent
value
main
public static void main(String[] args)
- Used for standalone debugging and hardware tests.