Class Downsampler

java.lang.Object
org.yamcs.http.api.Downsampler
All Implemented Interfaces:
Consumer<ParameterValueArray>

public class Downsampler extends Object implements 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.

  • 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

      public void process(ParameterValue pval)
    • accept

      public void accept(ParameterValueArray t)
      Specified by:
      accept in interface Consumer<ParameterValueArray>
    • process

      public void process(long time, double value, long expireMillis)
    • collect

      public List<Downsampler.Sample> collect()
    • lastSampleTime

      public long lastSampleTime()