public class FocusQuality extends AbstractParameter implements ErrorDependingParameter, StatePreserving, ParameterDepending
| Modifier and Type | Class and Description |
|---|---|
static class |
FocusQuality.Poke
We peek into the saved datas file and print its content.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private SortedMap<Date,List<Number>> |
exact
The lookuptable of all measures per date.
|
private Value |
focus
The focus position.
|
private Value |
height
The height value.
|
static String |
KEY_FOCUS
The parameter that is the focus value.
|
static String |
KEY_HEIGHT
The parameter that is target height.
|
static String |
KEY_TEMPERATURES
The list of parameter names that are temperatures.
|
private SortedSet<Value> |
temp
The temperature parameters.
|
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWNKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORNAMING_EXTENSIONCONFIG, KEY_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Constructor and Description |
|---|
FocusQuality(Map<String,String> prop)
Constructs a new error trigger.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
get()
Returns the last recorded line.
|
Object |
getForError(ErrorEvent err)
If an exact focus status message is received, the focus value is stored.
|
void |
init()
We initialize the temperature list.
|
boolean |
preserve()
On exit, we save our current state if the serialize property is set.
|
private List<Number> |
recordNow()
Returns the focus value, the temperature and the height of the telescope
as a list of numbers.
|
void |
registerError(ErrorEvent err)
Registers the error to this parameter.
|
void |
registerParameter(Parameter p)
Registers a parameter, which is kept if a value and is one of our
temperature sensors, the focus position or the target height.
|
double |
rescanned(String key,
String old,
String newval)
Makes this method public, no further changes.
|
boolean |
restore()
We restore our old value by reading the last date and target count from a
serialization file.
|
Object |
set(Object o)
Setting is not allowed.
|
createParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, overrideDefaultName, register, setName, toStringclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, 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, parseObject, reload, removeProperty, requires, setObject, setProperties, setProperty, stringPropertiesequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFormatted, getName, getStringdefaultBoolean, 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, stringPropertiesexitpublic static final String KEY_TEMPERATURES
public static final String KEY_FOCUS
public static final String KEY_HEIGHT
private Value focus
private Value height
public void init()
throws InitException
init in interface Initializableinit in class AbstractParameterInitExceptionpublic void registerParameter(Parameter p)
registerParameter in interface ParameterDependingpublic boolean restore()
restore in interface Preservingpublic boolean preserve()
preserve in interface Preservingpublic double rescanned(String key, String old, String newval)
rescanned in class AbstractParameterpublic Object getForError(ErrorEvent err)
getForError in interface ErrorDependingParameterpublic void registerError(ErrorEvent err)
registerError in interface ErrorDependingParameter