stella.command
Class FitsCcd

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.FitsCcd
All Implemented Interfaces:
Serializable, CcdCommand, TargetDependingCommand

public class FitsCcd
extends CommandEvent
implements CcdCommand, TargetDependingCommand

Adds parameters which should be dumped to the fits header file. Each command line consists of a fits-key, the parameter name which value should be dumped to the fits file and a remark. If there are no command lines at all, all the fits header information should be reset to their default values. If only a key, without a parameter name is given, this key should be deleted from the header information.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class stella.CommandEvent
CommandEvent.Create
 
Field Summary
private  String[] keys
          The fits keys.
private  String[] parameters
          The fits parameters which contribute their values to the header.
private  String[] remarks
          A collection of remarks to add to the corresponding header entry.
 
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
FitsCcd(Object src)
          Constructs a abort adapter telescope, grabbing the type from the class name and setting the command time to the current system time.
FitsCcd(Object src, String type, long time)
          Constructs a new fits header command.
 
Method Summary
 String[] getKeys()
          Returns all keys in correct order.
 String[] getLine()
          Returns the command line of the move telescope command.
 String[] getParameters()
          Returns all parameter names in correct order.
 String[] getRemarks()
          Returns all remarks in correct order.
 boolean parseLine(String[] all)
          Parse the command line into ra and dec of the move command.
 void registerTargetProperties(Object fitshead)
          Calculates the command line from the properties registered.
 
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

keys

private String[] keys
The fits keys.


parameters

private String[] parameters
The fits parameters which contribute their values to the header.


remarks

private String[] remarks
A collection of remarks to add to the corresponding header entry.

Constructor Detail

FitsCcd

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


FitsCcd

public FitsCcd(Object src,
               String type,
               long time)
Constructs a new fits header command. Per default no parameters are set.

Method Detail

registerTargetProperties

public void registerTargetProperties(Object fitshead)
Calculates the command line from the properties registered. The map must be constructed in a way that the key points to a list of two strings. The first string denotes the parameter asociated with the key while the second one is a possible remark. Null strings are stored as-is.

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.

getKeys

public String[] getKeys()
Returns all keys in correct order.


getParameters

public String[] getParameters()
Returns all parameter names in correct order.


getRemarks

public String[] getRemarks()
Returns all remarks in correct order.