Interface TunableBackend
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
MockTunableBackend, NetworkTablesTunableBackend
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA tunable removed from a backend. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidmarkDirty(TunableBase tunable) Notifies the backend that a tunable has local changes.booleanpublish(String path, TunableBase tunable) Publishes a tunable.booleanpublishComplex(String path, ComplexTunable tunable) Publishes a complex tunable.voidRemoves a tunable.removePrefix(String prefix) Removes all tunables under a prefix.voidupdate()Updates all tunable values and calls callbacks where appropriate.Methods inherited from interface AutoCloseable
close
-
Method Details
-
publish
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 pathtunable- the tunable- Returns:
- true if the tunable was published, false otherwise
-
publishComplex
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 pathtunable- the tunable- Returns:
- true if the tunable was published, false otherwise
-
remove
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
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.
-