The Inspector (GNU Radio module gr-inspector)
qtgui_inspector_sink_vf.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 
24 #ifndef INCLUDED_INSPECTOR_QTGUI_INSPECTOR_SINK_VF_H
25 #define INCLUDED_INSPECTOR_QTGUI_INSPECTOR_SINK_VF_H
26 
27 #ifdef ENABLE_PYTHON
28  #include <Python.h>
29 #endif
30 
31 #include <inspector/api.h>
32 #include <gnuradio/sync_block.h>
33 #include <qapplication.h>
34 
35 namespace gr {
36  namespace inspector {
37 
38  /*!
39  * \brief GUI for the inspector toolkit
40  * \ingroup inspector
41  *
42  * \details
43  * This GUI uses QT and QWT to create a graphical interface to control the
44  * inspector and get feedback about the detected and analyzed signals.
45  *
46  * The PSD estimation of the Signal Detector block gets displayed here along
47  * with signal markers and informations. Manual signal selection can be done
48  * within the GUI created by this block.
49  *
50  * Analysis blocks can pass information to the GUI block by providing
51  * messages in the tuple format
52  *
53  * <code>((pmt::intern("signal"), pmt::from_uint64(signal_no)), (pmt::intern("description1"), pmt::from_float(value1)), ...)</code>
54  *
55  * Controls: Use CTRL+LeftMouse to zoom, RightMouse to zoom out.
56  * This prevents confusion when in manual selection mode, where the
57  * signals are selected with LeftMouse.
58  *
59  * Message ports:
60  * - map in: takes RF map from Signal Detector block and visualizes the included
61  * information in the plot
62  * - analysis_in: takes messages of analysis blocks and displays their content
63  * in the GUI plot.
64  * - map out: passes either the input message when manual selection is deactivated
65  * or passes RF map according to the user's manual settings.
66  */
67  class INSPECTOR_API qtgui_inspector_sink_vf : virtual public gr::sync_block
68  {
69  public:
70  typedef boost::shared_ptr<qtgui_inspector_sink_vf> sptr;
71 
72  /*!
73  * \brief Build a GUI sink instance.
74  *
75  * \param samp_rate Sample rate of the input signal.
76  * \param fft_len Vector input size and number of PSD sample points
77  * \param cfreq Center frequency of source. Set to 0 if only relative frequencies are desired downstream.
78  * \param rf_unit Determine which unit the GUI uses to display frequencies
79  * \param msgports Number of message ports for analysis feedback
80  * \param manual Enable manual signal selection
81  * \param parent QWidget parent
82  */
83  static sptr make(double samp_rate, int fft_len, float cfreq = 0,
84  int rf_unit = 1000000, int msgports = 1,
85  bool manual = false, QWidget *parent = NULL);
86 
87  virtual void set_rf_unit(int unit) = 0;
88  virtual void set_samp_rate(double d_samp_rate) = 0;
89  virtual void set_cfreq(float cfreq) = 0;
90 #ifdef ENABLE_PYTHON
91  virtual PyObject* pyqwidget() = 0;
92 #else
93  virtual void* pyqwidget() = 0;
94 #endif
95  };
96 
97  } // namespace inspector
98 } // namespace gr
99 
100 #endif /* INCLUDED_INSPECTOR_QTGUI_INSPECTOR_SINK_VF_H */
boost::shared_ptr< qtgui_inspector_sink_vf > sptr
Definition: qtgui_inspector_sink_vf.h:70
#define INSPECTOR_API
Definition: api.h:30
GUI for the inspector toolkit.
Definition: qtgui_inspector_sink_vf.h:67
Definition: ofdm_bouzegzi_c.h:30