GNU Radio Manual and C++ API Reference  3.8.4.0
The Free & Open Software Radio Ecosystem
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 <inttypes.h>
27 #include <qwt_raster_data.h>
28 
29 #if QWT_VERSION >= 0x060200
30 #include "qwt_interval.h"
31 
32 typedef QwtInterval QwtDoubleInterval;
33 #elif QWT_VERSION >= 0x060000
34 #include <qwt_compat.h>
35 #include <qwt_point_3d.h> // doesn't seem necessary, but is...
36 #endif
37 
38 class WaterfallData : public QwtRasterData
39 {
40 public:
41  WaterfallData(const double, const double, const uint64_t, const unsigned int);
42  virtual ~WaterfallData();
43 
44  virtual void reset();
45  virtual void copy(const WaterfallData*);
46 
47  virtual void
48  resizeData(const double, const double, const uint64_t, const int history = 0);
49 
50  virtual QwtRasterData* copy() const;
51 
52 #if QWT_VERSION < 0x060000
53  virtual QwtDoubleInterval range() const;
54  virtual void setRange(const QwtDoubleInterval&);
55 #endif
56 
57  virtual double value(double x, double y) const;
58 
59  virtual uint64_t getNumFFTPoints() const;
60  virtual void addFFTData(const double*, const uint64_t, const int);
61 
62  virtual double* getSpectrumDataBuffer() const;
63  virtual void setSpectrumDataBuffer(const double*);
64 
65  virtual int getNumLinesToUpdate() const;
66  virtual void setNumLinesToUpdate(const int);
67  virtual void incrementNumLinesToUpdate();
68 
69 #if QWT_VERSION >= 0x060200
70  virtual QwtInterval interval(Qt::Axis) const;
71  void setInterval(Qt::Axis, const QwtInterval&);
72 #endif
73 
74 protected:
75  double* _spectrumData;
76  uint64_t _fftPoints;
77  uint64_t _historyLength;
79 
80 #if QWT_VERSION < 0x060000
81  QwtDoubleInterval _intensityRange;
82 #else
83  QwtInterval _intensityRange;
84 #endif
85 
86 #if QWT_VERSION >= 0x060200
87  QwtInterval d_intervals[3];
88 #endif
89 
90 private:
91 };
92 
93 #endif /* WATERFALL_GLOBAL_DATA_HPP */
virtual void setRange(const QwtDoubleInterval &)
Definition: waterfallGlobalData.h:38
virtual void addFFTData(const double *, const uint64_t, const int)
virtual double * getSpectrumDataBuffer() const
virtual void resizeData(const double, const double, const uint64_t, const int history=0)
virtual QwtDoubleInterval range() const
QwtDoubleInterval _intensityRange
Definition: waterfallGlobalData.h:81
virtual uint64_t getNumFFTPoints() const
virtual QwtRasterData * copy() const
int _numLinesToUpdate
Definition: waterfallGlobalData.h:78
virtual void incrementNumLinesToUpdate()
double * _spectrumData
Definition: waterfallGlobalData.h:75
uint64_t _historyLength
Definition: waterfallGlobalData.h:77
virtual double value(double x, double y) const
virtual void setNumLinesToUpdate(const int)
virtual int getNumLinesToUpdate() const
virtual ~WaterfallData()
virtual void setSpectrumDataBuffer(const double *)
WaterfallData(const double, const double, const uint64_t, const unsigned int)
uint64_t _fftPoints
Definition: waterfallGlobalData.h:76
virtual void reset()