Package org.yamcs.mdb

Class TcProcessingContext

java.lang.Object
org.yamcs.mdb.ProcessingContext
org.yamcs.mdb.TcProcessingContext

public class TcProcessingContext extends ProcessingContext
Keeps track of where we are when filling in the bits and bytes of a command
  • Constructor Details

  • Method Details

    • getArgumentValue

      public ArgumentValue 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.
      Parameters:
      argName - the name of the argument
      Returns:
      the argument value, if found, or null
    • getAggregateReference

      public TcProcessingContext.AggregateWithValue getAggregateReference(String argName)
      Lookup the argument by name in the stack of aggregates

      The 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

      public Value getRawParameterValue(Parameter param)
    • getArgValues

      public Map<Argument,ArgumentValue> getArgValues()
    • hasArgumentValue

      public boolean hasArgumentValue(Argument a)
    • pushCurrentAggregate

      public void pushCurrentAggregate(TcProcessingContext.AggregateWithValue newAggregate)
      Pushes a new current aggregate onto the stack.
      Parameters:
      newAggregate - the aggregate to push
    • popCurrentAggregate

      public TcProcessingContext.AggregateWithValue popCurrentAggregate()
      Pops the current aggregate from the stack and returns it.
      Returns:
      the previous current aggregate, or null if the stack is empty
    • addArgumentValue

      public void addArgumentValue(Argument a, Value argValue)
    • getArgument

      public Argument getArgument(String argName)
    • getSize

      public int getSize()
    • setSize

      public void setSize(int size)
      sets the size in bytes of the encoded command
    • getCommand

      public MetaCommand getCommand()
      returns the size in bytes of the encoded command