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 ProcessingData
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
-
Constructor Summary
ConstructorDescriptionParameterProcessorManager
(Processor proc, XtceTmProcessor tmProcessor) Creates a new ParameterRequestManager, configured to listen to the specified XtceTmProcessor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addParameterProvider
(ParameterProvider parameterProvider) void
addSoftwareParameterManager
(DataSource ds, SoftwareParameterManager swParameterManager) Register aSoftwareParameterManager
for the givenDataSource
.protected void
doStart()
protected void
doStop()
getParameter
(String fqn) returns a parameter based on fully qualified namegetParameter
(Yamcs.NamedObjectId paraId) <T extends ParameterProvider>
TgetParameterProvider
(Class<T> type) getValuesFromCache
(Parameter param) Get all the values from cache for a specific parameters The parameter are returned in descending order (newest parameter is returned first).boolean
void
init()
This is called after all the parameter providers have been added but before the start.void
process
(ProcessingData processingData) int
subscribe
(Collection<Parameter> paraList, ParameterProcessor paramProcessor) int
subscribeAll
(ParameterProcessor processor) void
subscribeToProviders
(Collection<Parameter> itemList) Called to subscribe to providers for the given parameters.void
unsubscribe
(int subscriptionId) void
unsubscribeAll
(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:
process
in interfaceParameterProcessor
-
getSoftwareParameterManager
- Returns:
- the SoftwareParameterManager associated to the DataSource or null if not configured
-
getParameterProvider
-
getAlarmChecker
-
getAlarmServer
-
hasParameterCache
public boolean hasParameterCache() -
getValuesFromCache
Get all the values from cache for a specific parameters The parameter are returned in descending order (newest parameter is returned first). Note that you can only all this function if thehasParameterCache()
returns true.- Parameters:
param
-- Returns:
-
getParameterCache
-
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:
doStart
in classcom.google.common.util.concurrent.AbstractService
-
doStop
protected void doStop()- Specified by:
doStop
in classcom.google.common.util.concurrent.AbstractService
-
getLastValueCache
-
addSoftwareParameterManager
Register aSoftwareParameterManager
for the givenDataSource
. Throws anIllegalStateException
if there is already registered a parameter manager for this data source.- Parameters:
ds
-swParameterManager
-
-
getParameterRequestManager
-