stella.sensor
Interface Telemetering

All Superinterfaces:
Initializable, PropertySupplying
All Known Implementing Classes:
AbstractSensor, AverageSensor, BadSensor, CumulativeSensor, DataSensor, DerivativeSensor, DewPoint, FakeSensor, FakeSolZSensor, HealthSensor, KeystrokeSensor, MoxaSensor, NoiseSolZSensor, OneWireADSensor, OneWireRainSensor, OneWireSensor, ParameterSensor, PredictiveSensor, QuickDumpSensor, RS485RainSensor, RS485Sensor, SmoothingSensor, SolHeightSensor, SolZSensor, TimerTaskSensor, Ups, UpsSensor, WeatherSensor, WeirdSolZSensor

public interface Telemetering
extends PropertySupplying, Initializable

The interface decribing capabilities to remote measure data. A typical implementation would be a sensor, or more specififc, a weather sensor. Each implementing class has only a single quantity to measure. If additional input from other telemetering instances is needed, they must implement the SensorDepending interface. To prononce the relationship of this interface with a sensor-definition, all implementing classes have names derived from sensor.


Field Summary
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Method Summary
 void cancel()
          Cancels this sensor.
 ConvertToPhysical getConvert()
          Returns the conversion utility to convert raw readings to physical meaningful quantities.
 double getReading()
          Returns the last/actual reading of the sensor as a double.
 long getRespawn()
          Returns the respawn intervall of this timer-task sensor, in ms.
 String getSensorDescription()
          Returns a lengthy description of this sensor.
 String getSensorInitInfo()
          Returns info on this sensor that is available after its initialization phase and gives some info on the init process.
 String getSensorName()
          Returns a unique identification of this telemetering instance.
 Date getTimeOfRead()
          Returns the exact date of the last measurement.
 TimerTask initSensorTimerTask()
          Returns the timer task this sensor wants to run in or null if no thread is needed.
 void setConvert(ConvertToPhysical converter)
          Sets the conversion utility to convert raw readings to physical meaningful quantities.
 String status()
          Returns a description of the actual status of this telemetering instance.
 boolean validReading()
          Returns true if the last reading is valid.
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, 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, stringProperties
 
Methods inherited from interface util.Initializable
init
 

Method Detail

getReading

double getReading()
Returns the last/actual reading of the sensor as a double. This value does not necessarily represent a physical quality.


validReading

boolean validReading()
Returns true if the last reading is valid.


getTimeOfRead

Date getTimeOfRead()
Returns the exact date of the last measurement.


cancel

void cancel()
Cancels this sensor. If this sensor is threaded, the thread should exit gracefully.


getSensorName

String getSensorName()
Returns a unique identification of this telemetering instance.


getSensorDescription

String getSensorDescription()
Returns a lengthy description of this sensor. This can be the location, hard ware information, reliability etc.


getSensorInitInfo

String getSensorInitInfo()
Returns info on this sensor that is available after its initialization phase and gives some info on the init process.


getConvert

ConvertToPhysical getConvert()
Returns the conversion utility to convert raw readings to physical meaningful quantities.


setConvert

void setConvert(ConvertToPhysical converter)
Sets the conversion utility to convert raw readings to physical meaningful quantities.


initSensorTimerTask

TimerTask initSensorTimerTask()
Returns the timer task this sensor wants to run in or null if no thread is needed. This method allows WeatherSurveying classes that normally consist of a collection of sensors to start their entire sensor bank separately from constructing the sensors.

Returns:
The ready-to-start timer-task of this sensor.
See Also:
getRespawn()

getRespawn

long getRespawn()
Returns the respawn intervall of this timer-task sensor, in ms. This time is used in WeatherSurveying classes to schedule sensors which need a sepatate thread to run.

Returns:
Zero, if this sensor does not need a thread.

status

String status()
Returns a description of the actual status of this telemetering instance.