gnu.io
クラス Raw

java.lang.Object
  上位を拡張 gnu.io.CommPort
      上位を拡張 gnu.io.RawPort
          上位を拡張 gnu.io.Raw

final class Raw
extends RawPort

導入されたバージョン:
JDK1.0

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

フィールドの詳細

ciAddress

private int ciAddress
File descriptor


dsrFlag

static boolean dsrFlag
DSR flag


out

private final Raw.RawOutputStream out
Output stream


in

private final Raw.RawInputStream 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 RawPortEventListener SPEventListener
Raw Port Event listener


monThread

private Raw.MonitorThread monThread
Thread to monitor data


dataAvailable

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

Raw

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

例外:
PortInUseException
メソッドの詳細

Initialize

private static void Initialize()
Initialize the native library


open

private int open(int ciAddress)
          throws PortInUseException
例外:
PortInUseException

getOutputStream

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

getInputStream

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

setRawPortParams

public void setRawPortParams(int b,
                             int d,
                             int s,
                             int p)
                      throws UnsupportedCommOperationException
Set the RawPort parameters

定義:
クラス RawPort 内の setRawPortParams
例外:
UnsupportedCommOperationException

nativeSetRawPortParams

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

例外:
UnsupportedCommOperationException

getBaudRate

public int getBaudRate()

getDataBits

public int getDataBits()

getStopBits

public int getStopBits()

getParity

public int getParity()

setFlowControlMode

public void setFlowControlMode(int flowcontrol)

getFlowControlMode

public int 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


setDTR

public void setDTR(boolean state)

setRTS

public void setRTS(boolean state)

setDSR

private void setDSR(boolean state)

isCTS

public boolean isCTS()

isDSR

public boolean isDSR()

isCD

public boolean isCD()

isRI

public boolean isRI()

isRTS

public boolean isRTS()

sendBreak

public void sendBreak(int duration)
Write to the port


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
Raw 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 RawPortEvents


sendEvent

public void sendEvent(int event,
                      boolean state)

addEventListener

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

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

removeEventListener

public void removeEventListener()
Remove the Raw port event listener

定義:
クラス RawPort 内の removeEventListener

notifyOnDataAvailable

public void notifyOnDataAvailable(boolean enable)

notifyOnOutputEmpty

public void notifyOnOutputEmpty(boolean enable)

notifyOnCTS

public void notifyOnCTS(boolean enable)

notifyOnDSR

public void notifyOnDSR(boolean enable)

notifyOnRingIndicator

public void notifyOnRingIndicator(boolean enable)

notifyOnCarrierDetect

public void notifyOnCarrierDetect(boolean enable)

notifyOnOverrunError

public void notifyOnOverrunError(boolean enable)

notifyOnParityError

public void notifyOnParityError(boolean enable)

notifyOnFramingError

public void notifyOnFramingError(boolean enable)

notifyOnBreakInterrupt

public void notifyOnBreakInterrupt(boolean enable)

nativeClose

private int nativeClose()
Close the port


close

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

finalize

protected void finalize()
Finalize the port

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

getVersion

public java.lang.String getVersion()