Package org.yamcs.http.api
Class Downsampler
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
Modifier and TypeClassDescriptionstatic class
A cumulative sample that keeps track of a rolling average among others. -
Constructor Summary
ConstructorDescriptionDownsampler
(long start, long stop) Downsampler
(long start, long stop, int sampleCount) Downsampler
(long start, long stop, int sampleCount, boolean useRawValue) -
Method Summary
Modifier and TypeMethodDescriptionvoid
collect()
long
void
process
(long time, double value, long expireMillis) void
process
(ParameterValue pval)
-
Constructor Details
-
Downsampler
public Downsampler(long start, long stop) -
Downsampler
public Downsampler(long start, long stop, int sampleCount) -
Downsampler
public Downsampler(long start, long stop, int sampleCount, boolean useRawValue)
-
-
Method Details
-
process
-
accept
- Specified by:
accept
in interfaceConsumer<ParameterValueArray>
-
process
public void process(long time, double value, long expireMillis) -
collect
-
lastSampleTime
public long lastSampleTime()
-