stella.sensor
Interface Cumulating

All Known Subinterfaces:
Deriving, Predicting, Smoothing
All Known Implementing Classes:
AverageSensor, BadSensor, CumulativeSensor, DerivativeSensor, DewPoint, FakeSensor, FakeSolZSensor, HealthSensor, KeystrokeSensor, MoxaSensor, NoiseSolZSensor, OneWireADSensor, OneWireRainSensor, OneWireSensor, ParameterSensor, PredictiveSensor, QuickDumpSensor, RS485Sensor, SmoothingSensor, SolHeightSensor, SolZSensor, Ups, UpsSensor, WeatherSensor, WeirdSolZSensor

public interface Cumulating

The interface defining cumulative capabilities. Methods for storing and retrieving the last data point are provided. Additionally, for the purpose of serving as a data event source, a method for retrieving a list of the last measurements is defined.
This is the most primitive interface in a hierarchy and therefore the methods for retriving data on the time axis are included here. Methods for querrieing the actual and maximal size of the data buffer are included.


Method Summary
 void cumulateOne(double raw, Date when)
          The method for storing a single data point.
 List getLastRaw(int nr)
          Returns the last nr raw values as a list.
 List getLastTime(int nr)
          Returns the last nr times of measurements as a list.
 int getMaxSize()
          Returns the maximal size of the data buffer.
 int getSize()
          Returns the actual size of the data buffer.
 Date getTimeOfRead()
          Returns the time of the last reading as a date object.
 double regetRaw()
          Returns the last raw value as a double.
 

Method Detail

getSize

int getSize()
Returns the actual size of the data buffer.


getMaxSize

int getMaxSize()
Returns the maximal size of the data buffer.


cumulateOne

void cumulateOne(double raw,
                 Date when)
The method for storing a single data point. Mainly introduced to make this interface a one-way-look twin to smoothing and deriving.


regetRaw

double regetRaw()
Returns the last raw value as a double.


getLastRaw

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

Parameters:
The - number of entries to return.

getTimeOfRead

Date getTimeOfRead()
Returns the time of the last reading as a date object.


getLastTime

List getLastTime(int nr)
Returns the last nr times of measurements as a list. The list consits of Date entries.

Parameters:
The - number of entries to retu