Package edu.wpi.first.networktables
Class PubSubOption
java.lang.Object
edu.wpi.first.networktables.PubSubOption
public class PubSubOption extends Object
NetworkTables publish/subscribe option.
-
Method Summary
Modifier and Type Method Description static PubSubOption
disableLocal(boolean disabled)
For subscriptions, specify whether local value updates should not be queued for readQueue().static PubSubOption
disableRemote(boolean disabled)
For subscriptions, specify whether remote value updates should not be queued for readQueue().static PubSubOption
excludePublisher(int publisher)
Don't queue value updates for the given publisher.static PubSubOption
excludePublisher(Publisher publisher)
Don't queue value updates for the given publisher.static PubSubOption
excludeSelf(boolean enabled)
Don't queue value updates for the internal publisher for an entry.static PubSubOption
keepDuplicates(boolean enabled)
If enabled, preserves duplicate value changes (rather than ignoring them).static PubSubOption
periodic(double period)
How frequently changes will be sent over the network.static PubSubOption
pollStorage(int depth)
Polling storage for subscription.static PubSubOption
sendAll(boolean enabled)
If enabled, sends all value changes over the network.static PubSubOption
topicsOnly(boolean enabled)
If enabled on a subscription, does not request value changes.
-
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
-
sendAll
If enabled, sends all value changes over the network. This option defaults to disabled.- Parameters:
enabled
- True to enable, false to disable- Returns:
- option
-
topicsOnly
If enabled on a subscription, does not request value changes. This option defaults to disabled.- Parameters:
enabled
- True to enable, false to disable- Returns:
- option
-
keepDuplicates
If enabled, preserves duplicate value changes (rather than ignoring them). This option defaults to disabled.- Parameters:
enabled
- True to enable, false to disable- 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
-
disableRemote
For subscriptions, specify whether remote value updates should not be queued for readQueue(). See also disableLocal(). Defaults to false (remote value updates are queued).- Parameters:
disabled
- True to disable, false to enable- Returns:
- option
-
disableLocal
For subscriptions, specify whether local value updates should not be queued for readQueue(). See alse disableRemote(). Defaults to false (local value updates are queued).- Parameters:
disabled
- True to disable, false to enable- 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
-
excludeSelf
Don't queue value updates for the internal publisher for an entry. Only has an effect on entries.- Parameters:
enabled
- True to enable, false to disable- Returns:
- option
-