All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class javax.comm.SerialPortEvent

java.lang.Object
   |
   +----java.util.EventObject
           |
           +----javax.comm.SerialPortEvent

public class SerialPortEvent
extends EventObject
A serial port event.

See Also:
SerialPort, SeriallPortEventListener, EventObject

Variable Index

 o BI
Break interrupt.
 o CD
Carrier detect.
 o CTS
Clear to send.
 o DATA_AVAIL
Data available at the serial port.
 o DSR
Data set ready.
 o eventType
The type of event. Deprecated.
 o FE
Framing error.
 o OE
Overrun error.
 o OUTBUF_EMPTY
Output buffer is empty.
 o PE
Parity error.
 o RI
Ring indicator.

Constructor Index

 o SerialPortEvent(SerialPort, int, boolean, boolean)
Constructs a SerialPortEvent with the specified serial port, event type, old and new values.

Method Index

 o getEventType()
Gets the type of this event.
 o getNewValue()
Gets the new value of the state change that caused the SerialPortEvent to be propagated.
 o getOldValue()
Gets the old value of the state change that caused the SerialPortEvent to be propagated.

Variables

 o eventType
 public int eventType
Note: eventType is deprecated. Replaced by getEventType method.

The type of event.

 o DATA_AVAIL
 public static final int DATA_AVAIL
Data available at the serial port.

 o OUTBUF_EMPTY
 public static final int OUTBUF_EMPTY
Output buffer is empty.

 o CTS
 public static final int CTS
Clear to send.

 o DSR
 public static final int DSR
Data set ready.

 o RI
 public static final int RI
Ring indicator.

 o CD
 public static final int CD
Carrier detect.

 o OE
 public static final int OE
Overrun error.

 o PE
 public static final int PE
Parity error.

 o FE
 public static final int FE
Framing error.

 o BI
 public static final int BI
Break interrupt.

Constructors

 o SerialPortEvent
 public SerialPortEvent(SerialPort srcport,
                        int eventtype,
                        boolean oldvalue,
                        boolean newvalue)
Constructs a SerialPortEvent with the specified serial port, event type, old and new values. Application programs should not directly create SerialPortEvent objects.

Parameters:
srcport - source parallel port
eventtype - event type
oldvalue - old value
newvalue - new value

Methods

 o getEventType
 public int getEventType()
Gets the type of this event.

Returns:
integer that can be equal to one of the following static variables: BI, CD, CTS, DATA_AVAIL, DSR, FE, OE, OUTBUF_EMPTY, PE or RI.
 o getNewValue
 public boolean getNewValue()
Gets the new value of the state change that caused the SerialPortEvent to be propagated. For example, when the CD bit changes, newValue reflects the new value of the CD bit.

 o getOldValue
 public boolean getOldValue()
Gets the old value of the state change that caused the SerialPortEvent to be propagated. For example, when the CD bit changes, oldValue reflects the old value of the CD bit.


All Packages  Class Hierarchy  This Package  Previous  Next  Index