|
WPILibC++
2020.3.2
|
A helper class for use with objects that add themselves to SendableRegistry. More...
#include <SendableHelper.h>
Public Member Functions | |
| SendableHelper (const SendableHelper &rhs)=default | |
| SendableHelper & | operator= (const SendableHelper &rhs)=default |
| SendableHelper (SendableHelper &&rhs) | |
| SendableHelper & | operator= (SendableHelper &&rhs) |
| std::string | GetName () const |
| Gets the name of this Sendable object. More... | |
| void | SetName (const wpi::Twine &name) |
| Sets the name of this Sendable object. More... | |
| void | SetName (const wpi::Twine &subsystem, const wpi::Twine &name) |
| Sets both the subsystem name and device name of this Sendable object. More... | |
| std::string | GetSubsystem () const |
| Gets the subsystem name of this Sendable object. More... | |
| void | SetSubsystem (const wpi::Twine &subsystem) |
| Sets the subsystem name of this Sendable object. More... | |
Protected Member Functions | |
| void | AddChild (std::shared_ptr< Sendable > child) |
| Add a child component. More... | |
| void | AddChild (void *child) |
| Add a child component. More... | |
| void | SetName (const wpi::Twine &moduleType, int channel) |
| Sets the name of the sensor with a channel number. More... | |
| void | SetName (const wpi::Twine &moduleType, int moduleNumber, int channel) |
| Sets the name of the sensor with a module and channel number. More... | |
A helper class for use with objects that add themselves to SendableRegistry.
It takes care of properly calling Move() and Remove() on move and destruction. No action is taken if the object is copied. Use public inheritance with CRTP when using this class.
| CRTP | derived class |
|
inlineprotected |
Add a child component.
| child | child component |
|
inlineprotected |
Add a child component.
| child | child component |
|
inline |
Gets the name of this Sendable object.
|
inline |
|
inlineprotected |
Sets the name of the sensor with a channel number.
| moduleType | A string that defines the module name in the label for the value |
| channel | The channel number the device is plugged into |
|
inlineprotected |
Sets the name of the sensor with a module and channel number.
| 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 (usually PWM) |
|
inline |
Sets the name of this Sendable object.
| name | name |
|
inline |
Sets both the subsystem name and device name of this Sendable object.
| subsystem | subsystem name |
| name | device name |
|
inline |
Sets the subsystem name of this Sendable object.
| subsystem | subsystem name |