gnu.io
クラス I2C

java.lang.Object
  上位を拡張 gnu.io.CommPort
      上位を拡張 gnu.io.I2CPort
          上位を拡張 gnu.io.I2C

final class I2C
extends I2CPort

I2C


入れ子のクラスの概要
(package private)  class I2C.I2CInputStream
          Inner class for I2CInputStream
(package private)  class I2C.I2COutputStream
          Inner class for I2COutputStream
(package private)  class I2C.MonitorThread
           
 
フィールドの概要
private  int dataAvailable
           
private  int dataBits
          Data bits port parameter
(package private) static boolean dsrFlag
          DSR flag
private  int fd
          File descriptor
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
private  int speed
          Line speed in bits-per-second
private  I2CPortEventListener SPEventListener
          I2C Port Event listener
private  int stopBits
          Stop bits port parameter
private  int threshold
          Receive threshold control
private  int timeout
          Receive timeout control
 
クラス gnu.io.I2CPort から継承されたフィールド
DATABITS_5, DATABITS_6, DATABITS_7, DATABITS_8, FLOWCONTROL_NONE, FLOWCONTROL_RTSCTS_IN, FLOWCONTROL_RTSCTS_OUT, FLOWCONTROL_XONXOFF_IN, FLOWCONTROL_XONXOFF_OUT, PARITY_EVEN, PARITY_MARK, PARITY_NONE, PARITY_ODD, PARITY_SPACE, STOPBITS_1, STOPBITS_1_5, STOPBITS_2
 
クラス gnu.io.CommPort から継承されたフィールド
name
 
コンストラクタの概要
I2C(java.lang.String name)
          Open the named port
 
メソッドの概要
 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)
           
 
クラス gnu.io.CommPort から継承されたメソッド
getName, toString
 
クラス java.lang.Object から継承されたメソッド
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

fd

private int fd
File descriptor


dsrFlag

static boolean dsrFlag
DSR flag


out

private final I2C.I2COutputStream out
Output stream


in

private final I2C.I2CInputStream in
Input stream


speed

private int speed
Line speed in bits-per-second


dataBits

private int dataBits
Data bits port parameter


stopBits

private int stopBits
Stop bits port parameter


parity

private int parity
Parity port parameter


flowmode

private int flowmode
Flow control


timeout

private int timeout
Receive timeout control


threshold

private int threshold
Receive threshold control


InputBuffer

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...


OutputBuffer

private int OutputBuffer

SPEventListener

private I2CPortEventListener SPEventListener
I2C Port Event listener


monThread

private I2C.MonitorThread monThread
Thread to monitor data


dataAvailable

private int dataAvailable
コンストラクタの詳細

I2C

public I2C(java.lang.String name)
    throws PortInUseException
Open the named port

例外:
PortInUseException
メソッドの詳細

Initialize

private static void Initialize()
Initialize the native library


open

private int open(java.lang.String name)
          throws PortInUseException
例外:
PortInUseException

getOutputStream

public java.io.OutputStream getOutputStream()
定義:
クラス CommPort 内の getOutputStream

getInputStream

public java.io.InputStream getInputStream()
定義:
クラス CommPort 内の getInputStream

setI2CPortParams

public void setI2CPortParams(int b,
                             int d,
                             int s,
                             int p)
                      throws UnsupportedCommOperationException
Set the I2CPort parameters

定義:
クラス I2CPort 内の setI2CPortParams
例外:
UnsupportedCommOperationException

nativeSetI2CPortParams

private void nativeSetI2CPortParams(int speed,
                                    int dataBits,
                                    int stopBits,
                                    int parity)
                             throws UnsupportedCommOperationException
Set the native I2C port parameters

例外:
UnsupportedCommOperationException

getBaudRate

public int getBaudRate()
定義:
クラス I2CPort 内の getBaudRate

getDataBits

public int getDataBits()
定義:
クラス I2CPort 内の getDataBits

getStopBits

public int getStopBits()
定義:
クラス I2CPort 内の getStopBits

getParity

public int getParity()
定義:
クラス I2CPort 内の getParity

setFlowControlMode

public void setFlowControlMode(int flowcontrol)
定義:
クラス I2CPort 内の setFlowControlMode

getFlowControlMode

public int getFlowControlMode()
定義:
クラス I2CPort 内の getFlowControlMode

setflowcontrol

void setflowcontrol(int flowcontrol)
              throws java.io.IOException
例外:
java.io.IOException

enableReceiveFraming

public void enableReceiveFraming(int f)
                          throws UnsupportedCommOperationException
Receive framing control

定義:
クラス CommPort 内の enableReceiveFraming
例外:
UnsupportedCommOperationException

disableReceiveFraming

public void disableReceiveFraming()
定義:
クラス CommPort 内の disableReceiveFraming

isReceiveFramingEnabled

public boolean isReceiveFramingEnabled()
定義:
クラス CommPort 内の isReceiveFramingEnabled

getReceiveFramingByte

public int getReceiveFramingByte()
定義:
クラス CommPort 内の getReceiveFramingByte

NativegetReceiveTimeout

public int NativegetReceiveTimeout()

NativeisReceiveTimeoutEnabled

public boolean NativeisReceiveTimeoutEnabled()

NativeEnableReceiveTimeoutThreshold

