Package org.yamcs.parameter
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 ProcessingContext 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
-
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 -
Constructor Summary
ConstructorsConstructorDescriptionParameterProcessorManager(Processor proc, XtceTmProcessor tmProcessor) Creates a new ParameterRequestManager, configured to listen to the specified XtceTmProcessor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddParameterProvider(ParameterProvider parameterProvider) voidaddSoftwareParameterManager(DataSource ds, SoftwareParameterManager swParameterManager) Register aSoftwareParameterManagerfor the givenDataSource.protected voiddoStart()protected voiddoStop()getParameter(String fqn) returns a parameter based on fully qualified namegetParameter(Yamcs.NamedObjectId paraId) <T extends ParameterProvider>
TgetParameterProvider(Class<T> type) voidinit()This is called after all the parameter providers have been added but before the start.voidprocess(ProcessingContext processingCtx) intsubscribe(Collection<Parameter> paraList, ParameterProcessor paramProcessor) intsubscribeAll(ParameterProcessor processor) voidsubscribeToProviders(Collection<Parameter> itemList) Called to subscribe to providers for the given parameters.voidunsubscribe(int subscriptionId) voidunsubscribeAll(int subscriptionId) 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
-
Field Details
-
processor
-
-
Constructor Details
-
ParameterProcessorManager
public ParameterProcessorManager(Processor proc, XtceTmProcessor tmProcessor) throws ConfigurationException Creates a new ParameterRequestManager, configured to listen to the specified XtceTmProcessor.- Throws:
ConfigurationException
-
-
Method Details
-
init
public void init()This is called after all the parameter providers have been added but before the start. -
addParameterProvider
-
subscribe
-
subscribeAll
-
unsubscribeAll
public void unsubscribeAll(int subscriptionId) -
unsubscribe
public void unsubscribe(int subscriptionId) -
getParameter
returns a parameter based on fully qualified name- Parameters:
fqn-- Returns:
- Throws:
InvalidIdentification
-
getParameter
- Parameters:
paraId-- Returns:
- the corresponding parameter definition for a IntemIdentification
- Throws:
InvalidIdentification- in case no provider knows of this parameter.
-
process
- Specified by:
processin interfaceParameterProcessor
-
getSoftwareParameterManager
- Returns:
- the SoftwareParameterManager associated to the DataSource or null if not configured
-
getParameterProvider
-
getAlarmChecker
-
getAlarmServer
-
subscribeToProviders
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:
doStartin classcom.google.common.util.concurrent.AbstractService
-
doStop
protected void doStop()- Specified by:
doStopin classcom.google.common.util.concurrent.AbstractService
-
getLastValueCache
-
addSoftwareParameterManager
Register aSoftwareParameterManagerfor the givenDataSource. Throws anIllegalStateExceptionif there is already registered a parameter manager for this data source.- Parameters:
ds-swParameterManager-
-
getParameterRequestManager
-