GNU Radio 3.3.0 C++ API
waterfallGlobalData.h
Go to the documentation of this file.
00001 #ifndef WATERFALL_GLOBAL_DATA_HPP
00002 #define WATERFALL_GLOBAL_DATA_HPP
00003 
00004 #include <qwt_raster_data.h>
00005 #include <qwt3d_function.h>
00006 #include <inttypes.h>
00007 
00008 class Waterfall3DDisplayPlot;
00009 
00010 class WaterfallData: public QwtRasterData
00011 {
00012 public:
00013   WaterfallData(const double, const double, const uint64_t, const unsigned int);
00014   virtual ~WaterfallData();
00015   
00016   virtual void Reset();
00017   virtual void Copy(const WaterfallData*);
00018   
00019   virtual void ResizeData(const double, const double, const uint64_t);
00020   
00021   virtual QwtRasterData *copy() const;
00022   virtual QwtDoubleInterval range() const;
00023   virtual void setRange(const QwtDoubleInterval&);
00024 
00025   virtual double value(double x, double y) const;
00026   
00027   virtual uint64_t GetNumFFTPoints()const;
00028   virtual void addFFTData(const double*, const uint64_t, const int);
00029   
00030   virtual double* GetSpectrumDataBuffer()const;
00031   virtual void SetSpectrumDataBuffer(const double*);
00032   
00033   virtual int GetNumLinesToUpdate()const;
00034   virtual void SetNumLinesToUpdate(const int);
00035   virtual void IncrementNumLinesToUpdate();
00036 
00037 protected:
00038 
00039   double* _spectrumData;
00040   uint64_t _fftPoints;
00041   uint64_t _historyLength;
00042   int _numLinesToUpdate;
00043   QwtDoubleInterval _intensityRange;
00044 
00045 private:
00046 
00047 };
00048 
00049 class Waterfall3DData: public WaterfallData, public Qwt3D::Function
00050 {
00051 public:
00052   Waterfall3DData(const double, const double, const uint64_t, const unsigned int);
00053   virtual ~Waterfall3DData();
00054     
00055   virtual void ResizeData(const double, const double, const uint64_t);
00056 
00057   virtual bool create();
00058   virtual void setMesh(unsigned int columns, unsigned int rows); //!< Sets number of rows and columns. 
00059 
00060   virtual double operator()(double x, double y);
00061 
00062   virtual double GetFloorValue()const;
00063   virtual void SetFloorValue(const double);
00064 
00065   virtual double minZ()const;
00066   virtual double maxZ()const;
00067 
00068 protected:
00069   void _ResizeMesh();
00070 
00071   double** data;
00072   double _floorValue;
00073 
00074 private:
00075 
00076 };
00077 
00078 
00079 #endif /* WATERFALL_GLOBAL_DATA_HPP */