WPILibC++
unspecified
|
The LiveWindow class is the public interface for putting sensors and actuators on the LiveWindow. More...
#include <LiveWindow.h>
Classes | |
struct | Impl |
Public Member Functions | |||||||
LiveWindow (const LiveWindow &)=delete | |||||||
LiveWindow & | operator= (const LiveWindow &)=delete | ||||||
void | Run () | ||||||
void | AddSensor (const llvm::Twine &type, int channel, Sendable *component) | ||||||
Meant for internal use in other WPILib classes. More... | |||||||
void | AddActuator (const llvm::Twine &type, int channel, Sendable *component) | ||||||
Meant for internal use in other WPILib classes. More... | |||||||
void | AddActuator (const llvm::Twine &type, int module, int channel, Sendable *component) | ||||||
Meant for internal use in other WPILib classes. More... | |||||||
void | Add (std::shared_ptr< Sendable > component) | ||||||
Add a component to the LiveWindow. More... | |||||||
void | Add (Sendable *component) | ||||||
Add a component to the LiveWindow. More... | |||||||
void | AddChild (Sendable *parent, std::shared_ptr< Sendable > component) | ||||||
Add a child component to a component. More... | |||||||
void | AddChild (Sendable *parent, void *component) | ||||||
Add a child component to a component. More... | |||||||
void | Remove (Sendable *component) | ||||||
Remove the component from the LiveWindow. More... | |||||||
void | EnableTelemetry (Sendable *component) | ||||||
Enable telemetry for a single component. More... | |||||||
void | DisableTelemetry (Sendable *component) | ||||||
Disable telemetry for a single component. More... | |||||||
void | DisableAllTelemetry () | ||||||
Disable ALL telemetry. | |||||||
bool | IsEnabled () const | ||||||
void | SetEnabled (bool enabled) | ||||||
Change the enabled status of LiveWindow. More... | |||||||
void | UpdateValues () | ||||||
Tell all the sensors to update (send) their values. More... | |||||||
AddSensor(subsystem, name, component) | |||||||
Add a Sensor associated with the subsystem and call it by the given name.
| |||||||
void | AddSensor (const llvm::Twine &subsystem, const llvm::Twine &name, Sendable *component) | ||||||
Use a raw pointer to the LiveWindow. More... | |||||||
void | AddSensor (const llvm::Twine &subsystem, const llvm::Twine &name, Sendable &component) | ||||||
Pass a reference to LiveWindow and retain ownership of the component. More... | |||||||
void | AddSensor (const llvm::Twine &subsystem, const llvm::Twine &name, std::shared_ptr< Sendable > component) | ||||||
Use a STL smart pointer to share ownership of component. More... | |||||||
AddActuator(subsystem, name, component) | |||||||
Add an Actuator associated with the subsystem and call it by the given name.
| |||||||
void | AddActuator (const llvm::Twine &subsystem, const llvm::Twine &name, Sendable *component) | ||||||
Use a raw pointer to the LiveWindow. More... | |||||||
void | AddActuator (const llvm::Twine &subsystem, const llvm::Twine &name, Sendable &component) | ||||||
Pass a reference to LiveWindow and retain ownership of the component. More... | |||||||
void | AddActuator (const llvm::Twine &subsystem, const llvm::Twine &name, std::shared_ptr< Sendable > component) | ||||||
Use a STL smart pointer to share ownership of component. | |||||||
Static Public Member Functions | |
static LiveWindow * | GetInstance () |
Get an instance of the LiveWindow main class. More... | |
The LiveWindow class is the public interface for putting sensors and actuators on the LiveWindow.
void LiveWindow::Add | ( | std::shared_ptr< Sendable > | sendable | ) |
Add a component to the LiveWindow.
sendable | component to add |
void LiveWindow::Add | ( | Sendable * | sendable | ) |
Add a component to the LiveWindow.
sendable | component to add |
void LiveWindow::AddActuator | ( | const llvm::Twine & | subsystem, |
const llvm::Twine & | name, | ||
Sendable * | component | ||
) |
Use a raw pointer to the LiveWindow.
void LiveWindow::AddActuator | ( | const llvm::Twine & | subsystem, |
const llvm::Twine & | name, | ||
Sendable & | component | ||
) |
Pass a reference to LiveWindow and retain ownership of the component.
void LiveWindow::AddActuator | ( | const llvm::Twine & | type, |
int | channel, | ||
Sendable * | component | ||
) |
Meant for internal use in other WPILib classes.
void LiveWindow::AddActuator | ( | const llvm::Twine & | type, |
int | module, | ||
int | channel, | ||
Sendable * | component | ||
) |
Meant for internal use in other WPILib classes.
Add a child component to a component.
parent | parent component |
child | child component |
void LiveWindow::AddChild | ( | Sendable * | parent, |
void * | child | ||
) |
Add a child component to a component.
parent | parent component |
child | child component |
void LiveWindow::AddSensor | ( | const llvm::Twine & | subsystem, |
const llvm::Twine & | name, | ||
Sendable * | component | ||
) |
Use a raw pointer to the LiveWindow.
void LiveWindow::AddSensor | ( | const llvm::Twine & | subsystem, |
const llvm::Twine & | name, | ||
Sendable & | component | ||
) |
Pass a reference to LiveWindow and retain ownership of the component.
void LiveWindow::AddSensor | ( | const llvm::Twine & | subsystem, |
const llvm::Twine & | name, | ||
std::shared_ptr< Sendable > | component | ||
) |
Use a STL smart pointer to share ownership of component.
void LiveWindow::AddSensor | ( | const llvm::Twine & | type, |
int | channel, | ||
Sendable * | component | ||
) |
Meant for internal use in other WPILib classes.
void LiveWindow::DisableTelemetry | ( | Sendable * | sendable | ) |
Disable telemetry for a single component.
sendable | component |
void LiveWindow::EnableTelemetry | ( | Sendable * | sendable | ) |
Enable telemetry for a single component.
sendable | component |
|
static |
Get an instance of the LiveWindow main class.
This is a singleton to guarantee that there is only a single instance regardless of how many times GetInstance is called.
void LiveWindow::Remove | ( | Sendable * | sendable | ) |
Remove the component from the LiveWindow.
sendable | component to remove |
void LiveWindow::SetEnabled | ( | bool | enabled | ) |
Change the enabled status of LiveWindow.
If it changes to enabled, start livewindow running otherwise stop it
void LiveWindow::UpdateValues | ( | ) |
Tell all the sensors to update (send) their values.
Actuators are handled through callbacks on their value changing from the SmartDashboard widgets.