|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.dalsemi.comm.VendPort
| Field Summary | |
static int |
COMMAND
|
static int |
GENERIC
|
static int |
PARAM_COMMANDTABLE
|
static int |
SERIALDEFAULTREADTIMEOUT
|
static int |
SPEED_115200
|
static int |
SPEED_1200
|
static int |
SPEED_19200
|
static int |
SPEED_2400
|
static int |
SPEED_300
|
static int |
SPEED_38400
|
static int |
SPEED_4800
|
static int |
SPEED_57600
|
static int |
SPEED_600
|
static int |
SPEED_9600
|
static int |
STDERR
|
static int |
STDIN
|
static int |
STDOUT
|
static int |
VEND_PORT
|
| Constructor Summary | |
VendPort(int portNum,
int stream)
|
|
| Method Summary | |
int |
available()
returns the number of bytes available on the port. |
void |
close()
close the serial port. |
void |
disableReceiveTimeout()
disables the receive timeout. |
void |
enableReceiveTimeout()
enables the receive timeout - currently not implemented. |
int |
getInputBufferSize()
gets the size of the input buffer. |
java.io.InputStream |
getInputStream()
gets a serial port Input stream |
int |
getOutputBufferSize()
gets the size of the output buffer. |
java.io.OutputStream |
getOutputStream()
gets a serial port Output stream |
boolean |
isReceiveTimeoutEnabled()
returns true if the receive timeout is enabled. |
void |
open()
opens the serial port for communications. |
int |
read()
read from the serial port. |
int |
read(byte[] arr,
int offset,
int len)
read from the serial port. |
void |
sendBreak(int timeMS)
Sends a break on the serial port. |
void |
setBaudRate(int speed)
Sets the baud rate for the port. |
void |
setInputBufferSize(int size)
sets the size of the input buffer. |
void |
setOutputBufferSize(int size)
sets the size of the output buffer. |
void |
setReceiveTimeout(int timeout)
sets the receive timeout to the given value. |
static void |
setVendParams(int paramNum,
byte[] params,
int length)
|
void |
write(byte[] arr)
write to the serial port. |
void |
write(byte[] arr,
int offset,
int len)
writes the given array to the serial port. |
void |
write(int ch)
write the byte to the serial port. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final int VEND_PORT
public static final int COMMAND
public static final int STDIN
public static final int STDOUT
public static final int STDERR
public static final int GENERIC
public static final int SPEED_300
public static final int SPEED_600
public static final int SPEED_1200
public static final int SPEED_2400
public static final int SPEED_4800
public static final int SPEED_9600
public static final int SPEED_19200
public static final int SPEED_38400
public static final int SPEED_57600
public static final int SPEED_115200
public static final int SERIALDEFAULTREADTIMEOUT
public static final int PARAM_COMMANDTABLE
| Constructor Detail |
public VendPort(int portNum,
int stream)
throws java.io.IOException
| Method Detail |
public static void setVendParams(int paramNum,
byte[] params,
int length)
public void open()
public void close()
throws java.io.IOException
public void write(byte[] arr)
throws java.io.IOException
arr - - the array to be written to the serial port.
public void write(byte[] arr,
int offset,
int len)
throws java.io.IOException
arr - - the array to be written.offset - - the offset in the array to begin sending.len - - the number of bytes to send.
public void write(int ch)
throws java.io.IOException
ch - - the data to be written.
public int read(byte[] arr,
int offset,
int len)
throws java.io.IOException
arr - - the array for the data read to be placed in.offset - - the offset to begin saving data.len - - the number of bytes to read.
public int read()
throws java.io.IOException
public java.io.InputStream getInputStream()
throws java.io.IOException
public java.io.OutputStream getOutputStream()
throws java.io.IOException
public void enableReceiveTimeout()
throws UnsupportedCommOperationException
public void disableReceiveTimeout()
throws UnsupportedCommOperationException
public void setReceiveTimeout(int timeout)
throws UnsupportedCommOperationException
timeout - - the value to delay before timeing out.public boolean isReceiveTimeoutEnabled()
public int getInputBufferSize()
public int getOutputBufferSize()
public void setInputBufferSize(int size)
throws UnsupportedCommOperationException
size - - the size of the input buffer.
public void setOutputBufferSize(int size)
throws UnsupportedCommOperationException
size - - the size of the output buffer.
public void setBaudRate(int speed)
throws UnsupportedCommOperationException
speed - - use the static final intspublic void sendBreak(int timeMS)
timeMS - - the duration of the break.public int available()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||