Package org.yamcs.parameterarchive
Class BaseSegment
- java.lang.Object
-
- org.yamcs.parameterarchive.BaseSegment
-
- Direct Known Subclasses:
BooleanValueSegment,DoubleValueSegment,FloatValueSegment,IntValueSegment,LongValueSegment,ObjectSegment,SortedTimeSegment
public abstract class BaseSegment extends Object
Base class for all segments of values, timestamps or ParameterStatus
-
-
Field Summary
Fields Modifier and Type Field Description static byteFORMAT_ID_BinaryValueSegmentstatic byteFORMAT_ID_BooleanValueSegmentstatic byteFORMAT_ID_DoubleValueSegmentstatic byteFORMAT_ID_FloatValueSegmentstatic byteFORMAT_ID_GenericValueSegmentstatic byteFORMAT_ID_IntValueSegmentstatic byteFORMAT_ID_LongValueSegmentstatic byteFORMAT_ID_ParameterStatusSegmentstatic byteFORMAT_ID_SortedTimeValueSegmentstatic byteFORMAT_ID_StringValueSegmentprotected byteformatId
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description bytegetFormatId()abstract intgetMaxSerializedSize()static BaseSegmentparseSegment(byte formatId, long segmentStart, ByteBuffer bb)abstract intsize()abstract voidwriteTo(ByteBuffer buf)
-
-
-
Field Detail
-
FORMAT_ID_SortedTimeValueSegment
public static final byte FORMAT_ID_SortedTimeValueSegment
- See Also:
- Constant Field Values
-
FORMAT_ID_ParameterStatusSegment
public static final byte FORMAT_ID_ParameterStatusSegment
- See Also:
- Constant Field Values
-
FORMAT_ID_GenericValueSegment
public static final byte FORMAT_ID_GenericValueSegment
- See Also:
- Constant Field Values
-
FORMAT_ID_IntValueSegment
public static final byte FORMAT_ID_IntValueSegment
- See Also:
- Constant Field Values
-
FORMAT_ID_StringValueSegment
public static final byte FORMAT_ID_StringValueSegment
- See Also:
- Constant Field Values
-
FORMAT_ID_FloatValueSegment
public static final byte FORMAT_ID_FloatValueSegment
- See Also:
- Constant Field Values
-
FORMAT_ID_DoubleValueSegment
public static final byte FORMAT_ID_DoubleValueSegment
- See Also:
- Constant Field Values
-
FORMAT_ID_LongValueSegment
public static final byte FORMAT_ID_LongValueSegment
- See Also:
- Constant Field Values
-
FORMAT_ID_BinaryValueSegment
public static final byte FORMAT_ID_BinaryValueSegment
- See Also:
- Constant Field Values
-
FORMAT_ID_BooleanValueSegment
public static final byte FORMAT_ID_BooleanValueSegment
- See Also:
- Constant Field Values
-
formatId
protected byte formatId
-
-
Method Detail
-
writeTo
public abstract void writeTo(ByteBuffer buf)
-
getMaxSerializedSize
public abstract int getMaxSerializedSize()
- Returns:
- a high approximation for the serialized size in order to allocate a ByteBuffer big enough
-
getFormatId
public byte getFormatId()
-
parseSegment
public static BaseSegment parseSegment(byte formatId, long segmentStart, ByteBuffer bb) throws DecodingException
- Throws:
DecodingException
-
size
public abstract int size()
-
-