Package edu.wpi.first.networktables
Class MultiSubscriber
java.lang.Object
edu.wpi.first.networktables.MultiSubscriber
- All Implemented Interfaces:
AutoCloseable
public final class MultiSubscriber extends Object implements AutoCloseable
Subscribe to multiple topics based on one or more topic name prefixes. Can be used in combination
with ValueListenerPoller to listen for value changes across all matching topics.
-
Constructor Summary
Constructors Constructor Description MultiSubscriber(NetworkTableInstance inst, String[] prefixes, PubSubOption... options)
Create a multiple subscriber. -
Method Summary
Modifier and Type Method Description void
close()
int
getHandle()
Gets the native handle.NetworkTableInstance
getInstance()
Gets the instance for the subscriber.boolean
isValid()
Determines if the native handle is valid.
-
Constructor Details
-
MultiSubscriber
Create a multiple subscriber.- Parameters:
inst
- instanceprefixes
- topic name prefixesoptions
- subscriber options
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
-
getInstance
Gets the instance for the subscriber.- Returns:
- Instance
-
isValid
Determines if the native handle is valid.- Returns:
- True if the native handle is valid, false otherwise.
-
getHandle
Gets the native handle.- Returns:
- Handle
-