Class ParameterValueSegment

java.lang.Object
org.yamcs.parameterarchive.ParameterValueSegment
Direct Known Subclasses:
SynchronizedParameterValueSegment

public class ParameterValueSegment extends Object
Stores parameter values for one parameter over a time range.

It is composed of a time, engineering, raw and parameter status segments and possibly by a list of gaps;

The engineering, raw and parameter status contain only the data - gaps are not stored in the segment themselves (the timeSegment has by definition no gap).

To convert from a position as used in the time segment to a position in the other segments, the gaps have to be taken into account. Such conversion can naturally result in no value if the requested position is part of the gaps.

The time segment is shared with other objects of this class and is updated outside this class

  • Constructor Details

  • Method Details

    • insertGap

      public void insertGap(int pos)
    • insert

      public void insert(int pos, BasicParameterValue pv)
    • consolidate

      public void consolidate()

      Optimise for writing to archive

    • getRange

      public ParameterValueArray getRange(int posStart, int posStop, boolean ascending, boolean retrieveParameterStatus)
    • getSegmentStart

      public long getSegmentStart()
    • getSegmentEnd

      public long getSegmentEnd()
    • numGaps

      public int numGaps()
    • numValues

      public int numValues()
    • getConsolidatedEngValueSegment

      public BaseSegment getConsolidatedEngValueSegment()
    • getConsolidatedRawValueSegment

      public BaseSegment getConsolidatedRawValueSegment()
    • getConsolidatedParmeterStatusSegment

      public BaseSegment getConsolidatedParmeterStatusSegment()
    • getTimedValue

      public TimedValue getTimedValue(int pos)
    • getEngValue

      public Value getEngValue(int pos)
    • getRawValue

      public Value getRawValue(int pos)
    • getGaps

      public SortedIntArray getGaps()
    • newAscendingIterator

      public PeekingIterator<TimedValue> newAscendingIterator(long t0)
    • newDescendingIterator

      public PeekingIterator<TimedValue> newDescendingIterator(long t0)
    • makeWritable

      public void makeWritable()
      In rare circumstances, a segment read from the archive has to be modified.

      This method updates the object such that it can be modified

    • toString

      public String toString()
      Overrides:
      toString in class Object