Class ParameterValueSegment

java.lang.Object
org.yamcs.parameterarchive.ParameterValueSegment

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

    • ParameterValueSegment

      public ParameterValueSegment(int pid, SortedTimeSegment timeSegment, ValueSegment engValueSegment, ValueSegment rawValueSegment, ParameterStatusSegment parameterStatusSegment, SortedIntArray gaps)
    • ParameterValueSegment

      public ParameterValueSegment(int pid, SortedTimeSegment timeSegment, int pos, BasicParameterValue pv)
      Creates a new segment and insert one value. The value is used to determine the individual engineering/raw segment types. All future values are expected to be the same type.

      The length of the segment (number of parameters) is given by the timeSegment length.

      If the length is greater than 1, then all other positions will be initialised with gaps.

  • 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)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getGaps

      public SortedIntArray getGaps()