Package org.yamcs.algorithms
Class MathAlgorithmExecutor
java.lang.Object
org.yamcs.algorithms.AbstractAlgorithmExecutor
org.yamcs.algorithms.MathAlgorithmExecutor
- All Implemented Interfaces:
AlgorithmExecutor
Executes XTCE math algorithms
MathAlgorithm
All the input parameters are converted to doubles and there is one single double output parameter-
Field Summary
Fields inherited from class org.yamcs.algorithms.AbstractAlgorithmExecutor
algorithmDef, execCtx, inputValues, log
-
Constructor Summary
ConstructorDescriptionMathAlgorithmExecutor
(Algorithm algorithmDef, AlgorithmExecutionContext execCtx, MathAlgorithm algorithm) -
Method Summary
Modifier and TypeMethodDescriptionexecute
(long acqTime, long genTime, ProcessingData data) Runs the associated algorithm with the latest InputParameters.protected void
updateInput
(int idx, InputParameter inputParameter, ParameterValue newValue) Called when the given inputParameter receives a value. idx is the index of the inputParameter in the algorithm definition input list.Methods inherited from class org.yamcs.algorithms.AbstractAlgorithmExecutor
getAlgorithm, getExecutionContext, getInputArgument, getInputParameter, getOutputParameter, update, updateInputArgument
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
-
Constructor Details
-
MathAlgorithmExecutor
public MathAlgorithmExecutor(Algorithm algorithmDef, AlgorithmExecutionContext execCtx, MathAlgorithm algorithm)
-
-
Method Details
-
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
- Returns:
- the output parameters, if any
-
updateInput
Description copied from class:AbstractAlgorithmExecutor
Called when the given inputParameter receives a value. idx is the index of the inputParameter in the algorithm definition input list.newValue can be either a
ParameterValue
or aArgumentValue
Can be used by subclasses to perform specific actions;
Note that all values are also collected in the inputList
- Overrides:
updateInput
in classAbstractAlgorithmExecutor
-