Package edu.wpi.first.wpilibj.event
Class NetworkBooleanEvent
java.lang.Object
edu.wpi.first.wpilibj.event.BooleanEvent
edu.wpi.first.wpilibj.event.NetworkBooleanEvent
- All Implemented Interfaces:
BooleanSupplier
This class provides an easy way to link NetworkTables boolean topics to callback actions.
-
Field Summary
Fields inherited from class edu.wpi.first.wpilibj.event.BooleanEvent
m_loop
-
Constructor Summary
ConstructorDescriptionNetworkBooleanEvent
(EventLoop loop, BooleanSubscriber sub) Creates a new event with the given boolean subscriber determining whether it is active.NetworkBooleanEvent
(EventLoop loop, BooleanTopic topic) Creates a new event with the given boolean topic determining whether it is active.NetworkBooleanEvent
(EventLoop loop, NetworkTableInstance inst, String tableName, String topicName) Creates a new event with the given boolean topic determining whether it is active.NetworkBooleanEvent
(EventLoop loop, NetworkTable table, String topicName) Creates a new event with the given boolean topic determining whether it is active.NetworkBooleanEvent
(EventLoop loop, String tableName, String topicName) Creates a new event with the given boolean topic determining whether it is active. -
Method Summary
-
Constructor Details
-
NetworkBooleanEvent
Creates a new event with the given boolean topic determining whether it is active.- Parameters:
loop
- the loop that polls this eventtopic
- The boolean topic that contains the value
-
NetworkBooleanEvent
Creates a new event with the given boolean subscriber determining whether it is active.- Parameters:
loop
- the loop that polls this eventsub
- The boolean subscriber that provides the value
-
NetworkBooleanEvent
Creates a new event with the given boolean topic determining whether it is active.- Parameters:
loop
- the loop that polls this eventtable
- The NetworkTable that contains the topictopicName
- The topic name within the table that contains the value
-
NetworkBooleanEvent
Creates a new event with the given boolean topic determining whether it is active.- Parameters:
loop
- the loop that polls this eventtableName
- The NetworkTable name that contains the topictopicName
- The topic name within the table that contains the value
-
NetworkBooleanEvent
public NetworkBooleanEvent(EventLoop loop, NetworkTableInstance inst, String tableName, String topicName) Creates a new event with the given boolean topic determining whether it is active.- Parameters:
loop
- the loop that polls this eventinst
- The NetworkTable instance to usetableName
- The NetworkTable that contains the topictopicName
- The topic name within the table that contains the value
-