- All Known Subinterfaces:
DataDecoder,DataEncoder
- All Known Implementing Classes:
AbstractAlgorithmExecutor,AbstractDataDecoder,AbstractDataEncoder,AbstractJavaExprExecutor,LeadingSizeBinaryDecoder,LeadingSizeBinaryEncoder,MathAlgorithmExecutor,ScriptAlgorithmExecutor
public interface AlgorithmExecutor
Represents the execution context of one algorithm.
An AlgorithmExecutor is reused upon each update of one or more of its InputParameters.
-
Method Summary
Modifier and TypeMethodDescriptionexecute(long acqTime, long genTime, ProcessingData data) Runs the associated algorithm with the latest InputParameters.booleanupdate(ProcessingData processingData) This method is called each time new parameters are received (for example extracting them from a packet).
-
Method Details
-
getAlgorithm
Algorithm getAlgorithm() -
update
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.
- Returns:
- true if the algorithm should run
-
execute
AlgorithmExecutionResult execute(long acqTime, long genTime, ProcessingData data) throws AlgorithmException 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- Parameters:
acqTime-genTime-- Returns:
- the output parameters, if any
- Throws:
AlgorithmException
-
getExecutionContext
AlgorithmExecutionContext getExecutionContext()- Returns:
- the execution context in which the executor activates
-