|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
util.rmi.RmiPropertyContainer
util.rmi.AbstractRmiListener
stella.rmi.AbstractRmiCasterAndListener
stella.rmi.ReceiverTorso
stella.rmi.GenericMaster
stella.calibration.CalibrationMaster
public class CalibrationMaster
This class is an intermediate step to a adapter that is capable only
of steering the calibrational units. Guiding is only possible with the
daughter class AdapterMaster. This class handles the following
commands:
ThArOnCalibration: Turns the calibration light, i.e. ThAr on.
If a movement of the calibration unit is required, this is also
done. The input source is NOT changed, normally this requires a
different filter position.ThArOffCalibration: Turns the calibration light off. The
calibration unit is only moved if the KEY_RETRACEUNIT points to
true.FlatFieldOnCalibration: Turns the flat-field light,
i.e. Halogen on.
If a movement of the calibration unit is required, this is also
done. The input source is NOT changed, normally this requires a
different filter position.FlatFieldOffCalibration: Turns the flat-field light off. The
calibration unit is only moved if the KEY_RETRACEUNIT points to
true.SelectFilterCalibration: Takes a verbal description like 'V' as
an argument. A lookup table is provided with KEY_WHEELPOSITIONS
that translate filter names to integer postions of the filter wheel(s).GenericMaster.KEY_DRIVERS list, though for switching of the lamps we
relie on OneWireSwitchs and not interfere with the switch driver
itself.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class stella.rmi.GenericMaster |
|---|
GenericMaster.Standalone |
| Nested classes/interfaces inherited from class stella.rmi.ReceiverTorso |
|---|
ReceiverTorso.CommandHandler |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private static long |
DEFALIGHTQUARTZ
The default time the quartz may be turned on. |
private static long |
DEFALIGHTTHAR
The default time the ThAr may be turned on. |
private static String |
DEFCALIBRATION
The name of the calibration unit driver for postioning lamps. |
private static long |
DEFCALIBRATIONOFFTIME
The default time to turn off calibration. |
private static long |
DEFCALIBRATIONONTIME
The default time to turn on calibration. |
private static String |
DEFFILTERCLEAR
The default name of the filter wheel position for star into fiber. |
private static String |
DEFFILTERQUARTZ
The default name of the filter wheel position for Quartz into fiber. |
private static String |
DEFFILTERTHAR
The default name of the filter wheel position for ThAr into fiber. |
private static String |
DEFFILTERWHEEL
The name of the filter wheel driver. |
private static long |
DEFFLATFIELDOFFTIME
The default time to turn off flat-fielding. |
private static long |
DEFFLATFIELDONTIME
The default time to turn on flat-fielding. |
private static long |
DEFMOVETIME
The default time to change the filter. |
private static String |
DEFPOSITIONHOME
The position name in the calibration unit for home position. |
private static String |
DEFPOSITIONQUARTZ
The position name in the calibration unit for choosing ThAr. |
private static String |
DEFPOSITIONTHAR
The position name in the calibration unit for choosing ThAr. |
private static boolean |
DEFRETRACEUNIT
If true, calibration unit is placed to POSITIONHOME after lamp off. |
private static long |
DEFSELECTFILTERTIME
The default time to change the filter. |
private static String |
DEFSET
The default properties file for the adapter master parameters. |
private static String |
DEFSWITCHQUARTZ
The name of the halogen lamp switch in the parameter set. |
private static String |
DEFSWITCHTHAR
The name of the thorium lamp switch in the parameter set. |
private static String |
DEFWHEELPOSITIONS
The default names to position lookup table for the wheel. |
static String |
KEY_ALIGHTQUARTZ
The time the quartz is allowed to be on at maximum, ms. |
static String |
KEY_ALIGHTTHAR
The time the ThAr is allowed to be on at maximum, ms. |
static String |
KEY_CALIBRATION
The name of the calibration unit driver for postioning lamps. |
static String |
KEY_CALIBRATIONOFFTIME
Time for turning off calibration light. |
static String |
KEY_CALIBRATIONONTIME
Time for turning on calibration light. |
static String |
KEY_FILTERCLEAR
The filter wheel position for calibration light. |
static String |
KEY_FILTERQUARTZ
The filter wheel position for calibration light. |
static String |
KEY_FILTERTHAR
The filter wheel position for calibration light. |
static String |
KEY_FILTERWHEEL
The name of the filter wheel drivers. |
static String |
KEY_FLATFIELDOFFTIME
Time for turning off flat-fielding light. |
static String |
KEY_FLATFIELDONTIME
Time for turning on flat-fielding light. |
static String |
KEY_MOVETIME
Time for moving the calibration unit. |
static String |
KEY_POSITIONHOME
The position name in the calibration unit for home position |
static String |
KEY_POSITIONQUARTZ
The position name in the calibration unit for choosing Halogen. |
static String |
KEY_POSITIONTHAR
The position name in the calibration unit for choosing ThAr. |
static String |
KEY_RETRACEUNIT
The position name in the calibration unit for choosing ThAr. |
static String |
KEY_SELECTFILTERTIME
Time for selecting the filter. |
static String |
KEY_SWITCHQUARTZ
The name of the halogen lamp switch in the parameter set. |
static String |
KEY_SWITCHTHAR
The name of the thorium lamp switch in the parameter set. |
static String |
KEY_WHEELPOSITIONS
The filter wheel position for telescope light. |
private List<String> |
wheeldriver
A list of filter-wheel driver names. |
private Map<String,List<Integer>> |
wheelposition
A lookup-table for filter names to integer position in filter wheels. |
| Fields inherited from class stella.rmi.GenericMaster |
|---|
DEFUNIQUE, KEY_ABORTTIME, KEY_AUTOMATIC, KEY_COMMTIME, KEY_COMMUNICATOR, KEY_DRIVERS, KEY_HISTORYDB, KEY_INITTIME, KEY_NODB, KEY_OBSERVEDB, KEY_OVERRULEAUTO, KEY_PARKTIME, KEY_PERMISSIONDB, KEY_PROPOSALDB, KEY_QUITTIME, KEY_REAUTO, KEY_RESETTIME, KEY_SET, KEY_SHUTDOWNDELAY, KEY_STATUSTIME, KEY_TARGETDB, KEY_TASKDB, KEY_UNIQUE, KEY_USERDB, lastabort, lastinit, lastpark, lastreset, telescope |
| Fields inherited from class stella.rmi.ReceiverTorso |
|---|
KEY_BIND, KEY_BINDNAME, KEY_COMMANDCASTER, KEY_ERRORCOOL |
| Fields inherited from class util.rmi.AbstractRmiListener |
|---|
KEY_ALIVE, KEY_EXPORTPORT, KEY_INIT, KEY_LISTENERNAME, KEY_RETRY, KEY_RETRYSLEEP |
| 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 stella.rmi.RmiAcknowledgeCaster |
|---|
NAMING_EXTENSION |
| Fields inherited from interface stella.rmi.RmiDoneCaster |
|---|
NAMING_EXTENSION |
| Fields inherited from interface util.StepInitializable |
|---|
KEY_INITDEPTH |
| 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 | |
|---|---|
CalibrationMaster(Map<String,String> prop)
Constructs a new adapter master. |
|
| Method Summary | |
|---|---|
boolean |
accepts(CommandEvent ce)
Checks if the command received is accepted by the adapter master. |
private boolean |
calibrationLight()
Returns the trigger state of the calibration light switch. |
boolean |
calibrationMove()
Changes the calibration unit for input of thar. |
boolean |
calibrationOff()
Switches calibration light off. |
boolean |
calibrationOn()
Switches calibration light on. |
boolean |
changeCalibrationPosition(String newpos)
To allow the a cahnge of the positioning of the calibration unit during operation. |
boolean |
changeCalibrationSwitch(String newswitch)
To allow the change of the calibration-light switch without change in the properties this method takes the name of the new calibration-light switch. |
boolean |
changeFlatFieldPosition(String newpos)
To allow the a change of the positioning of the flat-field unit during operation. |
boolean |
changeFlatFieldSwitch(String newswitch)
To allow the change of the flat-field light switch without change in the properties this method takes the name of the new flat-field light switch. |
void |
exit()
Turn lamps off on exit. |
boolean |
filterOffset(String name,
int off)
Steps the filter wheel on the given index back or forth for the given number of steps. |
private boolean |
filterWheelZero()
Does a zero-positioning on all filter wheels found. |
private boolean |
flatFieldLight()
Returns the trigger state of the calibration light switch. |
boolean |
flatFieldMove()
Changes the calibration unit for input of quartz. |
boolean |
flatFieldOff()
Switches flat-fielding light off. |
boolean |
flatFieldOn()
Switches flat-fielding light. |
protected int |
getAcknowledgeNumber(CommandEvent cmd)
Returns the number of acknowledge events produced for each command. |
protected long |
getCompletionTime(CommandEvent cmd,
int acknr)
Returns the individual completion times. |
String |
getFilterPosition()
Gets the current fiber input source as the filter wheel position. |
boolean |
homeMove()
Changes the calibration unit to home position |
private void |
init2()
Additionally initializes the filter-to-position lookup tables. |
protected boolean |
initializeMaster()
Initializes the calibration master. |
void |
initStep(int curstep)
Additionally initializes the filter-to-position lookup tables. |
boolean |
isCalibration()
Returns true if calibration light, i.e. |
boolean |
isFlatField()
Returns true if flatfield light is switched on. |
static void |
main(String[] arg)
Constructs a new adapter master. |
private boolean |
offFlat()
Turns the flat-fielding light off and does whatever adjustments necessary to feed telescope light into the spectrograph again. |
private boolean |
offThAr()
Turns the calibration light off and does whatever adjustments necessary to feed telescope light into the spectrograph. |
private boolean |
onFlat()
Turns the flat-fielding light on and does whatever adjustments necessary to feed it into the spectrograph. |
private boolean |
onThAr()
Turns on the calibration light. |
protected boolean |
parkMaster()
Parks the adapter. |
private String |
parseFilter()
Parses the state of all filter wheels to get the current active filter. |
boolean |
prepareCalibration()
Prepares a calibration exposure. |
boolean |
prepareFlatField()
Prepares a flat field exposure. |
boolean |
prepareScience()
Prepares a science operation. |
protected boolean |
processCommand(CommandEvent cmd,
int acknr)
Process the command. |
void |
quit()
Gracefully quite the adapter master. |
double |
rescanned(String key,
String old,
String newval)
On reload, we can rebuild the filter lookup table. |
boolean |
reset()
Zero positions all filter wheels and sets the calibration sledge to home. |
protected boolean |
resetMaster()
Resets the adapter. |
private boolean |
selectFilter(String filter)
Selects a new filter or filter wheel position within the adapter. |
boolean |
setFilterPosition(String pos)
Selects fiber input / ccd onput by changing the filter wheel position |
private Map<String,List<Integer>> |
setupFilterTable(List<String> wheels,
String pos)
Sets up the filter wheel table by parsing the individual filter wheel entries into integer positions. |
private boolean |
shiftCalibrationUnit(String position)
Shift the calibration unit to the position specified, if we have it. |
private boolean |
sledgeHome()
Does a homing on the calibration unit sledge. |
protected Object |
statusMaster()
Returns a short description of the status of the adapter. |
| Methods inherited from class stella.rmi.AbstractRmiCasterAndListener |
|---|
bindToRegistry, getBindName, isValid, notifyErrorListener, removeErrorListener, removeRmiErrorListener, sendError, sendError, sendError, sendStatus, sendStatus, sendStatus, unbindFromRegistry |
| Methods inherited from class util.rmi.AbstractRmiListener |
|---|
allBound, blockBinding, blockBinding, disconnect, getIP, getListenerName, isConnected, listenerName, releaseBinding, releaseBinding, startBinding, startBinding |
| 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, init, 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, removeProperty, setObject, setProperties, setProperty, stringProperties |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface stella.rmi.ListenerControlling |
|---|
automatic, external, getStatus, initialize, manual, park, setPassive |
| Methods inherited from interface util.Reloadable |
|---|
reload |
| Methods inherited from interface util.rmi.RmiCaster |
|---|
bindToRegistry, isValid, unbindFromRegistry |
| Methods inherited from interface stella.ErrorCaster |
|---|
removeErrorListener |
| Methods inherited from interface util.rmi.RmiEventListener |
|---|
getListenerName |
| Methods inherited from interface util.rmi.RmiListener |
|---|
disconnect, isConnected |
| 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 |
| Methods inherited from interface util.Initializable |
|---|
init |
| Field Detail |
|---|
public static final String KEY_FILTERWHEEL
public static final String KEY_CALIBRATION
public static final String KEY_POSITIONHOME
public static final String KEY_POSITIONTHAR
public static final String KEY_POSITIONQUARTZ
public static final String KEY_RETRACEUNIT
public static final String KEY_SWITCHTHAR
public static final String KEY_SWITCHQUARTZ
public static final String KEY_ALIGHTTHAR
public static final String KEY_ALIGHTQUARTZ
public static final String KEY_WHEELPOSITIONS
public static final String KEY_FILTERTHAR
public static final String KEY_FILTERQUARTZ
public static final String KEY_FILTERCLEAR
public static final String KEY_CALIBRATIONONTIME
public static final String KEY_CALIBRATIONOFFTIME
public static final String KEY_FLATFIELDONTIME
public static final String KEY_FLATFIELDOFFTIME
public static final String KEY_SELECTFILTERTIME
public static final String KEY_MOVETIME
private static final String DEFSET
private static final String DEFFILTERWHEEL
private static final String DEFCALIBRATION
private static final String DEFPOSITIONHOME
private static final String DEFPOSITIONTHAR
private static final String DEFPOSITIONQUARTZ
private static final boolean DEFRETRACEUNIT
private static final String DEFSWITCHTHAR
private static final String DEFSWITCHQUARTZ
private static final long DEFALIGHTQUARTZ
private static final long DEFALIGHTTHAR
private static final String DEFWHEELPOSITIONS
private static final String DEFFILTERTHAR
private static final String DEFFILTERQUARTZ
private static final String DEFFILTERCLEAR
private static final long DEFCALIBRATIONONTIME
private static final long DEFCALIBRATIONOFFTIME
private static final long DEFFLATFIELDONTIME
private static final long DEFFLATFIELDOFFTIME
private static final long DEFSELECTFILTERTIME
private static final long DEFMOVETIME
private Map<String,List<Integer>> wheelposition
private List<String> wheeldriver
| Constructor Detail |
|---|
public CalibrationMaster(Map<String,String> prop)
throws RemoteException
PropertyResources.init() section of the parent class.
RemoteException| Method Detail |
|---|
public void initStep(int curstep)
initStep in interface StepInitializableinitStep in class GenericMastercurstep - The current initialization depth.private void init2()
private Map<String,List<Integer>> setupFilterTable(List<String> wheels,
String pos)
public void exit()
exit in interface ExitCleaningexit in class GenericMaster
public double rescanned(String key,
String old,
String newval)
rescanned in interface Reloadablerescanned in class GenericMaster
public boolean accepts(CommandEvent ce)
throws RemoteException
AdapterCommands.
accepts in interface RmiCommandListenerRemoteException
public boolean calibrationOn()
throws RemoteException
calibrationOn in interface CalibrationControllingRemoteException
public boolean reset()
throws RemoteException
reset in interface ListenerControllingreset in class GenericMasterRemoteException
public boolean calibrationOff()
throws RemoteException
calibrationOff in interface CalibrationControllingRemoteException
public boolean calibrationMove()
throws RemoteException
calibrationMove in interface CalibrationControllingRemoteException
public boolean flatFieldOn()
throws RemoteException
flatFieldOn in interface CalibrationControllingRemoteException
public boolean flatFieldOff()
throws RemoteException
flatFieldOff in interface CalibrationControllingRemoteException
public boolean flatFieldMove()
throws RemoteException
flatFieldMove in interface CalibrationControllingRemoteException
public boolean homeMove()
throws RemoteException
RemoteException
public boolean prepareCalibration()
throws RemoteException
prepareCalibration in interface CalibrationControllingRemoteException
public boolean prepareFlatField()
throws RemoteException
prepareFlatField in interface CalibrationControllingRemoteException
public boolean prepareScience()
throws RemoteException
prepareScience in interface CalibrationControllingRemoteException
public boolean setFilterPosition(String pos)
throws RemoteException
setFilterPosition in interface CalibrationControllingRemoteException
public boolean filterOffset(String name,
int off)
throws RemoteException
filterOffset in interface CalibrationControllingRemoteException
public String getFilterPosition()
throws RemoteException
getFilterPosition in interface CalibrationControllingRemoteException
public boolean isCalibration()
throws RemoteException
isCalibration in interface CalibrationControllingRemoteException
public boolean isFlatField()
throws RemoteException
isFlatField in interface CalibrationControllingRemoteException
public boolean changeCalibrationSwitch(String newswitch)
throws RemoteException
changeCalibrationPosition(java.lang.String).
changeCalibrationSwitch in interface CalibrationControllingRemoteException
public boolean changeFlatFieldSwitch(String newswitch)
throws RemoteException
changeCalibrationPosition(java.lang.String).
changeFlatFieldSwitch in interface CalibrationControllingRemoteException
public boolean changeCalibrationPosition(String newpos)
throws RemoteException
changeCalibrationSwitch(java.lang.String).
changeCalibrationPosition in interface CalibrationControllingRemoteException
public boolean changeFlatFieldPosition(String newpos)
throws RemoteException
changeFlatFieldSwitch(java.lang.String).
changeFlatFieldPosition in interface CalibrationControllingRemoteException
public void quit()
throws RemoteException
quit in interface ListenerControllingquit in class GenericMasterRemoteExceptionprotected int getAcknowledgeNumber(CommandEvent cmd)
getAcknowledgeNumber in class GenericMaster
protected long getCompletionTime(CommandEvent cmd,
int acknr)
getCompletionTime in class GenericMastercmd - The command to process.acknr - The number of the acknowledge that will be sent back.
protected boolean processCommand(CommandEvent cmd,
int acknr)
processCommand in class GenericMasterprotected Object statusMaster()
statusMaster in class GenericMasterErrorEvent.protected boolean initializeMaster()
initializeMaster in class GenericMasterprotected boolean resetMaster()
resetMaster in class GenericMasterprotected boolean parkMaster()
parkMaster in class GenericMasterprivate String parseFilter()
private boolean filterWheelZero()
private boolean sledgeHome()
private boolean calibrationLight()
private boolean flatFieldLight()
private boolean onThAr()
private boolean offThAr()
private boolean onFlat()
private boolean offFlat()
private boolean selectFilter(String filter)
private boolean shiftCalibrationUnit(String position)
public static void main(String[] arg)
throws RemoteException
RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||