TOBI SignalServer
0.1
|
00001 /* 00002 This file is part of the TOBI SignalServer. 00003 00004 Commercial Usage 00005 Licensees holding valid Graz University of Technology Commercial 00006 licenses may use this file in accordance with the Graz University 00007 of Technology Commercial License Agreement provided with the 00008 Software or, alternatively, in accordance with the terms contained in 00009 a written agreement between you and Graz University of Technology. 00010 00011 -------------------------------------------------- 00012 00013 GNU General Public License Usage 00014 Alternatively, this file may be used under the terms of the GNU 00015 General Public License version 3.0 as published by the Free Software 00016 Foundation and appearing in the file gpl.txt included in the 00017 packaging of this file. Please review the following information to 00018 ensure the GNU General Public License version 3.0 requirements will be 00019 met: http://www.gnu.org/copyleft/gpl.html. 00020 00021 In case of GNU General Public License Usage ,the TOBI SignalServer 00022 is distributed in the hope that it will be useful, 00023 but WITHOUT ANY WARRANTY; without even the implied warranty of 00024 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00025 GNU General Public License for more details. 00026 00027 You should have received a copy of the GNU General Public License 00028 along with the TOBI SignalServer. If not, see <http://www.gnu.org/licenses/>. 00029 00030 Copyright 2010 Graz University of Technology 00031 Contact: SignalServer@tobi-project.org 00032 */ 00033 00041 #ifndef DATAFILEHANDLER_H 00042 #define DATAFILEHANDLER_H 00043 00044 #include <vector> 00045 #include <map> 00046 00047 //#include <boost/asio.hpp> 00048 //#include <boost/thread/condition.hpp> // for mutex and cond. variables 00049 //#include <boost/thread/shared_mutex.hpp> 00050 //#include <boost/date_time/posix_time/posix_time.hpp> 00051 //#include <boost/cstdint.hpp> 00052 00053 00054 #include "tia/defines.h" 00055 #include "tia/data_packet.h" 00056 00057 #include "filereading/file_reader.h" 00058 #include "filereading/file_reader_factory.h" 00059 00060 namespace tobiss 00061 { 00062 //----------------------------------------------------------------------------- 00069 class DataFileHandler 00070 { 00071 public: 00075 //DataFileHandler(boost::asio::io_service& io, std::map<std::string, std::string> config); 00076 00080 virtual ~DataFileHandler() { } 00081 00082 00083 DataPacket getDataPacket(); 00084 00088 void run(); 00089 00093 void stop(); 00094 00095 void readSamples(); 00096 00097 //----------------------------------------------- 00098 private: 00099 00100 00101 00102 //----------------------------------------------- 00103 00104 private: 00105 00106 //boost::asio::io_service& io_service_; 00107 std::map<std::string, std::string> config_; 00108 00109 //FileReader* current_reader_; 00110 00111 //FileReaderFactory reader_factory_; 00112 00113 00114 00115 //boost::asio::deadline_timer* t_; ///< timer object for accurate timing 00116 //double step_; ///< needed for sine generation 00117 //double cycle_dur_; ///< needed for sine generation 00118 //boost::posix_time::microseconds td_; ///< time period for the timer 00119 00120 //boost::mutex sync_mut_; ///< mutex neede for synchronisation 00121 //boost::condition_variable_any cond_; ///< condition variable to wake up getSyncData() 00122 00123 }; 00124 00125 } // Namespace tobiss 00126 00127 #endif // DATAFILEHANDLER_H 00128 00129 //-----------------------------------------------------------------------------