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
-
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
ConstructorDescriptionCommandingManager
(Processor proc) Keeps a reference to the channel and creates the queue manager -
Method Summary
Modifier and TypeMethodDescriptionbuildCommand
(MetaCommand mc, Map<String, Object> argAssignmentList, String origin, int seq, User user) Creates a newPreparedCommand
where the binary is created by processing the provided arguments and matching it against the MDB definition.buildRawCommand
(MetaCommand mc, byte[] binary, String origin, int seq, User user) Creates a newPreparedCommand
with raw provided binary.protected void
doStart()
protected void
doStop()
void
failedCommand
(ActiveCommand activeCommand) void
releaseCommand
(ActiveCommand activeCommand) sendCommand
(User user, PreparedCommand pc) void
setCommandAttribute
(Commanding.CommandId commandId, 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 Details
-
CommandingManager
Keeps a reference to the channel and creates the queue manager- Parameters:
proc
-- Throws:
ValidationException
-
-
Method Details
-
getCommandQueueManager
-
buildCommand
public PreparedCommand buildCommand(MetaCommand mc, Map<String, Object> argAssignmentList, String origin, int seq, User user) throws ErrorInCommand, YamcsExceptionCreates a newPreparedCommand
where the binary is created by processing the provided arguments and matching it against the MDB definition.- Throws:
ErrorInCommand
YamcsException
-
buildRawCommand
public PreparedCommand buildRawCommand(MetaCommand mc, byte[] binary, String origin, int seq, User user) Creates a newPreparedCommand
with raw provided binary. -
sendCommand
- Returns:
- the queue that the command was sent to
-
setCommandAttribute
public void setCommandAttribute(Commanding.CommandId commandId, Commanding.CommandHistoryAttribute attribute) -
getProcessor
-
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
-
failedCommand
-
verificatonFinished
-