Class ParameterCaptor

java.lang.Object
org.yamcs.tests.ParameterCaptor

public class ParameterCaptor extends Object
Utility class for queueing parameter deliveries as they are received from a subscription to Yamcs. This is intended for use in unit tests only.
  • Method Details

    • poll

      public List<org.yamcs.protobuf.Pvalue.ParameterValue> poll()
      Returns the next delivery. Or null, if nothing was received yet.
    • poll

      public List<org.yamcs.protobuf.Pvalue.ParameterValue> poll(long timeout) throws InterruptedException
      Returns the next delivery. Or null, if nothing was received yet.
      Throws:
      InterruptedException
    • expectTimely

      public List<org.yamcs.protobuf.Pvalue.ParameterValue> expectTimely() throws InterruptedException, TimeoutException
      Returns the next delivery. If there is nothing available yet, this will block for the specified time awaiting delivery.
      Throws:
      InterruptedException
      TimeoutException
    • assertSilence

      public void assertSilence() throws InterruptedException
      Throws:
      InterruptedException
    • clear

      public void clear()
    • isEmpty

      public boolean isEmpty()
      Returns true if there are not currently any unprocessed deliveries.
    • getPendingCount

      public int getPendingCount()
      Returns the number of unprocessed value deliveries.
    • expectTimelyInvalidIdentifier

      public org.yamcs.protobuf.Yamcs.NamedObjectId expectTimelyInvalidIdentifier() throws InterruptedException, TimeoutException
      Throws:
      InterruptedException
      TimeoutException
    • of

      public static ParameterCaptor of(org.yamcs.client.ParameterSubscription subscription)