GNU Radio Manual and C++ API Reference  3.8.1.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 
35 namespace gr {
36 namespace qtgui {
37 
38 class QTGUI_API ber_sink_b : virtual public block
39 {
40 public:
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(unsigned int which, const std::string& label) = 0;
65  virtual void set_line_color(unsigned int which, const std::string& color) = 0;
66  virtual void set_line_width(unsigned int which, int width) = 0;
67  virtual void set_line_style(unsigned int which, int style) = 0;
68  virtual void set_line_marker(unsigned int which, int marker) = 0;
69 
70  virtual void set_line_alpha(unsigned int which, double alpha) = 0;
71 
72  virtual std::string title() = 0;
73  virtual std::string line_label(unsigned int which) = 0;
74  virtual std::string line_color(unsigned int which) = 0;
75  virtual int line_width(unsigned int which) = 0;
76  virtual int line_style(unsigned int which) = 0;
77  virtual int line_marker(unsigned int which) = 0;
78  virtual double line_alpha(unsigned 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 */
float min(float a, float b)
#define QTGUI_API
Definition: gr-qtgui/include/gnuradio/qtgui/api.h:30
Definition: ber_sink_b.h:38
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:43
boost::shared_ptr< ber_sink_b > sptr
Definition: ber_sink_b.h:42
The abstract base class for all &#39;terminal&#39; processing blocks.A signal processing flow is constructed ...
Definition: block.h:71
QApplication * d_qApplication
Definition: ber_sink_b.h:86