Package org.yamcs.mdb
Class AbstractDataDecoder
java.lang.Object
org.yamcs.mdb.AbstractDataDecoder
- All Implemented Interfaces:
AlgorithmExecutor
,DataDecoder
- Direct Known Subclasses:
BitMaskBooleanDecoder
,HexStringDecoder
,LeadingSizeBinaryDecoder
,RemainingBinaryDecoder
,ReverseBinaryDecoder
,TimeBinaryDecoder
stubbed implementation of DataDecoder that "removes" all the AlgorithmExecutor methods -
to be used until the data decoders will work as algorithms, or for data decoders that do not need any input
parameters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExecListener
(AlgorithmExecListener listener) execute
(long acqTime, long genTime, ProcessingData data) Runs the associated algorithm with the latest InputParameters.void
removeExecListener
(AlgorithmExecListener listener) boolean
update
(ProcessingData data) This method is called each time new parameters are received (for example extracting them from a packet).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
Methods inherited from interface org.yamcs.mdb.DataDecoder
extractRaw
-
Constructor Details
-
AbstractDataDecoder
public AbstractDataDecoder()
-
-
Method Details
-
getAlgorithm
- Specified by:
getAlgorithm
in interfaceAlgorithmExecutor
-
update
Description copied from interface:AlgorithmExecutor
This method is called each time new parameters are received (for example extracting them from a packet).The executor should copy its inputs if updated or should use the list to determine if it should run.
- Specified by:
update
in interfaceAlgorithmExecutor
- Returns:
- true if the algorithm should run
-
execute
Description copied from interface:AlgorithmExecutor
Runs the associated algorithm with the latest InputParameters.Should throw an exception if there is an error within the algorithm.
The error message and error count will be remembered and available to external clients via the API.
The processing data parameter is passed if required to calibrate the output values. It shall not be updated by the executor as it is done in the
ActiveAlgorithm
- Specified by:
execute
in interfaceAlgorithmExecutor
- Returns:
- the output parameters, if any
-
addExecListener
-
removeExecListener
-
getExecutionContext
- Specified by:
getExecutionContext
in interfaceAlgorithmExecutor
- Returns:
- the execution context in which the executor activates
-