GNU Radio C++ API Reference g90d26cb
The Free & Open Software Radio Ecosystem
 
Loading...
Searching...
No Matches
rfnoc_f15_display.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2015 Ettus Research
4 * Copyright 2020 Ettus Research, LLC. A National Instruments Brand
5 *
6 * SPDX-License-Identifier: GPL-3.0-or-later
7 */
8
9#ifndef INCLUDED_QTGUI_RFNOC_F15_DISPLAY_H
10#define INCLUDED_QTGUI_RFNOC_F15_DISPLAY_H
11
12#ifdef ENABLE_PYTHON
13#include <Python.h>
14#endif
15
16#include <gnuradio/block.h>
17#include <gnuradio/qtgui/api.h>
18#include <qapplication.h>
19#include <string>
20
21namespace gr {
22namespace qtgui {
23
24/*! FFT Histogram/Waterfall display widget for RFNoC fosphor display
25 *
26 * This block can consume one or two inputs, each vectors of unsigned 8-bit
27 * numbers. The vector length is \p fft_bins for both inputs.
28 *
29 * The histogram display is a 2D display widget which does not only plot the
30 * current (average) FFT, but also the max-hold values for the FFT, and a
31 * histogram of the FFT (also averaged over time). For every FFT bin, it plots
32 * a histogram of power level distributions.
33 *
34 * The first input contains the histogram data for the FFT histogram. It expects
35 * data in the following order:
36 * - \p pwr_bins vectors of length \p fft_bins containing the histogram data for
37 * each FFT bin.
38 * - One vector of length \p fft_bins containing the max values.
39 * - One vector of length \p fft_bins containing the average values. After this
40 * vector, we expect an end-of-frame tag. This means end-of-frame tags on this
41 * input should be repeating every \p pwr_bins + 2 vectors.
42 *
43 * Averaging over time must be done by the upstream blocks. This block only does
44 * the display, none of the calculations.
45 *
46 * The second input contains FFT data for a waterfall display. It is simply a
47 * concatenation of FFT magnitude vectors (8-bit integers).
48 *
49 * \ingroup qtgui_blk
50 */
52{
53public:
54 typedef std::shared_ptr<rfnoc_f15_display> sptr;
55
56 /*! Create an instance of an RFNoC fosphor display
57 *
58 * \param fft_bins Number of FFT bins. This is also the vector length of the
59 * inputs, and the x-axis dimension on both the histogram
60 * plot and the waterfall plot (if enabled).
61 * \param pwr_bins The number of power bins histograms per FFT bin. This is
62 * also the y-axis dimension of the histogram plot. This
63 * must match the input provided (see block description).
64 * \param wf_lines The depth of the waterfall plot history (or the y-axis
65 * dimension of waterfall plot).
66 * \param parent The QWidget parent, if any.
67 *
68 * \brief Return a shared_ptr to a new instance of ettus::rfnoc_f15_display
69 */
70 static sptr make(const int fft_bins = 256,
71 const int pwr_bins = 64,
72 const int wf_lines = 512,
73 QWidget* parent = nullptr);
74
75 /*** Block API ***********************************************************/
76 virtual void set_frequency_range(const double center_freq,
77 const double samp_rate) = 0;
78 virtual void set_waterfall(bool enabled) = 0;
79 virtual void set_grid(bool enabled) = 0;
80 virtual void set_palette(const std::string& name) = 0;
81 virtual void set_frame_rate(int fps) = 0;
82
83 /*** QT GUI Widget stuff *************************************************/
84 virtual void exec_() = 0;
85 virtual QWidget* qwidget() = 0;
86
87 QApplication* d_qApplication;
88};
89
90} // namespace qtgui
91} // namespace gr
92
93#endif /* INCLUDED_QTGUI_RFNOC_F15_DISPLAY_H */
The abstract base class for all 'terminal' processing blocks.
Definition gnuradio-runtime/include/gnuradio/block.h:65
Definition rfnoc_f15_display.h:52
virtual QWidget * qwidget()=0
QApplication * d_qApplication
Definition rfnoc_f15_display.h:87
virtual void set_frequency_range(const double center_freq, const double samp_rate)=0
static sptr make(const int fft_bins=256, const int pwr_bins=64, const int wf_lines=512, QWidget *parent=nullptr)
Return a shared_ptr to a new instance of ettus::rfnoc_f15_display.
virtual void set_frame_rate(int fps)=0
std::shared_ptr< rfnoc_f15_display > sptr
Definition rfnoc_f15_display.h:54
virtual void set_waterfall(bool enabled)=0
virtual void set_grid(bool enabled)=0
virtual void set_palette(const std::string &name)=0
#define QTGUI_API
Definition gr-qtgui/include/gnuradio/qtgui/api.h:18
GNU Radio logging wrapper.
Definition basic_block.h:29