WPILibC++ 2024.3.1
nt::PubSubOptions Struct Reference

NetworkTables publish/subscribe options. More...

#include <ntcore_cpp.h>

Public Attributes

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

Static Public Attributes

static constexpr double kDefaultPeriodic = 0.1
 Default value of periodic. More...
 

Detailed Description

NetworkTables publish/subscribe options.

Member Data Documentation

◆ disableLocal

bool nt::PubSubOptions::disableLocal = false

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

See also disableRemote.

◆ disableRemote

bool nt::PubSubOptions::disableRemote = false

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

See also disableLocal.

◆ excludePublisher

NT_Publisher nt::PubSubOptions::excludePublisher = 0

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

◆ excludeSelf

bool nt::PubSubOptions::excludeSelf = false

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

◆ hidden

bool 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

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

Default value of periodic.

◆ keepDuplicates

bool nt::PubSubOptions::keepDuplicates = false

Preserve duplicate value changes (rather than ignoring them).

◆ periodic

double 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 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 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 nt::PubSubOptions::sendAll = false

Send all value changes over the network.

◆ structSize

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

Structure size.

Must be set to sizeof(PubSubOptions).

◆ topicsOnly

bool 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: