GNU Radio Manual and C++ API Reference
3.7.5
The Free & Open Software Radio Ecosystem
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
number_sink.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2014 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_NUMBER_SINK_H
24
#define INCLUDED_QTGUI_NUMBER_SINK_H
25
26
#ifdef ENABLE_PYTHON
27
#include <Python.h>
28
#endif
29
30
#include <
gnuradio/qtgui/api.h
>
31
#include <
gnuradio/qtgui/trigger_mode.h
>
32
#include <
gnuradio/qtgui/qtgui_types.h
>
33
#include <
gnuradio/sync_block.h
>
34
#include <qapplication.h>
35
36
namespace
gr {
37
namespace
qtgui {
38
39
/*!
40
* \brief A graphical sink to display numerical values of input streams.
41
* \ingroup instrumentation_blk
42
* \ingroup qtgui_blk
43
*
44
* \details
45
* Number sink
46
*/
47
class
QTGUI_API
number_sink
:
virtual
public
sync_block
48
{
49
public
:
50
51
// gr::qtgui::number_sink::sptr
52
typedef
boost::shared_ptr<number_sink>
sptr
;
53
54
/*!
55
* \brief Build a number sink
56
*
57
* \param itemsize Size of input item stream
58
* \param average Averaging coefficient (0 - 1)
59
* \param graph_type Type of graph to use (number_sink::graph_t)
60
* \param nconnections number of signals connected to sink
61
* \param parent a QWidget parent object, if any
62
*/
63
static
sptr
make(
size_t
itemsize
,
64
float
average=0,
65
graph_t
graph_type=
NUM_GRAPH_HORIZ
,
66
int
nconnections=1,
67
QWidget *parent=NULL);
68
69
virtual
void
exec_() = 0;
70
virtual
QWidget* qwidget() = 0;
71
72
#ifdef ENABLE_PYTHON
73
virtual
PyObject* pyqwidget() = 0;
74
#else
75
virtual
void
* pyqwidget() = 0;
76
#endif
77
78
virtual
void
set_update_time(
double
t) = 0;
79
virtual
void
set_average(
const
float
avg) = 0;
80
virtual
void
set_graph_type(
const
graph_t
type) = 0;
81
virtual
void
set_color(
int
which,
82
const
std::string &
min
,
83
const
std::string &max) = 0;
84
virtual
void
set_color(
int
which,
int
min
,
int
max) = 0;
85
virtual
void
set_label(
int
which,
const
std::string &label) = 0;
86
virtual
void
set_min(
int
which,
float
min
) = 0;
87
virtual
void
set_max(
int
which,
float
max) = 0;
88
virtual
void
set_title(
const
std::string &title) = 0;
89
virtual
void
set_unit(
int
which,
const
std::string &unit) = 0;
90
virtual
void
set_factor(
int
which,
float
factor) = 0;
91
92
virtual
float
average()
const
= 0;
93
virtual
graph_t
graph_type()
const
= 0;
94
virtual
std::string color_min(
int
which)
const
= 0;
95
virtual
std::string color_max(
int
which)
const
= 0;
96
virtual
std::string label(
int
which)
const
= 0;
97
virtual
float
min
(
int
which)
const
= 0;
98
virtual
float
max(
int
which)
const
= 0;
99
virtual
std::string title()
const
= 0;
100
virtual
std::string unit(
int
which)
const
= 0;
101
virtual
float
factor(
int
which)
const
= 0;
102
103
virtual
void
enable_menu(
bool
en=
true
) = 0;
104
virtual
void
enable_autoscale(
bool
en=
true
) = 0;
105
106
virtual
void
reset() = 0;
107
108
QApplication *
d_qApplication
;
109
};
110
111
}
/* namespace qtgui */
112
}
/* namespace gr */
113
114
#endif
/* INCLUDED_QTGUI_NUMBER_SINK_H */
gr-qtgui
include
gnuradio
qtgui
number_sink.h
Generated on Fri Oct 3 2014 00:33:51 for GNU Radio Manual and C++ API Reference by
1.8.1.2