public class GregorDriver extends GetterSetter implements TelescopeDriver, ParameterDepending, PointingProviding
| Modifier and Type | Class and Description |
|---|---|
private static class |
GregorDriver.KeyIn |
static class |
GregorDriver.Test
Test class, pops up a frame and asks for init.
|
| Modifier and Type | Field and Description |
|---|---|
private Value |
alttarget
Value stating elevation of target.
|
private Value |
aztarget
Value stating azimuth of target.
|
private static boolean |
DEFCONFIRMONTIMEOUT
Default property value.
|
private static String |
DEFDESTINATION
Default property value.
|
private static long |
DEFMOVETIME
Time for moving the telescope, maximum.
|
private static long |
DEFOFFSETTIME
Time for offsetting the telescop, maximum.
|
private static boolean |
DEFPRECESS
Default property value.
|
private static String |
DEFTARGETAZIMUTH
Default property value.
|
private static String |
DEFTARGETHEIGHT
Default property value.
|
private static long |
DEFTRACKTIME
Time for derotating the telescope.
|
static Object |
DONE |
static Object |
ERROR |
static String |
KEY_CONFIRMONTIMEOUT
If this is true, we confirm on time-out events in condfirm dialogs.
|
static String |
KEY_DESTINATION
The destination where commands should be sent to.
|
static String |
KEY_MOVETIME
Time for moving the telescope, maximum.
|
static String |
KEY_OFFSETTIME
Time for offsetting the telescop, maximum.
|
static String |
KEY_PRECESS
If true, we precess.
|
static String |
KEY_TARGETAZIMUTH
Name of the target height parameter.
|
static String |
KEY_TARGETHEIGHT
Name of the target height parameter.
|
static String |
KEY_TRACKTIME
Time for derotator action the telescope.
|
KEY_ACKTIMEOUT, KEY_GETTIMEOUT, KEY_STRICTGET, KEY_STRICTSETKEY_RECEIVERWAIT, KEY_SENDERWAITKEY_CLOSETIMEOUT, KEY_SOCKETPORT, KEY_SOCKETSERVER, KEY_SOCKETTIMEOUTKEY_DRIVERNAMEKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASS| Constructor and Description |
|---|
GregorDriver(Map<String,String> info)
Constructs a new greogor driver.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
authenticate()
Authenticates at the remote host.
|
boolean |
close()
On close, we dispose the message pane.
|
private boolean |
close(boolean inreal)
On close, we dispose the message pane.
|
boolean |
commenceAbort()
Aborts all active commands.
|
boolean |
commenceAbsoluteOffset(double azoff,
double altoff)
Applies an absolute offset to the telescope axis.
|
boolean |
commenceAbsoluteOffset(double azoff,
double altoff,
double h)
Applies an absolute offset to the telescope axis.
|
boolean |
commenceDerotator(double position)
Sets the derotator position in the system's coordinate system, which is
in degrees.
|
boolean |
commenceDerotatorOffset(double position)
Offsets the derotator position in the system's coordinate system, which
is in degrees.
|
boolean |
commenceFocus(double position)
Sets a new focus position.
|
boolean |
commenceFocusOffset(double position)
Sets a new focus offset.
|
boolean |
commenceGuiding(boolean start)
Starts or stops tracking of the telescope and waits until the new
tracking state is reached.
|
boolean |
commenceInit()
Initializes the telescope.
|
boolean |
commenceMove(double ra,
double de)
Moves the telescope to the given ra/dec position in J2000.0 equinox.
|
boolean |
commenceMove(double ra,
double de,
double off,
boolean fol)
Moves the telescope to the given ra/dec position in J2000.0 equinox.
|
boolean |
commenceMoveAzAlt(double az,
double alt)
Moves the telescope to the desired alt/az position.
|
boolean |
commencePark()
Parks the telescope.
|
boolean |
commenceRelativeOffset(double azoff,
double altoff)
Adds a current offset to both telescope axis.
|
boolean |
commenceRelativeOffset(double azoff,
double altoff,
double h)
Adds a current offset to both telescope axis.
|
boolean |
commenceTracking(boolean start)
Starts or stops tracking of the telescope, but does not block until the
telescope is in the new state.
|
protected boolean |
confirmDialog(CommandMessage cm,
int tsec)
We display a dialog asking for confirmation.
|
protected boolean |
displayDialog(String mess,
int tsec)
We display a dialog with a certain message.
|
private double |
getHorizontalHeight()
Returns the current height as returned by the telescope or throws an
error.
|
TelescopePosition |
getPosition()
For pointing model issues, Return the current pointing.
|
boolean |
open()
On open, we open a plain frame in which further dialogs are displayed.
|
private boolean |
open(boolean inreal)
If called with false, opening is not performed
|
void |
registerParameter(Parameter p)
A parameter depending command should drain the necessarry information
to get valid out of a parameter value.
|
createGet, createSet, executeGet, executeGet, executeSet, executeSet, init, initiate, messageReceived, removeCycle, toString, waitForCompleteputMessage, setMessageListener, startTransmission, stopTransmissionexit, getInputStream, getOutputStream, getSocket, isOpen, setTimeoutcreateDriver, equals, getDriverName, hashCodeaugment, augment, augment, augment, augment, clone, 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, initProperties, isNew, parseObject, parseObject, reload, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringPropertiesfinalize, getClass, notify, notifyAll, wait, wait, waitgetDriverName, isOpeninitpublic static final Object DONE
public static final Object ERROR
public static final String KEY_TARGETHEIGHT
public static final String KEY_TARGETAZIMUTH
public static final String KEY_CONFIRMONTIMEOUT
public static final String KEY_DESTINATION
public static final String KEY_MOVETIME
public static final String KEY_OFFSETTIME
public static final String KEY_TRACKTIME
public static final String KEY_PRECESS
private static final String DEFDESTINATION
private static final String DEFTARGETHEIGHT
private static final String DEFTARGETAZIMUTH
private static final boolean DEFCONFIRMONTIMEOUT
private static final long DEFMOVETIME
private static final long DEFOFFSETTIME
private static final long DEFTRACKTIME
private static final boolean DEFPRECESS
private Value aztarget
private Value alttarget
public void registerParameter(Parameter p)
ParameterDependingregisterParameter in interface ParameterDependingprotected boolean authenticate()
throws IOException
authenticate in class AbstractSocketDriverIOExceptionpublic boolean open()
throws IOException
open in interface Driveropen in class AbstractSocketDriverIOException - Exception to throw on connection errorprivate boolean open(boolean inreal)
throws IOException
IOExceptionpublic boolean close()
throws IOException
close in interface Driverclose in class CommunicationHandlerIOException - Exception to throw on disconnection errorprivate boolean close(boolean inreal)
throws IOException
IOExceptionprotected boolean displayDialog(String mess, int tsec) throws TimeoutException, IOException
TimeoutExceptionIOExceptionprotected boolean confirmDialog(CommandMessage cm, int tsec)
public boolean commenceInit()
throws IOException,
TimeoutException
commenceInit in interface TelescopeDriverIOExceptionTimeoutExceptionpublic boolean commencePark()
throws IOException,
TimeoutException
commencePark in interface TelescopeDriverIOExceptionTimeoutExceptionpublic boolean commenceAbort()
throws IOException,
TimeoutException
commenceAbort in interface TelescopeDriverIOExceptionTimeoutExceptionpublic boolean commenceDerotator(double position)
throws IOException
commenceDerotator in interface DerotatorAccessibleIOExceptionpublic boolean commenceDerotatorOffset(double position)
throws IOException
commenceDerotatorOffset in interface DerotatorAccessibleIOExceptionpublic boolean commenceFocus(double position)
throws IOException,
TimeoutException
UnsupportedOperationException if the telescope is not focusable.commenceFocus in interface FocusAccessibleposition - The new focus position.IOExceptionTimeoutExceptionpublic boolean commenceFocusOffset(double position)
throws IOException,
TimeoutException
UnsupportedOperationException if the telescope is not focusable.commenceFocusOffset in interface FocusAccessibleposition - The new focus offset, not cummulative.IOExceptionTimeoutExceptionpublic boolean commenceMove(double ra,
double de)
throws IOException,
TimeoutException
commenceMove in interface PointingAccessiblera - Right ascension in degrees.de - Declination in degrees.IOExceptionTimeoutExceptionpublic boolean commenceMove(double ra,
double de,
double off,
boolean fol)
throws IOException,
TimeoutException
commenceMove in interface PointingAccessiblera - Right ascension in degrees.de - Declination in degrees.off - The derotator offset in degressfol - If true, the derotator follows the tracking.IOExceptionTimeoutExceptionpublic boolean commenceMoveAzAlt(double az,
double alt)
throws IOException,
TimeoutException
commenceMoveAzAlt in interface PointingAccessibleaz - Astronomical azimuth of desired telescope position.alt - Height of target of desired telescope positionIOExceptionTimeoutExceptionpublic boolean commenceTracking(boolean start)
throws IOException,
TimeoutException
commenceTracking in interface PointingAccessiblestart - true for start, false for stopIOExceptionTimeoutExceptionpublic boolean commenceGuiding(boolean start)
throws IOException,
TimeoutException
commenceGuiding in interface OffsetAccessiblestart - true for start, false for stopIOExceptionTimeoutExceptionpublic boolean commenceAbsoluteOffset(double azoff,
double altoff,
double h)
throws IOException,
TimeoutException
commenceAbsoluteOffset in interface OffsetAccessibleazoff - Offset of azimuth axis in degrees.altoff - Offset in altitude axis in degrees.h - Height of telescope in degrees.IOExceptionTimeoutExceptionprivate double getHorizontalHeight()
throws IOException,
TimeoutException
IOExceptionTimeoutExceptionpublic boolean commenceAbsoluteOffset(double azoff,
double altoff)
throws IOException,
TimeoutException
commenceAbsoluteOffset in interface OffsetAccessibleazoff - Offset of azimuth axis in degrees.altoff - Offset in altitude axis in degrees.IOExceptionTimeoutExceptionpublic boolean commenceRelativeOffset(double azoff,
double altoff)
throws IOException,
TimeoutException
commenceRelativeOffset in interface OffsetAccessibleazoff - Offset of azimuth axis in degrees.altoff - Offset in altitude axis in degrees.IOExceptionTimeoutExceptionpublic boolean commenceRelativeOffset(double azoff,
double altoff,
double h)
throws IOException,
TimeoutException
commenceRelativeOffset in interface OffsetAccessibleazoff - Offset of azimuth axis in degrees.altoff - Offset in altitude axis in degrees.h - Height of telescope.IOExceptionTimeoutExceptionpublic TelescopePosition getPosition() throws IOException, TimeoutException
getPosition in interface PointingProvidingIOExceptionTimeoutException