Package org.yamcs.mdb

Class AbstractDataDecoder

All Implemented Interfaces:
AlgorithmExecutor, DataDecoder
Direct Known Subclasses:

public abstract class AbstractDataDecoder extends Object implements DataDecoder
stubbed implementation of DataDecoder 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 Details

    • AbstractDataDecoder

      public AbstractDataDecoder()
  • Method Details

    • getAlgorithm

      public Algorithm getAlgorithm()
      Specified by:
      getAlgorithm in interface AlgorithmExecutor
    • update

      public boolean update(ProcessingData data)
      Description copied from interface: AlgorithmExecutor
      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.

      Specified by:
      update in interface AlgorithmExecutor
      true if the algorithm should run
    • execute

      public AlgorithmExecutionResult execute(long acqTime, long genTime, ProcessingData data)
      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

      Specified by:
      execute in interface AlgorithmExecutor
      the output parameters, if any
    • addExecListener

      public void addExecListener(AlgorithmExecListener listener)
    • removeExecListener

      public void removeExecListener(AlgorithmExecListener listener)
    • getExecutionContext

      public AlgorithmExecutionContext getExecutionContext()
      Specified by:
      getExecutionContext in interface AlgorithmExecutor
      the execution context in which the executor activates