This is the latest WPILib src, VisionSample2013, cRIO image, ... pulled down from firstforge.wpi.edu.

There might be risks in using the top of tree rather than an official release, but the commit messages do mention fixes for some deadlocks and race conditions.

git-svn-id: https://robotics.mvla.net/svn/frc971/2013/trunk/src@4066 f308d9b7-e957-4cde-b6ac-9a88185e7312
diff --git a/azaleasource/WPILibCProgramming/trunk/WPILib/LiveWindow/LiveWindow.h b/azaleasource/WPILibCProgramming/trunk/WPILib/LiveWindow/LiveWindow.h
new file mode 100644
index 0000000..efdddf6
--- /dev/null
+++ b/azaleasource/WPILibCProgramming/trunk/WPILib/LiveWindow/LiveWindow.h
@@ -0,0 +1,67 @@
+#ifndef _LIVE_WINDOW_H

+#define _LIVE_WINDOW_H

+

+#include "LiveWindow/LiveWindowSendable.h"

+#include "tables/ITable.h"

+#include "Commands/Scheduler.h"

+#include <vector>

+#include <map>

+

+struct LiveWindowComponent

+{

+	std::string subsystem;

+	std::string name;

+	bool isSensor;

+

+	LiveWindowComponent()

+	{}//WTF?

+	LiveWindowComponent(std::string subsystem, std::string name, bool isSensor)

+	{

+		this->subsystem = subsystem;

+		this->name = name;

+		this->isSensor = isSensor;

+	}

+};

+

+/**

+ * The LiveWindow class is the public interface for putting sensors and actuators

+ * on the LiveWindow.

+ *

+ * @author Brad Miller

+ */

+class LiveWindow {

+public:

+	static LiveWindow * GetInstance();

+	void Run();

+	void AddSensor(char *subsystem, char *name, LiveWindowSendable *component);

+	void AddActuator(char *subsystem, char *name, LiveWindowSendable *component);

+	void AddSensor(std::string type, int module, int channel, LiveWindowSendable *component);

+	void AddActuator(std::string type, int module, int channel, LiveWindowSendable *component);

+	

+	bool IsEnabled() { return m_enabled; }

+	void SetEnabled(bool enabled);

+

+protected:

+	LiveWindow();

+	virtual ~LiveWindow();

+

+private:

+	void UpdateValues();

+	void Initialize();

+	void InitializeLiveWindowComponents();

+	

+	std::vector<LiveWindowSendable *> m_sensors;

+	std::map<LiveWindowSendable *, LiveWindowComponent> m_components;

+	

+	static LiveWindow *m_instance;

+	ITable *m_liveWindowTable;

+	ITable *m_statusTable;

+	

+	Scheduler *m_scheduler;

+	

+	bool m_enabled;

+	bool m_firstTime;

+};

+

+#endif

+