lejos.nxt
Class NXT

java.lang.Object
  extended by lejos.nxt.NXT

public class NXT
extends java.lang.Object

Abstraction for the local NXT device. This version of the NXT class supports remote execution.

Author:
Lawrie Griffiths and Brian Bagnall

Constructor Summary
NXT()
           
 
Method Summary
static byte deleteFlashMemory()
          Deletes all user programs and data in FLASH memory
static void exit(int code)
          Close the connection to the NXT and exit
static java.lang.String getBrickName()
          Get the friendly name of the brick
static float getFirmwareVersion()
          Get the (emulated) standard LEGO firmware version number
static int getFlashMemory()
          Get the number of bytes of free flash memory
static float getProtocolVersion()
          Get the LEGO Communication Protocol version number
static int getSignalStrength()
          This doesn't seem to be implemented in Lego NXT firmware/protocol?
static byte setBrickName(java.lang.String newName)
          Set the friendly name of the brick
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NXT

public NXT()
Method Detail

getFirmwareVersion

public static float getFirmwareVersion()
Get the (emulated) standard LEGO firmware version number

Returns:
the version number

getProtocolVersion

public static float getProtocolVersion()
Get the LEGO Communication Protocol version number

Returns:
the version number

getFlashMemory

public static int getFlashMemory()
Get the number of bytes of free flash memory

Returns:
Free memory remaining in FLASH

deleteFlashMemory

public static byte deleteFlashMemory()
Deletes all user programs and data in FLASH memory

Returns:
the status

getBrickName

public static java.lang.String getBrickName()
Get the friendly name of the brick

Returns:
the friendly name

setBrickName

public static byte setBrickName(java.lang.String newName)
Set the friendly name of the brick

Returns:
the status code

getSignalStrength

public static int getSignalStrength()
This doesn't seem to be implemented in Lego NXT firmware/protocol?

Returns:
Seems to return 0 every time

exit

public static void exit(int code)
Close the connection to the NXT and exit

Parameters:
code - the exit code