GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
waterfallGlobalData.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef WATERFALL_GLOBAL_DATA_HPP
24 #define WATERFALL_GLOBAL_DATA_HPP
25 
26 #include <qwt_raster_data.h>
27 #include <inttypes.h>
28 
29 #if QWT_VERSION >= 0x060000
30 #include <qwt_point_3d.h> // doesn't seem necessary, but is...
31 #include <qwt_compat.h>
32 #endif
33 
34 class WaterfallData: public QwtRasterData
35 {
36 public:
37  WaterfallData(const double, const double, const uint64_t, const unsigned int);
38  virtual ~WaterfallData();
39 
40  virtual void reset();
41  virtual void copy(const WaterfallData*);
42 
43  virtual void resizeData(const double, const double,
44  const uint64_t, const int history=0);
45 
46  virtual QwtRasterData *copy() const;
47 
48 #if QWT_VERSION < 0x060000
49  virtual QwtDoubleInterval range() const;
50  virtual void setRange(const QwtDoubleInterval&);
51 #endif
52 
53  virtual double value(double x, double y) const;
54 
55  virtual uint64_t getNumFFTPoints()const;
56  virtual void addFFTData(const double*, const uint64_t, const int);
57 
58  virtual double* getSpectrumDataBuffer()const;
59  virtual void setSpectrumDataBuffer(const double*);
60 
61  virtual int getNumLinesToUpdate()const;
62  virtual void setNumLinesToUpdate(const int);
63  virtual void incrementNumLinesToUpdate();
64 
65 protected:
66 
67  double* _spectrumData;
68  uint64_t _fftPoints;
69  uint64_t _historyLength;
71 
72 #if QWT_VERSION < 0x060000
73  QwtDoubleInterval _intensityRange;
74 #else
75  QwtInterval _intensityRange;
76 #endif
77 
78 private:
79 
80 };
81 
82 #endif /* WATERFALL_GLOBAL_DATA_HPP */
virtual double value(double x, double y) const
virtual void setRange(const QwtDoubleInterval &)
virtual int getNumLinesToUpdate() const
Definition: waterfallGlobalData.h:34
virtual void addFFTData(const double *, const uint64_t, const int)
virtual void resizeData(const double, const double, const uint64_t, const int history=0)
QwtDoubleInterval _intensityRange
Definition: waterfallGlobalData.h:73
virtual QwtDoubleInterval range() const
int _numLinesToUpdate
Definition: waterfallGlobalData.h:70
virtual void incrementNumLinesToUpdate()
double * _spectrumData
Definition: waterfallGlobalData.h:67
uint64_t _historyLength
Definition: waterfallGlobalData.h:69
virtual void setNumLinesToUpdate(const int)
virtual QwtRasterData * copy() const
virtual uint64_t getNumFFTPoints() const
virtual ~WaterfallData()
virtual void setSpectrumDataBuffer(const double *)
virtual double * getSpectrumDataBuffer() const
WaterfallData(const double, const double, const uint64_t, const unsigned int)
uint64_t _fftPoints
Definition: waterfallGlobalData.h:68
virtual void reset()