11 #include "LiveWindow/LiveWindowSendable.h"
12 #include "tables/ITable.h"
13 #include "Commands/Scheduler.h"
19 std::string subsystem;
21 bool isSensor =
false;
25 this->subsystem = subsystem;
27 this->isSensor = isSensor;
42 void AddSensor(
const std::string &subsystem,
const std::string &name,
44 void AddSensor(
const std::string &subsystem,
const std::string &name,
46 void AddSensor(
const std::string &subsystem,
const std::string &name,
47 std::shared_ptr<LiveWindowSendable> component);
48 void AddActuator(
const std::string &subsystem,
const std::string &name,
50 void AddActuator(
const std::string &subsystem,
const std::string &name,
52 void AddActuator(
const std::string &subsystem,
const std::string &name,
53 std::shared_ptr<LiveWindowSendable> component);
58 void AddActuator(std::string type,
int module,
int channel,
61 bool IsEnabled()
const {
return m_enabled; }
71 void InitializeLiveWindowComponents();
73 std::vector<std::shared_ptr<LiveWindowSendable>> m_sensors;
76 std::shared_ptr<ITable> m_liveWindowTable;
77 std::shared_ptr<ITable> m_statusTable;
81 bool m_enabled =
false;
82 bool m_firstTime =
true;
Definition: Scheduler.h:27
Live Window Sendable is a special type of object sendable to the live window.
Definition: LiveWindowSendable.h:18
void AddSensor(const std::string &subsystem, const std::string &name, LiveWindowSendable *component)
Use a raw pointer to the LiveWindow.
Definition: LiveWindow.cpp:91
The LiveWindow class is the public interface for putting sensors and actuators on the LiveWindow...
Definition: LiveWindow.h:38
static LiveWindow * GetInstance()
Get an instance of the LiveWindow main class This is a singleton to guarantee that there is only a si...
Definition: LiveWindow.cpp:19
void SetEnabled(bool enabled)
Change the enabled status of LiveWindow If it changes to enabled, start livewindow running otherwise ...
Definition: LiveWindow.cpp:37
LiveWindow()
LiveWindow constructor.
Definition: LiveWindow.cpp:28
void Run()
This method is called periodically to cause the sensors to send new values to the SmartDashboard...
Definition: LiveWindow.cpp:191
void AddActuator(const std::string &subsystem, const std::string &name, LiveWindowSendable *component)
Use a raw pointer to the LiveWindow.
Definition: LiveWindow.cpp:131
Definition: LiveWindow.h:18