Package org.yamcs.xtceproc
Class XtceTmProcessor
java.lang.Object
com.google.common.util.concurrent.AbstractService
org.yamcs.AbstractProcessorService
org.yamcs.xtceproc.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 inherited from class org.yamcs.AbstractProcessorService
config, log, processor
-
Constructor Summary
ConstructorDescriptionXtceTmProcessor
(Processor processor) XtceTmProcessor
(XtceDb xtcedb, 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 Summary
Modifier and TypeMethodDescriptionboolean
canProvide
(Yamcs.NamedObjectId paraId) Returns whether or not a given parameter can be provided by this providerboolean
canProvide
(Parameter para) boolean
canProvideContainer
(Yamcs.NamedObjectId containerId) Returns whether or not a given container can be provided by this providerprotected void
doStart()
protected void
doStop()
void
finished()
Notification that there is no more packet to processgetContainer
(Yamcs.NamedObjectId containerId) Returns the containerDefinition corresponding to the itemIdgetParameter
(Yamcs.NamedObjectId paraId) Returns the parameterDefinition corresponding to the parameter idvoid
init
(Processor processor, YConfiguration config, Object spec) void
processPacket
(TmPacket pwrt, SequenceContainer sc) Process telemetry packetsvoid
void
void
Send parameters to this processor.void
startProviding
(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
(SequenceContainer container) void
adds all parameters to the subscriptionvoid
Start providing all known containersvoid
stopProviding
(Parameter param) Removes a parameter from the list of parameters that have to be providedvoid
stopProviding
(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
-
xtcedb
-
-
Constructor Details
-
XtceTmProcessor
-
XtceTmProcessor
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 interfaceProcessorService
- Overrides:
init
in classAbstractProcessorService
config
- service configuration as specified in processor.yamlspec
- passed by the user when creating the processor (for instance via the REST API)- Throws:
ConfigurationException
-
setParameterProcessor
Description copied from interface:ParameterProvider
Send parameters to this processor.- Specified by:
setParameterProcessor
in interfaceParameterProvider
-
setContainerListener
- Specified by:
setContainerListener
in interfaceContainerProvider
-
startProviding
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 interfaceParameterProvider
- 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 interfaceParameterProvider
-
stopProviding
Description copied from interface:ParameterProvider
Removes a parameter from the list of parameters that have to be provided- Specified by:
stopProviding
in interfaceParameterProvider
-
canProvide
Description copied from interface:ParameterProvider
Returns whether or not a given parameter can be provided by this provider- Specified by:
canProvide
in interfaceParameterProvider
- Returns:
-
canProvide
- Specified by:
canProvide
in interfaceParameterProvider
-
getParameter
Description copied from interface:ParameterProvider
Returns the parameterDefinition corresponding to the parameter id- Specified by:
getParameter
in interfaceParameterProvider
- Parameters:
paraId
- - id of the parameter that is returned- Returns:
- Throws:
InvalidIdentification
-
processPacket
Process telemetry packets- Specified by:
processPacket
in interfaceTmProcessor
-
finished
public void finished()Description copied from interface:TmProcessor
Notification that there is no more packet to process- Specified by:
finished
in interfaceTmProcessor
-
resetStatistics
public void resetStatistics() -
getStatistics
-
canProvideContainer
Description copied from interface:ContainerProvider
Returns whether or not a given container can be provided by this provider- Specified by:
canProvideContainer
in interfaceContainerProvider
-
startProviding
- Specified by:
startProviding
in interfaceContainerProvider
-
stopProviding
- Specified by:
stopProviding
in interfaceContainerProvider
-
startProvidingAllContainers
public void startProvidingAllContainers()Description copied from interface:ContainerProvider
Start providing all known containers- Specified by:
startProvidingAllContainers
in interfaceContainerProvider
-
getContainer
Description copied from interface:ContainerProvider
Returns the containerDefinition corresponding to the itemId- Specified by:
getContainer
in interfaceContainerProvider
- Throws:
InvalidIdentification
-
getSubscription
-
doStart
protected void doStart()- Specified by:
doStart
in classcom.google.common.util.concurrent.AbstractService
-
doStop
protected void doStop()- Specified by:
doStop
in classcom.google.common.util.concurrent.AbstractService
-
getXtceDb
-