Package org.yamcs.algo
Class HexStringDecoder
java.lang.Object
org.yamcs.mdb.AbstractDataDecoder
org.yamcs.algo.HexStringDecoder
- All Implemented Interfaces:
AlgorithmExecutor
,DataDecoder
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>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionextractRaw
(DataEncoding de, BitBuffer buffer) Extracts the raw value from the buffer.Methods inherited from class org.yamcs.mdb.AbstractDataDecoder
addExecListener, execute, getAlgorithm, getExecutionContext, removeExecListener, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.yamcs.algorithms.AlgorithmExecutor
dispose, getInputList, getOutputList
-
Constructor Details
-
HexStringDecoder
-
-
Method Details
-
extractRaw
Description copied from interface:DataDecoder
Extracts the raw value from the buffer. The offset inside the buffer shall be moved to the end of the parameter- Returns:
-