Interface ComplexTunable

All Known Implementing Classes:
BangBangController, Field2d, PhoenixPIDController, PIDController, ProfiledPIDController, Selectable

public interface ComplexTunable
The base interface for complex (internally mutable) tunable objects.
  • Method Details

    • getTunableType

      default String getTunableType()
      Gets the tunable table type. Default is no specified table type (null).
      Returns:
      Table type
    • publishTunable

      void publishTunable(TunableTable table)
      Publishes the tunable to the given table.

      This function may be called when the tunable is initially published or republished during backend migration, and it must not throw. If an exception escapes, registry and backend state is not guaranteed to be restored.

      Parameters:
      table - table
    • updateTunable

      default void updateTunable()
      Updates this complex tunable.

      This function must not throw. If an exception escapes, registry and backend state is not guaranteed to be restored.

    • publishChildTunable

      default void publishChildTunable(String name, TunableBase tunable)
      Publishes a child tunable under all currently published paths for this complex tunable.

      If this complex tunable is not currently published, this function does nothing. Complex tunables should still publish their current children from publishTunable(TunableTable) so backend migration and full republish operations can recreate the complete child set.

      Parameters:
      name - the child name
      tunable - the child tunable
    • publishChildTunable

      default void publishChildTunable(String name, ComplexTunable tunable)
      Publishes a child complex tunable under all currently published paths for this complex tunable.

      If this complex tunable is not currently published, this function does nothing. Complex tunables should still publish their current children from publishTunable(TunableTable) so backend migration and full republish operations can recreate the complete child set.

      Parameters:
      name - the child name
      tunable - the child complex tunable
    • removeChildTunable

      default void removeChildTunable(String name)
      Removes a child tunable from all currently published paths for this complex tunable.

      If this complex tunable is not currently published, this function does nothing.

      Parameters:
      name - the child name
    • setChildTunableChanged

      default void setChildTunableChanged(String name)
      Marks a child tunable as locally changed.

      Use this for child tunables published from plain member variables when the member is mutated outside of the child tunable object.

      If this complex tunable or the child tunable is not currently published, this function does nothing.

      Parameters:
      name - the child name