00001 // Copyright (c) James Percent and Unlock contributors. 00002 // All rights reserved. 00003 // Redistribution and use in source and binary forms, with or without modification, 00004 // are permitted provided that the following conditions are met: 00005 // 00006 // 1. Redistributions of source code must retain the above copyright notice, 00007 // this list of conditions and the following disclaimer. 00008 // 00009 // 2. Redistributions in binary form must reproduce the above copyright 00010 // notice, this list of conditions and the following disclaimer in the 00011 // documentation and/or other materials provided with the distribution. 00012 // 00013 // 3. Neither the name of Unlock nor the names of its contributors may be used 00014 // to endorse or promote products derived from this software without 00015 // specific prior written permission. 00016 00017 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 00018 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00019 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00020 // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 00021 // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00022 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00023 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 00024 // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00025 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00026 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00027 00028 #ifndef ISIGNAL_HPP 00029 #define ISIGNAL_HPP 00030 00031 #include <stdint.h> 00032 #include <cstddef> 00033 00034 #include "Portability.hpp" 00035 00036 class DllExport ISignal 00037 { 00038 public: 00039 virtual ~ISignal() {} 00040 virtual bool open(uint8_t* mac)=0; 00041 virtual bool init(size_t channels)=0; 00042 virtual size_t channels()=0; 00043 virtual bool start()=0; 00044 virtual size_t acquire()=0; 00045 virtual void getdata(uint32_t* buffer, size_t samples)=0; 00046 virtual uint64_t timestamp()=0; 00047 virtual bool stop()=0; 00048 virtual bool close()=0; 00049 }; 00050 00051 #endif