Class NetworkButton

All Implemented Interfaces:
BooleanSupplier

public class NetworkButton
extends Button
A Button that uses a NetworkTable boolean field.

This class is provided by the NewCommands VendorDep

  • Constructor Details

    • NetworkButton

      public NetworkButton​(NetworkTableEntry entry)
      Creates a NetworkButton that commands can be bound to.
      Parameters:
      entry - The entry that is the value.
    • NetworkButton

      public NetworkButton​(NetworkTable table, String field)
      Creates a NetworkButton that commands can be bound to.
      Parameters:
      table - The table where the networktable value is located.
      field - The field that is the value.
    • NetworkButton

      public NetworkButton​(String table, String field)
      Creates a NetworkButton that commands can be bound to.
      Parameters:
      table - The table where the networktable value is located.
      field - The field that is the value.
  • Method Details

    • get

      public boolean get()
      Description copied from class: Trigger
      Returns whether or not the trigger is active.

      This method will be called repeatedly a command is linked to the Trigger.

      Functionally identical to Trigger.getAsBoolean().

      Overrides:
      get in class Trigger
      Returns:
      whether or not the trigger condition is active.