WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::nt::PubSubOptions Struct Reference

NetworkTables publish/subscribe options. More...

#include <wpi/nt/ntcore_cpp.hpp>

Public Attributes

unsigned int structSize = sizeof(PubSubOptions)
 Structure size.
unsigned int pollStorage = 0
 Polling storage size for a subscription.
double periodic = kDefaultPeriodic
 How frequently changes will be sent over the network, in seconds.
NT_Publisher excludePublisher = 0
 For subscriptions, if non-zero, value updates for ReadQueue() are not queued for this publisher.
bool sendAll = false
 Send all value changes over the network.
bool topicsOnly = false
 For subscriptions, don't ask for value changes (only topic announcements).
bool keepDuplicates = false
 Preserve duplicate value changes (rather than ignoring them).
bool prefixMatch = false
 Perform prefix match on subscriber topic names.
bool disableRemote = false
 For subscriptions, if remote value updates should not be queued for ReadQueue().
bool disableLocal = false
 For subscriptions, if local value updates should not be queued for ReadQueue().
bool excludeSelf = false
 For entries, don't queue (for ReadQueue) value updates for the entry's internal publisher.
bool hidden = false
 For subscriptions, don't share the existence of the subscription with the network.

Static Public Attributes

static constexpr double kDefaultPeriodic = 0.1
 Default value of periodic.

Detailed Description

NetworkTables publish/subscribe options.

Member Data Documentation

◆ disableLocal

bool wpi::nt::PubSubOptions::disableLocal = false

For subscriptions, if local value updates should not be queued for ReadQueue().

See also disableRemote.

◆ disableRemote

bool wpi::nt::PubSubOptions::disableRemote = false

For subscriptions, if remote value updates should not be queued for ReadQueue().

See also disableLocal.

◆ excludePublisher

NT_Publisher wpi::nt::PubSubOptions::excludePublisher = 0

For subscriptions, if non-zero, value updates for ReadQueue() are not queued for this publisher.

◆ excludeSelf

bool wpi::nt::PubSubOptions::excludeSelf = false

For entries, don't queue (for ReadQueue) value updates for the entry's internal publisher.

◆ hidden

bool wpi::nt::PubSubOptions::hidden = false

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.

◆ kDefaultPeriodic

double wpi::nt::PubSubOptions::kDefaultPeriodic = 0.1
staticconstexpr

Default value of periodic.

◆ keepDuplicates

bool wpi::nt::PubSubOptions::keepDuplicates = false

Preserve duplicate value changes (rather than ignoring them).

◆ periodic

double wpi::nt::PubSubOptions::periodic = kDefaultPeriodic

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.

◆ pollStorage

unsigned int wpi::nt::PubSubOptions::pollStorage = 0

Polling storage size for a subscription.

Specifies the maximum number of updates NetworkTables should store between calls to the subscriber's ReadQueue() function. If zero, defaults to 1 if sendAll is false, 20 if sendAll is true.

◆ prefixMatch

bool wpi::nt::PubSubOptions::prefixMatch = false

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.

◆ sendAll

bool wpi::nt::PubSubOptions::sendAll = false

Send all value changes over the network.

◆ structSize

unsigned int wpi::nt::PubSubOptions::structSize = sizeof(PubSubOptions)

Structure size.

Must be set to sizeof(PubSubOptions).

◆ topicsOnly

bool wpi::nt::PubSubOptions::topicsOnly = false

For subscriptions, don't ask for value changes (only topic announcements).


The documentation for this struct was generated from the following file: