Class NetworkBooleanEvent

java.lang.Object
edu.wpi.first.wpilibj.event.BooleanEvent
edu.wpi.first.wpilibj.event.NetworkBooleanEvent
All Implemented Interfaces:
BooleanSupplier

public class NetworkBooleanEvent
extends BooleanEvent
This class provides an easy way to link NetworkTables boolean topics to callback actions.
  • Constructor Details

    • NetworkBooleanEvent

      public NetworkBooleanEvent​(EventLoop loop, BooleanTopic topic)
      Creates a new event with the given boolean topic determining whether it is active.
      Parameters:
      loop - the loop that polls this event
      topic - 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 event
      sub - The boolean subscriber that provides the value
    • NetworkBooleanEvent

      public NetworkBooleanEvent​(EventLoop loop, NetworkTable table, String topicName)
      Creates a new event with the given boolean topic determining whether it is active.
      Parameters:
      loop - the loop that polls this event
      table - The NetworkTable that contains the topic
      topicName - The topic name within the table that contains the value
    • NetworkBooleanEvent

      public NetworkBooleanEvent​(EventLoop loop, 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 event
      tableName - The NetworkTable name that contains the topic
      topicName - 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 event
      inst - The NetworkTable instance to use
      tableName - The NetworkTable that contains the topic
      topicName - The topic name within the table that contains the value