Package org.yamcs.tctm
Class ReplayService
java.lang.Object
com.google.common.util.concurrent.AbstractService
org.yamcs.AbstractProcessorService
org.yamcs.tctm.ReplayService
- All Implemented Interfaces:
com.google.common.util.concurrent.Service
,ReplayListener
,CommandHistoryProvider
,ParameterProvider
,ProcessorService
,ArchiveTmPacketProvider
,TmPacketProvider
public class ReplayService
extends AbstractProcessorService
implements ReplayListener, ArchiveTmPacketProvider, ParameterProvider, CommandHistoryProvider
Provides telemetry packets and processed parameters from the yamcs archive.
-
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether or not a given parameter can be provided by this providerboolean
void
changeEndAction
(Yamcs.EndAction endAction) void
changeRange
(long start, long stop) void
changeSpeed
(Yamcs.ReplaySpeed speed) void
doStart()
void
doStop()
Returns the parameterDefinition corresponding to the parameter idlong
getSpeed()
void
init
(Processor proc, YConfiguration args, Object spec) boolean
true if this is a replay from archivevoid
newData
(Db.ProtoDataType type, Object data) void
pause()
void
resume()
void
seek
(long time, boolean autostart) void
void
Send parameters to this processor.void
startProviding
(Parameter paramDef) Adds a new parameter to the list of parameters that have to providedvoid
start providing all known parametersvoid
void
stopProviding
(Parameter paramDef) Removes a parameter from the list of parameters that have to be providedMethods inherited from class org.yamcs.AbstractProcessorService
getConfig, getYamcsInstance
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.yamcs.ProcessorService
getSpec
Methods inherited from interface com.google.common.util.concurrent.Service
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
-
Constructor Details
-
ReplayService
public ReplayService()
-
-
Method Details
-
init
- Specified by:
init
in interfaceProcessorService
- Overrides:
init
in classAbstractProcessorService
args
- service configuration as specified in processor.yamlspec
- passed by the user when creating the processor (for instance via the REST API)
-
isArchiveReplay
public boolean isArchiveReplay()Description copied from interface:TmPacketProvider
true if this is a replay from archive- Specified by:
isArchiveReplay
in interfaceTmPacketProvider
- Returns:
-
newData
- Specified by:
newData
in interfaceReplayListener
-
stateChanged
- Specified by:
stateChanged
in interfaceReplayListener
-
doStop
public void doStop()- Specified by:
doStop
in classcom.google.common.util.concurrent.AbstractService
-
doStart
public void doStart()- Specified by:
doStart
in classcom.google.common.util.concurrent.AbstractService
-
pause
public void pause()- Specified by:
pause
in interfaceArchiveTmPacketProvider
-
resume
public void resume()- Specified by:
resume
in interfaceArchiveTmPacketProvider
-
seek
public void seek(long time, boolean autostart) - Specified by:
seek
in interfaceArchiveTmPacketProvider
-
setParameterProcessor
Description copied from interface:ParameterProvider
Send parameters to this processor.- Specified by:
setParameterProcessor
in interfaceParameterProvider
-
startProviding
Description copied from interface:ParameterProvider
Adds a new parameter to the list of parameters that have to provided- Specified by:
startProviding
in interfaceParameterProvider
-
startProvidingAll
public void startProvidingAll()Description copied from interface:ParameterProvider
start providing all known parameters- Specified by:
startProvidingAll
in interfaceParameterProvider
-
stopProviding
Description copied from interface:ParameterProvider
Removes a parameter from the list of parameters that have to be provided- Specified by:
stopProviding
in interfaceParameterProvider
-
canProvide
Description copied from interface:ParameterProvider
Returns whether or not a given parameter can be provided by this provider- Specified by:
canProvide
in interfaceParameterProvider
- Returns:
-
canProvide
- Specified by:
canProvide
in interfaceParameterProvider
-
getParameter
Description copied from interface:ParameterProvider
Returns the parameterDefinition corresponding to the parameter id- Specified by:
getParameter
in interfaceParameterProvider
- Parameters:
id
- - id of the parameter that is returned- Returns:
- Throws:
InvalidIdentification
-
getSpeed
- Specified by:
getSpeed
in interfaceArchiveTmPacketProvider
-
getReplayRequest
- Specified by:
getReplayRequest
in interfaceArchiveTmPacketProvider
-
getCurrentReplayRequest
- Specified by:
getCurrentReplayRequest
in interfaceArchiveTmPacketProvider
-
getReplayState
- Specified by:
getReplayState
in interfaceArchiveTmPacketProvider
-
getReplayTime
public long getReplayTime()- Specified by:
getReplayTime
in interfaceArchiveTmPacketProvider
-
changeSpeed
- Specified by:
changeSpeed
in interfaceArchiveTmPacketProvider
-
changeEndAction
- Specified by:
changeEndAction
in interfaceArchiveTmPacketProvider
-
changeRange
public void changeRange(long start, long stop) - Specified by:
changeRange
in interfaceArchiveTmPacketProvider
-
setCommandHistoryRequestManager
- Specified by:
setCommandHistoryRequestManager
in interfaceCommandHistoryProvider
-