|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.dalsemi.comm.NativeComm
Class declaration
Field Summary | |
static int |
PORT_LCD
Field PORT_LCD |
static int |
PORT_SERIAL0
Field PORT_SERIAL0 |
static int |
PORT_SERIAL1
Field PORT_SERIAL1 |
static int |
PORT_SERIAL2
Field PORT_SERIAL2 |
static int |
PORT_SERIAL3
Field PORT_SERIAL3 |
static int |
STREAM_COMMAND
Field STREAM_COMMAND |
static int |
STREAM_GENERIC
Field STREAM_GENERIC |
static int |
STREAM_STDERR
Field STREAM_STDERR |
static int |
STREAM_STDIN
Field STREAM_STDIN |
static int |
STREAM_STDOUT
Field STREAM_STDOUT |
Constructor Summary | |
NativeComm()
|
Method Summary | |
static int |
available(int handle)
returns the number of bytes available in a driver. |
static int |
close(int handle)
Closes a previously opened port. |
static int |
ioctl(int handle,
byte[] arr,
int offset,
int length,
int timeout)
Performs a generic ioctl method. |
static int |
open(int port,
int stream)
opens a port for use. |
static int |
read(int handle,
byte[] arr,
int timeout,
boolean suspend)
Calls the drivers read method. |
static int |
read(int handle,
byte[] arr,
int offset,
int length,
int timeout,
boolean suspend)
Calls the drivers read method. |
static void |
setHandle(int handle)
Method setHandle |
static void |
write(int handle,
byte[] arr)
Calls the drivers write method. |
static void |
write(int handle,
byte[] arr,
int offset,
int length)
Calls the drivers write method. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int STREAM_COMMAND
public static final int STREAM_STDIN
public static final int STREAM_STDOUT
public static final int STREAM_STDERR
public static final int STREAM_GENERIC
public static final int PORT_SERIAL0
public static final int PORT_SERIAL1
public static final int PORT_LCD
public static final int PORT_SERIAL2
public static final int PORT_SERIAL3
Constructor Detail |
public NativeComm()
Method Detail |
public static void setHandle(int handle)
handle
- public static int open(int port, int stream)
port
- - The port type to open.stream
- - The stream type to open.public static int close(int handle)
handle
- - handle of a previously opened port.public static void write(int handle, byte[] arr)
handle
- arr
- public static void write(int handle, byte[] arr, int offset, int length)
handle
- arr
- length
- public static int read(int handle, byte[] arr, int timeout, boolean suspend)
handle
- arr
- timeout
- public static int read(int handle, byte[] arr, int offset, int length, int timeout, boolean suspend)
handle
- arr
- length
- timeout
- suspend
- - false - never times out.public static int ioctl(int handle, byte[] arr, int offset, int length, int timeout)
handle
- arr
- length
- timeout
- public static int available(int handle)
handle
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |