Interface TunableBackend

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
MockTunableBackend, NetworkTablesTunableBackend

public interface TunableBackend extends AutoCloseable
Backend interface for publishing and updating tunables.
  • Method Details

    • publish

      boolean publish(String path, TunableBase tunable)
      Publishes a tunable.

      Backend implementations must not throw from this method. Recoverable publication failures should be reported through TunableRegistry.reportWarning(String) and skipped.

      Parameters:
      path - normalized path
      tunable - the tunable
      Returns:
      true if the tunable was published, false otherwise
    • publishComplex

      boolean publishComplex(String path, ComplexTunable tunable)
      Publishes a complex tunable.

      Backend implementations must not throw from this method. Recoverable publication failures should be reported through TunableRegistry.reportWarning(String) and skipped.

      Parameters:
      path - normalized path
      tunable - the tunable
      Returns:
      true if the tunable was published, false otherwise
    • remove

      void remove(String path)
      Removes a tunable.

      Backend implementations must not throw from this method.

      Parameters:
      path - normalized path
    • removePrefix

      Removes all tunables under a prefix.

      Backend implementations must not throw from this method. The returned list must describe the tunables actually removed from the backend.

      Parameters:
      prefix - normalized path prefix
      Returns:
      removed tunables
    • markDirty

      default void markDirty(TunableBase tunable)
      Notifies the backend that a tunable has local changes.

      Backend implementations must not throw from this method.

      Parameters:
      tunable - the changed tunable
    • update

      void update()
      Updates all tunable values and calls callbacks where appropriate.

      Backend implementations must not throw from this method. Recoverable update failures should be reported through TunableRegistry.reportWarning(String) and skipped so the robot loop and registry state can continue updating.