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 classstatic 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 encodingintintintbyteparseString(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)voidsetEncoding(String encoding) voidsetMaxSizeInBytes(int maxSizeInBytes) voidsetSizeType(StringDataEncoding.SizeType sizeType) voidsetTerminationChar(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:
toBuilderin 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: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
-
getEncoding
-
setEncoding
-
copy
Description copied from class:DataEncodingCreate a shallow copy of the data encoding- Specified by:
copyin classDataEncoding- Returns:
-