|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.nxt.remote.NXTComm
public class NXTComm
Initiates communication to a remote NXT. Used by NXTCommand to implement the Lego Communications Protocol (LCP) over Bluetooth.
Method Summary | |
---|---|
void |
close()
Close the connection |
boolean |
open(String name,
int mode)
|
byte[] |
sendRequest(byte[] message,
int replyLen)
Send an LCP message to the NXT and receive a reply |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean open(String name, int mode) throws IOException
IOException
public byte[] sendRequest(byte[] message, int replyLen) throws IOException
NXTCommRequest
sendRequest
in interface NXTCommRequest
message
- the LCP messagereplyLen
- the reply length expected
IOException
public void close() throws IOException
NXTCommRequest
close
in interface NXTCommRequest
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |