Interface PubSubOption
- All Known Implementing Classes:
PubSubOption.DisableLocal, PubSubOption.DisableRemote, PubSubOption.ExcludePublisher, PubSubOption.ExcludePublisherHandle, PubSubOption.ExcludeSelf, PubSubOption.Hidden, PubSubOption.KeepDuplicates, PubSubOption.Periodic, PubSubOption.PollStorage, PubSubOption.SendAll, PubSubOption.TopicsOnly
public sealed interface PubSubOption
permits PubSubOption.Periodic, PubSubOption.SendAll, PubSubOption.TopicsOnly, PubSubOption.KeepDuplicates, PubSubOption.PollStorage, PubSubOption.DisableRemote, PubSubOption.DisableLocal, PubSubOption.ExcludePublisher, PubSubOption.ExcludePublisherHandle, PubSubOption.ExcludeSelf, PubSubOption.Hidden
NetworkTables publish/subscribe option.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordFor subscriptions, specify whether local value updates should not be queued for readQueue().static final recordFor subscriptions, specify whether remote value updates should not be queued for readQueue().static final recordDon't queue value updates for the given publisher.static final recordDon't queue value updates for the given publisher.static final recordDon't queue value updates for the internal publisher for an entry.static final recordFor subscriptions, don't share the existence of the subscription with the network.static final recordIf enabled, preserves duplicate value changes (rather than ignoring them).static final recordHow frequently changes will be sent over the network.static final recordPolling storage for subscription.static final recordIf enabled, sends all value changes over the network.static final recordIf enabled on a subscription, does not request value changes. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PubSubOptionFor subscriptions, indicates local value updates will not be queued for readQueue() .static final PubSubOptionFor subscriptions, indicates remote value updates will not be queued for readQueue() .static final PubSubOptionFor subscriptions, indicates local value updates will be queued for readQueue() (default).static final PubSubOptionFor subscriptions, indicates remote value updates will be queued for readQueue() (default).static final PubSubOptionFor entries, indicates value updates from the internal publisher will be excluded.static final PubSubOptionFor subscriptions, indicates the subscription is hidden from the network.static final PubSubOptionIndicates duplicate value changes will be ignored (default).static final PubSubOptionFor entries, indicates value updates from the internal publisher will be included (default).static final PubSubOptionIndicates duplicate value changes will be preserved.static final PubSubOptionIndicates all value changes will be sent over the network.static final PubSubOptionIndicates only value changes will be sent over the network (default).static final PubSubOptionIndicates both topics and values will be sent over the network (default).static final PubSubOptionIndicates only topics will be sent over the network.static final PubSubOptionFor subscriptions, indicates the subscription is visible to the network (default). -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic PubSubOptionexcludePublisher(int publisher) Don't queue value updates for the given publisher.static PubSubOptionexcludePublisher(Publisher publisher) Don't queue value updates for the given publisher.static PubSubOptionperiodic(double period) How frequently changes will be sent over the network.static PubSubOptionpollStorage(int depth) Polling storage for subscription.
-
Field Details
-
SEND_CHANGES
Indicates only value changes will be sent over the network (default). -
SEND_ALL
Indicates all value changes will be sent over the network. -
TOPICS_AND_VALUES
Indicates both topics and values will be sent over the network (default). -
TOPICS_ONLY
Indicates only topics will be sent over the network. -
IGNORE_DUPLICATES
Indicates duplicate value changes will be ignored (default). -
KEEP_DUPLICATES
Indicates duplicate value changes will be preserved. -
ENABLE_REMOTE
For subscriptions, indicates remote value updates will be queued for readQueue() (default). -
DISABLE_REMOTE
For subscriptions, indicates remote value updates will not be queued for readQueue() . -
ENABLE_LOCAL
For subscriptions, indicates local value updates will be queued for readQueue() (default). -
DISABLE_LOCAL
For subscriptions, indicates local value updates will not be queued for readQueue() . -
INCLUDE_SELF
For entries, indicates value updates from the internal publisher will be included (default). -
EXCLUDE_SELF
For entries, indicates value updates from the internal publisher will be excluded. -
VISIBLE
For subscriptions, indicates the subscription is visible to the network (default). -
HIDDEN
For subscriptions, indicates the subscription is hidden from the network.
-
-
Method Details
-
periodic
How frequently changes will be sent over the network. 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 if unspecified is 100 ms.- Parameters:
period- time between updates, in seconds- Returns:
- option
-
pollStorage
Polling storage for subscription. Specifies the maximum number of updates NetworkTables should store between calls to the subscriber's readQueue() function. Defaults to 1 if sendAll is false, 20 if sendAll is true.- Parameters:
depth- number of entries to save for polling.- Returns:
- option
-
excludePublisher
Don't queue value updates for the given publisher. Only has an effect on subscriptions. Only one exclusion may be set.- Parameters:
publisher- publisher handle to exclude- Returns:
- option
-
excludePublisher
Don't queue value updates for the given publisher. Only has an effect on subscriptions. Only one exclusion may be set.- Parameters:
publisher- publisher to exclude- Returns:
- option
-