|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.io.CommPort
gnu.io.RawPort
gnu.io.Raw
Nested Class Summary | |
(package private) class |
Raw.MonitorThread
|
(package private) class |
Raw.RawInputStream
Inner class for RawInputStream |
(package private) class |
Raw.RawOutputStream
Inner class for RawOutputStream |
Field Summary | |
private int |
ciAddress
File descriptor |
private int |
dataAvailable
|
private int |
dataBits
Data bits port parameter |
static int |
DATABITS_5
|
static int |
DATABITS_6
|
static int |
DATABITS_7
|
static int |
DATABITS_8
|
(package private) static boolean |
dsrFlag
DSR flag |
static int |
FLOWCONTROL_NONE
|
static int |
FLOWCONTROL_RTSCTS_IN
|
static int |
FLOWCONTROL_RTSCTS_OUT
|
static int |
FLOWCONTROL_XONXOFF_IN
|
static int |
FLOWCONTROL_XONXOFF_OUT
|
private int |
flowmode
Flow control |
private Raw.RawInputStream |
in
Input stream |
private int |
InputBuffer
FIXME I think this refers to FOPEN(3)/SETBUF(3)/FREAD(3)/FCLOSE(3) taj@www.linux.org.uk These are native stubs... |
static int |
IO_PORT
|
private Raw.MonitorThread |
monThread
Thread to monitor data |
private Raw.RawOutputStream |
out
Output stream |
private int |
OutputBuffer
|
private int |
parity
Parity port parameter |
static int |
PARITY_EVEN
|
static int |
PARITY_MARK
|
static int |
PARITY_NONE
|
static int |
PARITY_ODD
|
static int |
PARITY_SPACE
|
private int |
speed
Line speed in bits-per-second |
private RawPortEventListener |
SPEventListener
Raw Port Event listener |
private int |
stopBits
Stop bits port parameter |
static int |
STOPBITS_1
|
static int |
STOPBITS_1_5
|
static int |
STOPBITS_2
|
private int |
threshold
Receive threshold control |
private int |
timeout
Receive timeout control |
static int |
WRITE_SIZE
|
Fields inherited from class gnu.io.CommPort |
name |
Constructor Summary | |
Raw(java.lang.String name)
Open the named port |
Method Summary | |
void |
addEventListener(RawPortEventListener lsnr)
Add an event listener |
void |
close()
|
void |
disableReceiveFraming()
|
void |
disableReceiveThreshold()
|
void |
disableReceiveTimeout()
|
private void |
drain()
|
void |
enableReceiveFraming(int f)
Receive framing control |
void |
enableReceiveThreshold(int thresh)
|
void |
enableReceiveTimeout(int time)
|
(package private) void |
eventLoop()
Process RawPortEvents |
protected void |
finalize()
Finalize the port |
int |
getBaudRate()
|
int |
getDataBits()
|
int |
getFlowControlMode()
|
int |
getInputBufferSize()
|
java.io.InputStream |
getInputStream()
|
int |
getOutputBufferSize()
|
java.io.OutputStream |
getOutputStream()
|
int |
getParity()
|
int |
getReceiveFramingByte()
|
int |
getReceiveThreshold()
|
int |
getReceiveTimeout()
|
int |
getStopBits()
|
java.lang.String |
getVersion()
|
private static void |
Initialize()
Initialize the native library |
boolean |
isCD()
|
boolean |
isCTS()
|
boolean |
isDSR()
|
boolean |
isDTR()
Line status methods |
boolean |
isReceiveFramingEnabled()
|
boolean |
isReceiveThresholdEnabled()
|
boolean |
isReceiveTimeoutEnabled()
|
boolean |
isRI()
|
boolean |
isRTS()
|
private int |
nativeavailable()
Raw read methods |
private int |
nativeClose()
Close the port |
void |
NativeEnableReceiveTimeoutThreshold(int time,
int threshold,
int InputBuffer)
|
int |
NativegetReceiveTimeout()
|
boolean |
NativeisReceiveTimeoutEnabled()
|
private void |
nativeSetRawPortParams(int speed,
int dataBits,
int stopBits,
int parity)
Set the native Raw port parameters |
void |
notifyOnBreakInterrupt(boolean enable)
|
void |
notifyOnCarrierDetect(boolean enable)
|
void |
notifyOnCTS(boolean enable)
|
void |
notifyOnDataAvailable(boolean enable)
|
void |
notifyOnDSR(boolean enable)
|
void |
notifyOnFramingError(boolean enable)
|
void |
notifyOnOutputEmpty(boolean enable)
|
void |
notifyOnOverrunError(boolean enable)
|
void |
notifyOnParityError(boolean enable)
|
void |
notifyOnRingIndicator(boolean enable)
|
private int |
open(int ciAddress)
|
private int |
readArray(byte[] b,
int off,
int len)
|
private int |
readByte()
|
void |
removeEventListener()
Remove the Raw port event listener |
void |
sendBreak(int duration)
Write to the port |
void |
sendEvent(int event,
boolean state)
|
private void |
setDSR(boolean state)
|
void |
setDTR(boolean state)
|
(package private) void |
setflowcontrol(int flowcontrol)
|
void |
setFlowControlMode(int flowcontrol)
|
void |
setInputBufferSize(int size)
|
void |
setOutputBufferSize(int size)
|
void |
setRawPortParams(int b,
int d,
int s,
int p)
Set the RawPort parameters |
void |
setRTS(boolean state)
|
private void |
writeArray(byte[] b,
int off,
int len)
|
private void |
writeByte(int b)
|
Methods inherited from class gnu.io.CommPort |
getName, toString |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private int ciAddress
static boolean dsrFlag
private final Raw.RawOutputStream out
private final Raw.RawInputStream in
private int speed
private int dataBits
private int stopBits
private int parity
private int flowmode
private int timeout
private int threshold
private int InputBuffer
private int OutputBuffer
private RawPortEventListener SPEventListener
private Raw.MonitorThread monThread
private int dataAvailable
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 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 STOPBITS_1
public static final int STOPBITS_1_5
public static final int STOPBITS_2
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
public static final int WRITE_SIZE
public static final int IO_PORT
Constructor Detail |
public Raw(java.lang.String name) throws PortInUseException
Method Detail |
private static void Initialize()
private int open(int ciAddress) throws PortInUseException
PortInUseException
public java.io.OutputStream getOutputStream()
getOutputStream
in class CommPort
public java.io.InputStream getInputStream()
getInputStream
in class CommPort
public void setRawPortParams(int b, int d, int s, int p) throws UnsupportedCommOperationException
setRawPortParams
in class RawPort
UnsupportedCommOperationException
private void nativeSetRawPortParams(int speed, int dataBits, int stopBits, int parity) throws UnsupportedCommOperationException
UnsupportedCommOperationException
public int getBaudRate()
public int getDataBits()
public int getStopBits()
public int getParity()
public void setFlowControlMode(int flowcontrol)
public int getFlowControlMode()
void setflowcontrol(int flowcontrol) throws java.io.IOException
java.io.IOException
public void enableReceiveFraming(int f) throws UnsupportedCommOperationException
enableReceiveFraming
in class CommPort
UnsupportedCommOperationException
public void disableReceiveFraming()
disableReceiveFraming
in class CommPort
public boolean isReceiveFramingEnabled()
isReceiveFramingEnabled
in class CommPort
public int getReceiveFramingByte()
getReceiveFramingByte
in class CommPort
public int NativegetReceiveTimeout()
public boolean NativeisReceiveTimeoutEnabled()
public void NativeEnableReceiveTimeoutThreshold(int time, int threshold, int InputBuffer)
public void disableReceiveTimeout()
disableReceiveTimeout
in class CommPort
public void enableReceiveTimeout(int time)
enableReceiveTimeout
in class CommPort
public boolean isReceiveTimeoutEnabled()
isReceiveTimeoutEnabled
in class CommPort
public int getReceiveTimeout()
getReceiveTimeout
in class CommPort
public void enableReceiveThreshold(int thresh)
enableReceiveThreshold
in class CommPort
public void disableReceiveThreshold()
disableReceiveThreshold
in class CommPort
public int getReceiveThreshold()
getReceiveThreshold
in class CommPort
public boolean isReceiveThresholdEnabled()
isReceiveThresholdEnabled
in class CommPort
public void setInputBufferSize(int size)
setInputBufferSize
in class CommPort
public int getInputBufferSize()
getInputBufferSize
in class CommPort
public void setOutputBufferSize(int size)
setOutputBufferSize
in class CommPort
public int getOutputBufferSize()
getOutputBufferSize
in class CommPort
public boolean isDTR()
public void setDTR(boolean state)
public void setRTS(boolean state)
private void setDSR(boolean state)
public boolean isCTS()
public boolean isDSR()
public boolean isCD()
public boolean isRI()
public boolean isRTS()
public void sendBreak(int duration)
private void writeByte(int b) throws java.io.IOException
java.io.IOException
private void writeArray(byte[] b, int off, int len) throws java.io.IOException
java.io.IOException
private void drain() throws java.io.IOException
java.io.IOException
private int nativeavailable() throws java.io.IOException
java.io.IOException
private int readByte() throws java.io.IOException
java.io.IOException
private int readArray(byte[] b, int off, int len) throws java.io.IOException
java.io.IOException
void eventLoop()
public void sendEvent(int event, boolean state)
public void addEventListener(RawPortEventListener lsnr) throws java.util.TooManyListenersException
addEventListener
in class RawPort
java.util.TooManyListenersException
public void removeEventListener()
removeEventListener
in class RawPort
public void notifyOnDataAvailable(boolean enable)
public void notifyOnOutputEmpty(boolean enable)
public void notifyOnCTS(boolean enable)
public void notifyOnDSR(boolean enable)
public void notifyOnRingIndicator(boolean enable)
public void notifyOnCarrierDetect(boolean enable)
public void notifyOnOverrunError(boolean enable)
public void notifyOnParityError(boolean enable)
public void notifyOnFramingError(boolean enable)
public void notifyOnBreakInterrupt(boolean enable)
private int nativeClose()
public void close()
close
in class CommPort
protected void finalize()
public java.lang.String getVersion()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |