| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectserialPort.comm.CommPort
serialPort.comm.SerialPort
public abstract class SerialPort
This class models an RS-232 serial communications port.
| Field Summary | |
|---|---|
| static int | DATABITS_55 data bit format. | 
| static int | DATABITS_66 data bit format. | 
| static int | DATABITS_77 data bit format. | 
| static int | DATABITS_88 data bit format. | 
| static int | FLOWCONTROL_NONENo flow control. | 
| static int | FLOWCONTROL_RTSCTS_INRTS/CTS flow control on input. | 
| static int | FLOWCONTROL_RTSCTS_OUTRTS/CTS flow control on output. | 
| static int | FLOWCONTROL_XONXOFF_INXON/XOFF flow control on input. | 
| static int | FLOWCONTROL_XONXOFF_OUTXON/XOFF flow control on output. | 
| static int | PARITY_EVENEven parity. | 
| static int | PARITY_MARKMARK parity scheme. | 
| static int | PARITY_NONENo parity. | 
| static int | PARITY_ODDOdd parity. | 
| static int | PARITY_SPACESPACE parity scheme. | 
| static int | STOPBITS_11 stop bit. | 
| static int | STOPBITS_1_51-1½ stop bits. | 
| static int | STOPBITS_22 stop bits. | 
| Constructor Summary | |
|---|---|
| SerialPort()Constructor. | |
| Method Summary | |
|---|---|
| abstract  void | addEventListener(SerialPortEventListener listener)Adds the specified serial port listener to receive serial events. | 
| abstract  boolean | isCD()Indicates if the CD bit is set. | 
| abstract  boolean | isCTS()Indicates if the CTS bit is set. | 
| abstract  boolean | isDSR()Indicates if the DSR bit is set. | 
| abstract  boolean | isRI()Indicates if the RI bit is set. | 
| abstract  boolean | isRTS()Indicates if the RTS bit is set. | 
| abstract  void | notifyOnBreakInterrupt(boolean enable)Instructs the port to notify its listener when there is a break interrupt on the line. | 
| abstract  void | notifyOnCarrierDetect(boolean enable)Instructs the port to notify its listener when the CD bit changes. | 
| abstract  void | notifyOnCTS(boolean enable)Instructs the port to notify its listener when the CTS bit changes. | 
| abstract  void | notifyOnDataAvailable(boolean enable)Instructs the port to notify its listener when input data is available. | 
| abstract  void | notifyOnDSR(boolean enable)Instructs the port to notify its listener when the DSR bit changes. | 
| abstract  void | notifyOnFramingError(boolean enable)Instructs the port to notify its listener when a framing error occurs. | 
| abstract  void | notifyOnOutputEmpty(boolean enable)Instructs the port to notify its listener when the output buffer is empty. | 
| abstract  void | notifyOnOverrunError(boolean enable)Instructs the port to notify its listener when an overrun error occurs. | 
| abstract  void | notifyOnParityError(boolean enable)Instructs the port to notify its listener when a parity error occurs. | 
| abstract  void | notifyOnRingIndicator(boolean enable)Instructs the port to notify its listener when the RI bit changes. | 
| abstract  void | removeEventListener()Removes the current serial port listener. | 
|  void | setRcvFifoTrigger(int trigger)Deprecated. | 
| Methods inherited from class serialPort.comm.CommPort | 
|---|
| close, getName, toString | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface serialPort.comm.SerialPortInterface | 
|---|
| getBaudBase, getBaudRate, getCallOutHangup, getDataBits, getDivisor, getEndOfInputChar, getFlowControlMode, getLowLatency, getParity, getParityErrorChar, getStopBits, getUARTType, isDTR, sendBreak, setBaudBase, setCallOutHangup, setDivisor, setDTR, setEndOfInputChar, setFlowControlMode, setLowLatency, setParityErrorChar, setRTS, setSerialPortParams, setUARTType | 
| Field Detail | 
|---|
public static final int DATABITS_5
public static final int DATABITS_6
public static final int DATABITS_7
public static final int DATABITS_8
public static final int STOPBITS_1
public static final int STOPBITS_2
public static final int STOPBITS_1_5
public static final int PARITY_NONE
public static final int PARITY_ODD
public static final int PARITY_EVEN
public static final int PARITY_MARK
public static final int PARITY_SPACE
public static final int FLOWCONTROL_NONE
public static final int FLOWCONTROL_RTSCTS_IN
public static final int FLOWCONTROL_RTSCTS_OUT
public static final int FLOWCONTROL_XONXOFF_IN
public static final int FLOWCONTROL_XONXOFF_OUT
| Constructor Detail | 
|---|
public SerialPort()
| Method Detail | 
|---|
public void setRcvFifoTrigger(int trigger)
setRcvFifoTrigger in interface SerialPortInterfacetrigger - the trigger levelpublic abstract boolean isRTS()
isRTS in interface SerialPortInterfaceSerialPortInterface.setRTS(boolean)public abstract boolean isCTS()
isCTS in interface SerialPortInterfaceSerialPortInterface.setDTR(boolean)public abstract boolean isDSR()
isDSR in interface SerialPortInterfacepublic abstract boolean isRI()
isRI in interface SerialPortInterfacepublic abstract boolean isCD()
isCD in interface SerialPortInterface
public abstract void addEventListener(SerialPortEventListener listener)
                               throws java.util.TooManyListenersException
addEventListener in interface SerialPortInterfacelistener - the listener to add
java.util.TooManyListenersExceptionpublic abstract void removeEventListener()
removeEventListener in interface SerialPortInterfacepublic abstract void notifyOnDataAvailable(boolean enable)
notifyOnDataAvailable in interface SerialPortInterfaceenable - true if asynchronous events are desired, false
 otherwisepublic abstract void notifyOnOutputEmpty(boolean enable)
notifyOnOutputEmpty in interface SerialPortInterfaceenable - true to enable notification, false otherwisepublic abstract void notifyOnCTS(boolean enable)
notifyOnCTS in interface SerialPortInterfaceenable - true to enable notification, false otherwisepublic abstract void notifyOnDSR(boolean enable)
notifyOnDSR in interface SerialPortInterfaceenable - true to enable notification, false otherwisepublic abstract void notifyOnRingIndicator(boolean enable)
notifyOnRingIndicator in interface SerialPortInterfaceenable - true to enable notification, false otherwisepublic abstract void notifyOnCarrierDetect(boolean enable)
notifyOnCarrierDetect in interface SerialPortInterfaceenable - true to enable notification, false otherwisepublic abstract void notifyOnOverrunError(boolean enable)
notifyOnOverrunError in interface SerialPortInterfaceenable - true to enable notification, false otherwisepublic abstract void notifyOnParityError(boolean enable)
notifyOnParityError in interface SerialPortInterfaceenable - true to enable notification, false otherwisepublic abstract void notifyOnFramingError(boolean enable)
notifyOnFramingError in interface SerialPortInterfaceenable - true to enable notification, false otherwisepublic abstract void notifyOnBreakInterrupt(boolean enable)
notifyOnBreakInterrupt in interface SerialPortInterfaceenable - true to enable notification, false otherwise| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||