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 voidaddExecListener(AlgorithmExecListener listener)AlgorithmgetAlgorithm()AlgorithmExecutionContextgetExecutionContext()intgetLookbackSize(Parameter parameter)Set<Parameter>getRequiredParameters()List<ParameterValue>runAlgorithm(long acqTime, long genTime)Runs the associated algorithm with the latest InputParametersbooleanupdateParameters(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:
getAlgorithmin interfaceAlgorithmExecutor
-
getLookbackSize
public int getLookbackSize(Parameter parameter)
- Specified by:
getLookbackSizein interfaceAlgorithmExecutor
-
updateParameters
public boolean updateParameters(List<ParameterValue> paramList)
Update parameters and return true if the algorithm should run- Specified by:
updateParametersin 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:
runAlgorithmin interfaceAlgorithmExecutor- Parameters:
acqTime-genTime-- Returns:
- the outputted parameters, if any
-
addExecListener
public void addExecListener(AlgorithmExecListener listener)
- Specified by:
addExecListenerin interfaceAlgorithmExecutor
-
getExecutionContext
public AlgorithmExecutionContext getExecutionContext()
- Specified by:
getExecutionContextin interfaceAlgorithmExecutor
-
-