|
TUsb Respiration Belt plugin 1.0
|
00001 00012 #include <windows.h> 00013 #include <stdio.h> 00014 #include <stdlib.h> 00015 #include <iostream> 00016 using namespace std; 00017 00018 00022 #import "../lib/TUSB_Controller.tlb" 00023 #include <comdef.h> 00024 using namespace TUSB_Controller; 00025 #define COM_PORT 3 00026 #define CARRYING_FREQ 23 00027 00028 00032 #include <boost/thread/thread.hpp> 00033 #include <boost/thread/mutex.hpp> 00034 #include <boost/bind.hpp> 00035 00036 00040 #include "../lib/LSerie.h" 00041 00042 00046 class BeltData 00047 { 00048 public: 00049 // Standard constructor 00050 BeltData() 00051 { 00052 } 00053 00054 // Constructor 00055 BeltData(std::list<float> data) 00056 { 00057 lData = data; 00058 } 00059 00060 // Standard destructor 00061 ~BeltData() 00062 { 00063 lData.clear(); 00064 } 00065 00066 // Get list of new data 00067 std::list<float> GetBeltData() 00068 { 00069 return lData; 00070 } 00071 00072 // Add data 00073 void AddData(float val) 00074 { 00075 lData.push_back(val); 00076 } 00077 00078 // Display data 00079 void DisplayData() 00080 { 00081 std::list<float>::iterator it; 00082 MMechostr(MSKDEBUG, "-----------------------------\n"); 00083 for (it = lData.begin(); it != lData.end(); it++) 00084 { 00085 MMechostr(MSKDEBUG, ">>> DATA [%f]\n", *it); 00086 } 00087 MMechostr(MSKDEBUG, "-----------------------------\n"); 00088 } 00089 00090 private: 00091 std::list<float> lData; 00092 };
1.7.3