Package org.yamcs
Class Processor
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAcknowledgment
(Acknowledgment acknowledgment) Add a globally available acknowledgment (in addition to Acknowledge_Queued, Acknowledge_Released and Acknowledge_Sent).static void
addProcessorListener
(ProcessorListener processorListener) void
changeEndAction
(Yamcs.EndAction endAction) void
changeRange
(long start, long stop) void
changeSpeed
(Yamcs.ReplaySpeed speed) void
doStart()
starts processing by invoking the start method for all the associated componentsvoid
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.Returns globally available acknowledgments (in addition to Acknowledge_Queued, Acknowledge_Released and Acknowledge_Sent).long
Returns the processor time for realtime processors it is the mission time (could be simulated) for replay processors it is the replay timegetMdb()
getName()
Returns the processor data used to store processor specific calibration, alarmsvalid only if isArchiveReplay returns truevalid only if isArchiveReplay returns true<T extends ProcessorService>
List<T>getServices
(Class<T> serviceClass) getState()
If recording to the archive initial values and local parameters is enabled, this class can be used to do it.getTimer()
getType()
boolean
boolean
boolean
boolean
boolean
Returns if this processor is protected.boolean
isReplay()
boolean
boolean
void
void
pause()
void
quit()
boolean
static void
removeProcessorListener
(ProcessorListener processorListener) void
resume()
void
seek
(long instant) void
seek
(long instant, boolean autostart) void
void
setCreator
(String creator) void
void
setPersistent
(boolean systemSession) void
setProtected
(boolean protected_) void
setSynchronous
(boolean synchronous) void
start()
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_STREAM
stream 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:
doStart
in classcom.google.common.util.concurrent.AbstractService
-
getServices
-
pause
public void pause() -
resume
public void resume() -
seek
public void seek(long instant) -
seek
public void seek(long instant, boolean autostart) -
changeSpeed
-
changeRange
public void changeRange(long start, long stop) -
changeEndAction
-
getCommandReleaser
- Returns:
- the tcUplinker
-
getTmPacketProvider
- Returns:
- the tmPacketProvider
-
getName
-
getType
- Returns:
- the type
-
getCreator
-
setCreator
-
getAcknowledgments
Returns globally available acknowledgments (in addition to Acknowledge_Queued, Acknowledge_Released and Acknowledge_Sent). -
addAcknowledgment
Add a globally available acknowledgment (in addition to Acknowledge_Queued, Acknowledge_Released and Acknowledge_Sent). -
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:
doStop
in classcom.google.common.util.concurrent.AbstractService
-
addProcessorListener
-
removeProcessorListener
-
isPersistent
public boolean isPersistent() -
setPersistent
public void setPersistent(boolean systemSession) -
isProtected
public boolean isProtected()Returns if this processor is protected. A protected processor may not be deleted. -
setProtected
public void setProtected(boolean protected_) -
isSynchronous
public boolean isSynchronous() -
hasCommanding
public boolean hasCommanding() -
setSynchronous
public void setSynchronous(boolean synchronous) -
isReplay
public boolean isReplay() -
getReplayRequest
valid only if isArchiveReplay returns true- Returns:
-
getReplayState
valid only if isArchiveReplay returns true- Returns:
-
getCurrentReplayRequest
-
getState
-
getCommandingManager
-
getInstance
- Returns:
- the yamcs instance this processor is part of
-
getMdb
-
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:
toString
in classcom.google.common.util.concurrent.AbstractService
-