Package edu.wpi.first.networktables
Interface NTSendableBuilder
- All Superinterfaces:
SendableBuilder
- All Known Implementing Classes:
SendableBuilderImpl
public interface NTSendableBuilder extends SendableBuilder
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.wpi.first.util.sendable.SendableBuilder
SendableBuilder.BackendKind
-
Method Summary
Modifier and Type Method Description void
addValueProperty(String key, Supplier<NetworkTableValue> getter, Consumer<NetworkTableValue> setter)
Add a NetworkTableValue property.default SendableBuilder.BackendKind
getBackendKind()
Gets the kind of backend being used.NetworkTableEntry
getEntry(String key)
Add a property without getters or setters.NetworkTable
getTable()
Get the network table.void
setUpdateTable(Runnable func)
Set the function that should be called to update the network table for things other than properties.Methods inherited from interface edu.wpi.first.util.sendable.SendableBuilder
addBooleanArrayProperty, addBooleanProperty, addDoubleArrayProperty, addDoubleProperty, addRawProperty, addStringArrayProperty, addStringProperty, clearProperties, isPublished, setActuator, setSafeState, setSmartDashboardType, update
-
Method Details
-
setUpdateTable
Set the function that should be called to update the network table for things other than properties. Note this function is not passed the network table object; instead it should use the entry handles returned by getEntry().- Parameters:
func
- function
-
getEntry
Add a property without getters or setters. This can be used to get entry handles for the function called by setUpdateTable().- Parameters:
key
- property name- Returns:
- Network table entry
-
addValueProperty
void addValueProperty(String key, Supplier<NetworkTableValue> getter, Consumer<NetworkTableValue> setter)Add a NetworkTableValue property.- Parameters:
key
- property namegetter
- getter function (returns current value)setter
- setter function (sets new value)
-
getTable
Get the network table.- Returns:
- The network table
-
getBackendKind
Description copied from interface:SendableBuilder
Gets the kind of backend being used.- Specified by:
getBackendKind
in interfaceSendableBuilder
- Returns:
- Backend kind
-