Class ParameterValueSegment
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
ConstructorDescriptionParameterValueSegment
(int pid, SortedTimeSegment timeSegment, int pos, BasicParameterValue pv) Creates a new segment and insert one value.ParameterValueSegment
(int pid, SortedTimeSegment timeSegment, ValueSegment engValueSegment, ValueSegment rawValueSegment, ParameterStatusSegment parameterStatusSegment, SortedIntArray gaps) -
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) 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, 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
-
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
-
toString
-
getGaps
-