Class NetworkTablesTunableBackend
- All Implemented Interfaces:
AutoCloseable, TunableBackend
-
Nested Class Summary
Nested classes/interfaces inherited from interface TunableBackend
TunableBackend.PublishedTunable -
Constructor Summary
ConstructorsConstructorDescriptionNetworkTablesTunableBackend(NetworkTableInstance inst, String prefix) Construct. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()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.
-
Constructor Details
-
NetworkTablesTunableBackend
Construct.- Parameters:
inst- NetworkTables instanceprefix- prefix to put in front of tunable paths in NT
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
publish
Description copied from interface:TunableBackendPublishes a tunable.Backend implementations must not throw from this method. Recoverable publication failures should be reported through
TunableRegistry.reportWarning(String)and skipped.- Specified by:
publishin interfaceTunableBackend- Parameters:
path- normalized pathtunable- the tunable- Returns:
- true if the tunable was published, false otherwise
-
publishComplex
Description copied from interface:TunableBackendPublishes a complex tunable.Backend implementations must not throw from this method. Recoverable publication failures should be reported through
TunableRegistry.reportWarning(String)and skipped.- Specified by:
publishComplexin interfaceTunableBackend- Parameters:
path- normalized pathtunable- the tunable- Returns:
- true if the tunable was published, false otherwise
-
remove
Description copied from interface:TunableBackendRemoves a tunable.Backend implementations must not throw from this method.
- Specified by:
removein interfaceTunableBackend- Parameters:
path- normalized path
-
removePrefix
Description copied from interface:TunableBackendRemoves 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.
- Specified by:
removePrefixin interfaceTunableBackend- Parameters:
prefix- normalized path prefix- Returns:
- removed tunables
-
markDirty
Description copied from interface:TunableBackendNotifies the backend that a tunable has local changes.Backend implementations must not throw from this method.
- Specified by:
markDirtyin interfaceTunableBackend- Parameters:
tunable- the changed tunable
-
update
public void update()Description copied from interface:TunableBackendUpdates 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.- Specified by:
updatein interfaceTunableBackend
-