Package org.yamcs.xtce
Class BinaryDataEncoding
java.lang.Object
org.yamcs.xtce.DataEncoding
org.yamcs.xtce.BinaryDataEncoding
- All Implemented Interfaces:
Serializable
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). See
DataEncoding
for 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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
-
Field Summary
Modifier and TypeFieldDescriptionprotected DynamicIntegerValue
For variable-sized parameters or arguments, a reference to the parameter or argument containing the size.Fields inherited from class org.yamcs.xtce.DataEncoding
fromBinaryTransformAlgorithm, sizeInBits, toBinaryTransformAlgorithm
-
Constructor Summary
ConstructorDescriptioncopy constructor -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Create a shallow copy of the data encodingint
getType()
boolean
parseString
(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)void
setSizeInBitsOfSizeTag
(int sizeInBits) void
setSizeType
(BinaryDataEncoding.Type sizeType) toString()
Methods inherited from class org.yamcs.xtce.DataEncoding
getByteOrder, getDependentParameters, getFromBinaryTransformAlgorithm, getSizeInBits, getToBinaryTransformAlgorithm, setFromBinaryTransformAlgorithm, setSizeInBits, setToBinaryTransformAlgorithm
-
Field Details
-
dynamicSize
For variable-sized parameters or arguments, a reference to the parameter or argument containing the size.
-
-
Constructor Details
-
BinaryDataEncoding
copy constructor- Parameters:
bde
-
-
BinaryDataEncoding
-
-
Method Details
-
toBuilder
- Specified by:
toBuilder
in classDataEncoding
-
setSizeType
-
getType
-
getSizeInBitsOfSizeTag
public int getSizeInBitsOfSizeTag() -
setSizeInBitsOfSizeTag
public void setSizeInBitsOfSizeTag(int sizeInBits) -
isVariableSize
public boolean isVariableSize() -
getDynamicSize
-
parseString
Description copied from class:DataEncoding
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)- Specified by:
parseString
in classDataEncoding
-
copy
Description copied from class:DataEncoding
Create a shallow copy of the data encoding- Specified by:
copy
in classDataEncoding
- Returns:
-
toString
-