stella.command
Class StartGuidingAdapter

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.StartGuidingAdapter
All Implemented Interfaces:
Serializable, AdapterCommand, InitializerDepending, TargetDependingCommand

public class StartGuidingAdapter
extends CommandEvent
implements AdapterCommand, TargetDependingCommand, InitializerDepending

The start-guiding command. It is an adpater command because the guiding camera is part of the adapter. The command is always valid, but the transported guiding mode may change with an initializer or a ParsedTarget#Setup.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class stella.CommandEvent
CommandEvent.Create
 
Field Summary
private  String mode
          The guiding mode requested.
 
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
StartGuidingAdapter(Object src)
          Constructs a abort adapter telescope, grabbing the type from the class name and setting the command time to the current system time.
StartGuidingAdapter(Object src, String type, long time)
          Constructs a start guiding command.
 
Method Summary
 String getGuidingMode()
          Returns the mode of the guiding.
 String[] getLine()
          Returns the command line of the start guiding command.
 void initWith(String init)
          If a guiding mode is set from the outside.
 boolean parseLine(String[] all)
          The command line is the guiding mode.
 void registerTargetProperties(Object setup)
          Calculates the command line from the constant section delivered in the argument.
 
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

mode

private String mode
The guiding mode requested.

Constructor Detail

StartGuidingAdapter

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


StartGuidingAdapter

public StartGuidingAdapter(Object src,
                           String type,
                           long time)
Constructs a start guiding 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

initWith

public void initWith(String init)
If a guiding mode is set from the outside.

Specified by:
initWith in interface InitializerDepending

registerTargetProperties

public void registerTargetProperties(Object setup)
Calculates the command line from the constant section delivered in the argument.

Specified by:
registerTargetProperties in interface TargetDependingCommand

getLine

public String[] getLine()
Returns the command line of the start guiding command.

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

parseLine

public boolean parseLine(String[] all)
The command line is the guiding mode.

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

getGuidingMode

public String getGuidingMode()
Returns the mode of the guiding. Defaults to GuidingUnit.MODE_AUTO.