jssc
Class SerialPortEvent

java.lang.Object
  extended by jssc.SerialPortEvent

public class SerialPortEvent
extends java.lang.Object


Field Summary
static int BREAK
           
static int CTS
           
static int DSR
           
static int ERR
           
static int RING
           
static int RLSD
           
static int RXCHAR
           
static int RXFLAG
           
static int TXEMPTY
           
 
Constructor Summary
SerialPortEvent(java.lang.String portName, int eventType, int eventValue)
           
 
Method Summary
 int getEventType()
          Getting event type
 int getEventValue()
          Getting event value


Event values depending on their types:

RXCHAR - bytes count in input buffer

RXFLAG - bytes count in input buffer (Not supported in Linux)

TXEMPTY - bytes count in output buffer

CTS - state of CTS line (0 - OFF, 1 - ON)

DSR - state of DSR line (0 - OFF, 1 - ON)

RLSD - state of RLSD line (0 - OFF, 1 - ON)

BREAK - 0

RING - state of RING line (0 - OFF, 1 - ON)

ERR - mask of errors
 java.lang.String getPortName()
          Getting port name which sent the event
 boolean isBREAK()
          Method returns true if event of type "BREAK" is received and otherwise false
 boolean isCTS()
          Method returns true if event of type "CTS" is received and otherwise false
 boolean isDSR()
          Method returns true if event of type "DSR" is received and otherwise false
 boolean isERR()
          Method returns true if event of type "ERR" is received and otherwise false
 boolean isRING()
          Method returns true if event of type "RING" is received and otherwise false
 boolean isRLSD()
          Method returns true if event of type "RLSD" is received and otherwise false
 boolean isRXCHAR()
          Method returns true if event of type "RXCHAR" is received and otherwise false
 boolean isRXFLAG()
          Method returns true if event of type "RXFLAG" is received and otherwise false
 boolean isTXEMPTY()
          Method returns true if event of type "TXEMPTY" is received and otherwise false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RXCHAR

public static final int RXCHAR
See Also:
Constant Field Values

RXFLAG

public static final int RXFLAG
See Also:
Constant Field Values

TXEMPTY

public static final int TXEMPTY
See Also:
Constant Field Values

CTS

public static final int CTS
See Also:
Constant Field Values

DSR

public static final int DSR
See Also:
Constant Field Values

RLSD

public static final int RLSD
See Also:
Constant Field Values

BREAK

public static final int BREAK
See Also:
Constant Field Values

ERR

public static final int ERR
See Also:
Constant Field Values

RING

public static final int RING
See Also:
Constant Field Values
Constructor Detail

SerialPortEvent

public SerialPortEvent(java.lang.String portName,
                       int eventType,
                       int eventValue)
Method Detail

getPortName

public java.lang.String getPortName()
Getting port name which sent the event


getEventType

public int getEventType()
Getting event type


getEventValue

public int getEventValue()
Getting event value


Event values depending on their types:

RXCHAR - bytes count in input buffer

RXFLAG - bytes count in input buffer (Not supported in Linux)

TXEMPTY - bytes count in output buffer

CTS - state of CTS line (0 - OFF, 1 - ON)

DSR - state of DSR line (0 - OFF, 1 - ON)

RLSD - state of RLSD line (0 - OFF, 1 - ON)

BREAK - 0

RING - state of RING line (0 - OFF, 1 - ON)

ERR - mask of errors


isRXCHAR

public boolean isRXCHAR()
Method returns true if event of type "RXCHAR" is received and otherwise false


isRXFLAG

public boolean isRXFLAG()
Method returns true if event of type "RXFLAG" is received and otherwise false


isTXEMPTY

public boolean isTXEMPTY()
Method returns true if event of type "TXEMPTY" is received and otherwise false


isCTS

public boolean isCTS()
Method returns true if event of type "CTS" is received and otherwise false


isDSR

public boolean isDSR()
Method returns true if event of type "DSR" is received and otherwise false


isRLSD

public boolean isRLSD()
Method returns true if event of type "RLSD" is received and otherwise false


isBREAK

public boolean isBREAK()
Method returns true if event of type "BREAK" is received and otherwise false


isERR

public boolean isERR()
Method returns true if event of type "ERR" is received and otherwise false


isRING

public boolean isRING()
Method returns true if event of type "RING" is received and otherwise false