public void NativeEnableReceiveTimeoutThreshold(int time,
                                                int threshold,
                                                int InputBuffer)

disableReceiveTimeout

public void disableReceiveTimeout()
定義:
クラス CommPort 内の disableReceiveTimeout

enableReceiveTimeout

public void enableReceiveTimeout(int time)
定義:
クラス CommPort 内の enableReceiveTimeout

isReceiveTimeoutEnabled

public boolean isReceiveTimeoutEnabled()
定義:
クラス CommPort 内の isReceiveTimeoutEnabled

getReceiveTimeout

public int getReceiveTimeout()
定義:
クラス CommPort 内の getReceiveTimeout

enableReceiveThreshold

public void enableReceiveThreshold(int thresh)
定義:
クラス CommPort 内の enableReceiveThreshold

disableReceiveThreshold

public void disableReceiveThreshold()
定義:
クラス CommPort 内の disableReceiveThreshold

getReceiveThreshold

public int getReceiveThreshold()
定義:
クラス CommPort 内の getReceiveThreshold

isReceiveThresholdEnabled

public boolean isReceiveThresholdEnabled()
定義:
クラス CommPort 内の isReceiveThresholdEnabled

setInputBufferSize

public void setInputBufferSize(int size)
定義:
クラス CommPort 内の setInputBufferSize

getInputBufferSize

public int getInputBufferSize()
定義:
クラス CommPort 内の getInputBufferSize

setOutputBufferSize

public void setOutputBufferSize(int size)
定義:
クラス CommPort 内の setOutputBufferSize

getOutputBufferSize

public int getOutputBufferSize()
定義:
クラス CommPort 内の getOutputBufferSize

isDTR

public boolean isDTR()
Line status methods

定義:
クラス I2CPort 内の isDTR

setDTR

public void setDTR(boolean state)
定義:
クラス I2CPort 内の setDTR

setRTS

public void setRTS(boolean state)
定義:
クラス I2CPort 内の setRTS

setDSR

private void setDSR(boolean state)

isCTS

public boolean isCTS()
定義:
クラス I2CPort 内の isCTS

isDSR

public boolean isDSR()
定義:
クラス I2CPort 内の isDSR

isCD

public boolean isCD()
定義:
クラス I2CPort 内の isCD

isRI

public boolean isRI()
定義:
クラス I2CPort 内の isRI

isRTS

public boolean isRTS()
定義:
クラス I2CPort 内の isRTS

sendBreak

public void sendBreak(int duration)
Write to the port

定義:
クラス I2CPort 内の sendBreak

writeByte

private void writeByte(int b)
                throws java.io.IOException
例外:
java.io.IOException

writeArray

private void writeArray(byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
例外:
java.io.IOException

drain

private void drain()
            throws java.io.IOException
例外:
java.io.IOException

nativeavailable

private int nativeavailable()
                     throws java.io.IOException
I2C read methods

例外:
java.io.IOException

readByte

private int readByte()
              throws java.io.IOException
例外:
java.io.IOException

readArray

private int readArray(byte[] b,
                      int off,
                      int len)
               throws java.io.IOException
例外:
java.io.IOException

eventLoop

void eventLoop()
Process I2CPortEvents


sendEvent

public void sendEvent(int event,
                      boolean state)

addEventListener

public void addEventListener(I2CPortEventListener lsnr)
                      throws java.util.TooManyListenersException
Add an event listener

定義:
クラス I2CPort 内の addEventListener
例外:
java.util.TooManyListenersException

removeEventListener

public void removeEventListener()
Remove the I2C port event listener

定義:
クラス I2CPort 内の removeEventListener

notifyOnDataAvailable

public void notifyOnDataAvailable(boolean enable)
定義:
クラス I2CPort 内の notifyOnDataAvailable

notifyOnOutputEmpty

public void notifyOnOutputEmpty(boolean enable)
定義:
クラス I2CPort 内の notifyOnOutputEmpty

notifyOnCTS

public void notifyOnCTS(boolean enable)
定義:
クラス I2CPort 内の notifyOnCTS

notifyOnDSR

public void notifyOnDSR(boolean enable)
定義:
クラス I2CPort 内の notifyOnDSR

notifyOnRingIndicator

public void notifyOnRingIndicator(boolean enable)
定義:
クラス I2CPort 内の notifyOnRingIndicator

notifyOnCarrierDetect

public void notifyOnCarrierDetect(boolean enable)
定義:
クラス I2CPort 内の notifyOnCarrierDetect

notifyOnOverrunError

public void notifyOnOverrunError(boolean enable)
定義:
クラス I2CPort 内の notifyOnOverrunError

notifyOnParityError

public void notifyOnParityError(boolean enable)
定義:
クラス I2CPort 内の notifyOnParityError

notifyOnFramingError

public void notifyOnFramingError(boolean enable)
定義:
クラス I2CPort 内の notifyOnFramingError

notifyOnBreakInterrupt

public void notifyOnBreakInterrupt(boolean enable)
定義:
クラス I2CPort 内の notifyOnBreakInterrupt

nativeClose

private void nativeClose()
Close the port


close

public void close()
オーバーライド:
クラス CommPort 内の close

finalize

protected void finalize()
Finalize the port

オーバーライド:
クラス java.lang.Object 内の finalize