public abstract class TelescopeSubsidiaryCaster extends TelescopeCaster
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 castOffsetAndWaitTelescopeCaster.TestPropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private List<ReplyEvent> |
offsets
For locking on a reply.
|
private ReplySubscriber |
reply
The reply subscriber used for blocking command-sends.
|
private Object |
wait
A locking object.
|
KEY_ACKNOWLEDGECASTER, KEY_ACKNOWLEDGETIMEOUT, KEY_ALARMGROUP, KEY_BIND, KEY_DONECASTERKEY_ALIVE, KEY_EXPORTPORT, KEY_INIT, KEY_LISTENERNAME, KEY_RETRY, KEY_RETRYSLEEP, KEY_SHUTDOWNDELAYKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORNAMING_EXTENSIONCONFIG, KEY_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Modifier | Constructor and Description |
|---|---|
protected |
TelescopeSubsidiaryCaster(Map<String,String> prop)
Constructs a new adapter-to-telescope caster.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
castCommandAndWait(TelescopeCommand tc)
Only used for manual acquire.
|
boolean |
castCommandAndWait(TelescopeCommand tc,
long timeout)
Only used for manual acquire.
|
void |
castCommandNoWait(TelescopeCommand tc)
Casts the offset command to the telescope during guiding phase.
|
void |
clearAll()
Clears all cummulated reply events we are waiting for, but which have
never been removed.
|
int |
getActiveCommands()
At guide, the guider task may want to know how many offsets are currently
active to avoid overloading the telescope.
|
CommandEvent |
getShutdownCommand()
Returns null, never needed.
|
abstract long |
getTimeoutFor(TelescopeCommand ce)
On some commands, we might be able to calculate a variable offset.
|
boolean |
handles(CommandEvent ce)
This caster handles only
OffsetTelescope move, focus and status
commands. |
void |
init()
Registers a new reply subscriber to this command sender.
|
getExitCommandaddRmiCommandListener, announceInterest, castCommand, deregisterAtCaster, exit, getAcknowledgeTimeOut, getAlarmGroup, getClientName, isReady, recastCommand, registerAtCaster, registerReplySubscriber, removeRmiCommandListener, rmiGotAcknowledge, rmiGotDone, setOff, toStringaddErrorListener, addRmiErrorListener, bindToRegistry, getBindName, isValid, notifyErrorListener, removeErrorListener, removeRmiErrorListener, sendError, sendError, sendError, sendStatus, sendStatus, sendStatus, unbindFromRegistryallBound, blockBinding, blockBinding, disconnect, getIP, getListenerName, isConnected, listenerName, releaseBinding, releaseBinding, rescanned, startBinding, startBindingcontainsRemoteProperty, getRemoteProperties, getRemoteProperty, setRemotePropertyclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, 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, parseObject, reload, removeProperty, requires, setObject, setProperties, setProperty, stringPropertiesequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetListenerNamedisconnect, isConnectedbindToRegistry, isValid, unbindFromRegistryaddErrorListener, removeErrorListenerdefaultBoolean, 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, stringPropertiesprivate ReplySubscriber reply
private List<ReplyEvent> offsets
private Object wait
protected TelescopeSubsidiaryCaster(Map<String,String> prop) throws RemoteException
init() method.RemoteExceptionpublic void init()
#sendBlocking method.init in interface Initializableinit in class CasterTorsopublic int getActiveCommands()
public void clearAll()
public abstract long getTimeoutFor(TelescopeCommand ce)
public void castCommandNoWait(TelescopeCommand tc)
tc - A OffsetTelescope commandpublic boolean castCommandAndWait(TelescopeCommand tc)
public boolean castCommandAndWait(TelescopeCommand tc, long timeout)
public CommandEvent getShutdownCommand()
getShutdownCommand in interface CommandLaunchinggetShutdownCommand in class TelescopeCasterpublic boolean handles(CommandEvent ce)
OffsetTelescope move, focus and status
commands. override if other behaviour needed.handles in interface CommandLaunchinghandles in class TelescopeCaster