|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.j3d.device.input.polhemus.SerialPortDevice
Representation of a device that uses the serial port for information.
| Field Summary | |
static int |
DATABITS_5
|
static int |
DATABITS_6
|
static int |
DATABITS_7
|
static int |
DATABITS_8
|
static int |
PARITY_EVEN
|
static int |
PARITY_NONE
|
static int |
PARITY_ODD
|
static int |
SERIALPORT1
|
static int |
SERIALPORT2
|
static int |
SERIALPORT3
|
static int |
SERIALPORT4
|
static int |
STOPBITS_1
|
static int |
STOPBITS_1_5
|
static int |
STOPBITS_2
|
| Constructor Summary | |
protected |
SerialPortDevice(int device,
int baudrate,
int dataBits,
int stopBits,
int parity)
|
protected |
SerialPortDevice(java.lang.String deviceName,
int baudrate,
int dataBits,
int stopBits,
int parity)
|
| Method Summary | |
void |
close()
Close the serial port and all associated streams now. |
int |
nToRead()
Find out how many bytes are available for reading. |
java.lang.String |
read(int ndata)
Read the next ndata bytes from the port, given a maximum timeout of 3000 milliseconds. |
java.lang.String |
read(int ndata,
long timeOut)
|
void |
waitData(int nWaitData)
|
void |
waitTime(long millis)
Convenience method to wait for a certain period of time. |
void |
write(byte[] value,
int len)
Write the given string to the serial port now. |
void |
write(java.lang.String value)
Write the given string to the serial port now. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int SERIALPORT1
public static final int SERIALPORT2
public static final int SERIALPORT3
public static final int SERIALPORT4
public static final int DATABITS_5
public static final int DATABITS_6
public static final int DATABITS_7
public static final int DATABITS_8
public static final int STOPBITS_1
public static final int STOPBITS_2
public static final int STOPBITS_1_5
public static final int PARITY_NONE
public static final int PARITY_ODD
public static final int PARITY_EVEN
| Constructor Detail |
protected SerialPortDevice(java.lang.String deviceName,
int baudrate,
int dataBits,
int stopBits,
int parity)
deviceName - name of the port to open. ex. "COM1", "/dev/ttyd1"baudrate - baudrate of the port.
dataBits - stopBits - parity -
protected SerialPortDevice(int device,
int baudrate,
int dataBits,
int stopBits,
int parity)
device - number of the port to open. ex. "COM1", "/dev/ttyd1"
baudrate - baudrate of the port.
dataBits - stopBits - parity - | Method Detail |
public void close()
public void write(java.lang.String value)
value - The value to write
public void write(byte[] value,
int len)
value - The value to writelen - The number of bytes to write from the array
public java.lang.String read(int ndata,
long timeOut)
public java.lang.String read(int ndata)
ndata - The number of bytes to readpublic int nToRead()
public void waitData(int nWaitData)
public void waitTime(long millis)
millis - The number of milliseconds to sleep for
|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||