|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
dlife.robot.Robot
dlife.robot.scribbler.Scribbler
public class Scribbler
Class for Communicating with the Scribbler robot with an IPRE Fluke.

| Field Summary | |
|---|---|
static int |
FLUKE_AT_FRONT
Constant representing an orientation in which the Fluke end of the Scribbler is interpreted as the front. |
static int |
FLUKE_AT_REAR
Constant representing an orientation in which the Fluke end of the Scribbler is interpreted as the rear. |
| Constructor Summary | |
|---|---|
Scribbler()
Construct a new Scribbler robot. |
|
Scribbler(String btAddr)
Construct a new Scribbler using a known bluetooth address. |
|
| Method Summary | |
|---|---|
protected int[] |
getBaseSensorData()
Get the data from the readAll command to the robot. |
(package private) myrojava.Scribbler |
getMyroScribbler()
Get the Scribbler object from the Myro Java package. |
int |
getOrientation()
Returns the current orientation of the Scribbler as either FLUKE_AT_REAR or FLUKE_AT_FRONT. |
String |
getRobotInfo()
Get information about the Scribbler and Fluke version numbers. |
protected void |
restartDeviceAutoReadTimers()
|
String |
sendMessage(String msg)
This is an unsupported operation for the Scribbler. |
void |
setOrientation(int orientation)
Set the orientation of the Scribbler. |
void |
shutDown()
Invoked to shut down the Scribbler. |
void |
shutDown(boolean playShutDownSequence)
Invoked to shut down the Scribbler. |
void |
startUp()
This method establishes a connection to the Scribbler robot, marks it as alive and then plays a startup sequence on the Scribbler's speaker and LEDs to indicate that it is ready to go. |
void |
startUp(boolean playStartupSequence)
This method establishes a connection to the Scribbler robot, marks it as alive and then if the parameter is true it plays a startup sequence on the Scribbler's speaker and LEDs to indicate that it is ready to go. |
protected void |
stopDeviceAutoReadTimers()
Stop the autoRead threads for all of the devices currently attached to the robot. |
| Methods inherited from class dlife.robot.Robot |
|---|
addDevice, freeze, getDevices, getRunTime, isAlive, removeDevice, setAlive |
| 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 |
|---|
public static final int FLUKE_AT_FRONT
public static final int FLUKE_AT_REAR
| Constructor Detail |
|---|
public Scribbler()
RobotCreationCanceledException - if the user cancels the creation
while being asked to pick the device to use for
communication.public Scribbler(String btAddr)
btAddr - the bluetooth address of the Scribbler.| Method Detail |
|---|
myrojava.Scribbler getMyroScribbler()
public void startUp(boolean playStartupSequence)
playStartupSequence - true to play startup sequence, false to
startup silently.
RobotCommunicationException - if unable to communicate with the
Scribbler.public void startUp()
startUp in class RobotRobotCommunicationException - if unable to communicate with the
Scribbler.public void shutDown(boolean playShutDownSequence)
playShutDownSequence - true to play the shutdown sequence, false to
shutdown silently.
RobotCommunicationException - if unable to communicate with the
Scribbler.public void shutDown()
shutDown in class RobotRobotCommunicationException - if unable to communicate with the
Scribbler.public String sendMessage(String msg)
sendMessage in class Robotmsg - the message to be sent to the robot.
public String getRobotInfo()
RobotCommunicationException - if the message cannot be sent or the
if the response is not recieved within the delay specified by
maxDelayMSB and maxDelayLSB.public void setOrientation(int orientation)
If the orientation is FLUKE_AT_FRONT then positive translation values will move the robot forward with the fluke leading the way. In this orientation the obstacle and light sensors are rear-facing.
If the orientation is FLUKE_AT_REAR then positive translation values will move the robot with the fluke bringing up the rear. In this orientation the obstacle and light sensors are rear-facing.
When this method is invoked, and the orientation is changed, the readStateFromRobot method of each device attached to the robot will be invoked. This provides each device with an immediate opportunity to adjust its sensor values to reflect the change in orientation.
orientation - one of the constants FLUKE_AT_REAR or FLUKE_AT_FRONT
indicating the orientation of the Scribbler.public int getOrientation()
protected int[] getBaseSensorData()
protected void stopDeviceAutoReadTimers()
protected void restartDeviceAutoReadTimers()
|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||