Class Binding

java.lang.Object
com.cdarobotics.cdalib.bindings.Binding
Direct Known Subclasses:
ToggleBinding

public class Binding extends Object
A named boolean condition, typically wired to a gamepad button or a robot state. The condition is evaluated on demand via getStatus().
  • Constructor Details

    • Binding

      public Binding(BooleanSupplier condition, String id)
      Parameters:
      condition - the boolean condition this binding evaluates
      id - the unique name used to register and look up this binding
  • Method Details

    • getId

      public String getId()
      Returns:
      the unique id of this binding.
    • getCondition

      public BooleanSupplier getCondition()
      Returns:
      the underlying condition supplier.
    • getStatus

      public boolean getStatus()
      Returns:
      the current value of this binding's condition.