java.lang.Object
com.google.common.util.concurrent.AbstractService
org.yamcs.tse.InstrumentController
- All Implemented Interfaces:
com.google.common.util.concurrent.Service
public class InstrumentController
extends com.google.common.util.concurrent.AbstractService
Guarantees instruments are used by only one thread at a time, and establishes/closes device connections as-needed.
-
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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInstrument
(InstrumentDriver instrument) protected void
doStart()
protected void
doStop()
getInstrument
(String name) queueCommand
(InstrumentDriver instrument, TseCommand metadata, String command, boolean expectResponse) 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
-
Constructor Details
-
InstrumentController
public InstrumentController()
-
-
Method Details
-
addInstrument
-
doStart
protected void doStart()- Specified by:
doStart
in classcom.google.common.util.concurrent.AbstractService
-
queueCommand
public com.google.common.util.concurrent.ListenableFuture<List<String>> queueCommand(InstrumentDriver instrument, TseCommand metadata, String command, boolean expectResponse) -
getInstrument
-
getInstruments
-
doStop
protected void doStop()- Specified by:
doStop
in classcom.google.common.util.concurrent.AbstractService
-