|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsophware.home.io.SerialAccess
public class SerialAccess
SerialAccess provides communications access
to serial ports.
Requires a javax.comm implementation.
| Constructor Summary | |
|---|---|
SerialAccess(java.lang.String port)
Creates an instance of the SerialAccess |
|
SerialAccess(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()
Checks status of the connection |
void |
open()
Opens and initializes the Serial Port |
void |
serialEvent(javax.comm.SerialPortEvent event)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SerialAccess(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 SerialAccess(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(javax.comm.SerialPortEvent event)
serialEvent in interface javax.comm.SerialPortEventListenerSerialPortEventListenerpublic void close()
close in interface HomeAccesspublic boolean isOpen()
isOpen in interface HomeAccess
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||