stella.util
Class TelescopeAuxiliaryCaster
java.lang.Object
util.PropertyContainer
util.PropertyResources
util.PropertyBundles
util.rmi.RmiPropertyContainer
util.rmi.AbstractRmiListener
stella.rmi.AbstractRmiCasterAndListener
stella.rmi.CasterTorso
stella.rmi.TelescopeCaster
stella.util.TelescopeAuxiliaryCaster
- All Implemented Interfaces:
- Cloneable, Remote, EventListener, Caster, CommandLaunching, ErrorSending, ErrorCaster, ReplyDeliverer, RmiAcknowledgeListener, RmiCommandCaster, RmiDoneListener, RmiErrorCaster, AlarmHandler, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying, RmiCaster, RmiEventListener, RmiListener, RmiPropertyBearing
- Direct Known Subclasses:
- GregorTelescopeCaster, PilarTelescopeCaster, WifsipTelescopeCaster
public abstract class TelescopeAuxiliaryCaster
- extends TelescopeCaster
A simple class that allows sending of telescope commands from a generic
master to
the telescope. The main extension to the CasterClient is the
ability to send a single command and wait until the final done is
received or a #KEY_MINTIMEOUT, #KEY_DEGREETIMEOUT
is surpassed. This is done by invoking castOffsetAndWait
| Methods inherited from class stella.rmi.CasterTorso |
addRmiCommandListener, announceInterest, castCommand, deregisterAtCaster, exit, getAcknowledgeTimeOut, getAlarmGroup, getClientName, isReady, recastCommand, registerAtCaster, registerReplySubscriber, removeRmiCommandListener, rmiGotAcknowledge, rmiGotDone, setOff, toString |
| Methods inherited from class stella.rmi.AbstractRmiCasterAndListener |
addErrorListener, addRmiErrorListener, bindToRegistry, getBindName, isValid, notifyErrorListener, removeErrorListener, removeRmiErrorListener, sendError, sendError, sendError, sendStatus, sendStatus, sendStatus, unbindFromRegistry |
| Methods inherited from class util.rmi.AbstractRmiListener |
allBound, blockBinding, blockBinding, disconnect, getIP, getListenerName, isConnected, listenerName, releaseBinding, releaseBinding, rescanned, startBinding, startBinding |
| Methods inherited from class util.PropertyResources |
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, setObject, setProperties, setProperty, stringProperties |
| 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 |
reply
private ReplySubscriber reply
- The reply subscriber used for blocking command-sends.
offsets
private List<ReplyEvent> offsets
- For locking on a reply.
wait
private Object wait
- A locking object.
TelescopeAuxiliaryCaster
protected TelescopeAuxiliaryCaster(Map<String,String> prop)
throws RemoteException
- Constructs a new adapter-to-telescope caster. A reply-subscriber
that is used for blocking command transfer is registered to the
caster client in the
init() method.
- Throws:
RemoteException
init
public void init()
- Registers a new reply subscriber to this command sender. This reply
subscriber is used to block the in the
#sendBlocking method.
- Specified by:
init in interface Initializable- Overrides:
init in class CasterTorso
getActiveCommands
public int getActiveCommands()
- At guide, the guider task may want to know how many offsets are
currently active to avoid overloading the telescope.
clearAll
public void clearAll()
- Clears all cummulated reply events we are waiting for, but which have
never been removed.
getTimeoutFor
public abstract long getTimeoutFor(TelescopeCommand ce)
- On some commands, we might be able to calculate a variable offset.
castCommandNoWait
public void castCommandNoWait(TelescopeCommand tc)
- Casts the offset command to the telescope during guiding phase. We
immedeately return to the guiding loop.
- Parameters:
offset - A OffsetTelescope command
castCommandAndWait
public boolean castCommandAndWait(TelescopeCommand tc)
- Only used for manual acquire.
castCommandAndWait
public boolean castCommandAndWait(TelescopeCommand tc,
long timeout)
- Only used for manual acquire.
getShutdownCommand
public CommandEvent getShutdownCommand()
- Returns null, never needed.
- Specified by:
getShutdownCommand in interface CommandLaunching- Overrides:
getShutdownCommand in class TelescopeCaster
handles
public boolean handles(CommandEvent ce)
- This caster handles only
OffsetTelescope move, focus and
status commands. override if other behaviour needed.
- Specified by:
handles in interface CommandLaunching- Overrides:
handles in class TelescopeCaster