|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.rmi.RmiPropertyContainer
util.rmi.AbstractRmiCaster
stella.CastingContainer
stella.AbstractCommandLauncher
stella.net.CasterClient
stella.adapter.AdapterTelescopeCaster
public class AdapterTelescopeCaster
A simple class that allows sending of offset-commands from the adapter
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
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class stella.net.CasterClient |
|---|
CasterClient.CommandSender |
| Nested classes/interfaces inherited from class util.PropertyContainer |
|---|
PropertyContainer.URLResource |
| Field Summary | |
|---|---|
private static long |
DEFDEGREETIMEOUT
The default time-out for the OffsetTelescope command. |
private static long |
DEFMINTIMEOUT
The default time-out for the OffsetTelescope command. |
private List |
guideoffsets
A list of offset commands sent during guiding where we don't wait. |
static String |
KEY_DEGREETIMEOUT
The time-out added per degree shift. |
static String |
KEY_MINTIMEOUT
The minimum time-out for non-successful command submission. |
private ReplySubscriber |
reply
The reply subscriber used for blocking command-sends. |
private Object |
wait
A locking object. |
| Fields inherited from class stella.net.CasterClient |
|---|
KEY_ACKNOWLEDGETIMEOUT, KEY_ALARMGROUP, KEY_BIND, KEY_BUFFERSIZE, KEY_CASTERNAME, KEY_MAXWAITONCLOSE, KEY_PORT, KEY_RECEIVER, KEY_RETRYCOUNT, KEY_RETRYSLEEP |
| Fields inherited from class util.rmi.AbstractRmiCaster |
|---|
ALTERNATEHOST, ALTERNATEPORT, KEY_BINDNAME, KEY_EXPORTPORT, KEY_REGISTRYHOST, KEY_REGISTRYPORT |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES |
| Fields inherited from interface util.PropertyBearing |
|---|
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface stella.rmi.RmiCommandCaster |
|---|
NAMING_EXTENSION |
| Fields inherited from interface stella.rmi.RmiAcknowledgeCaster |
|---|
NAMING_EXTENSION |
| Fields inherited from interface stella.rmi.RmiDoneCaster |
|---|
NAMING_EXTENSION |
| Constructor Summary | |
|---|---|
AdapterTelescopeCaster(Map prop)
Constructs a new adapter-to-telescope caster. |
|
| Method Summary | |
|---|---|
boolean |
castCommandAndWait(TelescopeCommand tc,
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. |
CommandEvent |
getShutdownCommand()
Needed to be non-abstract. |
boolean |
handles(CommandEvent ce)
This caster handles only OffsetTelescope commands. |
void |
init()
Registers a new reply subscriber to this command sender. |
| Methods inherited from class stella.AbstractCommandLauncher |
|---|
createCommandLauncher |
| Methods inherited from class stella.CastingContainer |
|---|
addErrorListener, addRmiErrorListener, isValid, notifyErrorListener, removeErrorListener, removeRmiErrorListener, sendError, sendError, sendError, sendStatus, sendStatus, sendStatus |
| Methods inherited from class util.rmi.AbstractRmiCaster |
|---|
bindAlternate, bindToRegistry, bindToRegistry, bindToRegistry, casterExit, casterExit, getBindName, getBindName, unbindFromRegistry, unbindFromRegistry |
| Methods inherited from class util.rmi.RmiPropertyContainer |
|---|
containsRemoteProperty, getRemoteProperties, getRemoteProperty, setRemoteProperty |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface stella.CommandLaunching |
|---|
castCommand, getClientName, getExitCommand, isReady, recastCommand |
| Methods inherited from interface stella.ReplyDeliverer |
|---|
announceInterest, registerReplySubscriber |
| Methods inherited from interface util.PropertyBearing |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getLocalized, getProperties, getProperty, getResource, getResourceAsStream, getResources, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Methods inherited from interface stella.rmi.RmiErrorCaster |
|---|
addRmiErrorListener, removeRmiErrorListener |
| Methods inherited from interface util.rmi.RmiCaster |
|---|
bindToRegistry, isValid, unbindFromRegistry |
| Methods inherited from interface stella.ErrorCaster |
|---|
addErrorListener, removeErrorListener |
| Field Detail |
|---|
public static final String KEY_MINTIMEOUT
public static final String KEY_DEGREETIMEOUT
private static final long DEFMINTIMEOUT
OffsetTelescope command.
private static final long DEFDEGREETIMEOUT
OffsetTelescope command.
private ReplySubscriber reply
private Object wait
private List guideoffsets
| Constructor Detail |
|---|
public AdapterTelescopeCaster(Map prop)
throws RemoteException
init() method.
RemoteException| Method Detail |
|---|
public void init()
#sendBlocking method.
init in interface Initializableinit in class CasterClientCasterClient.KEY_RETRYCOUNT,
CasterClient.KEY_RETRYSLEEPpublic void castOffsetAtGuide(OffsetTelescope offset)
castOffsetAtGuide in interface OffsetCasteroffset - A OffsetTelescope commandpublic int getActiveOffsets()
getActiveOffsets in interface OffsetCasterpublic boolean castOffsetAndWait(OffsetTelescope offset)
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.
castOffsetAndWait in interface OffsetCasteroffset - A OffsetTelescope command
public boolean castCommandAndWait(TelescopeCommand tc,
long timeout)
castCommandAndWait in interface OffsetCasterpublic CommandEvent getShutdownCommand()
getShutdownCommand in interface CommandLaunchingpublic boolean handles(CommandEvent ce)
OffsetTelescope commands.
handles in interface CommandLaunchinghandles in class CasterClient
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||