stella.command
Class StartWatchMaster

java.lang.Object
  extended by java.util.EventObject
      extended by util.rmi.RmiEvent
          extended by stella.MessageEvent
              extended by stella.CommandEvent
                  extended by stella.command.StartWatchMaster
All Implemented Interfaces:
Serializable, TargetDependingCommand, ParameterDepending, ScsCommand

public class StartWatchMaster
extends CommandEvent
implements ScsCommand, TargetDependingCommand, ParameterDepending

The start-guiding command. It is an adpater command because the guiding camera is part of the adapter. This is a test version only. The final command may look different.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class stella.CommandEvent
CommandEvent.Create
 
Field Summary
private  long maxtime
          The desired maximal exposure time as a long in ms.
private static double TOMILLI
          The conversions from the time found in the xml-file to ms.
 
Fields inherited from class stella.CommandEvent
COMMANDPACKAGE, JVIEWPACKAGE, TYPESEPARATOR
 
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
StartWatchMaster(Object src)
          Constructs a abort adapter telescope, grabbing the type from the class name and setting the command time to the current system time.
StartWatchMaster(Object src, String type, long time)
          Constructs a move telescope command.
 
Method Summary
 String[] getLine()
          Returns the command line of the move telescope command.
 long getMaxTime()
          Returns the stopwatch time as a long in ms.
 boolean parseLine(String[] all)
          Parse the command line into ra and dec of the move command.
 void registerParameter(Parameter expose)
          Registers an external parameter giving the maximum exposure time.
 void registerTargetProperties(Object setup)
          Calculates the command line from the star description delivered in the DTDConstants.SETUP DOM-element.
 
Methods inherited from class stella.CommandEvent
classNameToTemplate, createCommand, createCommand, createJCommand, extractType, getExpectedAcknowledgeNumber, parseForStrings, templateToClassName
 
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

TOMILLI

private static final double TOMILLI
The conversions from the time found in the xml-file to ms.

See Also:
Constant Field Values

maxtime

private long maxtime
The desired maximal exposure time as a long in ms.

Constructor Detail

StartWatchMaster

public StartWatchMaster(Object src)
Constructs a abort adapter telescope, grabbing the type from the class name and setting the command time to the current system time.


StartWatchMaster

public StartWatchMaster(Object src,
                        String type,
                        long time)
Constructs a move telescope command. Only the header is fully qualified with the provided argumnets. The command line can only be retrieved after a DTDConstants.SETUP element has been registered to this command.

See Also:
MessageEvent.isValid()
Method Detail

registerParameter

public void registerParameter(Parameter expose)
Registers an external parameter giving the maximum exposure time.

Specified by:
registerParameter in interface ParameterDepending

registerTargetProperties

public void registerTargetProperties(Object setup)
Calculates the command line from the star description delivered in the DTDConstants.SETUP DOM-element. It uses the ReservedConstants.EXPOSURETIME key within the properties to derive the principal exposure time for the object.

Specified by:
registerTargetProperties in interface TargetDependingCommand

getLine

public String[] getLine()
Returns the command line of the move telescope command.

Specified by:
getLine in class MessageEvent
Returns:
An array containing all command lines.

parseLine

public boolean parseLine(String[] all)
Parse the command line into ra and dec of the move command.

Specified by:
parseLine in class MessageEvent
Returns:
True, if parsing was successful.

getMaxTime

public long getMaxTime()
Returns the stopwatch time as a long in ms.