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
FieldsFields inherited from class org.yamcs.AbstractProcessorService
config, log, processor -
Constructor Summary
ConstructorsConstructorDescriptionXtceTmProcessor(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 processingXtceTmProcessor(Processor processor) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanProvide(Yamcs.NamedObjectId paraId) Returns whether or not a given parameter can be provided by this providerbooleancanProvide(Parameter para) booleancanProvideContainer(Yamcs.NamedObjectId containerId) Returns whether or not a given container can be provided by this providerprotected voiddoStart()protected voiddoStop()voidfinished()Notification that there is no more packet to processgetContainer(Yamcs.NamedObjectId containerId) Returns the containerDefinition corresponding to the itemIdgetMdb()getParameter(Yamcs.NamedObjectId paraId) Returns the parameterDefinition corresponding to the parameter idvoidinit(Processor processor, YConfiguration config, Object spec) voidprocessPacket(TmPacket pkt, SequenceContainer sc) Process telemetry packetsvoidvoidvoidSend parameters to this processor.voidstartProviding(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.voidstartProviding(SequenceContainer container) voidadds all parameters to the subscriptionvoidStart providing all known containersvoidstopProviding(Parameter param) Removes a parameter from the list of parameters that have to be providedvoidstopProviding(SequenceContainer container) Methods inherited from class org.yamcs.AbstractProcessorService
getConfig, getYamcsInstanceMethods 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.yamcs.ProcessorService
getSpecMethods inherited from interface com.google.common.util.concurrent.Service
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
-
Field Details
-
mdb
-
-
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:
initin interfaceProcessorService- Overrides:
initin classAbstractProcessorServiceconfig- 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:ParameterProviderSend parameters to this processor.- Specified by:
setParameterProcessorin interfaceParameterProvider
-
setContainerListener
- Specified by:
setContainerListenerin 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:
startProvidingin interfaceParameterProvider- Parameters:
param- parameter to be added to the current subscription list
-
startProvidingAll
public void startProvidingAll()adds all parameters to the subscription- Specified by:
startProvidingAllin interfaceParameterProvider
-
stopProviding
Description copied from interface:ParameterProviderRemoves a parameter from the list of parameters that have to be provided- Specified by:
stopProvidingin interfaceParameterProvider
-
canProvide
Description copied from interface:ParameterProviderReturns whether or not a given parameter can be provided by this provider- Specified by:
canProvidein interfaceParameterProvider- Returns:
-
canProvide
- Specified by:
canProvidein interfaceParameterProvider
-
getParameter
Description copied from interface:ParameterProviderReturns the parameterDefinition corresponding to the parameter id- Specified by:
getParameterin interfaceParameterProvider- Parameters:
paraId- - id of the parameter that is returned- Returns:
- Throws:
InvalidIdentification
-
processPacket
Process telemetry packets- Specified by:
processPacketin interfaceTmProcessor
-
finished
public void finished()Description copied from interface:TmProcessorNotification that there is no more packet to process- Specified by:
finishedin interfaceTmProcessor
-
resetStatistics
public void resetStatistics() -
getStatistics
-
canProvideContainer
Description copied from interface:ContainerProviderReturns whether or not a given container can be provided by this provider- Specified by:
canProvideContainerin interfaceContainerProvider
-
startProviding
- Specified by:
startProvidingin interfaceContainerProvider
-
stopProviding
- Specified by:
stopProvidingin interfaceContainerProvider
-
startProvidingAllContainers
public void startProvidingAllContainers()Description copied from interface:ContainerProviderStart providing all known containers- Specified by:
startProvidingAllContainersin interfaceContainerProvider
-
getContainer
Description copied from interface:ContainerProviderReturns the containerDefinition corresponding to the itemId- Specified by:
getContainerin interfaceContainerProvider- Throws:
InvalidIdentification
-
getSubscription
-
doStart
protected void doStart()- Specified by:
doStartin classcom.google.common.util.concurrent.AbstractService
-
doStop
protected void doStop()- Specified by:
doStopin classcom.google.common.util.concurrent.AbstractService
-
getMdb
-