PubSubOptions

class ntcore.PubSubOptions(*, poll_storage: SupportsInt | SupportsIndex = 0, periodic: SupportsFloat | SupportsIndex = 0.1, exclude_publisher: ntcore._ntcore.Publisher | None = None, send_all: bool = False, topics_only: bool = False, keep_duplicates: bool = False, prefix_match: bool = False, disable_remote: bool = False, disable_local: bool = False, exclude_self: bool = False, hidden: bool = False, disable_signal: bool = False)

Bases: pybind11_object

NetworkTables publish/subscribe options.

Parameters:
  • poll_storage – Polling storage size for a subscription. Specifies the maximum number of updates NetworkTables should store between calls to the subscriber’s read_queue() function. If zero, defaults to 1 if send_all is false, 20 if send_all is true.

  • periodic – How frequently changes will be sent over the network, in seconds. NetworkTables may send more frequently than this (e.g. use a combined minimum period for all values) or apply a restricted range to this value. The default is 100 ms.

  • exclude_publisher – For subscriptions, if non-zero, value updates for read_queue() are not queued for this publisher.

  • send_all – Send all value changes over the network.

  • topics_only – For subscriptions, don’t ask for value changes (only topic announcements).

  • keep_duplicates – Preserve duplicate value changes (rather than ignoring them).

  • prefix_match – Perform prefix match on subscriber topic names. Is ignored/overridden by subscribe() functions; only present in struct for the purposes of getting information about subscriptions.

  • disable_remote – For subscriptions, if remote value updates should not be queued for read_queue(). See also disable_local.

  • disable_local – For subscriptions, if local value updates should not be queued for read_queue(). See also disable_remote.

  • exclude_self – For entries, don’t queue (for read_queue) value updates for the entry’s internal publisher.

  • hidden – For subscriptions, don’t share the existence of the subscription with the network. Note this means updates will not be received from the network unless another subscription overlaps with this one, and the subscription will not appear in metatopics.

  • disable_signal – For subscriptions, don’t signal the local handle when value updates are queued.

DEFAULT_PERIODIC = 0.1