stella.error
Class ObjectInLimit

java.lang.Object
  extended by java.util.EventObject
      extended by util.rmi.RmiEvent
          extended by stella.MessageEvent
              extended by stella.ErrorEvent
                  extended by stella.error.ObjectInLimit
All Implemented Interfaces:
Serializable, PickConnected

public class ObjectInLimit
extends ErrorEvent
implements PickConnected

An error event sent by the telescope if a certain position cannot be reached. It is generated as an response to a move telescope command and leads to a target abort.
The reason for the out-of-limit errors is submitted back to the SCS in the reason field. This is a bit-field combining the following reasons:

See Also:
Serialized Form

Field Summary
static int AZIMUTH_MAX
          The bit-mask for azimuth-maximum violations.
static int AZIMUTH_MIN
          The bit-mask for azimuth-minimum violations.
static int DEROT_MAX
          The bit-mask for derotator-maximum violations.
static int DEROT_MIN
          The bit-mask for derotator-minimum violations.
private static String FOLLOWUP
          The follow-up (shutdown).
private static boolean PIPING
          The pipe flag (false).
private  int reason
          The reason for the out-of-limit error.
private static int SEVERENESS
          The severness level (fatal error).
static int ZENITH_MAX
          The bit-mask for zenith-distance-maximum violations.
static int ZENITH_MIN
          The bit-mask for zenith-distance-minimum violations.
 
Fields inherited from class stella.ErrorEvent
ABORT_EXPOSURE, ABORT_TARGET, ALARM_OFF, ALARM_ON, BAD_SEEING, BAD_WEATHER, CLEAR_TEL, CLOSE_COVER, CLOSE_ROOF, CLOSE_SHUTTER, CONT_TIME, ERROR_TOKEN, ERRORCOMBINE, ERRORPACKAGE, GOOD_WEATHER, HIGH_WIND, MAIL_HOME, MAIL_LOCAL, MOVE_HOME, MOVE_PARK, NONE, OPEN_COVER, OPEN_SHUTTER, PIPE, REACQUIRE, REPOSITION, RESEND_COMMAND, RESET_ADAPTER, RESET_CALIBRATION, RESET_CCD, RESET_ENV, RESET_ERRORS, RESET_SPEC, RESET_TEL, SHUT_DOWN, STATUS_TOKEN, STOP_TIME
 
Fields inherited from class stella.MessageEvent
SEPCHAR
 
Fields inherited from class util.rmi.RmiEvent
localHost, sourceName
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ObjectInLimit(Object src)
          Constructs a software error.
 
Method Summary
 String getHuman()
          Returns the human-readable part of the string.
 String[] getLine()
          Returns the command lines as an string array.
 int getReason()
          Returns the error-reasons as an integer.
 boolean parseLine(String[] all)
          Parses the error lines supplied.
 void setReason(int cause)
          Sets the reason.
 
Methods inherited from class stella.ErrorEvent
consume, createError, createError, createError, createError, createError, createStatus, createStatus, createStatus, extractClassName, extractFollowUp, extractPipe, getErrorClass, getFollowUp, getSevereness, isConsumed, isPipe, isStatus, parseClassName, parseHeader, setFollowUp, setHuman, setHuman, setPipe
 
Methods inherited from class stella.MessageEvent
checkType, equals, equalTime, equalTime, fromAscii, getAllCommandLines, getExecuteGroupKey, getHead, getNr, getTime, getType, hashCode, isValid, parseFromSingleString, readFromBufferedStream, setNr, setTime, setType, setValid, toString
 
Methods inherited from class util.rmi.RmiEvent
getHost, getSourceName, setSourceName
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

AZIMUTH_MIN

public static final int AZIMUTH_MIN
The bit-mask for azimuth-minimum violations.

See Also:
Constant Field Values

AZIMUTH_MAX

public static final int AZIMUTH_MAX
The bit-mask for azimuth-maximum violations.

See Also:
Constant Field Values

ZENITH_MIN

public static final int ZENITH_MIN
The bit-mask for zenith-distance-minimum violations.

See Also:
Constant Field Values

ZENITH_MAX

public static final int ZENITH_MAX
The bit-mask for zenith-distance-maximum violations.

See Also:
Constant Field Values

DEROT_MIN

public static final int DEROT_MIN
The bit-mask for derotator-minimum violations.

See Also:
Constant Field Values

DEROT_MAX

public static final int DEROT_MAX
The bit-mask for derotator-maximum violations.

See Also:
Constant Field Values

SEVERENESS

private static final int SEVERENESS
The severness level (fatal error).

See Also:
Constant Field Values

FOLLOWUP

private static final String FOLLOWUP
The follow-up (shutdown).

See Also:
Constant Field Values

PIPING

private static final boolean PIPING
The pipe flag (false).

See Also:
Constant Field Values

reason

private int reason
The reason for the out-of-limit error. A bitmask as received from TCS.

Constructor Detail

ObjectInLimit

public ObjectInLimit(Object src)
Constructs a software error. Uses the SEVERENESS level, has a FOLLOWUP as a recovery strategy an does not pipe.

Method Detail

parseLine

public boolean parseLine(String[] all)
Parses the error lines supplied. Here, the integer of the second comand line is used as the violation-indicator. The reason of the limit error shows as a combination of the various bit-field, see main entry.

Overrides:
parseLine in class ErrorEvent
Returns:
True, if parsing was successful.

getLine

public String[] getLine()
Returns the command lines as an string array. See also main class entry.

Overrides:
getLine in class ErrorEvent
Returns:
An array containing all command lines.

getHuman

public String getHuman()
Returns the human-readable part of the string. See also main class entry.

Overrides:
getHuman in class ErrorEvent
Returns:
A String holding a readable description of the error.

getReason

public int getReason()
Returns the error-reasons as an integer.


setReason

public void setReason(int cause)
Sets the reason.