stella.sensor
Class SmoothDataEvent

java.lang.Object
  extended by java.util.EventObject
      extended by util.rmi.RmiEvent
          extended by stella.DataEvent
              extended by stella.sensor.RawDataEvent
                  extended by stella.sensor.CumulativeDataEvent
                      extended by stella.sensor.PredictiveDataEvent
                          extended by stella.sensor.SmoothDataEvent
All Implemented Interfaces:
Serializable, PostingEvent
Direct Known Subclasses:
DerivativeDataEvent

public class SmoothDataEvent
extends PredictiveDataEvent

Adds the smothened values to the data event.

See Also:
Serialized Form

Field Summary
private  Double smoothmax
          The maximum smoothed value if used as an average of data.
private  Double smoothmin
          The minimum smoothed value if used as an average of data.
private  Double smoothraw
          The raw smoothed value.
 
Fields inherited from class stella.DataEvent
FORMAT
 
Fields inherited from class util.rmi.RmiEvent
localHost, sourceName
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SmoothDataEvent(DataEvent de)
          Constructs a new smoothive data event from a generic data event.
SmoothDataEvent(Object src)
          Constructs a new smoothive data event without any values specified.
 
Method Summary
 String getFormattedSmoothMax()
          Returns the smoothed raw maximum as a string, formatted according to the raw formatter.
 String getFormattedSmoothMin()
          Returns the smoothed raw minimum as a string, formatted according to the raw formatter.
 String getFormattedSmoothPhysical()
          Returns the physical smooth quantity formatted to its converter's format.
 String getFormattedSmoothPhysicalMax()
          Returns the physical smooth maximum formatted to its converter's format.
 String getFormattedSmoothPhysicalMin()
          Returns the physical smooth minimum formatted to its converter's format.
 String getFormattedSmoothRaw()
          Returns the smoothened raw as a string, formatted according to the raw formatter.
 double getSmoothMax()
          Returns the maximum raw smoothed value as a primitive double or nan if undefined.
 double getSmoothMin()
          Returns the minimum raw smoothed value as a primitive double or nan if undefined.
 double getSmoothPhysical()
          Returns the smoothed measurement in physically meaningful quantities or NaN if undefined.
 double getSmoothPhysicalMax()
          Returns the maximum smoothed measurement in physically meaningful quantities or NaN if undefined.
 double getSmoothPhysicalMin()
          Returns the minimum smoothed measurement in physically meaningful quantities or NaN if undefined.
 double getSmoothRaw()
          Returns the raw smoothed value as a primitive double or nan if undefined.
 void setSmoothMinMax(double min, double max)
          Sets the minimum and maximum of the smoothed raw value.
 void setSmoothRaw(double smooth)
          Sets the smoothed value as a primitive double.
 String toString()
          Adds the smoothive values to the string representation.
 
Methods inherited from class stella.sensor.PredictiveDataEvent
getFormattedPredictMax, getFormattedPredictMin, getFormattedPredictPhysical, getFormattedPredictPhysicalMax, getFormattedPredictPhysicalMin, getFormattedPredictRaw, getPredictMax, getPredictMin, getPredictPhysical, getPredictPhysicalMax, getPredictPhysicalMin, getPredictRaw, getValueString, setPredictMinMax, setPredictRaw
 
Methods inherited from class stella.sensor.CumulativeDataEvent
getDateString, getFormattedPhysicalMax, getFormattedPhysicalMin, getFormattedRawMax, getFormattedRawMin, getMinMaxString, getN, getPhysicalMax, getPhysicalMin, getRawMax, getRawMin, setN, setRawMinMax
 
Methods inherited from class stella.sensor.RawDataEvent
formatPhysical, formatRaw, getFormattedPhysical, getFormattedPhysicalDeviation, getFormattedRaw, getFormattedRawDeviation, getPhysical, getPhysicalDeviation, getRaw, getRawConvert, getRawDeviation, getRawFormat, getRawString, getSigmaFormat, setRaw, setRawConvert, setRawDeviation, setRawFormat, setSigmaFormat
 
Methods inherited from class stella.DataEvent
getMeasurement, getTimeOfMeasure, isValid, setMeasurement, setTimeOfMeasure, setValid
 
Methods inherited from class util.rmi.RmiEvent
getHost, getSourceName, setSourceName
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

smoothraw

private Double smoothraw
The raw smoothed value.


smoothmax

private Double smoothmax
The maximum smoothed value if used as an average of data.


smoothmin

private Double smoothmin
The minimum smoothed value if used as an average of data.

Constructor Detail

SmoothDataEvent

public SmoothDataEvent(Object src)
Constructs a new smoothive data event without any values specified.

Parameters:
src - The event source.

SmoothDataEvent

public SmoothDataEvent(DataEvent de)
Constructs a new smoothive data event from a generic data event. All relevant field are copied.

Method Detail

setSmoothRaw

public void setSmoothRaw(double smooth)
Sets the smoothed value as a primitive double.


getSmoothRaw

public double getSmoothRaw()
Returns the raw smoothed value as a primitive double or nan if undefined.


getFormattedSmoothRaw

public String getFormattedSmoothRaw()
Returns the smoothened raw as a string, formatted according to the raw formatter. If the raw-formatter is null, Double.toString is used.


setSmoothMinMax

public void setSmoothMinMax(double min,
                            double max)
Sets the minimum and maximum of the smoothed raw value. Useful only if generated from multiple data.


getSmoothMin

public double getSmoothMin()
Returns the minimum raw smoothed value as a primitive double or nan if undefined.


getFormattedSmoothMin

public String getFormattedSmoothMin()
Returns the smoothed raw minimum as a string, formatted according to the raw formatter. If the raw-formatter is null, Double.toString is used.


getSmoothMax

public double getSmoothMax()
Returns the maximum raw smoothed value as a primitive double or nan if undefined.


getFormattedSmoothMax

public String getFormattedSmoothMax()
Returns the smoothed raw maximum as a string, formatted according to the raw formatter. If the raw-formatter is null, Double.toString is used.


getSmoothPhysical

public double getSmoothPhysical()
Returns the smoothed measurement in physically meaningful quantities or NaN if undefined.


getFormattedSmoothPhysical

public String getFormattedSmoothPhysical()
Returns the physical smooth quantity formatted to its converter's format.


getSmoothPhysicalMin

public double getSmoothPhysicalMin()
Returns the minimum smoothed measurement in physically meaningful quantities or NaN if undefined.


getFormattedSmoothPhysicalMin

public String getFormattedSmoothPhysicalMin()
Returns the physical smooth minimum formatted to its converter's format.


getSmoothPhysicalMax

public double getSmoothPhysicalMax()
Returns the maximum smoothed measurement in physically meaningful quantities or NaN if undefined.


getFormattedSmoothPhysicalMax

public String getFormattedSmoothPhysicalMax()
Returns the physical smooth maximum formatted to its converter's format.


toString

public String toString()
Adds the smoothive values to the string representation.

Overrides:
toString in class PredictiveDataEvent