public class CommPortModem extends OpenCommPort
BAUD, BITS_PER_SECOND_LIST, FLOWCONTROL_HARDWARE, FLOWCONTROL_NONE, FLOWCONTROL_XONXOFF, SERIALPORT_OPEN_TIMEOUTSECONDS
Constructor and Description |
---|
CommPortModem(java.lang.String portName) |
Modifier and Type | Method and Description |
---|---|
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( ).
|
getCommPortName, main
public CommPortModem(java.lang.String portName) throws java.io.IOException, gnu.io.NoSuchPortException, gnu.io.PortInUseException, gnu.io.UnsupportedCommOperationException
java.io.IOException
gnu.io.NoSuchPortException
gnu.io.PortInUseException
gnu.io.UnsupportedCommOperationException
public boolean send(java.lang.String txData) throws java.io.IOException
java.io.IOException
public java.lang.String readSerial() throws java.io.IOException
java.io.IOException