Package org.yamcs.algorithms
Interface AlgorithmExecutor
-
- All Known Subinterfaces:
DataDecoder,DataEncoder
- All Known Implementing Classes:
AbstractAlgorithmExecutor,AbstractDataDecoder,AbstractDataEncoder,LeadingSizeBinaryDecoder,LeadingSizeBinaryEncoder,MathAlgorithmExecutor,ScriptAlgorithmExecutor
public interface AlgorithmExecutorRepresents the execution context of one algorithm.An AlgorithmExecutor is reused upon each update of one or more of its InputParameters.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidaddExecListener(AlgorithmExecListener listener)Add a listener to be called each time the algorithm has runAlgorithmgetAlgorithm()AlgorithmExecutionContextgetExecutionContext()default intgetLookbackSize(Parameter parameter)Deprecated.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
-
-
-
Method Detail
-
getAlgorithm
Algorithm getAlgorithm()
-
updateParameters
boolean updateParameters(List<ParameterValue> paramList)
Update parameters and return true if the algorithm should run- Parameters:
paramList- - list of input parameters- Returns:
- true if the algorithm should run
-
runAlgorithm
List<ParameterValue> runAlgorithm(long acqTime, long genTime)
Runs the associated algorithm with the latest InputParameters- Parameters:
acqTime-genTime-- Returns:
- the outputted parameters, if any
-
addExecListener
void addExecListener(AlgorithmExecListener listener)
Add a listener to be called each time the algorithm has run- Parameters:
listener-
-
getExecutionContext
AlgorithmExecutionContext getExecutionContext()
- Returns:
- the execution context in which the executor activates
-
getLookbackSize
@Deprecated default int getLookbackSize(Parameter parameter)
Deprecated.the method has been removed because it has nothing to do here. The implementation from AbstractAlgorithmExecutor has been moved inAlgorithmUtils
-
-