SendableRegistry

class wpilib.SendableRegistry

Bases: pybind11_builtins.pybind11_object

The SendableRegistry class is the public interface for registering sensors and actuators for use on dashboards and LiveWindow.

add(*args, **kwargs)

Overloaded function.

  1. add(self: wpilib._wpilib.SendableRegistry, sendable: wpilib._wpilib.Sendable, name: str) -> None

Adds an object to the registry.

Parameters
  • sendable – object to add

  • name – component name

  1. add(self: wpilib._wpilib.SendableRegistry, sendable: wpilib._wpilib.Sendable, moduleType: str, channel: int) -> None

Adds an object to the registry.

Parameters
  • sendable – object to add

  • moduleType – A string that defines the module name in the label for the value

  • channel – The channel number the device is plugged into

  1. add(self: wpilib._wpilib.SendableRegistry, sendable: wpilib._wpilib.Sendable, moduleType: str, moduleNumber: int, channel: int) -> None

Adds an object to the registry.

Parameters
  • sendable – object to add

  • moduleType – A string that defines the module name in the label for the value

  • moduleNumber – The number of the particular module type

  • channel – The channel number the device is plugged into

  1. add(self: wpilib._wpilib.SendableRegistry, sendable: wpilib._wpilib.Sendable, subsystem: str, name: str) -> None

Adds an object to the registry.

Parameters
  • sendable – object to add

  • subsystem – subsystem name

  • name – component name

addChild(self: wpilib.SendableRegistry, parent: wpilib.Sendable, child: wpilib.Sendable) → None

Adds a child object to an object. Adds the child object to the registry if it’s not already present.

Parameters
  • parent – parent object

  • child – child object

addLW(*args, **kwargs)

Overloaded function.

  1. addLW(self: wpilib._wpilib.SendableRegistry, sendable: wpilib._wpilib.Sendable, name: str) -> None

Adds an object to the registry and LiveWindow.

Parameters
  • sendable – object to add

  • name – component name

  1. addLW(self: wpilib._wpilib.SendableRegistry, sendable: wpilib._wpilib.Sendable, moduleType: str, channel: int) -> None

Adds an object to the registry and LiveWindow.

Parameters
  • sendable – object to add

  • moduleType – A string that defines the module name in the label for the value

  • channel – The channel number the device is plugged into

  1. addLW(self: wpilib._wpilib.SendableRegistry, sendable: wpilib._wpilib.Sendable, moduleType: str, moduleNumber: int, channel: int) -> None

Adds an object to the registry and LiveWindow.

Parameters
  • sendable – object to add

  • moduleType – A string that defines the module name in the label for the value

  • moduleNumber – The number of the particular module type

  • channel – The channel number the device is plugged into

  1. addLW(self: wpilib._wpilib.SendableRegistry, sendable: wpilib._wpilib.Sendable, subsystem: str, name: str) -> None

Adds an object to the registry and LiveWindow.

Parameters
  • sendable – object to add

  • subsystem – subsystem name

  • name – component name

contains(self: wpilib.SendableRegistry, sendable: wpilib.Sendable) → bool

Determines if an object is in the registry.

Parameters

sendable – object to check

Returns

True if in registry, false if not.

disableLiveWindow(self: wpilib.SendableRegistry, sendable: wpilib.Sendable) → None

Disables LiveWindow for an object.

Parameters

sendable – object

enableLiveWindow(self: wpilib.SendableRegistry, sendable: wpilib.Sendable) → None

Enables LiveWindow for an object.

Parameters

sendable – object

static getInstance()wpilib.SendableRegistry

Gets an instance of the SendableRegistry class.

This is a singleton to guarantee that there is only a single instance regardless of how many times GetInstance is called.

getName(self: wpilib.SendableRegistry, sendable: wpilib.Sendable) → str

Gets the name of an object.

Parameters

sendable – object

Returns

Name (empty if object is not in registry)

getSendable(self: wpilib.SendableRegistry, uid: int)wpilib.Sendable

Get sendable object for a given unique id.

Parameters

uid – unique id

Returns

sendable object (may be null)

getSubsystem(self: wpilib.SendableRegistry, sendable: wpilib.Sendable) → str

Gets the subsystem name of an object.

Parameters

sendable – object

Returns

Subsystem name (empty if object is not in registry)

getUniqueId(self: wpilib.SendableRegistry, sendable: wpilib.Sendable) → int

Get unique id for an object. Since objects can move, use this instead of storing Sendable* directly if ownership is in question.

Parameters

sendable – object

Returns

unique id

publish(self: wpilib.SendableRegistry, sendableUid: int, table: _pyntcore._ntcore.NetworkTable) → None

Publishes an object in the registry to a network table.

Parameters
  • sendableUid – sendable unique id

  • table – network table

remove(self: wpilib.SendableRegistry, sendable: wpilib.Sendable) → bool

Removes an object from the registry.

Parameters

sendable – object to remove

Returns

true if the object was removed; false if it was not present

setName(*args, **kwargs)

Overloaded function.

  1. setName(self: wpilib._wpilib.SendableRegistry, sendable: wpilib._wpilib.Sendable, name: str) -> None

Sets the name of an object.

Parameters
  • sendable – object

  • name – name

  1. setName(self: wpilib._wpilib.SendableRegistry, sendable: wpilib._wpilib.Sendable, moduleType: str, channel: int) -> None

Sets the name of an object with a channel number.

Parameters
  • sendable – object

  • moduleType – A string that defines the module name in the label for the value

  • channel – The channel number the device is plugged into

  1. setName(self: wpilib._wpilib.SendableRegistry, sendable: wpilib._wpilib.Sendable, moduleType: str, moduleNumber: int, channel: int) -> None

Sets the name of an object with a module and channel number.

Parameters
  • sendable – object

  • moduleType – A string that defines the module name in the label for the value

  • moduleNumber – The number of the particular module type

  • channel – The channel number the device is plugged into

  1. setName(self: wpilib._wpilib.SendableRegistry, sendable: wpilib._wpilib.Sendable, subsystem: str, name: str) -> None

Sets both the subsystem name and device name of an object.

Parameters
  • sendable – object

  • subsystem – subsystem name

  • name – device name

setSubsystem(self: wpilib.SendableRegistry, sendable: wpilib.Sendable, subsystem: str) → None

Sets the subsystem name of an object.

Parameters
  • sendable – object

  • subsystem – subsystem name

update(self: wpilib.SendableRegistry, sendableUid: int) → None

Updates network table information from an object.

Parameters

sendableUid – sendable unique id