|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--josx.rcxcomm.RCXPort
RCXPort provides an interface similar to java.net.Socket Adapted from original code created by the LEGO3 Team at DTU-IAU
Field Summary | |
static int |
DEFAULT_TIMEOUT
The default time-out for the RCXPort. |
protected IOException |
ioe
|
protected Object |
monitor
|
protected josx.rcxcomm.RCXPort.RCXInputStream |
rcxin
|
protected josx.rcxcomm.RCXPort.RCXOutputStream |
rcxout
|
Constructor Summary | |
RCXPort()
Parameterless constructor for the RCXPort. |
Method Summary | |
void |
close()
Closes this RCXPort. |
protected boolean |
dataAvailable()
Check if data is available using RCX Serial Class. |
InputStream |
getInputStream()
Returns an input stream for this RCXPort. |
OutputStream |
getOutputStream()
Returns an output stream for this RCXPort. |
int |
getTimeOut()
Getter for property timeOut. |
protected byte |
receiveByte()
|
protected void |
sendByte(byte b)
|
protected void |
sendPacket(byte b)
Send a packet using this RCXPort. |
void |
setTimeOut(int timeOut)
Setter for property timeOut. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
Field Detail |
protected josx.rcxcomm.RCXPort.RCXInputStream rcxin
protected josx.rcxcomm.RCXPort.RCXOutputStream rcxout
protected Object monitor
protected IOException ioe
public static final int DEFAULT_TIMEOUT
Constructor Detail |
public RCXPort() throws IOException
Method Detail |
public InputStream getInputStream()
public OutputStream getOutputStream()
public void close()
protected void sendPacket(byte b) throws IOException
b
- a byte to sendIOException
- if the packet could not be sent.RCXOutputStream
public int getTimeOut()
public void setTimeOut(int timeOut)
timeOut
- New value of property timeOut.protected void sendByte(byte b) throws IOException
protected boolean dataAvailable()
protected byte receiveByte() throws IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |