Interface StringSubscriber

All Superinterfaces:
AutoCloseable, PubSub, Subscriber, Supplier<String>
All Known Subinterfaces:
StringEntry

public interface StringSubscriber
extends Subscriber, Supplier<String>
NetworkTables String subscriber.
  • Method Details

    • getTopic

      Get the corresponding topic.
      Specified by:
      getTopic in interface PubSub
      Returns:
      Topic
    • get

      Get the last published value. If no value has been published, returns the stored default value.
      Specified by:
      get in interface Supplier<String>
      Returns:
      value
    • get

      String get​(String defaultValue)
      Get the last published value. If no value has been published, returns the passed defaultValue.
      Parameters:
      defaultValue - default value to return if no value has been published
      Returns:
      value
    • getAtomic

      Get the last published value along with its timestamp If no value has been published, returns the stored default value and a timestamp of 0.
      Returns:
      timestamped value
    • getAtomic

      Get the last published value along with its timestamp If no value has been published, returns the passed defaultValue and a timestamp of 0.
      Parameters:
      defaultValue - default value to return if no value has been published
      Returns:
      timestamped value
    • readQueue

      Get an array of all value changes since the last call to readQueue. Also provides a timestamp for each value.

      The "poll storage" subscribe option can be used to set the queue depth.

      Returns:
      Array of timestamped values; empty array if no new changes have been published since the previous call.
    • readQueueValues

      Get an array of all value changes since the last call to readQueue.

      The "poll storage" subscribe option can be used to set the queue depth.

      Returns:
      Array of values; empty array if no new changes have been published since the previous call.