stella.sensor
Interface WeatherJudging

All Known Implementing Classes:
AverageSensor, BadSensor, DewPoint, FakeSensor, FakeSolZSensor, HealthSensor, KeystrokeSensor, MoxaSensor, NoiseSolZSensor, OneWireADSensor, OneWireRainSensor, OneWireSensor, ParameterSensor, QuickDumpSensor, RS485RainSensor, RS485Sensor, SolHeightSensor, SolZSensor, Ups, UpsSensor, WeatherSensor, WeirdSolZSensor

public interface WeatherJudging

The interface defining the methods necessarry to allow a raw filter reading to be converted into a single bad/false response. Normally implementations will simple check the argument value against some threshold. Note that this interface additionally allows the addition of an (unspecified) Object, which may be usefule for sensors that cannot destinguish between good and bad weather conditions simple because of their own reading, but only by adding information from other sources. Actual implementations of this interface and their actual callers must make sure that this argument object is of the appropriate type on both ends, e.g. null, otherwise the sensor will crash!

Sensors that implement only parts of this methods should ensure that the non-implemented methods return always false. A default implementation of this interface is the WeatherSensor, though it does not provide any method bodies for the interfaces.


Method Summary
 boolean currentlyClear()
          Returns true if this weather judging instance reports good weather conditions.
 boolean currentlyRetarding()
          Returns true, if this sensor is currently in a retarding phase.
 long getMinClearUpTime()
          Estimates the minimum time until this sensor will report clear again.
 

Method Detail

currentlyClear

boolean currentlyClear()
Returns true if this weather judging instance reports good weather conditions.


currentlyRetarding

boolean currentlyRetarding()
Returns true, if this sensor is currently in a retarding phase. Normally, if the weather reading changes back from bad to good, a sensor may still not 'trust' the current weather and be thus retarding. In this case the sensor will return true on currentlyClear(), but also true on retarding. Definite good weather is than achieved, if the sensor is good and not retarding.


getMinClearUpTime

long getMinClearUpTime()
Estimates the minimum time until this sensor will report clear again. On retarding sensors, this could be the time retarding will last. Calculated sensor, like SolarHeightSensor might return an accurate measurement.