GNU Radio 3.7.1 C++ API
|
00001 /* -*- c++ -*- */ 00002 /* 00003 * Copyright 2012 Free Software Foundation, Inc. 00004 * 00005 * This file is part of GNU Radio 00006 * 00007 * GNU Radio is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 3, or (at your option) 00010 * any later version. 00011 * 00012 * GNU Radio is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with GNU Radio; see the file COPYING. If not, write to 00019 * the Free Software Foundation, Inc., 51 Franklin Street, 00020 * Boston, MA 02110-1301, USA. 00021 */ 00022 00023 #ifndef WATERFALL_GLOBAL_DATA_HPP 00024 #define WATERFALL_GLOBAL_DATA_HPP 00025 00026 #include <qwt_raster_data.h> 00027 #include <inttypes.h> 00028 00029 #if QWT_VERSION >= 0x060000 00030 #include <qwt_point_3d.h> // doesn't seem necessary, but is... 00031 #include <qwt_compat.h> 00032 #endif 00033 00034 class WaterfallData: public QwtRasterData 00035 { 00036 public: 00037 WaterfallData(const double, const double, const uint64_t, const unsigned int); 00038 virtual ~WaterfallData(); 00039 00040 virtual void reset(); 00041 virtual void copy(const WaterfallData*); 00042 00043 virtual void resizeData(const double, const double, const uint64_t); 00044 00045 virtual QwtRasterData *copy() const; 00046 00047 #if QWT_VERSION < 0x060000 00048 virtual QwtDoubleInterval range() const; 00049 virtual void setRange(const QwtDoubleInterval&); 00050 #endif 00051 00052 virtual double value(double x, double y) const; 00053 00054 virtual uint64_t getNumFFTPoints()const; 00055 virtual void addFFTData(const double*, const uint64_t, const int); 00056 00057 virtual double* getSpectrumDataBuffer()const; 00058 virtual void setSpectrumDataBuffer(const double*); 00059 00060 virtual int getNumLinesToUpdate()const; 00061 virtual void setNumLinesToUpdate(const int); 00062 virtual void incrementNumLinesToUpdate(); 00063 00064 protected: 00065 00066 double* _spectrumData; 00067 uint64_t _fftPoints; 00068 uint64_t _historyLength; 00069 int _numLinesToUpdate; 00070 00071 #if QWT_VERSION < 0x060000 00072 QwtDoubleInterval _intensityRange; 00073 #else 00074 QwtInterval _intensityRange; 00075 #endif 00076 00077 private: 00078 00079 }; 00080 00081 #endif /* WATERFALL_GLOBAL_DATA_HPP */