|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.nxt.comm.NXTCommDevice lejos.nxt.comm.USB
public class USB
Low-level USB access.
Field Summary | |
---|---|
static int |
RESET
|
Fields inherited from class lejos.nxt.comm.NXTCommDevice |
---|
ADDRESS_LEN, cs, NAME, NAME_LEN, SERIAL_NO |
Method Summary | |
---|---|
static NXTCommConnector |
getConnector()
Provides access to the singleton connection object. |
static void |
usbDisable()
|
static void |
usbEnable(int reset)
|
static int |
usbRead(byte[] buf,
int off,
int len)
|
static void |
usbReset()
|
static void |
usbSetName(String name)
|
static void |
usbSetSerialNo(String serNo)
|
static int |
usbStatus()
|
static int |
usbWrite(byte[] buf,
int off,
int len)
|
static USBConnection |
waitForConnection()
Wait for ever for the USB connection to become available. |
static USBConnection |
waitForConnection(int timeout,
int mode)
Wait for the USB interface to become available and for a PC side program to attach to it. |
static void |
waitForDisconnect(USBConnection conn,
int timeout)
Wait for the remote side of the connection to close down. |
Methods inherited from class lejos.nxt.comm.NXTCommDevice |
---|
addressToString, getAddress, getName, isAddress, loadSettings, nameToString, setAddress, setName, stringToAddress, stringToName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int RESET
Method Detail |
---|
public static USBConnection waitForConnection(int timeout, int mode)
timeout
- length of time to wait (in ms), if 0 wait for evermode
- The IO mode to be used for the connection. (see NXTConnection)
public static USBConnection waitForConnection()
public static void waitForDisconnect(USBConnection conn, int timeout)
conn
- The connection associated with this device.timeout
- public static void usbEnable(int reset)
public static void usbDisable()
public static void usbReset()
public static int usbRead(byte[] buf, int off, int len)
public static int usbWrite(byte[] buf, int off, int len)
public static int usbStatus()
public static void usbSetSerialNo(String serNo)
public static void usbSetName(String name)
public static NXTCommConnector getConnector()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |