java.lang.Object
org.yamcs.http.api.Downsampler
- All Implemented Interfaces:
Consumer<ParameterValueArray>
One-pass downsampler for time-series data (i.e. numeric archived parameters), where the number of recorded data
points are not known upfront.
The output is not a bunch of parameter values, but instead a range of values limited to n, which should be fit for inclusion in plots.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA cumulative sample that keeps track of a rolling average among others. -
Constructor Summary
ConstructorsConstructorDescriptionDownsampler(long start, long stop) Downsampler(long start, long stop, int sampleCount) -
Method Summary
Modifier and TypeMethodDescriptionvoidcollect()longvoidprocess(long time, double value, long expireMillis) voidprocess(ParameterValue pval) voidsetGapTime(long gapTime) voidsetUseRawValue(boolean useRawValue)
-
Constructor Details
-
Downsampler
public Downsampler(long start, long stop) -
Downsampler
public Downsampler(long start, long stop, int sampleCount)
-
-
Method Details
-
setUseRawValue
public void setUseRawValue(boolean useRawValue) -
setGapTime
public void setGapTime(long gapTime) -
process
-
accept
- Specified by:
acceptin interfaceConsumer<ParameterValueArray>
-
process
public void process(long time, double value, long expireMillis) -
collect
-
lastSampleTime
public long lastSampleTime()
-