Package org.yamcs.algorithms
Class AlgorithmExecutionContext
java.lang.Object
org.yamcs.algorithms.AlgorithmExecutionContext
A context is a collection of active algorithms. Each algorithm has only one instance active in a given context.
There is normally a global context in a processor and a few contexts related to the command verifiers.
The process(long, ProcessingData)
method will trigger calling all the active algorithms from this context in
order.
-
Constructor Summary
ConstructorDescriptionAlgorithmExecutionContext
(String contextName, ProcessorData procData, int maxErrCount) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAlgorithm
(ActiveAlgorithm activeAlgorithm) boolean
containsAlgorithm
(String algoFqn) void
disableTracing
(Algorithm algo) void
enableTracing
(Algorithm algo) getAlgorithm
(String algoFqn) getAlgorithmStatus
(String algoFqn) getMdb()
getName()
void
void
process
(long acqTime, ProcessingData data) Update the input data and run the affected algorithmsremoveAlgorithm
(String algoFqn) remove the active algorithm with the given identifier.removeAlgorithm
(Algorithm algorithm)
-
Constructor Details
-
AlgorithmExecutionContext
-
-
Method Details
-
process
Update the input data and run the affected algorithmsAdd the result of the algorithms to the processing data
-
getName
-
containsAlgorithm
-
addAlgorithm
-
removeAlgorithm
remove the active algorithm with the given identifier.The algorithm will not be called in subsequent calls to
process(long, ProcessingData)
- Parameters:
algoFqn
-- Returns:
- the active algorithm removed or null if there was no active algorithm
-
removeAlgorithm
-
getActiveAlgorithms
-
getProcessorData
-
getMdb
-
getEventProducer
-
enableTracing
-
disableTracing
-
getTrace
-
logTrace
-
getAlgorithm
-
getAlgorithmStatus
-