WPILibC++
unspecified
|
The LiveWindow class is the public interface for putting sensors and actuators on the LiveWindow. More...
#include <LiveWindow.h>
Public Member Functions | |||||||
void | Run () | ||||||
This method is called periodically to cause the sensors to send new values to the SmartDashboard. | |||||||
void | AddSensor (std::string type, int channel, LiveWindowSendable *component) | ||||||
Meant for internal use in other WPILib classes. | |||||||
void | AddActuator (std::string type, int channel, LiveWindowSendable *component) | ||||||
Meant for internal use in other WPILib classes. | |||||||
void | AddActuator (std::string type, int module, int channel, LiveWindowSendable *component) | ||||||
Meant for internal use in other WPILib classes. | |||||||
bool | IsEnabled () const | ||||||
void | SetEnabled (bool enabled) | ||||||
Change the enabled status of LiveWindow. More... | |||||||
AddSensor(subsystem, name, component) | |||||||
Add a Sensor associated with the subsystem and call it by the given name.
| |||||||
void | AddSensor (const std::string &subsystem, const std::string &name, LiveWindowSendable *component) | ||||||
Use a raw pointer to the LiveWindow. More... | |||||||
void | AddSensor (const std::string &subsystem, const std::string &name, LiveWindowSendable &component) | ||||||
Pass a reference to LiveWindow and retain ownership of the component. | |||||||
void | AddSensor (const std::string &subsystem, const std::string &name, std::shared_ptr< LiveWindowSendable > component) | ||||||
Use a STL smart pointer to share ownership of component. | |||||||
AddActuator(subsystem, name, component) | |||||||
Add an Actuator associated with the subsystem and call it by the given name.
| |||||||
void | AddActuator (const std::string &subsystem, const std::string &name, LiveWindowSendable *component) | ||||||
Use a raw pointer to the LiveWindow. More... | |||||||
void | AddActuator (const std::string &subsystem, const std::string &name, LiveWindowSendable &component) | ||||||
Pass a reference to LiveWindow and retain ownership of the component. | |||||||
void | AddActuator (const std::string &subsystem, const std::string &name, std::shared_ptr< LiveWindowSendable > 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... | |
Protected Member Functions | |
LiveWindow () | |
LiveWindow constructor. More... | |
The LiveWindow class is the public interface for putting sensors and actuators on the LiveWindow.
|
protected |
LiveWindow constructor.
Allocate the necessary tables.
void LiveWindow::AddActuator | ( | const std::string & | subsystem, |
const std::string & | name, | ||
LiveWindowSendable * | component | ||
) |
Use a raw pointer to the LiveWindow.
void LiveWindow::AddSensor | ( | const std::string & | subsystem, |
const std::string & | name, | ||
LiveWindowSendable * | component | ||
) |
Use a raw pointer to the LiveWindow.
|
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::SetEnabled | ( | bool | enabled | ) |
Change the enabled status of LiveWindow.
If it changes to enabled, start livewindow running otherwise stop it