stella.command
Class RandomOffsetTelescope

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.OffsetTelescope
                      extended by stella.command.EncoderOffsetTelescope
                          extended by stella.command.InitialOffsetTelescope
                              extended by stella.command.RandomOffsetTelescope
All Implemented Interfaces:
Serializable, InitializerDepending, RelativeOffset, ParameterDepending, TelescopeCommand

public class RandomOffsetTelescope
extends InitialOffsetTelescope

The command used during random search. The specified offsets are the maximum possible, the true is a random selection between -/+ the maximum.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class stella.CommandEvent
CommandEvent.Create
 
Field Summary
 
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
RandomOffsetTelescope(Object src)
          Constructs a abort adapter telescope, grabbing the type from the class name and setting the command time to the current system time.
RandomOffsetTelescope(Object src, String id, long time)
          Constructs a new offset telescope command.
 
Method Summary
 void initWith(String focus)
          If initialized with a parsable double, this gets the focus offset.
 void setOffset(double az0, double alt0, double azmax, double altmax)
          Randomizes the offset between +/- the stated values.
 
Methods inherited from class stella.command.InitialOffsetTelescope
registerParameter
 
Methods inherited from class stella.command.EncoderOffsetTelescope
getAzimuth, getHeight, getLine, parseLine, setAzimuth, setHeight
 
Methods inherited from class stella.command.OffsetTelescope
getOffsetAltitude, getOffsetAzimuth, setOffset
 
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
 

Constructor Detail

RandomOffsetTelescope

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


RandomOffsetTelescope

public RandomOffsetTelescope(Object src,
                             String id,
                             long time)
Constructs a new offset telescope command. The command only gets valid when either its EncoderOffsetTelescope.parseLine(java.lang.String[]) or the setOffset(double, double, double, double) method are called.
To mark both offsets invalid, NaN is assigned to them.

Method Detail

initWith

public void initWith(String focus)
If initialized with a parsable double, this gets the focus offset.

Specified by:
initWith in interface InitializerDepending
Overrides:
initWith in class InitialOffsetTelescope

setOffset

public void setOffset(double az0,
                      double alt0,
                      double azmax,
                      double altmax)
Randomizes the offset between +/- the stated values.