stella.sensor
Interface Deriving

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

public interface Deriving
extends Cumulating

The interface marking derivative capabilities of a sensor. It is an extension to the cumulative interface because smoothing datas will always require storing some data. As a consequence, no methods for access to the time axis are given here. They are inherited from the base interface.

This interface is introduced to make it more convenient to derive one's own combination of smoothing and/or deriving sensors. A default implementation DerivativeSensor implements this interface and gives a body for this method.


Method Summary
 void deriveAt(double raw)
          Derives the data values at the given raw reading and stores it in an internal buffer.
 NumberFormat getDerivativeFormat()
          Returns the decimal format to use with the first raw derivative.
 List getLastDerivative(int nr)
          Returns the last nr derivative values as a list.
 boolean isDeriving()
          Returns true if the implementing instance is really capable of derivating the sensor data.
 double regetDerive()
          Returns the last value of the derivative as a double.
 
Methods inherited from interface stella.sensor.Cumulating
cumulateOne, getLastRaw, getLastTime, getMaxSize, getSize, getTimeOfRead, regetRaw
 

Method Detail

deriveAt

void deriveAt(double raw)
Derives the data values at the given raw reading and stores it in an internal buffer.


regetDerive

double regetDerive()
Returns the last value of the derivative as a double.


getLastDerivative

List getLastDerivative(int nr)
Returns the last nr derivative values as a list. The list consits of Double entries.

Parameters:
The - number of entries to return.

getDerivativeFormat

NumberFormat getDerivativeFormat()
Returns the decimal format to use with the first raw derivative.


isDeriving

boolean isDeriving()
Returns true if the implementing instance is really capable of derivating the sensor data. Note: the name stems from the faulty interface name.