lejos.pc.tools
Class ConsoleViewComms

java.lang.Object
  extended by lejos.pc.tools.ConsoleViewComms

public class ConsoleViewComms
extends Object

Contains the logic for connecting to RConsole on the NXT and downloading data. Can be used by different user interfaces.

Rating red

Constructor Summary
ConsoleViewComms(ConsoleViewerUI viewer, boolean daemon, boolean lcd)
           
 
Method Summary
 void close()
          Close the connection
 boolean connectTo(String name, String address, boolean useUSB)
          Connect to RConsole on the NXT uusing either USB or Bluetooth
 boolean connectTo(String name, String address, int protocol)
          Connect to RConsole on the NXT using the specified protocols
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleViewComms

public ConsoleViewComms(ConsoleViewerUI viewer,
                        boolean daemon,
                        boolean lcd)
Method Detail

connectTo

public boolean connectTo(String name,
                         String address,
                         boolean useUSB)
Connect to RConsole on the NXT uusing either USB or Bluetooth

Parameters:
name - the name of the NXT or null
address - the address of the NXT or null
useUSB - use USB if true, else use Bluetooth
Returns:
true iff the connection was successful

connectTo

public boolean connectTo(String name,
                         String address,
                         int protocol)
Connect to RConsole on the NXT using the specified protocols

Parameters:
name - the name of the NXT or null
address - the address of the NXT or null
protocol - USB or Bluetooth or both
Returns:
true iff the connection was successful

close

public void close()
Close the connection