java.lang.Object
com.google.common.util.concurrent.AbstractService
org.yamcs.Processor
- All Implemented Interfaces:
com.google.common.util.concurrent.Service
public class Processor
extends com.google.common.util.concurrent.AbstractService
This class helps keeping track of the different objects used in a Yamcs Processor - i.e. all the objects required to
have a TM/TC processing chain (either realtime or playback).
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddProcessorListener(ProcessorListener processorListener) voidchangeSpeed(org.yamcs.protobuf.Yamcs.ReplaySpeed speed) voiddoStart()starts processing by invoking the start method for all the associated componentsvoiddoStop()Closes the processor by stoping the tm/pp and tc It can be that there are still clients connected, but they will not get any data and new clients can not connect to these processors anymore.longReturns the processor time for realtime processors it is the mission time (could be simulated) for replay processors it is the replay timegetName()Returns the processor data used to store processor specific calibration, alarmsorg.yamcs.protobuf.Yamcs.ReplayRequestvalid only if isArchiveReplay returns trueorg.yamcs.protobuf.Yamcs.ReplayStatus.ReplayStatevalid only if isArchiveReplay returns true<T extends ProcessorService>
List<T>getServices(Class<T> serviceClass) org.yamcs.protobuf.ServiceStategetState()If recording to the archive initial values and local parameters is enabled, this class can be used to do it.getTimer()getType()booleanbooleanbooleanbooleanbooleanisReplay()booleanbooleanvoidvoidpause()voidquit()booleanstatic voidremoveProcessorListener(ProcessorListener processorListener) voidresume()voidseek(long instant) voidvoidsetCreator(String creator) voidvoidsetPersistent(boolean systemSession) voidsetSynchronous(boolean synchronous) voidstart()toString()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
-
Field Details
-
PROC_PARAMETERS_STREAM
- See Also:
-
-
Constructor Details
-
Processor
public Processor(String yamcsInstance, String name, String type, String creator) throws ProcessorException - Throws:
ProcessorException
-
-
Method Details
-
getStreamParameterSender
If recording to the archive initial values and local parameters is enabled, this class can be used to do it. Otherwise it will return null.- Returns:
- the stream parameter sender that can be used to send data on the
PROC_PARAMETERS_STREAMstream to be recorded in the archive
-
setPacketProvider
-
setCommandHistoryProvider
-
getCommandHistoryPublisher
-
getParameterProcessorManager
-
getContainerRequestManager
-
getTmProcessor
-
doStart
public void doStart()starts processing by invoking the start method for all the associated components- Specified by:
doStartin classcom.google.common.util.concurrent.AbstractService
-
getServices
-
pause
public void pause() -
resume
public void resume() -
seek
public void seek(long instant) -
changeSpeed
public void changeSpeed(org.yamcs.protobuf.Yamcs.ReplaySpeed speed) -
getCommandReleaser
- Returns:
- the tcUplinker
-
getTmPacketProvider
- Returns:
- the tmPacketProvider
-
getName
-
getType
- Returns:
- the type
-
getCreator
-
setCreator
-
doStop
public void doStop()Closes the processor by stoping the tm/pp and tc It can be that there are still clients connected, but they will not get any data and new clients can not connect to these processors anymore. Once it is closed, you can create a processor with the same name which will make it maybe a bit confusing :(- Specified by:
doStopin classcom.google.common.util.concurrent.AbstractService
-
addProcessorListener
-
removeProcessorListener
-
isPersistent
public boolean isPersistent() -
setPersistent
public void setPersistent(boolean systemSession) -
isSynchronous
public boolean isSynchronous() -
hasCommanding
public boolean hasCommanding() -
setSynchronous
public void setSynchronous(boolean synchronous) -
isReplay
public boolean isReplay() -
getReplayRequest
public org.yamcs.protobuf.Yamcs.ReplayRequest getReplayRequest()valid only if isArchiveReplay returns true- Returns:
-
getReplayState
public org.yamcs.protobuf.Yamcs.ReplayStatus.ReplayState getReplayState()valid only if isArchiveReplay returns true- Returns:
-
getState
public org.yamcs.protobuf.ServiceState getState() -
getCommandingManager
-
getInstance
- Returns:
- the yamcs instance this processor is part of
-
getXtceDb
-
getCommandHistoryManager
-
hasAlarmChecker
public boolean hasAlarmChecker() -
hasAlarmServer
public boolean hasAlarmServer() -
getTimer
-
getCurrentTime
public long getCurrentTime()Returns the processor time for realtime processors it is the mission time (could be simulated) for replay processors it is the replay time- Returns:
-
quit
public void quit() -
start
public void start() -
notifyStateChange
public void notifyStateChange() -
getPameterCacheConfig
-
getParameterCache
-
getProcessorData
Returns the processor data used to store processor specific calibration, alarms- Returns:
- processor specific data
-
getLastValueCache
-
isSubscribeAll
public boolean isSubscribeAll() -
getServices
-
recordLocalValues
public boolean recordLocalValues() -
getEventAlarmServer
-
getConfig
-
getParameterRequestManager
-
toString
- Overrides:
toStringin classcom.google.common.util.concurrent.AbstractService
-