Package org.yamcs.parameterarchive
Class LongValueSegment
- java.lang.Object
-
- org.yamcs.parameterarchive.BaseSegment
-
- org.yamcs.parameterarchive.LongValueSegment
-
- All Implemented Interfaces:
ValueSegment
public class LongValueSegment extends BaseSegment implements ValueSegment
-
-
Field Summary
-
Fields inherited from class org.yamcs.parameterarchive.BaseSegment
FORMAT_ID_BinaryValueSegment, FORMAT_ID_BooleanValueSegment, FORMAT_ID_DoubleValueSegment, FORMAT_ID_FloatValueSegment, FORMAT_ID_GenericValueSegment, FORMAT_ID_IntValueSegment, FORMAT_ID_LongValueSegment, FORMAT_ID_ParameterStatusSegment, FORMAT_ID_SortedTimeValueSegment, FORMAT_ID_StringValueSegment, formatId
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int pos, Value v)
LongValueSegment
consolidate()
static LongValueSegment
consolidate(List<Value> values, org.yamcs.protobuf.Yamcs.Value.Type type)
int
getMaxSerializedSize()
ValueArray
getRange(int posStart, int posStop, boolean ascending)
returns an array containing the values in the range [posStart, posStop) if ascending or [posStop, posStart) if descendingValue
getValue(int index)
returns Value at position indexstatic LongValueSegment
parseFrom(ByteBuffer bb)
int
size()
void
writeTo(ByteBuffer bb)
-
Methods inherited from class org.yamcs.parameterarchive.BaseSegment
getFormatId, parseSegment
-
-
-
-
Method Detail
-
writeTo
public void writeTo(ByteBuffer bb)
- Specified by:
writeTo
in classBaseSegment
-
parseFrom
public static LongValueSegment parseFrom(ByteBuffer bb) throws DecodingException
- Throws:
DecodingException
-
consolidate
public static LongValueSegment consolidate(List<Value> values, org.yamcs.protobuf.Yamcs.Value.Type type)
-
getMaxSerializedSize
public int getMaxSerializedSize()
- Specified by:
getMaxSerializedSize
in classBaseSegment
- Returns:
- a high approximation for the serialized size in order to allocate a ByteBuffer big enough
-
getRange
public ValueArray getRange(int posStart, int posStop, boolean ascending)
Description copied from interface:ValueSegment
returns an array containing the values in the range [posStart, posStop) if ascending or [posStop, posStart) if descending- Specified by:
getRange
in interfaceValueSegment
- Returns:
- an array containing the values in the specified range
-
getValue
public Value getValue(int index)
Description copied from interface:ValueSegment
returns Value at position index- Specified by:
getValue
in interfaceValueSegment
- Returns:
- the value at the index
-
size
public int size()
- Specified by:
size
in interfaceValueSegment
- Specified by:
size
in classBaseSegment
-
add
public void add(int pos, Value v)
- Specified by:
add
in interfaceValueSegment
-
consolidate
public LongValueSegment consolidate()
- Specified by:
consolidate
in interfaceValueSegment
-
-