lejos.pc.comm
Class NXTCommandConnector
java.lang.Object
lejos.pc.comm.NXTCommandConnector
public class NXTCommandConnector
- extends java.lang.Object
Used by remote execution leJOS API classes to create a connection to a
NXTCommand (LCP) connection to the NXT.
- Author:
- Lawrie Griffiths
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NXTCommandConnector
public NXTCommandConnector()
open
public static NXTComm open()
throws java.io.IOException
- Open any available NXT.
- Returns:
- true if connected
- Throws:
java.io.IOException
getSingletonOpen
public static NXTCommand getSingletonOpen()
- Ensure that the singleton NXTCommand object has been opened
and return it.
Used by leJOS API remote execution classes.
A message is sent to System.err and the program is exited if the
open fails.
- Returns:
- the singleton NXTCommand instance
close
public static void close()
throws java.io.IOException
- Throws:
java.io.IOException
setNXTCommand
public static void setNXTCommand(NXTCommand nxtCommand)