|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.dalsemi.onewire.adapter.SerialService
Method Summary | |
int |
available()
|
boolean |
beginExclusive(boolean blocking)
Gets exclusive use of the 1-Wire to communicate with an iButton or 1-Wire Device. |
static void |
CleanUpByThread(Thread t)
Cleans up the resources used by the thread argument. |
void |
closePort()
Close this serial port. |
void |
endExclusive()
Relinquishes exclusive control of the 1-Wire Network. |
void |
flush()
|
int |
getBaudRate()
|
String |
getPortName()
|
static Enumeration |
getSerialPortIdentifiers()
|
static SerialService |
getSerialService(String strComPort)
|
boolean |
haveExclusive()
Check if this thread has exclusive control of the port. |
boolean |
isDTR()
|
boolean |
isPortOpen()
|
boolean |
isRTS()
|
void |
openPort()
|
void |
openPort(com.dalsemi.onewire.adapter.SerialPortEventListener spel)
|
int |
read()
|
int |
read(byte[] buffer)
|
int |
read(byte[] buffer,
int offset,
int length)
|
int |
readWithTimeout(byte[] buffer,
int offset,
int length)
|
char[] |
readWithTimeout(int length)
|
void |
sendBreak(int duration)
Send a break on this serial port |
void |
serialEvent(com.dalsemi.onewire.adapter.SerialPortEvent spe)
SerialPortEventListener method. |
void |
setBaudRate(int baudRate)
|
void |
setDTR(boolean newDTR)
|
void |
setNotifyOnDataAvailable(boolean notify)
|
void |
setRTS(boolean newRTS)
|
void |
write(byte[] data)
|
void |
write(byte[] data,
int offset,
int length)
|
void |
write(char data)
|
void |
write(char[] data)
|
void |
write(char[] data,
int offset,
int length)
|
void |
write(int data)
|
void |
write(String data)
|
Method Detail |
public static void CleanUpByThread(Thread t)
thread
- that may have used a USerialAdapter
public static SerialService getSerialService(String strComPort)
public void serialEvent(com.dalsemi.onewire.adapter.SerialPortEvent spe)
public void openPort() throws IOException
public void openPort(com.dalsemi.onewire.adapter.SerialPortEventListener spel) throws IOException
public void setNotifyOnDataAvailable(boolean notify)
public static Enumeration getSerialPortIdentifiers()
public String getPortName()
public boolean isPortOpen()
public boolean isDTR()
public void setDTR(boolean newDTR)
public boolean isRTS()
public void setRTS(boolean newRTS)
public void sendBreak(int duration)
duration
- - break duration in mspublic int getBaudRate()
public void setBaudRate(int baudRate) throws IOException
public void closePort()
IOException
- - if port is in use by another applicationpublic void flush() throws IOException
public boolean beginExclusive(boolean blocking)
blocking
- true
if want to block waiting
for an excluse access to the adaptertrue
if blocking was false and a
exclusive session with the adapter was aquiredIOException
- public void endExclusive()
public boolean haveExclusive()
public int available() throws IOException
public int read() throws IOException
public int read(byte[] buffer) throws IOException
public int read(byte[] buffer, int offset, int length) throws IOException
public int readWithTimeout(byte[] buffer, int offset, int length) throws IOException
public char[] readWithTimeout(int length) throws IOException
public void write(int data) throws IOException
public void write(byte[] data, int offset, int length) throws IOException
public void write(byte[] data) throws IOException
public void write(String data) throws IOException
public void write(char data) throws IOException
public void write(char[] data) throws IOException
public void write(char[] data, int offset, int length) throws IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |