lejos.pc.comm
Class NXTCommLibnxt

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

public class NXTCommLibnxt
extends NXTCommUSB
implements JNIClass

Implementation of NXTComm over USB using libnxt. 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
NXTCommLibnxt()
           
 
Method Summary
 boolean initialize(JNILoader jnil)
          Return false, if the
 void jlibnxt_close(long nxt)
           
 java.lang.String[] jlibnxt_find()
           
 long jlibnxt_open(java.lang.String nxt)
           
 int jlibnxt_read_data(long nxt, byte[] data, int offset, int len)
           
 int jlibnxt_send_data(long nxt, byte[] message, int offset, int len)
           
 
Methods inherited from class lejos.pc.comm.NXTCommUSB
available, close, getInputStream, getOutputStream, open, open, read, search, sendRequest, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NXTCommLibnxt

public NXTCommLibnxt()
Method Detail

jlibnxt_find

public java.lang.String[] jlibnxt_find()

jlibnxt_open

public long jlibnxt_open(java.lang.String nxt)

jlibnxt_close

public void jlibnxt_close(long nxt)

jlibnxt_send_data

public int jlibnxt_send_data(long nxt,
                             byte[] message,
                             int offset,
                             int len)

jlibnxt_read_data

public int jlibnxt_read_data(long nxt,
                             byte[] data,
                             int offset,
                             int len)

initialize

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

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