The Inspector (GNU Radio module gr-inspector)
qtgui_inspector_sink_vf_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2016 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * This 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  * This software 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 this software; 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 INCLUDED_INSPECTOR_QTGUI_INSPECTOR_SINK_VF_IMPL_H
24 #define INCLUDED_INSPECTOR_QTGUI_INSPECTOR_SINK_VF_IMPL_H
25 
27 #include "inspector_form.h"
28 
29 namespace gr {
30  namespace inspector {
31 
33  {
34  private:
35  int d_argc, d_rf_unit, d_fft_len;
36  bool d_manual, d_auto_sent;
37  float d_cfreq;
38  double d_samp_rate;
39  char *d_argv;
40  QWidget *d_parent;
41  pmt::pmt_t d_tmp_msg;
42  inspector_form *d_main_gui;
43  QApplication *d_qApplication;
44  std::vector<double> d_buffer;
45  std::vector<std::vector<float> > d_rf_map;
46  gr::msg_queue* d_msg_queue;
47 
48  public:
49  qtgui_inspector_sink_vf_impl(double samp_rate, int fft_len,
50  float cfreq, int rf_unit,
51  int msgports, bool manual,
52  QWidget *parent);
54 
55 #ifdef ENABLE_PYTHON
56  PyObject* pyqwidget();
57 #else
58  void* pyqwidget();
59 #endif
60 
61 
62  void handle_msg(pmt::pmt_t msg);
63  void handle_analysis(pmt::pmt_t msg);
64  void unpack_message(pmt::pmt_t msg);
65  void send_manual_message(float center, float bw);
66  void set_rf_unit(int unit);
67  void set_samp_rate(double d_samp_rate);
68 
69  void initialize();
70 
71  // Where all the action really happens
72  int work(int noutput_items,
73  gr_vector_const_void_star &input_items,
74  gr_vector_void_star &output_items);
75 
76 
77  void set_cfreq(float cfreq) {
78  d_cfreq = cfreq;
79  d_main_gui->set_cfreq(cfreq);
80  d_main_gui->set_axis_x(-d_samp_rate/2, d_samp_rate/2-1);
81  }
82 
83  };
84 
85  } // namespace inspector
86 } // namespace gr
87 
88 #endif /* INCLUDED_INSPECTOR_QTGUI_INSPECTOR_SINK_VF_IMPL_H */
void set_cfreq(float cfreq)
Definition: qtgui_inspector_sink_vf_impl.h:77
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Definition: inspector_form.h:77
void send_manual_message(float center, float bw)
GUI for the inspector toolkit.
Definition: qtgui_inspector_sink_vf.h:67
void set_axis_x(float start, float stop)
Definition: qtgui_inspector_sink_vf_impl.h:32
Definition: ofdm_bouzegzi_c.h:30
qtgui_inspector_sink_vf_impl(double samp_rate, int fft_len, float cfreq, int rf_unit, int msgports, bool manual, QWidget *parent)