|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.io.CommPort
gnu.io.I2CPort
gnu.io.I2C
I2C
Nested Class Summary | |
(package private) class |
I2C.I2CInputStream
Inner class for I2CInputStream |
(package private) class |
I2C.I2COutputStream
Inner class for I2COutputStream |
(package private) class |
I2C.MonitorThread
|
Field Summary | |
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 |
private int |
fd
File descriptor |
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 I2C.I2CInputStream |
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... |
private I2C.MonitorThread |
monThread
Thread to monitor data |
private I2C.I2COutputStream |
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 I2CPortEventListener |
SPEventListener
I2C 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 |
Fields inherited from class gnu.io.CommPort |
name |
Constructor Summary | |
I2C(java.lang.String name)
Open the named port |
Method Summary | |
void |
addEventListener(I2CPortEventListener 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 I2CPortEvents |
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()
|
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()
I2C read methods |
private void |
nativeClose()
Close the port |
void |
NativeEnableReceiveTimeoutThreshold(int time,
int threshold,
int InputBuffer)
|
int |
NativegetReceiveTimeout()
|
boolean |
NativeisReceiveTimeoutEnabled()
|
private void |
nativeSetI2CPortParams(int speed,
int dataBits,
int stopBits,
int parity)
Set the native I2C 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(java.lang.String name)
|
private int |
readArray(byte[] b,
int off,
int len)
|
private int |
readByte()
|
void |
removeEventListener()
Remove the I2C 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 |
setI2CPortParams(int b,
int d,
int s,
int p)
Set the I2CPort parameters |
void |
setInputBufferSize(int size)
|
void |
setOutputBufferSize(int size)
|
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 fd
static boolean dsrFlag
private final I2C.I2COutputStream out
private final I2C.I2CInputStream 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 I2CPortEventListener SPEventListener
private I2C.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
Constructor Detail |
public I2C(java.lang.String name) throws PortInUseException
Method Detail |
private static void Initialize()
private int open(java.lang.String name) throws PortInUseException
PortInUseException
public java.io.OutputStream getOutputStream()
getOutputStream
in class CommPort
public java.io.InputStream getInputStream()
getInputStream
in class CommPort
public void setI2CPortParams(int b, int d, int s, int p) throws UnsupportedCommOperationException
setI2CPortParams
in class I2CPort
UnsupportedCommOperationException
private void nativeSetI2CPortParams(int speed, int dataBits, int stopBits, int parity) throws UnsupportedCommOperationException
UnsupportedCommOperationException
public int getBaudRate()
getBaudRate
in class I2CPort
public int getDataBits()
getDataBits
in class I2CPort
public int getStopBits()
getStopBits
in class I2CPort
public int getParity()
getParity
in class I2CPort
public void setFlowControlMode(int flowcontrol)
setFlowControlMode
in class I2CPort
public int getFlowControlMode()
getFlowControlMode
in class I2CPort
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()
isDTR
in class I2CPort
public void setDTR(boolean state)
setDTR
in class I2CPort
public void setRTS(boolean state)
setRTS
in class I2CPort
private void setDSR(boolean state)
public boolean isCTS()
isCTS
in class I2CPort
public boolean isDSR()
isDSR
in class I2CPort
public boolean isCD()
isCD
in class I2CPort
public boolean isRI()
isRI
in class I2CPort
public boolean isRTS()
isRTS
in class I2CPort
public void sendBreak(int duration)
sendBreak
in class I2CPort
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(I2CPortEventListener lsnr) throws java.util.TooManyListenersException
addEventListener
in class I2CPort
java.util.TooManyListenersException
public void removeEventListener()
removeEventListener
in class I2CPort
public void notifyOnDataAvailable(boolean enable)
notifyOnDataAvailable
in class I2CPort
public void notifyOnOutputEmpty(boolean enable)
notifyOnOutputEmpty
in class I2CPort
public void notifyOnCTS(boolean enable)
notifyOnCTS
in class I2CPort
public void notifyOnDSR(boolean enable)
notifyOnDSR
in class I2CPort
public void notifyOnRingIndicator(boolean enable)
notifyOnRingIndicator
in class I2CPort
public void notifyOnCarrierDetect(boolean enable)
notifyOnCarrierDetect
in class I2CPort
public void notifyOnOverrunError(boolean enable)
notifyOnOverrunError
in class I2CPort
public void notifyOnParityError(boolean enable)
notifyOnParityError
in class I2CPort
public void notifyOnFramingError(boolean enable)
notifyOnFramingError
in class I2CPort
public void notifyOnBreakInterrupt(boolean enable)
notifyOnBreakInterrupt
in class I2CPort
private void nativeClose()
public void close()
close
in class CommPort
protected void finalize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |