orbotix.robot.base
Class Robot

java.lang.Object
  extended by java.util.Observable
      extended by orbotix.robot.base.Robot
All Implemented Interfaces:
android.os.Parcelable

public class Robot
extends java.util.Observable
implements android.os.Parcelable

Class to represent an available robotic device.


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.os.Parcelable
android.os.Parcelable.Creator
 
Field Summary
static java.lang.String ACTION_FOUND
          Action used in broadcast intent when a robot is found
static java.lang.String EXTRA_ROBOT_ID
          Extra data used in broadcast intent
static int OBERVABLE_MAIN_APP_CORRUPT_STATE_CHANGED
           
static int OBSERVABLE_CONNECTED_STATE_CHANGED
           
static int OBSERVABLE_NAME_CHANGED
           
static int OBSERVABLE_UNDER_CONTROL_STATE_CHANGED
           
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Method Summary
 int describeContents()
           
 java.lang.String getBluetoothName()
          Accessor to the bluetooth name of the robot.
 android.bluetooth.BluetoothDevice getDevice()
          Accessor to the underlaying BluetoothDevice
 java.lang.String getName()
          Accessor to the robot's name.
 java.lang.String getUniqueId()
          Provides a unique identifier for the robot.
 java.lang.Boolean isConnected()
          Accessor to check the connection state.
 boolean isKnown()
          Method to check if the robot is known.
 boolean isMainApplicationCorrupt()
           
 boolean isUnderControl()
          Method to check the connection status.
 void setName(java.lang.String newName)
           
 java.lang.String toString()
          Provides a formated string of the robot name and status.
 void writeToParcel(android.os.Parcel dest, int flags)
          Used for serializing Robot objects.
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OBSERVABLE_UNDER_CONTROL_STATE_CHANGED

public static final int OBSERVABLE_UNDER_CONTROL_STATE_CHANGED
See Also:
Constant Field Values

OBSERVABLE_CONNECTED_STATE_CHANGED

public static final int OBSERVABLE_CONNECTED_STATE_CHANGED
See Also:
Constant Field Values

OBERVABLE_MAIN_APP_CORRUPT_STATE_CHANGED

public static final int OBERVABLE_MAIN_APP_CORRUPT_STATE_CHANGED
See Also:
Constant Field Values

OBSERVABLE_NAME_CHANGED

public static final int OBSERVABLE_NAME_CHANGED
See Also:
Constant Field Values

ACTION_FOUND

public static final java.lang.String ACTION_FOUND
Action used in broadcast intent when a robot is found

See Also:
Constant Field Values

EXTRA_ROBOT_ID

public static final java.lang.String EXTRA_ROBOT_ID
Extra data used in broadcast intent

See Also:
Constant Field Values
Method Detail

getDevice

public android.bluetooth.BluetoothDevice getDevice()
Accessor to the underlaying BluetoothDevice

Returns:
A BluetoothDevice object.

getBluetoothName

public java.lang.String getBluetoothName()
Accessor to the bluetooth name of the robot.

Returns:
The bluetooth name.

getName

public java.lang.String getName()
Accessor to the robot's name.

Returns:
String with the name of the robot.

setName

public void setName(java.lang.String newName)

getUniqueId

public java.lang.String getUniqueId()
Provides a unique identifier for the robot.

Returns:
A unique identifier.

isKnown

public boolean isKnown()
Method to check if the robot is known.

Returns:
true if the robot has been used before(paired), otherwise false.

isUnderControl

public boolean isUnderControl()
Method to check the connection status.

Returns:
true if connected to the robot, otherwise false.

isMainApplicationCorrupt

public boolean isMainApplicationCorrupt()

isConnected

public java.lang.Boolean isConnected()
Accessor to check the connection state.

Returns:
The connection state.

toString

public java.lang.String toString()
Provides a formated string of the robot name and status.

Overrides:
toString in class java.lang.Object
Returns:
A representative string for the robot.

describeContents

public int describeContents()
Specified by:
describeContents in interface android.os.Parcelable

writeToParcel

public void writeToParcel(android.os.Parcel dest,
                          int flags)
Used for serializing Robot objects.

Specified by:
writeToParcel in interface android.os.Parcelable