15 #include "Commands/Scheduler.h"
16 #include "LiveWindow/LiveWindowSendable.h"
17 #include "tables/ITable.h"
22 std::string subsystem;
24 bool isSensor =
false;
28 this->subsystem = subsystem;
30 this->isSensor = isSensor;
43 void AddSensor(
const std::string& subsystem,
const std::string& name,
45 void AddSensor(
const std::string& subsystem,
const std::string& name,
47 void AddSensor(
const std::string& subsystem,
const std::string& name,
48 std::shared_ptr<LiveWindowSendable> component);
49 void AddActuator(
const std::string& subsystem,
const std::string& name,
51 void AddActuator(
const std::string& subsystem,
const std::string& name,
53 void AddActuator(
const std::string& subsystem,
const std::string& name,
54 std::shared_ptr<LiveWindowSendable> component);
59 void AddActuator(std::string type,
int module,
int channel,
62 bool IsEnabled()
const {
return m_enabled; }
72 void InitializeLiveWindowComponents();
74 std::vector<std::shared_ptr<LiveWindowSendable>> m_sensors;
78 std::shared_ptr<ITable> m_liveWindowTable;
79 std::shared_ptr<ITable> m_statusTable;
83 bool m_enabled =
false;
84 bool m_firstTime =
true;
Live Window Sendable is a special type of object sendable to the live window.
Definition: LiveWindowSendable.h:17
The LiveWindow class is the public interface for putting sensors and actuators on the LiveWindow...
Definition: LiveWindow.h:39
void SetEnabled(bool enabled)
Change the enabled status of LiveWindow.
Definition: LiveWindow.cpp:43
void AddSensor(const std::string &subsystem, const std::string &name, LiveWindowSendable *component)
Use a raw pointer to the LiveWindow.
Definition: LiveWindow.cpp:100
Definition: LiveWindow.h:21
void Run()
This method is called periodically to cause the sensors to send new values to the SmartDashboard...
Definition: LiveWindow.cpp:207
void AddActuator(const std::string &subsystem, const std::string &name, LiveWindowSendable *component)
Use a raw pointer to the LiveWindow.
Definition: LiveWindow.cpp:143
static LiveWindow * GetInstance()
Get an instance of the LiveWindow main class.
Definition: LiveWindow.cpp:23
LiveWindow()
LiveWindow constructor.
Definition: LiveWindow.cpp:33
Definition: Scheduler.h:29