Class ParameterProcessorManager

java.lang.Object
com.google.common.util.concurrent.AbstractService
org.yamcs.parameter.ParameterProcessorManager
All Implemented Interfaces:
com.google.common.util.concurrent.Service, ParameterProcessor

public class ParameterProcessorManager extends com.google.common.util.concurrent.AbstractService implements ParameterProcessor
Makes the connection between ParameterProvider and ParameterProcessor

Each parameter processor will get the ProcessingData delivery (those containing parameters it is interested into) and can further add parameters to it.

The AlgorithmManager is a parameter processor and is added first in the list.

After each parameter processor is called, the alarm manager (if enabled) will check the newly added parameters

  • Field Details

    • processor

      public final Processor processor
  • Constructor Details

  • Method Details

    • init

      public void init()
      This is called after all the parameter providers have been added but before the start.
    • addParameterProvider

      public void addParameterProvider(ParameterProvider parameterProvider)
    • subscribe

      public int subscribe(Collection<Parameter> paraList, ParameterProcessor paramProcessor)
    • subscribeAll

      public int subscribeAll(ParameterProcessor processor)
    • unsubscribeAll

      public void unsubscribeAll(int subscriptionId)
    • unsubscribe

      public void unsubscribe(int subscriptionId)
    • getParameter

      public Parameter getParameter(String fqn) throws InvalidIdentification
      returns a parameter based on fully qualified name
      Parameters:
      fqn -
      Returns:
      Throws:
      InvalidIdentification
    • getParameter

      public Parameter getParameter(Yamcs.NamedObjectId paraId) throws InvalidIdentification
      Parameters:
      paraId -
      Returns:
      the corresponding parameter definition for a IntemIdentification
      Throws:
      InvalidIdentification - in case no provider knows of this parameter.
    • process

      public void process(ProcessingData processingData)
      Specified by:
      process in interface ParameterProcessor
    • getSoftwareParameterManager

      public SoftwareParameterManager getSoftwareParameterManager(DataSource ds)
      Returns:
      the SoftwareParameterManager associated to the DataSource or null if not configured
    • getParameterProvider

      public <T extends ParameterProvider> T getParameterProvider(Class<T> type)
    • getAlarmChecker

      public ParameterAlarmChecker getAlarmChecker()
    • getAlarmServer

      public AlarmServer<Parameter,ParameterValue> getAlarmServer()
    • hasParameterCache

      public boolean hasParameterCache()
    • getValuesFromCache

      public List<ParameterValue> getValuesFromCache(Parameter param)
      Get all the values from cache for a specific parameters The parameter are returned in descending order (newest parameter is returned first). Note that you can only all this function if the hasParameterCache() returns true.
      Parameters:
      param -
      Returns:
    • getParameterCache

      public ParameterCache getParameterCache()
    • subscribeToProviders

      public void subscribeToProviders(Collection<Parameter> itemList)
      Called to subscribe to providers for the given parameters.

      Unless already subscribed, the PRM will start delivering from now on those parameters.

      Parameters:
      itemList -
    • doStart

      protected void doStart()
      Specified by:
      doStart in class com.google.common.util.concurrent.AbstractService
    • doStop

      protected void doStop()
      Specified by:
      doStop in class com.google.common.util.concurrent.AbstractService
    • getLastValueCache

      public LastValueCache getLastValueCache()
    • addSoftwareParameterManager

      public void addSoftwareParameterManager(DataSource ds, SoftwareParameterManager swParameterManager)
      Register a SoftwareParameterManager for the given DataSource. Throws an IllegalStateException if there is already registered a parameter manager for this data source.
      Parameters:
      ds -
      swParameterManager -
    • getParameterRequestManager

      public ParameterRequestManager getParameterRequestManager()