Package org.yamcs.parameterarchive
Class BaseSegment
java.lang.Object
org.yamcs.parameterarchive.BaseSegment
- Direct Known Subclasses:
BooleanValueSegment
,DoubleValueSegment
,FloatValueSegment
,IntValueSegment
,LongValueSegment
,ObjectSegment
,SortedTimeSegment
Base class for all segments of values, timestamps or ParameterStatus
-
Field Summary
Modifier and TypeFieldDescriptionstatic final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
Deprecated.static final byte
static final byte
protected byte
-
Method Summary
Modifier and TypeMethodDescriptionvoid
byte
abstract int
void
static BaseSegment
parseSegment
(byte formatId, long segmentStart, ByteBuffer bb) abstract int
size()
abstract void
writeTo
(ByteBuffer buf)
-
Field Details
-
FORMAT_ID_SortedTimeValueSegmentV1
Deprecated.- See Also:
-
FORMAT_ID_ParameterStatusSegment
public static final byte FORMAT_ID_ParameterStatusSegment- See Also:
-
FORMAT_ID_GenericValueSegment
public static final byte FORMAT_ID_GenericValueSegment- See Also:
-
FORMAT_ID_IntValueSegment
public static final byte FORMAT_ID_IntValueSegment- See Also:
-
FORMAT_ID_StringValueSegment
public static final byte FORMAT_ID_StringValueSegment- See Also:
-
FORMAT_ID_FloatValueSegment
public static final byte FORMAT_ID_FloatValueSegment- See Also:
-
FORMAT_ID_DoubleValueSegment
public static final byte FORMAT_ID_DoubleValueSegment- See Also:
-
FORMAT_ID_LongValueSegment
public static final byte FORMAT_ID_LongValueSegment- See Also:
-
FORMAT_ID_BinaryValueSegment
public static final byte FORMAT_ID_BinaryValueSegment- See Also:
-
FORMAT_ID_BooleanValueSegment
public static final byte FORMAT_ID_BooleanValueSegment- See Also:
-
FORMAT_ID_SortedTimeValueSegmentV2
public static final byte FORMAT_ID_SortedTimeValueSegmentV2- See Also:
-
FORMAT_ID_GapSegment
public static final byte FORMAT_ID_GapSegment- See Also:
-
formatId
protected byte formatId
-
-
Method Details
-
writeTo
-
makeWritable
public void makeWritable() -
getMaxSerializedSize
public abstract int getMaxSerializedSize()- Returns:
- a high approximation for the serialized size in order to allocate a ByteBuffer big enough
-
consolidate
public void consolidate() -
getFormatId
public byte getFormatId() -
parseSegment
public static BaseSegment parseSegment(byte formatId, long segmentStart, ByteBuffer bb) throws DecodingException - Throws:
DecodingException
-
size
public abstract int size()
-