public class PowerTelescope extends AbstractStatusRequestor implements Trigger, Reloadable
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFCOMMAND
The default class name of the status command to send.
|
static String |
DEFNAME
The default name of this parameter.
|
private Trigger |
power
My simple trigger that reflects the state.
|
KEY_COMMAND, KEY_DISABLE, KEY_TIMEOUTKEY_CACHEKEY_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_MAPSEPARATORCONFIG, KEY_CLASSNAMING_EXTENSIONKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Constructor and Description |
|---|
PowerTelescope(Map<String,String> prop)
Constructs a new power telescope trigger.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getElapsedToggleTime()
Might be grossly wrong, event trigger steps might be lost, depending
on the update time.
|
Object |
getForError(ErrorEvent ee)
Returns the power of the telescope deduced from a freshly received
TelescopeStatus. |
String |
getFormatted()
Returns the azimuth of the telescope in a properly formatted way.
|
Date |
getLastToggleTime()
Might be grossly wrong, event trigger steps might be lost, depending
on the update time.
|
Boolean |
getTrigger()
Returns the power of the telescope.
|
void |
init()
Inits the status requestor.
|
protected boolean |
isStatusRequested(ErrorEvent ee)
Returns true if the error event received is of
TelescopeStatus |
boolean |
isTrue()
Returns the state of the trigger.
|
double |
rescanned(String key,
String old,
String newval)
Makes this method public, no further changes.
|
Object |
set(Object newval)
Reflect the set change also in my trigger for time updates.
|
Boolean |
setTrigger(Boolean newpower)
Sets the azimuth of the telescope.
|
Boolean |
toggleTrigger()
Setting is only allowed by receive of a status event.
|
getUncached, registerError, registerLauncherget, getCache, getCacheFormattedcreateParameter, delivers, exit, 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, 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, stringPropertiesreloadgetCache, getCacheFormattedpublic static final String DEFNAME
private static final String DEFCOMMAND
private Trigger power
public PowerTelescope(Map<String,String> prop)
TelescopeStatus event is registered, this parameter returns
false.public void init()
throws InitException
AbstractStatusRequestorAbstractStatusRequestor.KEY_COMMAND in daughter
classes.init in interface Initializableinit in class AbstractStatusRequestorInitExceptionpublic double rescanned(String key, String old, String newval)
rescanned in interface Reloadablerescanned in class AbstractStatusRequestorpublic Boolean setTrigger(Boolean newpower)
setTrigger in interface Triggeringpublic Object set(Object newval)
set in interface Parameterset in class AbstractCachedParameterpublic Boolean getTrigger()
TelescopeStatus event registered to this parameter.getTrigger in interface Triggeringpublic boolean isTrue()
isTrue in interface Triggeringpublic Boolean toggleTrigger()
toggleTrigger in interface Triggeringpublic Date getLastToggleTime()
getLastToggleTime in interface Triggeringpublic long getElapsedToggleTime()
getElapsedToggleTime in interface Triggeringpublic String getFormatted()
getFormatted in interface ParametergetFormatted in class AbstractParameterpublic Object getForError(ErrorEvent ee)
TelescopeStatus. This method is probably not extremly useful,
normally a TelescopeStatus error will be registered to this
parameter and its value queried later.getForError in interface ErrorDependingParameterprotected boolean isStatusRequested(ErrorEvent ee)
TelescopeStatusisStatusRequested in class AbstractStatusRequestor