|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
io.AbstractDriver
stella.roof.BaaderDome
public class BaaderDome
Dome driver implementation for the Baader dome in Potsdam, sheltering Robotel.
| Nested Class Summary | |
|---|---|
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.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. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
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 |
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 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 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_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. |
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. |
| Fields inherited from class io.AbstractDriver |
|---|
KEY_DRIVERNAME |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Constructor Summary | |
|---|---|
BaaderDome(Map<String,String> prop)
Constructs a new BaaderDome driver, but does not connect to hardware. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class io.AbstractDriver |
|---|
createDriver, equals, getDriverName, hashCode |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| 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, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface io.Driver |
|---|
getDriverName |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| 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 |
| Field Detail |
|---|
public static final int OK
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
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 DomeClient robotel
private Trigger hatchopen
private Trigger hatchshut
private Trigger slitopen
private Trigger slitshut
private Double cache
private Thread update
| Constructor Detail |
|---|
public BaaderDome(Map<String,String> prop)
open() section.
| Method Detail |
|---|
public void init()
init in interface Initializableinit in class PropertyResources
public boolean open()
throws IOException
#KEY_HATCHSWITCHES and #KEY_SLITSWITCHES to true,
initializes the internal triggers with true readings.
open in interface DriverIOException
private boolean startUpdate()
throws IOException
IOExceptionpublic boolean isOpen()
isOpen in interface Driver
public boolean close()
throws IOException
close in interface DriverIOException
public boolean stopAzimuth()
throws IOException
stopAzimuth in interface DomeDriverIOException
public boolean fastForward()
throws IOException
fastForward in interface DomeDriverIOException
public boolean fastBackward()
throws IOException
fastBackward in interface DomeDriverIOException
public boolean slowForward()
throws IOException
slowForward in interface DomeDriverIOException
public boolean slowBackward()
throws IOException
slowBackward in interface DomeDriverIOException
public boolean openSlit()
throws IOException
openSlit in interface DomeDriverIOException
public boolean openHatch()
throws IOException
openHatch in interface DomeDriverIOException
public boolean openDome()
throws IOException
openDome in interface DomeDriverIOException
public boolean closeDome()
throws IOException
closeDome in interface DomeDriverIOException
public boolean closeHatch()
throws IOException
closeHatch in interface DomeDriverIOException
public boolean closeSlit()
throws IOException
closeSlit in interface DomeDriverIOExceptionpublic boolean isDomeOpened()
isDomeOpened in interface DomeDriverpublic boolean isDomeClosed()
isDomeClosed in interface DomeDriver
public 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||