Package lejos.remote.nxt
Class RemoteNXT
- java.lang.Object
-
- lejos.remote.nxt.RemoteNXT
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ArrayList<RemoteNXTPort>ports
-
Constructor Summary
Constructors Constructor Description RemoteNXT(java.lang.String name, byte[] address)RemoteNXT(java.lang.String name, NXTCommConnector connector)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect(NXTCommConnector connector)static NXTget(java.lang.String name, NXTCommConnector connector)AudiogetAudio()return a Audio object which can be used to access the device's audio playbackLocalBTDevicegetBluetoothDevice()Get the local Bluetooth deviceGraphicsLCDgetGraphicsLCD()Get graphics access to the LCDKeygetKey(java.lang.String name)Get access to a specific Key (aka Button)KeysgetKeys()Get access to the keys (buttons)LEDgetLED()Get access to the LEDjava.lang.StringgetName()Get he name of the brickNXTCommandgetNXTCommand()PortgetPort(java.lang.String portName)Return a port object for the request port name.PowergetPower()return a battery object which can be used to obtain battery voltage etc.TextLCDgetTextLCD()Get text access to the LCD using the default fontTextLCDgetTextLCD(Font f)Get text access to the LCD using a specified fontjava.lang.StringgetType()Get the type of brick, e.g.VideogetVideo()LocalWifiDevicegetWifiDevice()Get the local Wifi devicebooleanisLocal()Test whether the brick is a local onevoidsetDefault()Set this brick as the default one for static methods
-
-
-
Field Detail
-
ports
protected java.util.ArrayList<RemoteNXTPort> ports
-
-
Constructor Detail
-
RemoteNXT
public RemoteNXT(java.lang.String name, NXTCommConnector connector) throws java.io.IOException- Throws:
java.io.IOException
-
RemoteNXT
public RemoteNXT(java.lang.String name, byte[] address)
-
-
Method Detail
-
connect
public void connect(NXTCommConnector connector) throws java.io.IOException
- Throws:
java.io.IOException
-
get
public static NXT get(java.lang.String name, NXTCommConnector connector) throws java.io.IOException
- Throws:
java.io.IOException
-
getPort
public Port getPort(java.lang.String portName)
Description copied from interface:BrickReturn a port object for the request port name. This allows access to the hardware associated with the specified port.
-
getPower
public Power getPower()
Description copied from interface:Brickreturn a battery object which can be used to obtain battery voltage etc.
-
getAudio
public Audio getAudio()
Description copied from interface:Brickreturn a Audio object which can be used to access the device's audio playback
-
getTextLCD
public TextLCD getTextLCD()
Description copied from interface:BrickGet text access to the LCD using the default font- Specified by:
getTextLCDin interfaceBrick- Returns:
- the text LCD
-
getTextLCD
public TextLCD getTextLCD(Font f)
Description copied from interface:BrickGet text access to the LCD using a specified font- Specified by:
getTextLCDin interfaceBrick- Parameters:
f- the font- Returns:
- the text LCD
-
getGraphicsLCD
public GraphicsLCD getGraphicsLCD()
Description copied from interface:BrickGet graphics access to the LCD- Specified by:
getGraphicsLCDin interfaceBrick- Returns:
- the graphics LCD
-
isLocal
public boolean isLocal()
Description copied from interface:BrickTest whether the brick is a local one
-
getType
public java.lang.String getType()
Description copied from interface:BrickGet the type of brick, e.g. "EV3", "NXT", "BrickPi"
-
getName
public java.lang.String getName()
Description copied from interface:BrickGet he name of the brick
-
getBluetoothDevice
public LocalBTDevice getBluetoothDevice()
Description copied from interface:BrickGet the local Bluetooth device- Specified by:
getBluetoothDevicein interfaceBrick- Returns:
- the local Bluetooth device
-
getWifiDevice
public LocalWifiDevice getWifiDevice()
Description copied from interface:BrickGet the local Wifi device- Specified by:
getWifiDevicein interfaceBrick- Returns:
- the local Wifi device
-
setDefault
public void setDefault()
Description copied from interface:BrickSet this brick as the default one for static methods- Specified by:
setDefaultin interfaceBrick
-
getKey
public Key getKey(java.lang.String name)
Description copied from interface:BrickGet access to a specific Key (aka Button)
-
getKeys
public Keys getKeys()
Description copied from interface:BrickGet access to the keys (buttons)
-
getNXTCommand
public NXTCommand getNXTCommand()
-
-