public class DerivativeDataEvent extends SmoothDataEvent
ConvertToPhysical instance used by this data event also supports
conversion of derivatives via implementing the PhysicalDerivative
interface, the toString() method uses it for formatting. Only in
the latter case, the getDerivativePhysical... methods return
meaningful quantities.| Modifier and Type | Field and Description |
|---|---|
private Double |
derivativemax
The maximum derivative value if used as an average of data.
|
private Double |
derivativemin
The minimum derivative value if used as an average of data.
|
private Double |
derivativeraw
The raw derivative value.
|
private NumberFormat |
derivformat
A formatter for the raw measurements.
|
private static long |
serialVersionUID |
localHost, sourceNamesource| Constructor and Description |
|---|
DerivativeDataEvent(DataEvent de)
Constructs a new derivativeive data event from a generic data event.
|
DerivativeDataEvent(Object src)
Constructs a new derivativeive data event without any values specified.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
formatPhysicalDerivative(Double meas)
Formats a physical reading according to the
RawDataEvent.rawconvert rule. |
protected String |
formatRawDerivative(Double meas)
Formats a raw reading according to the
RawDataEvent.rawformat rule. |
NumberFormat |
getDerivativeFormat()
gets the raw-data formatter.
|
double |
getDerivativeMax()
Returns the maximum raw derivative value as a primitive double or nan if
undefined.
|
double |
getDerivativeMin()
Returns the minimum raw derivative value as a primitive double or nan if
undefined.
|
double |
getDerivativePhysical()
Returns the derivative measurement in physically meaningful
quantities or NaN if undefined.
|
double |
getDerivativePhysicalMax()
Returns the maximum derivative measurement in physically meaningful
quantities or NaN if undefined.
|
double |
getDerivativePhysicalMin()
Returns the minimum derivative measurement in physically meaningful
quantities or NaN if undefined.
|
double |
getDerivativeRaw()
Returns the raw derivative value as a primitive double or nan if
undefined.
|
String |
getFormattedDerivativeMax()
Returns the derivative minimum as a string, formatted according to the
raw formatter.
|
String |
getFormattedDerivativeMin()
Returns the derivative minimum as a string, formatted according to the
raw formatter.
|
String |
getFormattedDerivativePhysical()
Returns the physical derivative formatted to its converter's format.
|
String |
getFormattedDerivativePhysicalMax()
Returns the physical derivative maximum
formatted to its converter's format.
|
String |
getFormattedDerivativePhysicalMin()
Returns the physical derivative minimum
formatted to its converter's format.
|
String |
getFormattedDerivativeRaw()
Returns the derivative raw as a string, formatted according to the
raw formatter.
|
void |
setDerivativeFormat(NumberFormat forderiv)
Sets the raw-data formatter.
|
void |
setDerivativeMinMax(double min,
double max)
Sets the minimum and maximum of the derivative raw value.
|
void |
setDerivativeRaw(double derivative)
Sets the derivative value as a primitive double.
|
String |
toString()
Adds the derivativeive values to the string representation.
|
getFormattedSmoothMax, getFormattedSmoothMin, getFormattedSmoothPhysical, getFormattedSmoothPhysicalMax, getFormattedSmoothPhysicalMin, getFormattedSmoothRaw, getSmoothMax, getSmoothMin, getSmoothPhysical, getSmoothPhysicalMax, getSmoothPhysicalMin, getSmoothRaw, setSmoothMinMax, setSmoothRawgetFormattedPredictMax, getFormattedPredictMin, getFormattedPredictPhysical, getFormattedPredictPhysicalMax, getFormattedPredictPhysicalMin, getFormattedPredictRaw, getPredictMax, getPredictMin, getPredictPhysical, getPredictPhysicalMax, getPredictPhysicalMin, getPredictRaw, getValueString, setPredictMinMax, setPredictRawgetDateString, getFormattedPhysicalMax, getFormattedPhysicalMin, getFormattedRawMax, getFormattedRawMin, getMinMaxString, getN, getPhysicalMax, getPhysicalMin, getRawMax, getRawMin, setN, setRawMinMaxformatPhysical, formatRaw, getFormattedPhysical, getFormattedPhysicalDeviation, getFormattedRaw, getFormattedRawDeviation, getPhysical, getPhysicalDeviation, getRaw, getRawConvert, getRawDeviation, getRawFormat, getRawString, getSigmaFormat, setRaw, setRawConvert, setRawDeviation, setRawFormat, setSigmaFormatgetMeasurement, getTimeOfMeasure, isValid, setMeasurement, setTimeOfMeasure, setValidgetHost, getSourceName, setSourceNamegetSourceprivate static final long serialVersionUID
private Double derivativeraw
private Double derivativemax
private Double derivativemin
private NumberFormat derivformat
public DerivativeDataEvent(Object src)
src - The event source.public DerivativeDataEvent(DataEvent de)
public void setDerivativeFormat(NumberFormat forderiv)
public NumberFormat getDerivativeFormat()
public void setDerivativeRaw(double derivative)
public double getDerivativeRaw()
public String getFormattedDerivativeRaw()
public void setDerivativeMinMax(double min,
double max)
public double getDerivativeMin()
public String getFormattedDerivativeMin()
public double getDerivativeMax()
public String getFormattedDerivativeMax()
public double getDerivativePhysical()
public String getFormattedDerivativePhysical()
public double getDerivativePhysicalMin()
public String getFormattedDerivativePhysicalMin()
public double getDerivativePhysicalMax()
public String getFormattedDerivativePhysicalMax()
public String toString()
toString in class SmoothDataEventprotected String formatRawDerivative(Double meas)
RawDataEvent.rawformat rule. If
the measurement is NaN or null, nan is included in the string.protected String formatPhysicalDerivative(Double meas)
RawDataEvent.rawconvert rule. If
the measurement is NaN or null, the empty string is returned.meas - The raw measurement value.RawDataEvent.formatRaw(java.lang.Double)