Package org.yamcs.mdb

Class XtceTmProcessor

java.lang.Object
com.google.common.util.concurrent.AbstractService
org.yamcs.AbstractProcessorService
org.yamcs.mdb.XtceTmProcessor
All Implemented Interfaces:
com.google.common.util.concurrent.Service, ContainerProvider, ParameterProvider, ProcessorService, TmProcessor

public class XtceTmProcessor extends AbstractProcessorService implements TmProcessor, ParameterProvider, ContainerProvider
Does the job of getting containers and transforming them into parameters which are then sent to the parameter request manager for the distribution to the requesters. Relies on XtceTmExtractor for extracting the parameters out of containers
  • 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
    Modifier and Type
    Field
    Description
    final Mdb
     

    Fields inherited from class org.yamcs.AbstractProcessorService

    config, log, processor
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a TmProcessor to be used in "standalone" mode, outside of any processor It still uses the processor config for configuration parameters relevant to container processing
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canProvide(org.yamcs.protobuf.Yamcs.NamedObjectId paraId)
    Returns whether or not a given parameter can be provided by this provider
    boolean
    canProvide(org.yamcs.xtce.Parameter para)
     
    boolean
    canProvideContainer(org.yamcs.protobuf.Yamcs.NamedObjectId containerId)
    Returns whether or not a given container can be provided by this provider
    protected void
     
    protected void
     
    void
    Notification that there is no more packet to process
    org.yamcs.xtce.Container
    getContainer(org.yamcs.protobuf.Yamcs.NamedObjectId containerId)
    Returns the containerDefinition corresponding to the itemId
     
    org.yamcs.xtce.Parameter
    getParameter(org.yamcs.protobuf.Yamcs.NamedObjectId paraId)
    Returns the parameterDefinition corresponding to the parameter id
     
     
    void
    init(Processor processor, YConfiguration config, Object spec)
     
    void
    processPacket(TmPacket pkt, org.yamcs.xtce.SequenceContainer sc)
    Process telemetry packets
    void
     
    void
     
    void
    Send parameters to this processor.
    void
    startProviding(org.yamcs.xtce.Parameter param)
    Adds a parameter to the current subscription list: finds all the SequenceContainers in which this parameter may appear and adds them to the list. also for each sequence container adds the parameter needed to instantiate the sequence container.
    void
    startProviding(org.yamcs.xtce.SequenceContainer container)
     
    void
    adds all parameters to the subscription
    void
    Start providing all known containers
    void
    stopProviding(org.yamcs.xtce.Parameter param)
    Removes a parameter from the list of parameters that have to be provided
    void
    stopProviding(org.yamcs.xtce.SequenceContainer container)
     

    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
  • Field Details

    • mdb

      public final Mdb mdb
  • Constructor Details

    • XtceTmProcessor

      public XtceTmProcessor(Processor processor)
    • XtceTmProcessor

      public XtceTmProcessor(Mdb mdb, ProcessorConfig pconfig)
      Creates a TmProcessor to be used in "standalone" mode, outside of any processor It still uses the processor config for configuration parameters relevant to container processing
  • Method Details

    • init

      public void init(Processor processor, YConfiguration config, Object spec) throws ConfigurationException
      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)
      Throws:
      ConfigurationException
    • setParameterProcessor

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

      public void setContainerListener(ContainerListener c)
      Specified by:
      setContainerListener in interface ContainerProvider
    • startProviding

      public void startProviding(org.yamcs.xtce.Parameter param)
      Adds a parameter to the current subscription list: finds all the SequenceContainers in which this parameter may appear and adds them to the list. also for each sequence container adds the parameter needed to instantiate the sequence container.
      Specified by:
      startProviding in interface ParameterProvider
      Parameters:
      param - parameter to be added to the current subscription list
    • startProvidingAll

      public void startProvidingAll()
      adds all parameters to the subscription
      Specified by:
      startProvidingAll in interface ParameterProvider
    • stopProviding

      public void stopProviding(org.yamcs.xtce.Parameter param)
      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 paraId)
      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 para)
      Specified by:
      canProvide in interface ParameterProvider
    • getParameter

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

      public void processPacket(TmPacket pkt, org.yamcs.xtce.SequenceContainer sc)
      Process telemetry packets
      Specified by:
      processPacket in interface TmProcessor
    • finished

      public void finished()
      Description copied from interface: TmProcessor
      Notification that there is no more packet to process
      Specified by:
      finished in interface TmProcessor
    • resetStatistics

      public void resetStatistics()
    • getStatistics

      public ProcessingStatistics getStatistics()
    • canProvideContainer

      public boolean canProvideContainer(org.yamcs.protobuf.Yamcs.NamedObjectId containerId)
      Description copied from interface: ContainerProvider
      Returns whether or not a given container can be provided by this provider
      Specified by:
      canProvideContainer in interface ContainerProvider
    • startProviding

      public void startProviding(org.yamcs.xtce.SequenceContainer container)
      Specified by:
      startProviding in interface ContainerProvider
    • stopProviding

      public void stopProviding(org.yamcs.xtce.SequenceContainer container)
      Specified by:
      stopProviding in interface ContainerProvider
    • startProvidingAllContainers

      public void startProvidingAllContainers()
      Description copied from interface: ContainerProvider
      Start providing all known containers
      Specified by:
      startProvidingAllContainers in interface ContainerProvider
    • getContainer

      public org.yamcs.xtce.Container getContainer(org.yamcs.protobuf.Yamcs.NamedObjectId containerId) throws InvalidIdentification
      Description copied from interface: ContainerProvider
      Returns the containerDefinition corresponding to the itemId
      Specified by:
      getContainer in interface ContainerProvider
      Throws:
      InvalidIdentification
    • getSubscription

      public Subscription getSubscription()
    • 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
    • getMdb

      public Mdb getMdb()