dLife Home Page

dlife.robot.aibo
Class AiboBackButtons

java.lang.Object
  extended by java.util.Observable
      extended by dlife.robot.Device
          extended by dlife.robot.ArraySensor<Float>
              extended by dlife.robot.aibo.AiboBackButtons

public class AiboBackButtons
extends ArraySensor<Float>

A collection containing all buttons located on the physical Aibo's back. There are 3 buttons and their values will be stored in this structure. The button values are pressure sensitive floats between 0.0 and 1.0.

Version:
Feb 5 2008, Oct 3, 2008, Jun 14, 2010
Author:
Mike Olasin, Luke Maffey, Alex Diehl, Nate Mitchell, Grant Braught

Field Summary
static int FRONT
          Index of the value of the Aibo's front-most back button in the values array of this ArraySensor.
static int MIDDLE
          Index of the value of the Aibo's middle back button in the values array of this ArraySensor.
static int REAR
          Index of the value of the Aibo's read-most back button in the values array of this ArraySensor.
 
Fields inherited from class dlife.robot.ArraySensor
length, values
 
Fields inherited from class dlife.robot.Device
DEFAULT_GUI_UPDATE_DELAY, DEFAULT_READ_DELAY, myRobot, readCount
 
Constructor Summary
AiboBackButtons()
          Construct a new AiboBackButtons sensor.
 
Method Summary
protected  DeviceDisplay[] createGUIObjects()
          Build the GUI for this AiboBackButtons Sensor.
 void freeze()
          Does nothing.
 float getFrontButton()
          Get the value of the Aibo's front-most back button.
 float getMiddleButton()
          Get the value of the Aibo's middle back button.
 float getRearButton()
          Get the value of the Aibo's rear back button.
 void readStateFromRobot()
          Uses the getButton method to retrieve the button values and stores them in the values array for later access
 
Methods inherited from class dlife.robot.ArraySensor
getAverage, getAverage, getMaximum, getMaximum, getMaximumIndex, getMaximumIndex, getMinimum, getMinimum, getMinimumIndex, getMinimumIndex, getNumValues, getSubset, getValue, getValues
 
Methods inherited from class dlife.robot.Device
getAutoRead, getGUI, getGUIUpdateDelay, getReadDelay, getRobot, getSensorReadCount, getSensorReadRate, setAutoRead, setGUIUpdateDelay, setReadDelay, setRobot, shutDown, startAutoReadTimer, startUp, stopAutoReadTimer
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FRONT

public static final int FRONT
Index of the value of the Aibo's front-most back button in the values array of this ArraySensor.

See Also:
Constant Field Values

MIDDLE

public static final int MIDDLE
Index of the value of the Aibo's middle back button in the values array of this ArraySensor.

See Also:
Constant Field Values

REAR

public static final int REAR
Index of the value of the Aibo's read-most back button in the values array of this ArraySensor.

See Also:
Constant Field Values
Constructor Detail

AiboBackButtons

public AiboBackButtons()
Construct a new AiboBackButtons sensor.

Method Detail

freeze

public void freeze()
Does nothing.

Specified by:
freeze in class Device

readStateFromRobot

public void readStateFromRobot()
Uses the getButton method to retrieve the button values and stores them in the values array for later access

Specified by:
readStateFromRobot in class Device

getFrontButton

public float getFrontButton()
Get the value of the Aibo's front-most back button.

Returns:
value of the front-most button.

getMiddleButton

public float getMiddleButton()
Get the value of the Aibo's middle back button.

Returns:
value of the middle button.

getRearButton

public float getRearButton()
Get the value of the Aibo's rear back button.

Returns:
value of the rear button.

createGUIObjects

protected DeviceDisplay[] createGUIObjects()
Build the GUI for this AiboBackButtons Sensor.

Specified by:
createGUIObjects in class Device
Returns:
an array of DeviceDisplay subclass objects that make up the GUI for this Device.

dLife Home Page