lejos.pc.comm
Class NXTCommFantom
java.lang.Object
lejos.pc.comm.NXTCommUSB
lejos.pc.comm.NXTCommFantom
- All Implemented Interfaces:
- NXTCommRequest, NXTComm
public class NXTCommFantom
- extends NXTCommUSB
Implementation of NXTComm using the the LEGO Fantom API.
Currently only supports USB access. The Fantom read function when using
Bluetooth seems to be broken, it does not work if the amount of data
available to be read does not match the amount of data requested. So for now
we only support USB.
Notes
The Fantom read and write functions have a built in timeout period of
20 seconds. This module assumes that this timeout exists and uses it to
timeout some requests.
Should not be used directly - use NXTCommFactory to create
an appropriate NXTComm object for your system and the protocol
you are using.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NXTCommFantom
public NXTCommFantom()
jfantom_find
public java.lang.String[] jfantom_find()
jfantom_open
public long jfantom_open(java.lang.String nxt)
jfantom_close
public void jfantom_close(long nxt)
jfantom_send_data
public int jfantom_send_data(long nxt,
byte[] message,
int offset,
int len)
jfantom_read_data
public int jfantom_read_data(long nxt,
byte[] data,
int offset,
int len)