Package org.yamcs.xtce
Class BinaryDataEncoding
- java.lang.Object
-
- org.yamcs.xtce.DataEncoding
-
- org.yamcs.xtce.BinaryDataEncoding
-
- All Implemented Interfaces:
Serializable
public class BinaryDataEncoding extends DataEncoding
Although XTCE suggests that this class could be used to encode/decode integer/float/string data, In Yamcs this is used just for encoding binary data (i.e. binary to binary). SeeDataEncodingfor how to use the other classes to encode/decode arbitrary binary to a float/integer/string.DIFFERS_FROM_XTCE: XTCE doesn't support LEADING_SIZE parameter types (it does only for strings). However it allows the size to be specified dynamically by the value of another parameter.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBinaryDataEncoding.Builderstatic classBinaryDataEncoding.Type
-
Field Summary
-
Fields inherited from class org.yamcs.xtce.DataEncoding
fromBinaryTransformAlgorithm, sizeInBits, toBinaryTransformAlgorithm
-
-
Constructor Summary
Constructors Constructor Description BinaryDataEncoding(BinaryDataEncoding bde)copy constructorBinaryDataEncoding(BinaryDataEncoding.Builder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BinaryDataEncodingcopy()Create a shallow copy of the data encodingintgetSizeInBitsOfSizeTag()BinaryDataEncoding.TypegetType()ObjectparseString(String stringValue)parses the string into a java object of the correct type Has to match the DataEncodingDecoder (so probably it should be moved there somehow: TODO)voidsetSizeInBitsOfSizeTag(int sizeInBits)voidsetSizeType(BinaryDataEncoding.Type sizeType)BinaryDataEncoding.BuildertoBuilder()StringtoString()-
Methods inherited from class org.yamcs.xtce.DataEncoding
getByteOrder, getDependentParameters, getFromBinaryTransformAlgorithm, getSizeInBits, getToBinaryTransformAlgorithm, setFromBinaryTransformAlgorithm, setSizeInBits, setToBinaryTransformAlgorithm
-
-
-
-
Constructor Detail
-
BinaryDataEncoding
public BinaryDataEncoding(BinaryDataEncoding bde)
copy constructor- Parameters:
bde-
-
BinaryDataEncoding
public BinaryDataEncoding(BinaryDataEncoding.Builder builder)
-
-
Method Detail
-
toBuilder
public BinaryDataEncoding.Builder toBuilder()
- Specified by:
toBuilderin classDataEncoding
-
setSizeType
public void setSizeType(BinaryDataEncoding.Type sizeType)
-
getType
public BinaryDataEncoding.Type getType()
-
getSizeInBitsOfSizeTag
public int getSizeInBitsOfSizeTag()
-
setSizeInBitsOfSizeTag
public void setSizeInBitsOfSizeTag(int sizeInBits)
-
parseString
public Object parseString(String stringValue)
Description copied from class:DataEncodingparses the string into a java object of the correct type Has to match the DataEncodingDecoder (so probably it should be moved there somehow: TODO)- Specified by:
parseStringin classDataEncoding
-
copy
public BinaryDataEncoding copy()
Description copied from class:DataEncodingCreate a shallow copy of the data encoding- Specified by:
copyin classDataEncoding- Returns:
-
-