rcx.comm
Class Win32USBPort
java.lang.Object
   rcx.comm.Win32USBPort
rcx.comm.Win32USBPort
- All Implemented Interfaces: 
- USBPort
- public class Win32USBPort 
- extends java.lang.Object- implements USBPort
Win32USBPort - uses JNI to interface to win32usb.dll (see win32usb source)
- Author:
- Dario Laverde
         Copyright 2002 Dario Laverde, under terms of GNU LGPL
 
 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
Win32USBPort
public Win32USBPort()
getName
public java.lang.String getName()
- 
- Specified by:
- getNamein interface- USBPort
 
- 
 
toString
public java.lang.String toString()
- 
- Specified by:
- toStringin interface- USBPort
- Overrides:
- toStringin class- java.lang.Object
 
- 
 
open
public int open(java.lang.String portname)
         throws java.io.IOException
- 
- Specified by:
- openin interface- USBPort
 
- 
- Throws:
- java.io.IOException
 
read
public int read()
         throws java.io.IOException
- 
- Specified by:
- readin interface- USBPort
 
- 
- Throws:
- java.io.IOException
 
write
public void write(int b)
           throws java.io.IOException
- 
- Specified by:
- writein interface- USBPort
 
- 
- Throws:
- java.io.IOException
 
close
public void close()
- 
- Specified by:
- closein interface- USBPort
 
- 
 
available
public int available()
              throws java.io.IOException
- note: available() currently not supported by win32 driver
 
- 
- Specified by:
- availablein interface- USBPort
 
- 
- Throws:
- java.io.IOException
 
read
public int read(byte[] byteArray)
         throws java.io.IOException
- 
- Specified by:
- readin interface- USBPort
 
- 
- Throws:
- java.io.IOException
 
read
public int read(byte[] byteArray,
                int offset,
                int len)
         throws java.io.IOException
- 
- Specified by:
- readin interface- USBPort
 
- 
- Throws:
- java.io.IOException
 
write
public void write(byte[] byteArray)
           throws java.io.IOException
- 
- Specified by:
- writein interface- USBPort
 
- 
- Throws:
- java.io.IOException
 
write
public void write(byte[] byteArray,
                  int offset,
                  int len)
           throws java.io.IOException
- 
- Specified by:
- writein interface- USBPort
 
- 
- Throws:
- java.io.IOException
 
getInputStream
public java.io.InputStream getInputStream()
                                   throws java.io.IOException
- 
- Specified by:
- getInputStreamin interface- USBPort
 
- 
- Throws:
- java.io.IOException
 
getOutputStream
public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
- 
- Specified by:
- getOutputStreamin interface- USBPort
 
- 
- Throws:
- java.io.IOException
 
enableReceiveThreshold
public void enableReceiveThreshold(int i)
- 
- Specified by:
- enableReceiveThresholdin interface- USBPort
 
- 
 
disableReceiveThreshold
public void disableReceiveThreshold()
- 
- Specified by:
- disableReceiveThresholdin interface- USBPort
 
- 
 
isReceiveThresholdEnabled
public boolean isReceiveThresholdEnabled()
- 
- Specified by:
- isReceiveThresholdEnabledin interface- USBPort
 
- 
 
getReceiveThreshold
public int getReceiveThreshold()
- 
- Specified by:
- getReceiveThresholdin interface- USBPort
 
- 
 
enableReceiveTimeout
public void enableReceiveTimeout(int timeout)
- 
- Specified by:
- enableReceiveTimeoutin interface- USBPort
 
- 
 
disableReceiveTimeout
public void disableReceiveTimeout()
- 
- Specified by:
- disableReceiveTimeoutin interface- USBPort
 
- 
 
isReceiveTimeoutEnabled
public boolean isReceiveTimeoutEnabled()
- 
- Specified by:
- isReceiveTimeoutEnabledin interface- USBPort
 
- 
 
getReceiveTimeout
public int getReceiveTimeout()
- 
- Specified by:
- getReceiveTimeoutin interface- USBPort
 
- 
 
enableReceiveFraming
public void enableReceiveFraming(int i)
- 
- Specified by:
- enableReceiveFramingin interface- USBPort
 
- 
 
disableReceiveFraming
public void disableReceiveFraming()
- 
- Specified by:
- disableReceiveFramingin interface- USBPort
 
- 
 
isReceiveFramingEnabled
public boolean isReceiveFramingEnabled()
- 
- Specified by:
- isReceiveFramingEnabledin interface- USBPort
 
- 
 
getReceiveFramingByte
public int getReceiveFramingByte()
- 
- Specified by:
- getReceiveFramingBytein interface- USBPort
 
- 
 
setInputBufferSize
public void setInputBufferSize(int i)
- 
- Specified by:
- setInputBufferSizein interface- USBPort
 
- 
 
getInputBufferSize
public int getInputBufferSize()
- 
- Specified by:
- getInputBufferSizein interface- USBPort
 
- 
 
setOutputBufferSize
public void setOutputBufferSize(int i)
- 
- Specified by:
- setOutputBufferSizein interface- USBPort
 
- 
 
getOutputBufferSize
public int getOutputBufferSize()
- 
- Specified by:
- getOutputBufferSizein interface- USBPort
 
- 
 
main
public static void main(java.lang.String[] args)
                 throws java.io.IOException
- 
 
- 
- Throws:
- java.io.IOException