TUsb Respiration Belt plugin 1.0

src/RespirationBelt.h

Go to the documentation of this file.
00001 
00011 #include "prerequisites.h"
00012 
00013 
00017 class RespirationBelt
00018 {
00019   public:
00023     RespirationBelt();
00024     ~RespirationBelt();
00025 
00029     double GetChestExtension();
00030     float GetBatteryLevel();
00031     void SetChestExtension(double extensionPercent);
00032     void SetBatteryLevel(float batteryPercent);
00033 
00037     bool Connect(long comPort, long carryingFrequency);
00038     bool Disconnect();
00039 
00043     void GoThread();
00044 
00048     void ParseData();
00049 
00050   private:
00051     IT_USBComPtr m_pIMonCom;
00052     double m_chestExtension;
00053     float m_batteryLevel;
00054     bool m_isConnected;
00055 
00059     boost::mutex mutexNewData;
00060     boost::thread* loopThread;    // Pointer to the update loop thread
00061     bool exitRequested;           // Boolean used to ask the loop thread to end
00062     bool comState;                // Boolean used to handle COM connection state
00063 };