Package org.yamcs.commanding
Class CommandingManager
- java.lang.Object
-
- com.google.common.util.concurrent.AbstractService
-
- org.yamcs.commanding.CommandingManager
-
- All Implemented Interfaces:
com.google.common.util.concurrent.Service
public class CommandingManager extends com.google.common.util.concurrent.AbstractService
Responsible for parsing and tc packet composition.Also keeps track of the pending active commands
-
-
Constructor Summary
Constructors Constructor Description CommandingManager(Processor proc)
Keeps a reference to the channel and creates the queue manager
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PreparedCommand
buildCommand(MetaCommand mc, Map<String,Object> argAssignmentList, String origin, int seq, User user)
pc is a command whose source is included. parse the source populate the binary part and the definition.protected void
doStart()
protected void
doStop()
void
failedCommand(ActiveCommand activeCommand)
CommandQueueManager
getCommandQueueManager()
MetaCommandProcessor
getMetaCommandProcessor()
Processor
getProcessor()
void
releaseCommand(ActiveCommand activeCommand)
CommandQueue
sendCommand(User user, PreparedCommand pc)
void
setCommandAttribute(org.yamcs.protobuf.Commanding.CommandId commandId, org.yamcs.protobuf.Commanding.CommandHistoryAttribute attribute)
void
verificatonFinished(ActiveCommand activeCommand)
-
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 Detail
-
CommandingManager
public CommandingManager(Processor proc) throws ValidationException
Keeps a reference to the channel and creates the queue manager- Parameters:
proc
-- Throws:
ValidationException
-
-
Method Detail
-
getCommandQueueManager
public CommandQueueManager getCommandQueueManager()
-
buildCommand
public PreparedCommand buildCommand(MetaCommand mc, Map<String,Object> argAssignmentList, String origin, int seq, User user) throws ErrorInCommand, YamcsException
pc is a command whose source is included. parse the source populate the binary part and the definition.- Throws:
ErrorInCommand
YamcsException
-
sendCommand
public CommandQueue sendCommand(User user, PreparedCommand pc)
- Returns:
- the queue that the command was sent to
-
setCommandAttribute
public void setCommandAttribute(org.yamcs.protobuf.Commanding.CommandId commandId, org.yamcs.protobuf.Commanding.CommandHistoryAttribute attribute)
-
getProcessor
public Processor getProcessor()
-
getMetaCommandProcessor
public MetaCommandProcessor getMetaCommandProcessor()
-
doStart
protected void doStart()
- Specified by:
doStart
in classcom.google.common.util.concurrent.AbstractService
-
doStop
protected void doStop()
- Specified by:
doStop
in classcom.google.common.util.concurrent.AbstractService
-
releaseCommand
public void releaseCommand(ActiveCommand activeCommand)
-
failedCommand
public void failedCommand(ActiveCommand activeCommand)
-
verificatonFinished
public void verificatonFinished(ActiveCommand activeCommand)
-
-