#ifndef __CONTROL_THREAD_H_INCLUDED__
#define __CONTROL_THREAD_H_INCLUDED__

#include "threads.h"
#include "mutex.h"

class ControlThread : public Thread {
public:

	// Bogus Variable Get & Set
	// Do something appropriate
	double GetVelocity(void) {
		double velocity;
		m_ExclusiveAccess.Acquire();
		velocity = m_Velocity;
		m_ExclusiveAccess.Release();
		return velocity;
	}

	void SetVelocity(double velocity) {
		m_ExclusiveAccess.Acquire();
		m_Velocity = velocity;
		m_ExclusiveAccess.Release();
	}

protected:
	virtual void* Run(void*);

private:
	Mutex		m_ExclusiveAccess;
	double		m_Velocity;
};

#endif // of __CONTROL_THREAD_H_INCLUDED__
