GNU Radio 3.4.2 C++ API
|
00001 #ifndef WATERFALL_GLOBAL_DATA_HPP 00002 #define WATERFALL_GLOBAL_DATA_HPP 00003 00004 #include <qwt_raster_data.h> 00005 #include <inttypes.h> 00006 00007 #if QWT_VERSION >= 0x060000 00008 #include <qwt_point_3d.h> // doesn't seem necessary, but is... 00009 #include <qwt_compat.h> 00010 #endif 00011 00012 class WaterfallData: public QwtRasterData 00013 { 00014 public: 00015 WaterfallData(const double, const double, const uint64_t, const unsigned int); 00016 virtual ~WaterfallData(); 00017 00018 virtual void Reset(); 00019 virtual void Copy(const WaterfallData*); 00020 00021 virtual void ResizeData(const double, const double, const uint64_t); 00022 00023 virtual QwtRasterData *copy() const; 00024 00025 #if QWT_VERSION < 0x060000 00026 virtual QwtDoubleInterval range() const; 00027 virtual void setRange(const QwtDoubleInterval&); 00028 #endif 00029 00030 virtual double value(double x, double y) const; 00031 00032 virtual uint64_t GetNumFFTPoints()const; 00033 virtual void addFFTData(const double*, const uint64_t, const int); 00034 00035 virtual double* GetSpectrumDataBuffer()const; 00036 virtual void SetSpectrumDataBuffer(const double*); 00037 00038 virtual int GetNumLinesToUpdate()const; 00039 virtual void SetNumLinesToUpdate(const int); 00040 virtual void IncrementNumLinesToUpdate(); 00041 00042 protected: 00043 00044 double* _spectrumData; 00045 uint64_t _fftPoints; 00046 uint64_t _historyLength; 00047 int _numLinesToUpdate; 00048 00049 #if QWT_VERSION < 0x060000 00050 QwtDoubleInterval _intensityRange; 00051 #else 00052 QwtInterval _intensityRange; 00053 #endif 00054 00055 private: 00056 00057 }; 00058 00059 #endif /* WATERFALL_GLOBAL_DATA_HPP */