|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsophware.home.io.RXTXSerialAccess
public class RXTXSerialAccess
RXTXSerialAccess provides communications access
to serial ports using RXTX specification.
Requires RXTX release 2.1 package from RXTX
| Constructor Summary | |
|---|---|
RXTXSerialAccess(java.lang.String port)
Creates an instance of the SerialAccess |
|
RXTXSerialAccess(java.lang.String port,
int baudrate,
int databits,
int stopbits,
int parity)
Creates an instance of the SerialAccess |
|
| Method Summary | |
|---|---|
void |
close()
Closes the Serial Port |
java.io.InputStream |
getInputStream()
Gets the input stream associate with the Serial Port |
java.io.OutputStream |
getOutputStream()
Gets the output stream associate with the Serial Port |
boolean |
isOpen()
returns status of access |
void |
open()
Opens and initializes the Serial Port |
void |
serialEvent(gnu.io.SerialPortEvent event)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RXTXSerialAccess(java.lang.String port)
SerialAccess
DEFAULT: 4800 baud, 8 data bits, 1 stop bit, no parity
port - the COM port connected to the device
public RXTXSerialAccess(java.lang.String port,
int baudrate,
int databits,
int stopbits,
int parity)
SerialAccess
The databits, stopbits and parity should use the static fields provided by javax.comm.SerialPort
port - the COM port connected to the device (e.g. COM1, COM2, ...)baudrate - the baud rate of the portdatabits - stopbits - parity - | Method Detail |
|---|
public void open()
throws java.io.IOException
open in interface HomeAccessjava.io.IOExceptionpublic java.io.InputStream getInputStream()
getInputStream in interface HomeAccesspublic java.io.OutputStream getOutputStream()
getOutputStream in interface HomeAccesspublic void serialEvent(gnu.io.SerialPortEvent event)
serialEvent in interface gnu.io.SerialPortEventListenerSerialPortEventListenerpublic boolean isOpen()
isOpen in interface HomeAccess
public void close()
throws java.io.IOException
close in interface HomeAccessjava.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||