portcomms
Class CommPortModem
java.lang.Object
portcomms.OpenCommPort
portcomms.CommPortModem
- Direct Known Subclasses:
- SerialPortCommsStepLock
public class CommPortModem
- extends OpenCommPort
Subclasses CommPortOpen and adds send/expect handling for dealing
with Hayes-type modems.
|
Field Summary |
protected boolean |
debug
A flag to control debugging output. |
protected java.lang.String |
rxData
The last line read from the serial port. |
| Fields inherited from class portcomms.OpenCommPort |
BAUD, BITS_PER_SECOND_LIST, commPortID, FLOWCONTROL_HARDWARE, FLOWCONTROL_NONE, FLOWCONTROL_XONXOFF, inputStream, outputStream, parent, response, SERIALPORT_OPEN_TIMEOUTSECONDS, thePort |
|
Method Summary |
java.lang.String |
readSerial()
Read from the port
store response in rxData. |
boolean |
send(java.lang.String txData)
Send to the port
Send Car Return & Line Feed (\r\n),
instead of using println( ). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rxData
protected java.lang.String rxData
- The last line read from the serial port.
debug
protected boolean debug
- A flag to control debugging output.
CommPortModem
public CommPortModem(java.lang.String portName)
throws java.io.IOException,
gnu.io.NoSuchPortException,
gnu.io.PortInUseException,
gnu.io.UnsupportedCommOperationException
- Throws:
java.io.IOException
gnu.io.NoSuchPortException
gnu.io.PortInUseException
gnu.io.UnsupportedCommOperationException
send
public boolean send(java.lang.String txData)
throws java.io.IOException
- Send to the port
Send Car Return & Line Feed (\r\n),
instead of using println( ).
- Throws:
java.io.IOException
readSerial
public java.lang.String readSerial()
throws java.io.IOException
- Read from the port
store response in rxData.
- Throws:
java.io.IOException