public class UsbCommPipe extends Object
| Constructor and Description |
|---|
UsbCommPipe(UsbPipe pipe)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the pipe
|
int |
flush()
Flushes any pending read data
|
int |
read(byte[] data,
int timeout)
Reads data from the pipe
|
int |
read(byte[] data,
int offs,
int leng,
int timeout)
Reads data from the pipe
|
int |
write(byte[] data)
Writes data to the pipe
|
int |
write(byte[] data,
int offs,
int leng)
Writes data to the pipe
|
public UsbCommPipe(UsbPipe pipe) throws UsbException
UsbExceptionpublic void close()
throws UsbException
UsbException - if the device is not open.public int write(byte[] data)
throws UsbException
data - Byte array of data to be written.UsbException - if the out endpoint is not open.public int write(byte[] data,
int offs,
int leng)
throws UsbException
data - Byte array containing the data to be written.offs - The offset of the first byte to be written.leng - The number of bytes to be written.UsbException - if the out endpoint is not open.public int read(byte[] data,
int timeout)
throws UsbException,
UsbTimeoutException
data - Byte array to receive the read data.timeout - The maximum time, in milliseconds, to wait for data.UsbException - if the in endpoint is not open.UsbTimeoutException - if the read times out.public int read(byte[] data,
int offs,
int leng,
int timeout)
throws UsbException,
UsbTimeoutException
data - Byte array to receive the read data.offs - The offset in data where the read data is to
start.leng - The number of bytes of data to read.timeout - The maximum time, in milliseconds, to wait for data.UsbException - if the in endpoint is not open.UsbTimeoutException - if the read times out.public int flush()
throws UsbException
UsbExceptionCopyright © 2014 LSST. All Rights Reserved.