public class BaaderDome extends AbstractDriver implements DomeDriver, Initializable
| Modifier and Type | Class and Description |
|---|---|
private class |
BaaderDome.ApertureThread |
private class |
BaaderDome.AzimuthRead
This thread permanently tries to read the azimuth.
|
static class |
BaaderDome.Close
Simple test class that connects to the dome server and closes the
dome, additionally cranking out the azimuth.
|
private class |
BaaderDome.CloseHatch
A thread that turns on the hatch motor for opening and turns it
off automatically after a specified wait time.
|
private class |
BaaderDome.CloseSlit
A thread that turns on the hatch motor for opening and turns it
off automatically after a specified wait time.
|
static class |
BaaderDome.Control
Command line interface to the dome server.
|
static class |
BaaderDome.Open
Simple test class that connects to the dome server and opens the
dome, additionally cranking out the azimuth.
|
private class |
BaaderDome.OpenHatch
A thread that turns on the hatch motor for opening and turns it
off automatically after a specified wait time.
|
private class |
BaaderDome.OpenSlit
A thread that turns on the hatch motor for opening and turns it
off automatically after a specified wait time.
|
static class |
BaaderDome.Test
Simple test class that connects to the dome server and rotates the
dome, additionally cranking out the azimuth.
|
| Modifier and Type | Field and Description |
|---|---|
private Double |
cache
We have to cache valid azimuth reading due to faulty hardware.
|
private static double |
DEFAZIMUTHLINEAR
Measured linear term, ticks per degree.
|
private static double |
DEFAZIMUTHOFFSET
Offset, crude estimate, N=jump.
|
private static long |
DEFAZIMUTHSLEEP
Default property value.
|
static String |
DEFDRIVERNAME
Default name of the dome in Potsdam.
|
private static long |
DEFHATCHCLOSE
Default property value.
|
private static long |
DEFHATCHOPEN
Default property value.
|
private static long |
DEFHATCHSURE
Default property value.
|
private static long |
DEFJOINFULL
Default property value.
|
private static int |
DEFMAXVALID
Minimum valid reading on dome.
|
private static int |
DEFMINVALID
Minimum valid reading on dome.
|
private static long |
DEFPOWERDELAY
Default property value.
|
private static long |
DEFREADTIMEOUT
Default property value.
|
private static int |
DEFRPCTIMEOUT
Default property value.
|
private static String |
DEFSERVERNAME
Default property value.
|
private static long |
DEFSLITFULL
Default property value.
|
private static long |
DEFSLITSURE
Default property value.
|
private static double |
DEFSLOWSPEED
Measured slow speed.
|
private static boolean |
DEFUPDATE
Default property value.
|
private BaaderDome.ApertureThread |
hatch
Opening or closing of the hatch.
|
private static Object |
HATCH
A lock for hatch operation.
|
private Trigger |
hatchopen
The trigger that is true, if the hatch is open.
|
private Trigger |
hatchshut
The trigger that is true, if the hatch is shut.
|
static int |
INTERRUPT |
static int |
IOEX |
static String |
KEY_AZIMUTHLINEAR
The conversion factor from position encoder to azimuth, linear term.
|
static String |
KEY_AZIMUTHOFFSET
The conversion factor from position encoder to azimuth, offset.
|
static String |
KEY_AZIMUTHSLEEP
Timeout between azimuth reads, ms.
|
static String |
KEY_HATCHCLOSE
Time to ensure that the hatch has moved its entire way.
|
static String |
KEY_HATCHOPEN
Time to ensure that the hatch has moved its entire way.
|
static String |
KEY_HATCHSURE
Time to ensure that the hatch is closed, smaller than full time.
|
static String |
KEY_JOINFULL
Time to ensure that joins are good
|
static String |
KEY_MAXVALID
The raw-azimuth maximum value that is valid.
|
static String |
KEY_MINVALID
The raw-azimuth minimum value that is valid.
|
static String |
KEY_POWERDELAY
Time delay on electrical switching to avoid overload.
|
static String |
KEY_READTIMEOUT
Timeout to get a valid azimuth reading on moving dome.
|
static String |
KEY_RPCTIMEOUT
The RPC time-out in millisecond.
|
static String |
KEY_SERVERNAME
FCDN of the host where the guider rpc server is running.
|
static String |
KEY_SLITFULL
Time to ensure that the slit has moved its entire way.
|
static String |
KEY_SLITSURE
Time to ensure that the slit has opened, smaller than full time.
|
static String |
KEY_SLOWSPEED
The speed in azimuth at slow, degrees per second.
|
static String |
KEY_UPDATE
If true, start the updarte thread on client connect.
|
static int |
OK
return value for OK .
|
private DomeClient |
robotel
The RPC client talking to the module-pc at the dome.
|
static int |
RPCEX |
private BaaderDome.ApertureThread |
slit
Opening or closing of the slit.
|
private static Object |
SLIT
A lock for slit operation.
|
private Trigger |
slitopen
The trigger that is true, if the slit is open.
|
private Trigger |
slitshut
The trigger that is true, if the slit is shut.
|
private Thread |
update
This thread updates the azimuth reading continuosly.
|
KEY_DRIVERNAMEKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASS| Constructor and Description |
|---|
BaaderDome(Map<String,String> prop)
Constructs a new BaaderDome driver, but does not connect to hardware.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
close()
Close the RPC communication.
|
boolean |
closeDome()
Closes the dome.
|
boolean |
closeHatch()
Closes the hatch.
|
boolean |
closeSlit()
Closes the slit.
|
boolean |
fastBackward()
Starts fast backward in azimuth.
|
boolean |
fastForward()
Starts fast forward in azimuth.
|
double |
getAzimuth()
Returns the azimuth position of the dome in degrees.
|
void |
init()
On itit, the triggers are constructed and set to dome closed.
|
boolean |
isDomeClosed()
Returns true, if dome is closed.
|
boolean |
isDomeOpened()
Returns true, if dome is open.
|
boolean |
isOpen()
We are open if we have a client.
|
boolean |
open()
Opens the RPC client to the module-PC operating the dome.
|
boolean |
openDome()
Opens the dome.
|
boolean |
openHatch()
Opens the hatch.
|
boolean |
openSlit()
Opens the slit.
|
boolean |
slowBackward()
Starts slow backward in azimuth.
|
boolean |
slowForward()
Starts slow forward in azimuth.
|
private boolean |
startUpdate()
This method starts the update thread.
|
boolean |
stopAzimuth()
Stops the azimuth motor.
|
boolean |
stopDomeOpeningMotors()
Stops either opening or closing of the dome.
|
createDriver, 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, stringProperties, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitgetDriverNamepublic static final int OK
public static final int IOEX
public static final int RPCEX
public static final int INTERRUPT
public static final String KEY_SERVERNAME
public static final String KEY_RPCTIMEOUT
public static final String KEY_AZIMUTHLINEAR
public static final String KEY_AZIMUTHOFFSET
public static final String KEY_SLOWSPEED
public static final String KEY_UPDATE
public static final String KEY_MINVALID
public static final String KEY_MAXVALID
public static final String KEY_READTIMEOUT
public static final String KEY_AZIMUTHSLEEP
public static final String KEY_HATCHSURE
public static final String KEY_HATCHOPEN
public static final String KEY_HATCHCLOSE
public static final String KEY_SLITSURE
public static final String KEY_SLITFULL
public static final String KEY_JOINFULL
public static final String KEY_POWERDELAY
private static final Object HATCH
private static final Object SLIT
public static final String DEFDRIVERNAME
private static final String DEFSERVERNAME
private static final int DEFRPCTIMEOUT
private static final boolean DEFUPDATE
private static final double DEFSLOWSPEED
private static final int DEFMINVALID
private static final int DEFMAXVALID
private static final double DEFAZIMUTHLINEAR
private static final double DEFAZIMUTHOFFSET
private static final long DEFAZIMUTHSLEEP
private static final long DEFREADTIMEOUT
private static final long DEFHATCHSURE
private static final long DEFHATCHCLOSE
private static final long DEFHATCHOPEN
private static final long DEFSLITSURE
private static final long DEFSLITFULL
private static final long DEFJOINFULL
private static final long DEFPOWERDELAY
private DomeClient robotel
private BaaderDome.ApertureThread hatch
private BaaderDome.ApertureThread slit
private Trigger hatchopen
private Trigger hatchshut
private Trigger slitopen
private Trigger slitshut
private Double cache
private Thread update
public void init()
throws InitException
init in interface InitializableInitExceptionpublic boolean open()
throws IOException
#KEY_HATCHSWITCHES and #KEY_SLITSWITCHES to true,
initializes the internal triggers with true readings.open in interface DriverIOExceptionprivate boolean startUpdate()
throws IOException
IOExceptionpublic boolean isOpen()
public boolean close()
throws IOException
close in interface DriverIOExceptionpublic boolean stopAzimuth()
throws IOException
stopAzimuth in interface DomeDriverIOExceptionpublic boolean fastForward()
throws IOException
fastForward in interface DomeDriverIOExceptionpublic boolean fastBackward()
throws IOException
fastBackward in interface DomeDriverIOExceptionpublic boolean slowForward()
throws IOException
slowForward in interface DomeDriverIOExceptionpublic boolean slowBackward()
throws IOException
slowBackward in interface DomeDriverIOExceptionpublic boolean stopDomeOpeningMotors()
throws IOException
DomeDriverstopDomeOpeningMotors in interface DomeDriverIOExceptionpublic boolean openSlit()
throws IOException
openSlit in interface DomeDriverIOExceptionpublic boolean openHatch()
throws IOException
openHatch in interface DomeDriverIOExceptionpublic boolean openDome()
throws IOException
openDome in interface DomeDriverIOExceptionpublic boolean closeDome()
throws IOException
closeDome in interface DomeDriverIOExceptionpublic boolean closeHatch()
throws IOException
closeHatch in interface DomeDriverIOExceptionpublic boolean closeSlit()
throws IOException
closeSlit in interface DomeDriverIOExceptionpublic boolean isDomeOpened()
isDomeOpened in interface DomeDriverpublic boolean isDomeClosed()
isDomeClosed in interface DomeDriverpublic double getAzimuth()
throws IOException
The hardware installed at robotel is not very reliable, at an error rate of 50%. The unability to read is strongly position depending, i.e. if the dome is stopped at a position, where reading fails, repeating the reading will not help. Thus, we start a parallel thread on opening that contiuously caches valid readings. The most actual reading is returned by this method, without any access to the hardware.
getAzimuth in interface DomeDriverIOException