Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## PER.rover
Class ActionConstants

    java.lang.Object
      PER.rover.control.RoverState
          PER.rover.ActionConstants

public class ActionConstants
extends RoverState

Allows the constants representing rover status to be translated into more descriptive strings. Also contains some of the constants used as Action return values and allows errors to be logged in the StatsLog.

See Also:
  `Action.getReturnValue()`, `RoverState`

Field Summary
`static int` | `NO_MOTION_DETECTED` Did not detect any motion
`static int` | `NO_ROCK` Can't find a rock that should be there
`static int` | `SMTP_FAILED` Couldn't talk to the SMTP server
`static int` | `UNKNOWN_ERROR` I don't know what happened
`static int` | `WRONG_STAYTON_VERSION` The version of code running on the Stayton is out of date

Fields inherited from class PER.rover.control.RoverState
`BAD_INPUT, BATTERY_LOW, CAMERA_TIMEOUT, CEREB_DRIVETO, CEREB_IDLE, CEREB_SCAN, CEREB_STARTING, CEREB_TIMEOUT, CEREB_TURNTO, cerebThreadState, COMM_DEAD, FULL_PACKET_LENGTH, HIT_WALL, HL_CONTINUE, INVALID_PACKET_LENGTH, KILLED, LEGS_LOCK, locks, NOT_CONNECTED, OBSTACLE_DETECTED, PAN_LOCK, RESOURCE_CONFLICT, STAYTON_INVALID_LENGTH, STAYTON_IO_ERROR, STAYTON_UNKNOWN_TYPE, SUCCESS, TILT_LOCK, UNKNOWN_PACKET_TYPE, WEBCAM_CYCLE_PIC, WEBCAM_CYCLY_NOPIC, WEBCAM_GRAB, WEBCAM_IDLE, WEBCAM_MEAN, WEBCAM_MOTION, WEBCAM_PIC, WEBCAM_PROPERTIES, WEBCAM_STOP, WEBCAM_TRACK, webCamThreadState`

Constructor Summary
`ActionConstants()`

Method Summary
`static java.lang.String` | `getErrorText(int err)` Gives a description of an error code.
`static boolean` | `isFatalError(int error)` Returns true if the error is fatal to rover operations, false if it is not.
`static void` | `logErrorStats(int err)` Notes the error in the StatsLog.

Methods inherited from class PER.rover.control.RoverState
`getDist, getPan, getPosition, getRange, getRangeCM, getRawVoltage, getRealVoltage, getStatus, getStatusMessage, getTilt, isTerminationCondition, parsePacket, setCrabAngle, setPan, setPosition, setSign, setStatus, setTilt`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### WRONG_STAYTON_VERSION

    public static final int WRONG_STAYTON_VERSION

  The version of code running on the Stayton is out of date

  See Also:
    Constant Field Values

### SMTP_FAILED

    public static final int SMTP_FAILED

  Couldn't talk to the SMTP server

  See Also:
    Constant Field Values

### UNKNOWN_ERROR

    public static final int UNKNOWN_ERROR

  I don't know what happened

  See Also:
    Constant Field Values

### NO_ROCK

    public static final int NO_ROCK

  Can't find a rock that should be there

  See Also:
    Constant Field Values

### NO_MOTION_DETECTED

    public static final int NO_MOTION_DETECTED

  Did not detect any motion

  See Also:
    Constant Field Values

Constructor Detail

### ActionConstants

    public ActionConstants()

Method Detail

### getErrorText

    public static java.lang.String getErrorText(int err)

  Gives a description of an error code.

  Parameters:
    `err` - The error code
  Returns:
    A message describing the error.

### logErrorStats

    public static void logErrorStats(int err)

  Notes the error in the StatsLog.

  See Also:
    `StatsLog`

### isFatalError

    public static boolean isFatalError(int error)

  Returns true if the error is fatal to rover operations, false if it is not. Currently only SMTP_FAILED is a non-fatal error.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD