public class AUXSerialPort extends SerialPort
DATABITS_7, DATABITS_8, FLOWCONTROL_NONE, FLOWCONTROL_RTSCTS_IN, FLOWCONTROL_RTSCTS_OUT, FLOWCONTROL_XONXOFF_IN, FLOWCONTROL_XONXOFF_OUT, PARITY_EVEN, PARITY_NONE, PARITY_ODD, SPEED_110, SPEED_115200, SPEED_1200, SPEED_128000, SPEED_14400, SPEED_150, SPEED_19200, SPEED_2400, SPEED_250000, SPEED_28800, SPEED_300, SPEED_31250, SPEED_38400, SPEED_4800, SPEED_56000, SPEED_57600, SPEED_600, SPEED_9600, STDAUX, STDCOM, STOPBITS_1, STOPBITS_2
Constructor and Description |
---|
AUXSerialPort()
Class provided access to the AUX serial port.
|
Modifier and Type | Method and Description |
---|---|
void |
enableDrivers(boolean mode)
Enabled output drivers
|
void |
enableReceivers(boolean mode)
Enabled receivers
|
boolean |
getCTS()
Returns the current state of CTS at the exact time it was sampled by the
native driver.
|
boolean |
getDriversEnabled()
Returns the current driver mode
|
boolean |
getFastSlew()
Returns the current state of the RS-485 slew control
|
static String |
getName()
Returns the name of the port.
|
boolean |
getReceiversEnabled()
Returns the current receiver mode
|
boolean |
getRS485()
Returns the current driver mode
|
boolean |
getRTS()
Returns the current state of RTS at the exact time it was sampled by the
native driver.
|
void |
readAfterBreak(byte[] buffer)
Captures data following the next Break condition.
|
void |
sendMarkAfterBreak(int brk,
int mrk)
First this method creates a Break condition on the serial line for a duration defined in
microseconds.
|
void |
setFastSlew(boolean fast)
Sets the slew rate for RS-485 mode.
|
void |
setRS485(boolean mode)
Sets the driver mode on the AUX serial port for RS-485.
|
void |
setRTS(boolean rts)
Sets the state of RTS.
|
addEventListener, close, disableReceiveFraming, disableReceiveThreshold, disableReceiveTimeout, enableReceiveFraming, enableReceiveThreshold, enableReceiveTimeout, getBaudRate, getDataBits, getFlowControlMode, getInputBufferSize, getInputStream, getOutputBufferSize, getOutputStream, getParity, getReceiveFramingByte, getReceiveThreshold, getReceiveTimeout, getStopBits, isReceiveFramingEnabled, isReceiveThresholdEnabled, isReceiveTimeoutEnabled, notifyOnBreakInterrupt, notifyOnCTS, notifyOnDataAvailable, notifyOnFramingError, notifyOnOutputEmpty, notifyOnOverrunError, notifyOnParityError, open, removeEventListener, sendBreak, setBitParameters, setFlowControlMode, setInputBufferSize, setOutputBufferSize, setSerialPortParams
public AUXSerialPort()
public static String getName()
public void setRTS(boolean rts)
rts
- set to true to enable RTSIllegalStateException
- if the port is not openpublic boolean getRTS()
IllegalStateException
- if the port is not openpublic boolean getCTS()
IllegalStateException
- if the port is not openpublic void setRS485(boolean mode)
mode
- set to true for RS-485 and false for RS-232IllegalStateException
- if the port is not openpublic boolean getRS485()
IllegalStateException
- if the port is not openpublic void setFastSlew(boolean fast)
fast
- ?IllegalStateException
- if the port is not openpublic boolean getFastSlew()
IllegalStateException
- if the port is not openpublic void enableDrivers(boolean mode)
mode
- set to true to enable driversIllegalStateException
- if the port is not openpublic boolean getDriversEnabled()
IllegalStateException
- if the port is not openpublic void enableReceivers(boolean mode)
mode
- set to true to enable receiversIllegalStateException
- if the port is not openpublic boolean getReceiversEnabled()
IllegalStateException
- if the port is not openpublic void sendMarkAfterBreak(int brk, int mrk)
brk
- desired duration of the break condition in microseconds.mrk
- desired duration of the marking condition in microseconds.IllegalStateException
- if the port is not openpublic void readAfterBreak(byte[] buffer)
buffer
- filled with data.