Class HexStringDecoder

java.lang.Object
org.yamcs.mdb.AbstractDataDecoder
org.yamcs.algo.HexStringDecoder
All Implemented Interfaces:
AlgorithmExecutor, DataDecoder

public class HexStringDecoder extends AbstractDataDecoder
Decoder that returns the string value in hex format of read bytes. This is intended to be used for special use cases where the hex value represents the actual string value.

This is intended to be used with a custom transformation for the BinaryDataEncoding of a string parameter.

The implementation assumes a fixed-size encoding.

The following XTCE snippet illustrates intended usage.

 <StringParameterType name="gitHash">
   <BinaryDataEncoding>
     <SizeInBits>
       <FixedValue>160</FixedValue>
     </SizeInBits>
     <FromBinaryTransformAlgorithm name="org_yamcs_algo_HexStringDecoder">
       <AlgorithmText language="java">org.yamcs.algo.HexStringDecoder</AlgorithmText>
     </FromBinaryTransformAlgorithm>
   </BinaryDataEncoding>
 </StringParameterType>