Package org.yamcs.xtceproc
Class AbstractDataEncoder
- java.lang.Object
-
- org.yamcs.xtceproc.AbstractDataEncoder
-
- All Implemented Interfaces:
AlgorithmExecutor
,DataEncoder
- Direct Known Subclasses:
LeadingSizeBinaryEncoder
public abstract class AbstractDataEncoder extends Object implements DataEncoder
stubbed implementation of DataEncoder 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
Constructors Constructor Description AbstractDataEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addExecListener(AlgorithmExecListener listener)
Algorithm
getAlgorithm()
AlgorithmExecutionContext
getExecutionContext()
int
getLookbackSize(Parameter parameter)
Set<Parameter>
getRequiredParameters()
List<ParameterValue>
runAlgorithm(long acqTime, long genTime)
Runs the associated algorithm with the latest InputParametersboolean
updateParameters(List<ParameterValue> paramList)
Update parameters and return true if the algorithm should run-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.yamcs.xtceproc.DataEncoder
encodeRaw
-
-
-
-
Method Detail
-
getAlgorithm
public Algorithm getAlgorithm()
- Specified by:
getAlgorithm
in interfaceAlgorithmExecutor
-
getLookbackSize
public int getLookbackSize(Parameter parameter)
- Specified by:
getLookbackSize
in interfaceAlgorithmExecutor
-
updateParameters
public boolean updateParameters(List<ParameterValue> paramList)
Update parameters and return true if the algorithm should run- Specified by:
updateParameters
in interfaceAlgorithmExecutor
- Parameters:
paramList
- - list of input parameters- Returns:
- true if the algorithm should run
-
runAlgorithm
public List<ParameterValue> runAlgorithm(long acqTime, long genTime)
Runs the associated algorithm with the latest InputParameters- Specified by:
runAlgorithm
in interfaceAlgorithmExecutor
- Parameters:
acqTime
-genTime
-- Returns:
- the outputted parameters, if any
-
addExecListener
public void addExecListener(AlgorithmExecListener listener)
- Specified by:
addExecListener
in interfaceAlgorithmExecutor
-
getExecutionContext
public AlgorithmExecutionContext getExecutionContext()
- Specified by:
getExecutionContext
in interfaceAlgorithmExecutor
-
-