Package org.yamcs.mdb
Class TcProcessingContext
java.lang.Object
org.yamcs.mdb.ProcessingContext
org.yamcs.mdb.TcProcessingContext
Keeps track of where we are when filling in the bits and bytes of a command
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.yamcs.mdb.ProcessingContext
cmdArgs, cmdParams, cmdParamsCache, tmParams, tmParamsCache
-
Constructor Summary
ConstructorsConstructorDescriptionTcProcessingContext
(MetaCommand metaCmd, ProcessorData pdata, Map<Parameter, Value> paramValues, BitBuffer bitbuf, int bitPosition, long generationTime) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addArgumentValue
(Argument a, Value argValue) getAggregateReference
(String argName) Lookup the argument by name in the stack of aggregatesgetArgument
(String argName) getArgumentValue
(String argName) Look up an argument by name only, for cases in which we do not have the full argument definition, such as arguments used for defining the length of other variable-length arguments.returns the size in bytes of the encoded commandgetRawParameterValue
(Parameter param) int
getSize()
boolean
Pops the current aggregate from the stack and returns it.void
pushCurrentAggregate
(TcProcessingContext.AggregateWithValue newAggregate) Pushes a new current aggregate onto the stack.void
setSize
(int size) sets the size in bytes of the encoded commandMethods inherited from class org.yamcs.mdb.ProcessingContext
addCmdParam, addTmParam, addTmParams, cloneForCommanding, cloneForTm, containsUpdate, createForCmdProcessing, createForTestCmd, createForTestTm, createForTmProcessing, createInitial, getCmdArgs, getCmdArgument, getCmdParams, getGenerationTime, getParameterInstance, getTmParams, resolveDynamicIntegerValue, toString
-
Constructor Details
-
TcProcessingContext
public TcProcessingContext(MetaCommand metaCmd, ProcessorData pdata, Map<Parameter, Value> paramValues, BitBuffer bitbuf, int bitPosition, long generationTime)
-
-
Method Details
-
getArgumentValue
Look up an argument by name only, for cases in which we do not have the full argument definition, such as arguments used for defining the length of other variable-length arguments.- Parameters:
argName
- the name of the argument- Returns:
- the argument value, if found, or null
-
getAggregateReference
Lookup the argument by name in the stack of aggregatesThe returned AggregateWithValue may not have the value set
- Parameters:
argName
- the name of the aggregate member to look up- Returns:
- the argument value, if found, or null
-
getRawParameterValue
-
getArgValues
-
hasArgumentValue
-
pushCurrentAggregate
Pushes a new current aggregate onto the stack.- Parameters:
newAggregate
- the aggregate to push
-
popCurrentAggregate
Pops the current aggregate from the stack and returns it.- Returns:
- the previous current aggregate, or null if the stack is empty
-
addArgumentValue
-
getArgument
-
getSize
public int getSize() -
setSize
public void setSize(int size) sets the size in bytes of the encoded command -
getCommand
returns the size in bytes of the encoded command
-