Package org.yamcs.parameterarchive
Class ParameterValueSegment
java.lang.Object
org.yamcs.parameterarchive.ParameterValueSegment
- Direct Known Subclasses:
SynchronizedParameterValueSegment
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 Summary
ConstructorsConstructorDescriptionParameterValueSegment
(int pid, SortedTimeSegment timeSegment, ValueSegment engValueSegment, ValueSegment rawValueSegment, ParameterStatusSegment parameterStatusSegment, SortedIntArray gaps) ParameterValueSegment
(int pid, SortedTimeSegment timeSegment, Yamcs.Value.Type engValueType, Yamcs.Value.Type rawValueType) Creates a new segment for a parameter with the given engValue and raw value types -
Method Summary
Modifier and TypeMethodDescriptionvoid
Optimise for writing to archivegetEngValue
(int pos) getGaps()
getRange
(int posStart, int posStop, boolean ascending, boolean retrieveParameterStatus) getRawValue
(int pos) long
long
getTimedValue
(int pos) void
insert
(int pos, BasicParameterValue pv) void
insertGap
(int pos) void
In rare circumstances, a segment read from the archive has to be modified.newAscendingIterator
(long t0) newDescendingIterator
(long t0) int
numGaps()
int
toString()
-
Constructor Details
-
ParameterValueSegment
public ParameterValueSegment(int pid, SortedTimeSegment timeSegment, ValueSegment engValueSegment, ValueSegment rawValueSegment, ParameterStatusSegment parameterStatusSegment, SortedIntArray gaps) -
ParameterValueSegment
public ParameterValueSegment(int pid, SortedTimeSegment timeSegment, Yamcs.Value.Type engValueType, Yamcs.Value.Type rawValueType) Creates a new segment for a parameter with the given engValue and raw value types
-
-
Method Details
-
insertGap
public void insertGap(int pos) -
insert
-
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
-
getConsolidatedRawValueSegment
-
getConsolidatedParmeterStatusSegment
-
getTimedValue
-
getEngValue
-
getRawValue
-
getGaps
-
newAscendingIterator
-
newDescendingIterator
-
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
-