public final class SerialComLineEvent extends Object
Encapsulate events that happens on serial port control lines. Application can call various methods on an instance of this class to know which event has happen and to get its details. Whenever an event happens, an object of this class containing details about the event is passed to registered listener.
| Constructor and Description |
|---|
SerialComLineEvent(int oldLineState,
int newLineState)
The looper object remembers state of lines and pass both previous and new state.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCTS()
Gives the status of CTS (clear to send) control line.
|
int |
getDCD()
Gives the status of DCD (data carrier detect) control line.
|
int |
getDSR()
Gives the status of DSR (data set ready) control line.
|
int |
getRI()
Gives the status of RI (ring indicator) control line.
|
public SerialComLineEvent(int oldLineState,
int newLineState)
The looper object remembers state of lines and pass both previous and new state.
oldLineState - previous line statenewLineState - new line statepublic int getCTS()
Gives the status of CTS (clear to send) control line. Transition from 0 to 1 means line is asserted and vice-versa.
public int getDSR()
Gives the status of DSR (data set ready) control line. Transition from 0 to 1 means line is asserted and vice-versa.
public int getDCD()
Gives the status of DCD (data carrier detect) control line. Transition from 0 to 1 means line is asserted and vice-versa.
public int getRI()
Gives the status of RI (ring indicator) control line. Transition from 0 to 1 means line is asserted and vice-versa.
Copyright © 2016. All rights reserved.