stella.adapter
Interface OffsetCaster

All Superinterfaces:
CommandLaunching, PropertySupplying, ReplyDeliverer
All Known Implementing Classes:
AdapterTelescopeCaster, GregorTelescopeCaster, PilarTelescopeCaster

public interface OffsetCaster
extends CommandLaunching

An interface that allows the adapter to communicate to a telescope and allows it to block on certain commands.


Field Summary
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Method Summary
 boolean castCommandAndWait(TelescopeCommand move, long timeout)
          Only used for manual acquire.
 boolean castOffsetAndWait(OffsetTelescope offset)
          Casts the offset command to the telescope and waits for notification on the appropriate done event.
 void castOffsetAtGuide(OffsetTelescope offset)
          Casts the offset command to the telescope during guiding phase.
 int getActiveOffsets()
          At guide, the guider task may want to know how many offsets are currently active to avoid overloading the telescope.
 
Methods inherited from interface stella.CommandLaunching
castCommand, getClientName, getExitCommand, getShutdownCommand, handles, isReady, recastCommand
 
Methods inherited from interface stella.ReplyDeliverer
announceInterest, registerReplySubscriber
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 

Method Detail

castOffsetAtGuide

void castOffsetAtGuide(OffsetTelescope offset)
Casts the offset command to the telescope during guiding phase. We immedeately return to the guiding loop.

Parameters:
offset - A OffsetTelescope command

castOffsetAndWait

boolean castOffsetAndWait(OffsetTelescope offset)
Casts the offset command to the telescope and waits for notification on the appropriate done event. This method only returns if the final done event to this OffsetTelescope command was received or a time-out has occured. The time-out depends on the offset: to the minimal time-out #KEY_MINTIMEOUT an offset-depending #KEY_DEGREETIMEOUT is added by multiplying the second number with the desired offset in degrees. Note that we have access to the telescope altitude via the enclosing class.
The method returns true, if the done-event was received on time.

Parameters:
offset - A OffsetTelescope command
Returns:
True, if command was sent successful and done was received.

getActiveOffsets

int getActiveOffsets()
At guide, the guider task may want to know how many offsets are currently active to avoid overloading the telescope.


castCommandAndWait

boolean castCommandAndWait(TelescopeCommand move,
                           long timeout)
Only used for manual acquire.