public abstract class AdapterUnit extends PropertyResources implements Initializable
FocusUnit, a
AcquireUnit and a GuiderUnit exits.PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
static String |
ACQUIRETYPE
Acquire frames start with this header, followed by date and count.
|
private AbstractStarGuider |
guider
The image-processing unit.
|
static String |
GUIDERTYPE
Guiding frames start with this header, followed by date and count.
|
private boolean |
manual
If true, we are in manual mode and do not generate status events.
|
private AdapterMaster |
master
The reference to the master.
|
static String |
PYRAMIDTYPE
Guiding frames start with this header, followed by date and count.
|
private OffsetCaster |
telescope
The communicator to send offset commands.
|
KEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOMECONFIG, KEY_CLASS| Modifier | Constructor and Description |
|---|---|
protected |
AdapterUnit(Map<String,String> prop)
No default settings.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract ErrorEvent |
doUnitTask(String mode)
Commits the task of this unit.
|
protected AbstractStarGuider |
getGuider()
Get the adapter helper that can be used for calculating image-realted
quantities.
|
protected AdapterMaster |
getMaster()
Returns the adapter master registered to this unit.
|
protected OffsetCaster |
getTelescope()
Get the telescope communication.
|
protected abstract String |
getUnitType()
Returns the type of this unit.
|
void |
init() |
protected boolean |
isManual()
Returns the manual status, normally inherited from the adapter master.
|
protected boolean |
isValid()
Checks if all the required quantities are set and non-null.
|
protected void |
resetUnit()
Resets the unit.
|
protected void |
setGuider(AbstractStarGuider calculus)
Sets the adapter helper who knows everything image related.
|
protected void |
setManual(boolean nostatus)
Sets manual mode, in which case we should not send status event, but
rather use syslog.
|
protected void |
setMaster(AdapterMaster chef)
Sets the adapter master.
|
protected void |
setTelescope(OffsetCaster sendto)
Set the telescope communication.
|
clone, 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, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, 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, stringPropertiespublic static final String ACQUIRETYPE
public static final String GUIDERTYPE
public static final String PYRAMIDTYPE
private boolean manual
private OffsetCaster telescope
private AbstractStarGuider guider
private AdapterMaster master
public void init()
throws InitException
init in interface InitializableInitExceptionprotected void setManual(boolean nostatus)
protected boolean isManual()
protected void setTelescope(OffsetCaster sendto)
protected OffsetCaster getTelescope()
isValid() returns true, this
will never return null.protected void resetUnit()
protected void setGuider(AbstractStarGuider calculus)
protected void setMaster(AdapterMaster chef)
protected AdapterMaster getMaster()
protected AbstractStarGuider getGuider()
isValid() returns true, this will never return
null.protected boolean isValid()
protected abstract ErrorEvent doUnitTask(String mode)
mode - If the unit supports more than a single mode, otherwise nullprotected abstract String getUnitType()