Home
Roadside
Carputer
geoHist
software
FRC
Blog
Now you can download a copy of these docs so you can use them offline!
Download now
Main Page
Related Pages
Classes
Files
File List
LiveWindow
LiveWindow.h
1
#ifndef _LIVE_WINDOW_H
2
#define _LIVE_WINDOW_H
3
4
#include "LiveWindow/LiveWindowSendable.h"
5
#include "tables/ITable.h"
6
#include "Commands/Scheduler.h"
7
#include <vector>
8
#include <map>
9
10
struct
LiveWindowComponent
11
{
12
std::string subsystem;
13
std::string name;
14
bool
isSensor;
15
16
LiveWindowComponent
()
17
{}
//WTF?
18
LiveWindowComponent
(std::string subsystem, std::string name,
bool
isSensor)
19
{
20
this->subsystem = subsystem;
21
this->name = name;
22
this->isSensor = isSensor;
23
}
24
};
25
32
class
LiveWindow
{
33
public
:
34
static
LiveWindow
*
GetInstance
();
35
void
Run
();
36
void
AddSensor
(
const
char
*subsystem,
const
char
*name,
LiveWindowSendable
*component);
37
void
AddActuator
(
const
char
*subsystem,
const
char
*name,
LiveWindowSendable
*component);
38
void
AddSensor
(std::string type,
int
module,
int
channel,
LiveWindowSendable
*component);
39
void
AddActuator
(std::string type,
int
module,
int
channel,
LiveWindowSendable
*component);
40
41
bool
IsEnabled() {
return
m_enabled; }
42
void
SetEnabled
(
bool
enabled);
43
44
protected
:
45
LiveWindow
();
46
virtual
~
LiveWindow
();
47
48
private
:
49
void
UpdateValues();
50
void
Initialize();
51
void
InitializeLiveWindowComponents();
52
53
std::vector<LiveWindowSendable *> m_sensors;
54
std::map<LiveWindowSendable *, LiveWindowComponent> m_components;
55
56
static
LiveWindow
*m_instance;
57
ITable
*m_liveWindowTable;
58
ITable
*m_statusTable;
59
60
Scheduler
*m_scheduler;
61
62
bool
m_enabled;
63
bool
m_firstTime;
64
};
65
66
#endif
67
LiveWindow::AddActuator
void AddActuator(const char *subsystem, const char *name, LiveWindowSendable *component)
Definition:
LiveWindow.cpp:96
Scheduler
Definition:
Scheduler.h:25
LiveWindow::SetEnabled
void SetEnabled(bool enabled)
Definition:
LiveWindow.cpp:38
ITable
Definition:
ITable.h:26
LiveWindow
Definition:
LiveWindow.h:32
LiveWindowComponent
Definition:
LiveWindow.h:10
LiveWindow::Run
void Run()
Definition:
LiveWindow.cpp:151
LiveWindowSendable
Definition:
LiveWindowSendable.h:17
LiveWindow::AddSensor
void AddSensor(const char *subsystem, const char *name, LiveWindowSendable *component)
Definition:
LiveWindow.cpp:82
LiveWindow::GetInstance
static LiveWindow * GetInstance()
Definition:
LiveWindow.cpp:13
LiveWindow::LiveWindow
LiveWindow()
Definition:
LiveWindow.cpp:26
Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by
1.8.6
© 2006-2009 Dustin Spicuzza. All rights reserved.
Powered by Onnac
I do not condone or encourage graffiti. Please paint responsibly.