|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ISerial
Interface for Serial devices
| Method Summary | |
|---|---|
int |
available()
|
void |
closeInputStream()
|
void |
closeOutputStream()
|
InputStream |
openInputStream()
Open and return an input stream for a connection. |
OutputStream |
openOutputStream()
Open and return an output stream for a connection. |
int |
read()
|
int |
read(byte[] b,
int off,
int len)
|
void |
setUSARTParams(int baudrate,
int databits,
String parity,
float stopbits)
Set the USART line parameteres. |
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
| Methods inherited from interface com.sun.spot.resources.IResource |
|---|
addTag, getTags, getTagValue, hasTag, removeTag |
| Methods inherited from interface javax.microedition.io.InputConnection |
|---|
openDataInputStream |
| Methods inherited from interface javax.microedition.io.Connection |
|---|
close |
| Methods inherited from interface javax.microedition.io.OutputConnection |
|---|
openDataOutputStream |
| Methods inherited from interface javax.microedition.io.Connection |
|---|
close |
| Method Detail |
|---|
void setUSARTParams(int baudrate,
int databits,
String parity,
float stopbits)
throws IOException
baudrate - baud speed to set module todatabits - supported values are 5,6,7,8parity - supported options are none, odd, even, space & markstopbits - supported options are 1, 1.5 or 2
IOException
InputStream openInputStream()
throws IOException
InputConnection
openInputStream in interface InputConnectionIOException - If an I/O error occurs
OutputStream openOutputStream()
throws IOException
OutputConnection
openOutputStream in interface OutputConnectionIOException - If an I/O error occurs
void closeInputStream()
throws IOException
IOException
void closeOutputStream()
throws IOException
IOException
int read()
throws IOException
IOException
int read(byte[] b,
int off,
int len)
throws IOException
IOException
int available()
throws IOException
IOException
void write(int b)
throws IOException
IOException
void write(byte[] b,
int off,
int len)
throws IOException
IOException
|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||