GNU Radio 3.7.1.1 C++ API
freq_sink_c.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 INCLUDED_QTGUI_FREQ_SINK_C_H
24
#define INCLUDED_QTGUI_FREQ_SINK_C_H
25
26
#include <Python.h>
27
#include <
gnuradio/qtgui/api.h
>
28
#include <
gnuradio/sync_block.h
>
29
#include <qapplication.h>
30
#include <
gnuradio/filter/firdes.h
>
31
32
namespace
gr {
33
namespace
qtgui {
34
35
/*!
36
* \brief A graphical sink to display multiple signals in frequency.
37
* \ingroup instrumentation_blk
38
* \ingroup qtgui_blk
39
*
40
* \details
41
* This is a QT-based graphical sink the takes set of a complex
42
* streams and plots the PSD. Each signal is plotted with a
43
* different color, and the \a set_title and \a set_color
44
* functions can be used to change the lable and color for a given
45
* input number.
46
*/
47
class
QTGUI_API
freq_sink_c
:
virtual
public
sync_block
48
{
49
public
:
50
// gr::qtgui::freq_sink_c::sptr
51
typedef
boost::shared_ptr<freq_sink_c>
sptr
;
52
53
/*!
54
* \brief Build a complex PSD sink.
55
*
56
* \param fftsize size of the FFT to compute and display
57
* \param wintype type of window to apply (see gnuradio/filter/firdes.h)
58
* \param fc center frequency of signal (use for x-axis labels)
59
* \param bw bandwidth of signal (used to set x-axis labels)
60
* \param name title for the plot
61
* \param nconnections number of signals connected to sink
62
* \param parent a QWidget parent object, if any
63
*/
64
static
sptr
make(
int
fftsize,
int
wintype,
65
double
fc,
double
bw,
66
const
std::string &name,
67
int
nconnections=1,
68
QWidget *parent=NULL);
69
70
virtual
void
exec_() = 0;
71
virtual
PyObject* pyqwidget() = 0;
72
73
virtual
void
set_fft_size(
const
int
fftsize) = 0;
74
virtual
int
fft_size()
const
= 0;
75
virtual
void
set_fft_average(
const
float
fftavg) = 0;
76
virtual
float
fft_average()
const
= 0;
77
virtual
void
set_fft_window(
const
gr::filter::firdes::win_type
win) = 0;
78
virtual
gr::filter::firdes::win_type
fft_window() = 0;
79
80
virtual
void
set_frequency_range(
const
double
centerfreq,
const
double
bandwidth) = 0;
81
virtual
void
set_y_axis(
double
min
,
double
max) = 0;
82
83
virtual
void
set_update_time(
double
t) = 0;
84
85
virtual
void
set_title(
const
std::string &title) = 0;
86
virtual
void
set_line_label(
int
which,
const
std::string &label) = 0;
87
virtual
void
set_line_color(
int
which,
const
std::string &color) = 0;
88
virtual
void
set_line_width(
int
which,
int
width) = 0;
89
virtual
void
set_line_style(
int
which,
int
style) = 0;
90
virtual
void
set_line_marker(
int
which,
int
marker) = 0;
91
virtual
void
set_line_alpha(
int
which,
double
alpha) = 0;
92
93
virtual
std::string title() = 0;
94
virtual
std::string line_label(
int
which) = 0;
95
virtual
std::string line_color(
int
which) = 0;
96
virtual
int
line_width(
int
which) = 0;
97
virtual
int
line_style(
int
which) = 0;
98
virtual
int
line_marker(
int
which) = 0;
99
virtual
double
line_alpha(
int
which) = 0;
100
101
virtual
void
set_size(
int
width,
int
height) = 0;
102
103
virtual
void
enable_menu(
bool
en=
true
) = 0;
104
virtual
void
enable_grid(
bool
en=
true
) = 0;
105
virtual
void
enable_autoscale(
bool
en=
true
) = 0;
106
virtual
void
reset() = 0;
107
108
QApplication *
d_qApplication
;
109
};
110
111
}
/* namespace qtgui */
112
}
/* namespace gr */
113
114
#endif
/* INCLUDED_QTGUI_FREQ_SINK_C_H */
gnuradio
gr-qtgui
include
gnuradio
qtgui
freq_sink_c.h
Generated by
1.8.1.1