Class SendableRegistry
java.lang.Object
org.wpilib.util.sendable.SendableRegistry
The SendableRegistry class is the public interface for registering sensors and actuators for use
on dashboards.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdds an object to the registry.static voidAdds an object to the registry.static voidAdds an object to the registry.static voidAdds an object to the registry.static voidAdds a child object to an object.static booleanDetermines if an object is in the registry.static ObjectGets arbitrary data associated with an object in the registry.static intGets a unique handle for setting/getting data with setData() and getData().static StringGets the name of an object.static StringgetSubsystem(Sendable sendable) Gets the subsystem name of an object.static voidpublish(Sendable sendable, SendableBuilder builder) Publishes an object in the registry to a builder.static booleanRemoves an object from the registry.static AutoCloseablesetData(Sendable sendable, int handle, AutoCloseable data) Associates arbitrary data with an object in the registry.static voidSets the name of an object.static voidSets the name of an object with a channel number.static voidSets the name of an object with a module and channel number.static voidSets both the subsystem name and device name of an object.static voidsetSubsystem(Sendable sendable, String subsystem) Sets the subsystem name of an object.static voidUpdates network table information from an object.
-
Method Details
-
add
-
add
-
add
Adds an object to the registry.- Parameters:
sendable- object to addmoduleType- A string that defines the module name in the label for the valuemoduleNumber- The number of the particular module typechannel- The channel number the device is plugged into
-
add
-
addChild
-
remove
-
contains
-
getName
-
setName
-
setName
-
setName
Sets the name of an object with a module and channel number.- Parameters:
sendable- objectmoduleType- A string that defines the module name in the label for the valuemoduleNumber- The number of the particular module typechannel- The channel number the device is plugged into
-
setName
-
getSubsystem
Gets the subsystem name of an object.- Parameters:
sendable- object- Returns:
- Subsystem name (empty if object is not in registry)
-
setSubsystem
Sets the subsystem name of an object.- Parameters:
sendable- objectsubsystem- subsystem name
-
getDataHandle
Gets a unique handle for setting/getting data with setData() and getData().- Returns:
- Handle
-
setData
Associates arbitrary data with an object in the registry.- Parameters:
sendable- objecthandle- data handle returned by getDataHandle()data- data to set- Returns:
- Previous data (may be null). If non-null, caller is responsible for calling close().
-
getData
-
publish
Publishes an object in the registry to a builder.- Parameters:
sendable- objectbuilder- sendable builder
-
update
-