Package org.yamcs.parameter
Class LocalParameterManager
java.lang.Object
com.google.common.util.concurrent.AbstractService
org.yamcs.AbstractProcessorService
org.yamcs.parameter.LocalParameterManager
- All Implemented Interfaces:
com.google.common.util.concurrent.Service,ParameterProvider,SoftwareParameterManager,ProcessorService
public class LocalParameterManager
extends AbstractProcessorService
implements SoftwareParameterManager, ParameterProvider
Implements local parameters - these are parameters that can be set from the clients.
All the parameters are sent from the executor thread.
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddParameterListener(ParameterProcessor parameterListener) booleancanProvide(Yamcs.NamedObjectId paraId) Returns whether or not a given parameter can be provided by this providerbooleancanProvide(Parameter param) protected voiddoStart()protected voiddoStop()getParameter(Yamcs.NamedObjectId paraId) Returns the parameterDefinition corresponding to the parameter idvoidinit(Processor proc, YConfiguration config, Object spec) voidsetParameterProcessor(ParameterProcessor parameterListener) Send parameters to this processor.voidstartProviding(Parameter paramDef) Adds a new parameter to the list of parameters that have to providedvoidstart providing all known parametersvoidstopProviding(Parameter paramDef) Removes a parameter from the list of parameters that have to be providedvoidsync()voidupdateParameters(List<ParameterValue> pvList) update the list of parameters.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, stopAsyncMethods inherited from interface org.yamcs.parameter.SoftwareParameterManager
updateParameter
-
Constructor Details
-
LocalParameterManager
public LocalParameterManager()
-
-
Method Details
-
init
- 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)
-
setParameterProcessor
Description copied from interface:ParameterProviderSend parameters to this processor.- Specified by:
setParameterProcessorin interfaceParameterProvider
-
addParameterListener
-
updateParameters
update the list of parameters.Converts the value to the target type and sends the result to PRM
- Specified by:
updateParametersin interfaceSoftwareParameterManager
-
startProviding
Description copied from interface:ParameterProviderAdds a new parameter to the list of parameters that have to provided- Specified by:
startProvidingin interfaceParameterProvider
-
startProvidingAll
public void startProvidingAll()Description copied from interface:ParameterProviderstart providing all known parameters- 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:
-
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
-
canProvide
- Specified by:
canProvidein interfaceParameterProvider
-
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
-
sync
-