GNU Radio Manual and C++ API Reference 3.7.14.0
The Free & Open Software Radio Ecosystem
ber_sink_b.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2013-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_BER_SINK_B_H
24#define INCLUDED_QTGUI_BER_SINK_B_H
25
26#ifdef ENABLE_PYTHON
27#include <Python.h>
28#endif
29
30#include <gnuradio/block.h>
31#include <gnuradio/qtgui/api.h>
32#include <qapplication.h>
33
34
35namespace gr {
36namespace qtgui {
37
38class QTGUI_API ber_sink_b : virtual public block
39{
40public:
41 // gr::fec::ber_sink_b::sptr
42 typedef boost::shared_ptr<ber_sink_b> sptr;
43
44 static sptr make(std::vector<float> esnos,
45 int curves = 1,
46 int berminerrors = 100,
47 float berLimit = -7.0,
48 std::vector<std::string> curvenames = std::vector<std::string>(),
49 QWidget* parent = NULL);
50
51 virtual void exec_() = 0;
52
53#ifdef ENABLE_PYTHON
54 virtual PyObject* pyqwidget() = 0;
55#else
56 virtual void* pyqwidget() = 0;
57#endif
58
59 virtual void set_y_axis(double min, double max) = 0;
60 virtual void set_x_axis(double min, double max) = 0;
61
62 virtual void set_update_time(double t) = 0;
63 virtual void set_title(const std::string& title) = 0;
64 virtual void set_line_label(int which, const std::string& label) = 0;
65 virtual void set_line_color(int which, const std::string& color) = 0;
66 virtual void set_line_width(int which, int width) = 0;
67 virtual void set_line_style(int which, int style) = 0;
68 virtual void set_line_marker(int which, int marker) = 0;
69
70 virtual void set_line_alpha(int which, double alpha) = 0;
71
72 virtual std::string title() = 0;
73 virtual std::string line_label(int which) = 0;
74 virtual std::string line_color(int which) = 0;
75 virtual int line_width(int which) = 0;
76 virtual int line_style(int which) = 0;
77 virtual int line_marker(int which) = 0;
78 virtual double line_alpha(int which) = 0;
79
80 virtual void set_size(int width, int height) = 0;
81
82 virtual void enable_menu(bool en = true) = 0;
83 virtual void enable_autoscale(bool en) = 0;
84 virtual int nsamps() const = 0;
85
86 QApplication* d_qApplication;
87};
88
89} /* namespace qtgui */
90} /* namespace gr */
91
92#endif /* INCLUDED_QTGUI_BER_SINK_B_H */
The abstract base class for all 'terminal' processing blocks.
Definition: block.h:66
Definition: ber_sink_b.h:39
virtual std::string line_label(int which)=0
virtual std::string line_color(int which)=0
virtual void set_line_alpha(int which, double alpha)=0
virtual void set_y_axis(double min, double max)=0
virtual void set_line_label(int which, const std::string &label)=0
static sptr make(std::vector< float > esnos, int curves=1, int berminerrors=100, float berLimit=-7.0, std::vector< std::string > curvenames=std::vector< std::string >(), QWidget *parent=NULL)
QApplication * d_qApplication
Definition: ber_sink_b.h:86
virtual int line_marker(int which)=0
virtual void * pyqwidget()=0
virtual int line_style(int which)=0
virtual void exec_()=0
virtual int nsamps() const =0
virtual void set_line_color(int which, const std::string &color)=0
virtual void set_size(int width, int height)=0
virtual void set_line_width(int which, int width)=0
virtual void set_update_time(double t)=0
virtual std::string title()=0
virtual int line_width(int which)=0
boost::shared_ptr< ber_sink_b > sptr
Definition: ber_sink_b.h:42
virtual void set_line_style(int which, int style)=0
virtual void enable_autoscale(bool en)=0
virtual void enable_menu(bool en=true)=0
virtual double line_alpha(int which)=0
virtual void set_line_marker(int which, int marker)=0
virtual void set_title(const std::string &title)=0
virtual void set_x_axis(double min, double max)=0
#define QTGUI_API
Definition: gr-qtgui/include/gnuradio/qtgui/api.h:30
float min(float a, float b)
Include this header to use the message passing features.
Definition: basic_block.h:45