|
TOBI Interface A
0.1
|
00001 /* 00002 This file is part of the TOBI Interface A (TiA) library. 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 Lesser General Public License Usage 00014 Alternatively, this file may be used under the terms of the GNU Lesser 00015 General Public License version 3.0 as published by the Free Software 00016 Foundation and appearing in the file lgpl.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/lgpl.html. 00020 00021 In case of GNU Lesser General Public License Usage ,the TiA library 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 Lesser General Public License 00028 along with the TiA library. If not, see <http://www.gnu.org/licenses/>. 00029 00030 Copyright 2010 Graz University of Technology 00031 Contact: TiA@tobi-project.org 00032 */ 00033 00046 #ifndef RAWMEM_H 00047 #define RAWMEM_H 00048 00049 // STL 00050 00051 #include <vector> 00052 00053 // Boost 00054 #include <boost/cstdint.hpp> 00055 #include <boost/date_time/posix_time/posix_time.hpp> 00056 00057 // Local 00058 #include "tia/defines.h" 00059 00060 namespace tia 00061 { 00062 //----------------------------------------------------------------------------- 00063 00073 class RawMem 00074 { 00075 00076 public: 00088 RawMem(boost::uint32_t flags, 00089 boost::uint64_t sample_nr, 00090 boost::uint64_t packet_nr, \ 00091 boost::posix_time::ptime timestamp, \ 00092 std::vector<boost::uint16_t>& nr_values, std::vector<boost::uint16_t>& nr_blocks, 00093 std::vector<double>& data); 00094 00100 virtual ~RawMem() { free(mem_); } 00101 00106 boost::uint32_t size() { return(size_); } 00112 void* getMemPtr() { return(mem_); } 00113 00114 00115 private: 00116 void* mem_; 00117 boost::uint32_t size_; 00118 }; 00119 00120 } // Namespace tobiss 00121 00122 //----------------------------------------------------------------------------- 00123 00124 #endif // RAWMEM_H