public class SensorValue extends DataValue implements WeatherDependingParameter, Reloadable
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_SENSOR
The key to the sensor this global wraps.
|
private DataSensor |
sensor
A reference to the data sensor we listen to for proper exiting.
|
DERIVATIVE, DERIVATIVEVALUE, KEY_BLOCK, KEY_DATA, PREDICT, PREDICTVALUE, RAW, SMOOTH, SMOOTHVALUE, VALUEKEY_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_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Constructor and Description |
|---|
SensorValue(Map info)
Constructs a new sensor global.
|
| Modifier and Type | Method and Description |
|---|---|
void |
exit()
Deregisters from the sensor.
|
Object |
getForWeather(WeatherSurveying weather)
Receiving the sensor value directly from the weather station without
registering is not possible.
|
void |
registerWeather(WeatherSurveying weather)
Tells the sensor global to which sensor it should register itself as
a data listener.
|
double |
rescanned(String key,
String old,
String newval)
As any parameter depending instance we fail if the parameter we depend
on is now a different one.
|
dataAvailable, getString, getValue, setValueget, setcreateParameter, delivers, getFormatted, getFormatted, getName, getPreserveFile, getString, init, 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, stringPropertiesinitreloadpublic static final String KEY_SENSOR
private DataSensor sensor
public SensorValue(Map info)
DataValue.RAW. This guarantees
that this key is present and points to a allowed value once the
construction phase is finished. Note that a successful construction of
the sensor global does not mean this global can be querried
right away. It must register to the sensor it should listen to via
a call to registerWeather(stella.sensor.WeatherSurveying).public double rescanned(String key, String old, String newval)
rescanned in interface Reloadablerescanned in class AbstractParameterpublic void registerWeather(WeatherSurveying weather)
registerWeather in interface WeatherDependingParameterpublic void exit()
exit in interface ExitCleaningexit in class AbstractParameterpublic Object getForWeather(WeatherSurveying weather)
getForWeather in interface WeatherDependingParameter