Class StreamParameterProvider

java.lang.Object
com.google.common.util.concurrent.AbstractService
org.yamcs.AbstractProcessorService
org.yamcs.tctm.StreamParameterProvider
All Implemented Interfaces:
com.google.common.util.concurrent.Service, ParameterProvider, ProcessorService, StreamSubscriber

public class StreamParameterProvider extends AbstractProcessorService implements StreamSubscriber, ParameterProvider
Provides parameters from yarch streams (pp_realtime) to ParameterProcessorManager
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service

    com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
  • Field Summary

    Fields inherited from class org.yamcs.AbstractProcessorService

    config, log, processor
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canProvide(org.yamcs.protobuf.Yamcs.NamedObjectId id)
    Returns whether or not a given parameter can be provided by this provider
    boolean
    canProvide(org.yamcs.xtce.Parameter p)
     
    protected void
     
    protected void
     
    org.yamcs.xtce.Parameter
    getParameter(org.yamcs.protobuf.Yamcs.NamedObjectId id)
    Returns the parameterDefinition corresponding to the parameter id
    void
    init(Processor processor, YConfiguration config, Object spec)
     
    void
    onTuple(Stream s, Tuple tuple)
    Make sure all parameters are defined in the MDB, otherwise the PRM will choke
    void
    Send parameters to this processor.
    void
    startProviding(org.yamcs.xtce.Parameter paramDef)
    Adds a new parameter to the list of parameters that have to provided
    void
    start providing all known parameters
    void
    stopProviding(org.yamcs.xtce.Parameter paramDef)
    Removes a parameter from the list of parameters that have to be provided
    void
     

    Methods inherited from class org.yamcs.AbstractProcessorService

    getConfig, getYamcsInstance

    Methods inherited from class com.google.common.util.concurrent.AbstractService

    addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, doCancelStart, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.yamcs.ProcessorService

    getSpec

    Methods inherited from interface com.google.common.util.concurrent.Service

    addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
  • Constructor Details

    • StreamParameterProvider

      public StreamParameterProvider()
  • Method Details

    • init

      public void init(Processor processor, YConfiguration config, Object spec)
      Specified by:
      init in interface ProcessorService
      Overrides:
      init in class AbstractProcessorService
      config - service configuration as specified in processor.yaml
      spec - passed by the user when creating the processor (for instance via the REST API)
    • 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
    • onTuple

      public void onTuple(Stream s, Tuple tuple)
      Make sure all parameters are defined in the MDB, otherwise the PRM will choke
      Specified by:
      onTuple in interface StreamSubscriber
    • streamClosed

      public void streamClosed(Stream s)
      Specified by:
      streamClosed in interface StreamSubscriber
    • setParameterProcessor

      public void setParameterProcessor(ParameterProcessor paraListener)
      Description copied from interface: ParameterProvider
      Send parameters to this processor.
      Specified by:
      setParameterProcessor in interface ParameterProvider
    • stopProviding

      public void stopProviding(org.yamcs.xtce.Parameter paramDef)
      Description copied from interface: ParameterProvider
      Removes a parameter from the list of parameters that have to be provided
      Specified by:
      stopProviding in interface ParameterProvider
    • canProvide

      public boolean canProvide(org.yamcs.protobuf.Yamcs.NamedObjectId id)
      Description copied from interface: ParameterProvider
      Returns whether or not a given parameter can be provided by this provider
      Specified by:
      canProvide in interface ParameterProvider
      Returns:
    • canProvide

      public boolean canProvide(org.yamcs.xtce.Parameter p)
      Specified by:
      canProvide in interface ParameterProvider
    • getParameter

      public org.yamcs.xtce.Parameter getParameter(org.yamcs.protobuf.Yamcs.NamedObjectId id) throws InvalidIdentification
      Description copied from interface: ParameterProvider
      Returns the parameterDefinition corresponding to the parameter id
      Specified by:
      getParameter in interface ParameterProvider
      Parameters:
      id - - id of the parameter that is returned
      Returns:
      Throws:
      InvalidIdentification
    • startProviding

      public void startProviding(org.yamcs.xtce.Parameter paramDef)
      Description copied from interface: ParameterProvider
      Adds a new parameter to the list of parameters that have to provided
      Specified by:
      startProviding in interface ParameterProvider
    • startProvidingAll

      public void startProvidingAll()
      Description copied from interface: ParameterProvider
      start providing all known parameters
      Specified by:
      startProvidingAll in interface ParameterProvider