GNU Radio 3.4.0 C++ API
|
00001 #ifndef SPECTRUM_UPDATE_EVENTS_H 00002 #define SPECTRUM_UPDATE_EVENTS_H 00003 00004 #include <stdint.h> 00005 #include <QEvent> 00006 #include <QString> 00007 #include <complex> 00008 #include <vector> 00009 #include <gruel/high_res_timer.h> 00010 00011 class SpectrumUpdateEvent:public QEvent{ 00012 00013 public: 00014 SpectrumUpdateEvent(const std::complex<float>* fftPoints, 00015 const uint64_t numFFTDataPoints, 00016 const double* realTimeDomainPoints, 00017 const double* imagTimeDomainPoints, 00018 const uint64_t numTimeDomainDataPoints, 00019 const gruel::high_res_timer_type dataTimestamp, 00020 const bool repeatDataFlag, 00021 const bool lastOfMultipleUpdateFlag, 00022 const gruel::high_res_timer_type generatedTimestamp, 00023 const int droppedFFTFrames); 00024 00025 ~SpectrumUpdateEvent(); 00026 00027 const std::complex<float>* getFFTPoints() const; 00028 const double* getRealTimeDomainPoints() const; 00029 const double* getImagTimeDomainPoints() const; 00030 uint64_t getNumFFTDataPoints() const; 00031 uint64_t getNumTimeDomainDataPoints() const; 00032 gruel::high_res_timer_type getDataTimestamp() const; 00033 bool getRepeatDataFlag() const; 00034 bool getLastOfMultipleUpdateFlag() const; 00035 gruel::high_res_timer_type getEventGeneratedTimestamp() const; 00036 int getDroppedFFTFrames() const; 00037 00038 protected: 00039 00040 private: 00041 std::complex<float>* _fftPoints; 00042 double* _realDataTimeDomainPoints; 00043 double* _imagDataTimeDomainPoints; 00044 uint64_t _numFFTDataPoints; 00045 uint64_t _numTimeDomainDataPoints; 00046 gruel::high_res_timer_type _dataTimestamp; 00047 bool _repeatDataFlag; 00048 bool _lastOfMultipleUpdateFlag; 00049 gruel::high_res_timer_type _eventGeneratedTimestamp; 00050 int _droppedFFTFrames; 00051 }; 00052 00053 class SpectrumWindowCaptionEvent:public QEvent{ 00054 public: 00055 SpectrumWindowCaptionEvent(const QString&); 00056 ~SpectrumWindowCaptionEvent(); 00057 QString getLabel(); 00058 00059 protected: 00060 00061 private: 00062 QString _labelString; 00063 }; 00064 00065 class SpectrumWindowResetEvent:public QEvent{ 00066 public: 00067 SpectrumWindowResetEvent(); 00068 ~SpectrumWindowResetEvent(); 00069 00070 protected: 00071 00072 private: 00073 00074 }; 00075 00076 class SpectrumFrequencyRangeEvent:public QEvent{ 00077 public: 00078 SpectrumFrequencyRangeEvent(const double, const double, const double); 00079 ~SpectrumFrequencyRangeEvent(); 00080 double GetCenterFrequency()const; 00081 double GetStartFrequency()const; 00082 double GetStopFrequency()const; 00083 00084 protected: 00085 00086 private: 00087 double _centerFrequency; 00088 double _startFrequency; 00089 double _stopFrequency; 00090 }; 00091 00092 00093 class TimeUpdateEvent: public QEvent 00094 { 00095 public: 00096 TimeUpdateEvent(const std::vector<double*> timeDomainPoints, 00097 const uint64_t numTimeDomainDataPoints); 00098 00099 ~TimeUpdateEvent(); 00100 00101 int which() const; 00102 const std::vector<double*> getTimeDomainPoints() const; 00103 uint64_t getNumTimeDomainDataPoints() const; 00104 timespec getDataTimestamp() const; 00105 bool getRepeatDataFlag() const; 00106 00107 protected: 00108 00109 private: 00110 size_t _nplots; 00111 std::vector<double*> _dataTimeDomainPoints; 00112 uint64_t _numTimeDomainDataPoints; 00113 }; 00114 00115 00116 #endif /* SPECTRUM_UPDATE_EVENTS_H */