lejos.pc.comm
Class NXTCommFantom

java.lang.Object
  extended by lejos.pc.comm.NXTCommUSB
      extended by lejos.pc.comm.NXTCommFantom
All Implemented Interfaces:
lejos.internal.jni.JNIClass, NXTCommRequest, NXTComm

public class NXTCommFantom
extends NXTCommUSB
implements lejos.internal.jni.JNIClass

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.


Field Summary
 
Fields inherited from interface lejos.pc.comm.NXTComm
LCP, PACKET, RAW
 
Constructor Summary
NXTCommFantom()
           
 
Method Summary
 boolean initialize(lejos.internal.jni.JNILoader jnil)
          Return false, if the
 
Methods inherited from class lejos.pc.comm.NXTCommUSB
available, close, finalize, getInputStream, getOutputStream, open, open, read, search, sendRequest, write
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NXTCommFantom

public NXTCommFantom()
Method Detail

initialize

public boolean initialize(lejos.internal.jni.JNILoader jnil)
                   throws lejos.internal.jni.JNIException
Description copied from interface: lejos.internal.jni.JNIClass
Return false, if the

Specified by:
initialize in interface lejos.internal.jni.JNIClass
Parameters:
jnil - instance of JNILoader
Returns:
false, if the class is not suitable for this platform
Throws:
lejos.internal.jni.JNIException - if something went wrong loading the JNI library