Package org.yamcs.xtce
Class StringDataEncoding
java.lang.Object
org.yamcs.xtce.DataEncoding
org.yamcs.xtce.StringDataEncoding
- All Implemented Interfaces:
Serializable
For common encodings of string data.
String data is encoded in a buffer. The size of the buffer may be fixed or variable. The size of the string may be variable inside the buffer or may take the whole buffer.
Upon decoding a packet, the resulting raw value will be the string extracted from the buffer but the parameter is considered to occupy the whole buffer (meaning that the next parameter will come in the packet after the end of the buffer not after the end of the string)
The distinction between the string and the buffer containing the string has been made in Yamcs 5.5 in order to comply better with the XTCE 1.2.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static enum
-
Field Summary
Fields inherited from class org.yamcs.xtce.DataEncoding
fromBinaryTransformAlgorithm, sizeInBits, toBinaryTransformAlgorithm
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Create a shallow copy of the data encodingint
int
int
byte
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
setEncoding
(String encoding) void
setMaxSizeInBytes
(int maxSizeInBytes) void
setSizeType
(StringDataEncoding.SizeType sizeType) void
setTerminationChar
(byte tc) toString()
Methods inherited from class org.yamcs.xtce.DataEncoding
getByteOrder, getDependentParameters, getFromBinaryTransformAlgorithm, getSizeInBits, getToBinaryTransformAlgorithm, setFromBinaryTransformAlgorithm, setSizeInBits, setToBinaryTransformAlgorithm
-
Constructor Details
-
StringDataEncoding
-
-
Method Details
-
toBuilder
- Specified by:
toBuilder
in classDataEncoding
-
setSizeType
-
getSizeType
-
getSizeInBytesOfSizeTag
public int getSizeInBytesOfSizeTag() -
getSizeInBitsOfSizeTag
public int getSizeInBitsOfSizeTag() -
getTerminationChar
public byte getTerminationChar() -
setTerminationChar
public void setTerminationChar(byte tc) -
getDynamicBufferSize
-
getMaxSizeInBytes
public int getMaxSizeInBytes() -
setMaxSizeInBytes
public void setMaxSizeInBytes(int maxSizeInBytes) -
toString
-
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
-
getEncoding
-
setEncoding
-
copy
Description copied from class:DataEncoding
Create a shallow copy of the data encoding- Specified by:
copy
in classDataEncoding
- Returns:
-