|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
PER.rover.control.Reliagram
External class for RoverController to handle communication.
| Field Summary | |
static int |
DEBUG
|
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
Reliagram()
Creates a new instance of Reliagram |
|
| Method Summary | |
boolean |
close()
|
boolean |
connect(java.lang.String ipAddr,
int port,
int timeout)
|
static void |
debug(int level,
java.lang.String msg)
|
void |
quit()
Quits the thread that handles the receives; only call this if destroying a copy of Reliagram. |
Datapack |
receive()
Waits for a new packet. |
Datapack |
receive(int seqNum)
Waits for a new packet. |
Datapack |
receive(int seqNum,
int timeout)
|
Datapack |
receiveWithTimeout(int timeout)
Waits for a new packet with the specified timeout in milliseconds. |
void |
run()
|
int |
send(byte[] cmd,
int len)
|
int |
send(byte[] cmd,
int len,
Datapack resp)
|
boolean |
wasReceived(int seqNum)
|
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int DEBUG
| Constructor Detail |
public Reliagram()
| Method Detail |
public boolean connect(java.lang.String ipAddr,
int port,
int timeout)
timeout - How long to wait for received data.
0=infinity, a negative number will cause the function to return immediatelypublic boolean close()
public void quit()
public int send(byte[] cmd,
int len)
public int send(byte[] cmd,
int len,
Datapack resp)
public Datapack receive(int seqNum)
connect was called.
public Datapack receive(int seqNum,
int timeout)
timeout - How long to wait for - 0 means infinite timeoutpublic Datapack receive()
connect was called.
public Datapack receiveWithTimeout(int timeout)
public void run()
public static void debug(int level,
java.lang.String msg)
public boolean wasReceived(int seqNum)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||