gnu.io

Class SerialPort


public abstract class SerialPort
extends CommPort

Since:
JDK1.0

Field Summary

static int
DATABITS_5
static int
DATABITS_6
static int
DATABITS_7
static int
DATABITS_8
static int
FLOWCONTROL_NONE
static int
FLOWCONTROL_RTSCTS_IN
static int
FLOWCONTROL_RTSCTS_OUT
static int
FLOWCONTROL_XONXOFF_IN
static int
FLOWCONTROL_XONXOFF_OUT
static int
PARITY_EVEN
static int
PARITY_MARK
static int
PARITY_NONE
static int
PARITY_ODD
static int
PARITY_SPACE
static int
STOPBITS_1
static int
STOPBITS_1_5
static int
STOPBITS_2

Method Summary

abstract void
addEventListener(SerialPortEventListener lsnr)
abstract int
getBaudBase()
abstract int
getBaudRate()
abstract boolean
getCallOutHangup()
abstract int
getDataBits()
abstract int
getDivisor()
abstract byte
getEndOfInputChar()
abstract int
getFlowControlMode()
abstract boolean
getLowLatency()
abstract int
getParity()
abstract byte
getParityErrorChar()
abstract int
getStopBits()
abstract String
getUARTType()
abstract boolean
isCD()
abstract boolean
isCTS()
abstract boolean
isDSR()
abstract boolean
isDTR()
abstract boolean
isRI()
abstract boolean
isRTS()
abstract void
notifyOnBreakInterrupt(boolean enable)
abstract void
notifyOnCTS(boolean enable)
abstract void
notifyOnCarrierDetect(boolean enable)
abstract void
notifyOnDSR(boolean enable)
abstract void
notifyOnDataAvailable(boolean enable)
abstract void
notifyOnFramingError(boolean enable)
abstract void
notifyOnOutputEmpty(boolean enable)
abstract void
notifyOnOverrunError(boolean enable)
abstract void
notifyOnParityError(boolean enable)
abstract void
notifyOnRingIndicator(boolean enable)
abstract void
removeEventListener()
abstract void
sendBreak(int duration)
abstract boolean
setBaudBase(int BaudBase)
abstract boolean
setCallOutHangup(boolean NoHup)
abstract void
setDTR(boolean state)
abstract boolean
setDivisor(int Divisor)
abstract boolean
setEndOfInputChar(byte b)
abstract void
setFlowControlMode(int flowcontrol)
abstract boolean
setLowLatency()
abstract boolean
setParityErrorChar(byte b)
abstract void
setRTS(boolean state)
abstract void
setSerialPortParams(int b, int d, int s, int p)
abstract boolean
setUARTType(String type, boolean test)

Field Details

DATABITS_5

public static final int DATABITS_5
Field Value:
5

DATABITS_6

public static final int DATABITS_6
Field Value:
6

DATABITS_7

public static final int DATABITS_7
Field Value:
7

DATABITS_8

public static final int DATABITS_8
Field Value:
8

FLOWCONTROL_NONE

public static final int FLOWCONTROL_NONE
Field Value:
0

FLOWCONTROL_RTSCTS_IN

public static final int FLOWCONTROL_RTSCTS_IN
Field Value:
1

FLOWCONTROL_RTSCTS_OUT

public static final int FLOWCONTROL_RTSCTS_OUT
Field Value:
2

FLOWCONTROL_XONXOFF_IN

public static final int FLOWCONTROL_XONXOFF_IN
Field Value:
4

FLOWCONTROL_XONXOFF_OUT

public static final int FLOWCONTROL_XONXOFF_OUT
Field Value:
8

PARITY_EVEN

public static final int PARITY_EVEN
Field Value:
2

PARITY_MARK

public static final int PARITY_MARK
Field Value:
3

PARITY_NONE

public static final int PARITY_NONE
Field Value:
0

PARITY_ODD

