org.rrd4j.data.PDef Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rrd4j Show documentation
Show all versions of rrd4j Show documentation
A high performance data logging and graphing system for time series data.
package org.rrd4j.data;
class PDef extends Source implements NonRrdSource {
private final Plottable plottable;
PDef(String name, Plottable plottable) {
super(name);
this.plottable = plottable;
}
/** {@inheritDoc} */
public void calculate(long tStart, long tEnd, DataProcessor dataProcessor) {
long[] times = getTimestamps();
double[] vals = new double[times.length];
for (int i = 0; i < times.length; i++) {
vals[i] = plottable.getValue(times[i]);
}
setValues(vals);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy