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
ConstructorsConstructorDescriptionCommandingManager(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 newPreparedCommandwhere 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 newPreparedCommandwith raw provided binary.protected voiddoStart()protected voiddoStop()voidfailedCommand(ActiveCommand activeCommand) voidreleaseCommand(ActiveCommand activeCommand) sendCommand(User user, PreparedCommand pc) voidsetCommandAttribute(org.yamcs.protobuf.Commanding.CommandId commandId, org.yamcs.protobuf.Commanding.CommandHistoryAttribute attribute) voidverificatonFinished(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 newPreparedCommandwhere the binary is created by processing the provided arguments and matching it against the MDB definition.- Throws:
ErrorInCommandYamcsException
-
buildRawCommand
public PreparedCommand buildRawCommand(MetaCommand mc, byte[] binary, String origin, int seq, User user) Creates a newPreparedCommandwith raw provided binary. -
sendCommand
- 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
-
getMetaCommandProcessor
-
doStart
protected void doStart()- Specified by:
doStartin classcom.google.common.util.concurrent.AbstractService
-
doStop
protected void doStop()- Specified by:
doStopin classcom.google.common.util.concurrent.AbstractService
-
releaseCommand
-
failedCommand
-
verificatonFinished
-