lejos.pc.tools
Class ConsoleViewComms

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

public class ConsoleViewComms
extends java.lang.Object

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

Author:
Roger Glassey, Lawrie Griffiths and Andy Shaw

Constructor Summary
ConsoleViewComms(ConsoleViewerUI viewer, ConsoleDebug debug, boolean daemon)
           
 
Method Summary
 void close()
          Close the connection
 boolean connectTo(java.lang.String name, java.lang.String address, boolean useUSB, boolean lcd)
          Connect to RConsole on the NXT uusing either USB or Bluetooth
 boolean connectTo(java.lang.String name, java.lang.String address, int protocol, boolean lcd)
          Connect to RConsole on the NXT using the specified protocols
 void waitComplete()
          Wait for the console session to end
 
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,
                        ConsoleDebug debug,
                        boolean daemon)
Method Detail

connectTo

public boolean connectTo(java.lang.String name,
                         java.lang.String address,
                         boolean useUSB,
                         boolean lcd)
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
lcd - Request NXT LCD display contents
Returns:
true iff the connection was successful

connectTo

public boolean connectTo(java.lang.String name,
                         java.lang.String address,
                         int protocol,
                         boolean lcd)
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
lcd - Request NXT LCD display contents
Returns:
true iff the connection was successful

close

public void close()
Close the connection


waitComplete

public void waitComplete()
Wait for the console session to end