public static final int PARITY_ODD
Field Value:
1

PARITY_SPACE

public static final int PARITY_SPACE
Field Value:
4

STOPBITS_1

public static final int STOPBITS_1
Field Value:
1

STOPBITS_1_5

public static final int STOPBITS_1_5
Field Value:
3

STOPBITS_2

public static final int STOPBITS_2
Field Value:
2

Method Details

addEventListener

public abstract void addEventListener(SerialPortEventListener lsnr)
            throws TooManyListenersException

getBaudBase

public abstract int getBaudBase()
            throws UnsupportedCommOperationException,
                   IOException

getBaudRate

public abstract int getBaudRate()

getCallOutHangup

public abstract boolean getCallOutHangup()
            throws UnsupportedCommOperationException

getDataBits

public abstract int getDataBits()

getDivisor

public abstract int getDivisor()
            throws UnsupportedCommOperationException,
                   IOException

getEndOfInputChar

public abstract byte getEndOfInputChar()
            throws UnsupportedCommOperationException

getFlowControlMode

public abstract int getFlowControlMode()

getLowLatency

public abstract boolean getLowLatency()
            throws UnsupportedCommOperationException

getParity

public abstract int getParity()

getParityErrorChar

public abstract byte getParityErrorChar()
            throws UnsupportedCommOperationException

getStopBits

public abstract int getStopBits()

getUARTType

public abstract String getUARTType()
            throws UnsupportedCommOperationException

isCD

public abstract boolean isCD()

isCTS

public abstract boolean isCTS()

isDSR

public abstract boolean isDSR()

isDTR

public abstract boolean isDTR()

isRI

public abstract boolean isRI()

isRTS

public abstract boolean isRTS()

notifyOnBreakInterrupt

public abstract void notifyOnBreakInterrupt(boolean enable)

notifyOnCTS

public abstract void notifyOnCTS(boolean enable)

notifyOnCarrierDetect

public abstract void notifyOnCarrierDetect(boolean enable)

notifyOnDSR

public abstract void notifyOnDSR(boolean enable)

notifyOnDataAvailable

public abstract void notifyOnDataAvailable(boolean enable)

notifyOnFramingError

public abstract void notifyOnFramingError(boolean enable)

notifyOnOutputEmpty

public abstract void notifyOnOutputEmpty(boolean enable)

notifyOnOverrunError

public abstract void notifyOnOverrunError(boolean enable)

notifyOnParityError

public abstract void notifyOnParityError(boolean enable)

notifyOnRingIndicator

public abstract void notifyOnRingIndicator(boolean enable)

removeEventListener

public abstract void removeEventListener()

sendBreak

public abstract void sendBreak(int duration)

setBaudBase

public abstract boolean setBaudBase(int BaudBase)
            throws UnsupportedCommOperationException,
                   IOException

setCallOutHangup

public abstract boolean setCallOutHangup(boolean NoHup)
            throws UnsupportedCommOperationException

setDTR

public abstract void setDTR(boolean state)

setDivisor

public abstract boolean setDivisor(int Divisor)
            throws UnsupportedCommOperationException,
                   IOException

setEndOfInputChar

public abstract boolean setEndOfInputChar(byte b)
            throws UnsupportedCommOperationException

setFlowControlMode

public abstract void setFlowControlMode(int flowcontrol)
            throws UnsupportedCommOperationException

setLowLatency

public abstract boolean setLowLatency()
            throws UnsupportedCommOperationException

setParityErrorChar

public abstract boolean setParityErrorChar(byte b)
            throws UnsupportedCommOperationException

setRTS

public abstract void setRTS(boolean state)

setSerialPortParams

public abstract void setSerialPortParams(int b,
                                         int d,
                                         int s,
                                         int p)
            throws UnsupportedCommOperationException

setUARTType

public abstract boolean setUARTType(String type,
                                    boolean test)
            throws UnsupportedCommOperationException