WPILibC++
2019.1.1-beta-4-27-ga2368a6
|
The LiveWindow class is the public interface for putting sensors and actuators on the LiveWindow. More...
#include <LiveWindow.h>
Public Member Functions | |
LiveWindow (const LiveWindow &)=delete | |
LiveWindow & | operator= (const LiveWindow &)=delete |
void | Run () |
void | AddSensor (const wpi::Twine &subsystem, const wpi::Twine &name, Sendable *component) |
Add a Sensor associated with the subsystem and call it by the given name. More... | |
void | AddSensor (const wpi::Twine &subsystem, const wpi::Twine &name, Sendable &component) |
Add a Sensor associated with the subsystem and call it by the given name. More... | |
void | AddSensor (const wpi::Twine &subsystem, const wpi::Twine &name, std::shared_ptr< Sendable > component) |
Add a Sensor associated with the subsystem and call it by the given name. More... | |
void | AddActuator (const wpi::Twine &subsystem, const wpi::Twine &name, Sendable *component) |
Add an Actuator associated with the subsystem and call it by the given name. More... | |
void | AddActuator (const wpi::Twine &subsystem, const wpi::Twine &name, Sendable &component) |
Add an Actuator associated with the subsystem and call it by the given name. More... | |
void | AddActuator (const wpi::Twine &subsystem, const wpi::Twine &name, std::shared_ptr< Sendable > component) |
Add an Actuator associated with the subsystem and call it by the given name. More... | |
void | AddSensor (const wpi::Twine &type, int channel, Sendable *component) |
Meant for internal use in other WPILib classes. More... | |
void | AddActuator (const wpi::Twine &type, int channel, Sendable *component) |
Meant for internal use in other WPILib classes. More... | |
void | AddActuator (const wpi::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... | |
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 frc::LiveWindow::Add | ( | std::shared_ptr< Sendable > | component | ) |
Add a component to the LiveWindow.
sendable | component to add |
void frc::LiveWindow::Add | ( | Sendable * | component | ) |
Add a component to the LiveWindow.
sendable | component to add |
void frc::LiveWindow::AddActuator | ( | const wpi::Twine & | subsystem, |
const wpi::Twine & | name, | ||
Sendable * | component | ||
) |
Add an Actuator associated with the subsystem and call it by the given name.
subsystem | The subsystem this component is part of. |
name | The name of this component. |
component | A Sendable component that represents a actuator. |
void frc::LiveWindow::AddActuator | ( | const wpi::Twine & | subsystem, |
const wpi::Twine & | name, | ||
Sendable & | component | ||
) |
Add an Actuator associated with the subsystem and call it by the given name.
subsystem | The subsystem this component is part of. |
name | The name of this component. |
component | A Sendable component that represents a actuator. |
void frc::LiveWindow::AddActuator | ( | const wpi::Twine & | subsystem, |
const wpi::Twine & | name, | ||
std::shared_ptr< Sendable > | component | ||
) |
Add an Actuator associated with the subsystem and call it by the given name.
subsystem | The subsystem this component is part of. |
name | The name of this component. |
component | A Sendable component that represents a actuator. |
void frc::LiveWindow::AddActuator | ( | const wpi::Twine & | type, |
int | channel, | ||
Sendable * | component | ||
) |
Meant for internal use in other WPILib classes.
void frc::LiveWindow::AddActuator | ( | const wpi::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 frc::LiveWindow::AddChild | ( | Sendable * | parent, |
void * | component | ||
) |
Add a child component to a component.
parent | parent component |
child | child component |
void frc::LiveWindow::AddSensor | ( | const wpi::Twine & | subsystem, |
const wpi::Twine & | name, | ||
Sendable * | component | ||
) |
Add a Sensor associated with the subsystem and call it by the given name.
subsystem | The subsystem this component is part of. |
name | The name of this component. |
component | A Sendable component that represents a sensor. |
void frc::LiveWindow::AddSensor | ( | const wpi::Twine & | subsystem, |
const wpi::Twine & | name, | ||
Sendable & | component | ||
) |
Add a Sensor associated with the subsystem and call it by the given name.
subsystem | The subsystem this component is part of. |
name | The name of this component. |
component | A Sendable component that represents a sensor. |
void frc::LiveWindow::AddSensor | ( | const wpi::Twine & | subsystem, |
const wpi::Twine & | name, | ||
std::shared_ptr< Sendable > | component | ||
) |
Add a Sensor associated with the subsystem and call it by the given name.
subsystem | The subsystem this component is part of. |
name | The name of this component. |
component | A Sendable component that represents a sensor. |
void frc::LiveWindow::AddSensor | ( | const wpi::Twine & | type, |
int | channel, | ||
Sendable * | component | ||
) |
Meant for internal use in other WPILib classes.
void frc::LiveWindow::DisableTelemetry | ( | Sendable * | component | ) |
Disable telemetry for a single component.
sendable | component |
void frc::LiveWindow::EnableTelemetry | ( | Sendable * | component | ) |
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 frc::LiveWindow::Remove | ( | Sendable * | component | ) |
Remove the component from the LiveWindow.
sendable | component to remove |
void frc::LiveWindow::SetEnabled | ( | bool | enabled | ) |
Change the enabled status of LiveWindow.
If it changes to enabled, start livewindow running otherwise stop it
void frc::LiveWindow::UpdateValues | ( | ) |
Tell all the sensors to update (send) their values.
Actuators are handled through callbacks on their value changing from the SmartDashboard widgets.