GNU Radio Manual and C++ API Reference  v3.9.2.0-89-gb7c7001e
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  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef INCLUDED_QTGUI_BER_SINK_B_H
12 #define INCLUDED_QTGUI_BER_SINK_B_H
13 
14 #ifdef ENABLE_PYTHON
15 #include <Python.h>
16 #endif
17 
18 #include <gnuradio/block.h>
19 #include <gnuradio/qtgui/api.h>
20 #include <qapplication.h>
21 
22 
23 namespace gr {
24 namespace qtgui {
25 
26 class QTGUI_API ber_sink_b : virtual public block
27 {
28 public:
29  // gr::fec::ber_sink_b::sptr
30  typedef std::shared_ptr<ber_sink_b> sptr;
31 
32  static sptr make(std::vector<float> esnos,
33  int curves = 1,
34  int berminerrors = 100,
35  float berLimit = -7.0,
36  std::vector<std::string> curvenames = std::vector<std::string>(),
37  QWidget* parent = NULL);
38 
39  virtual void exec_() = 0;
40 
41 #ifdef ENABLE_PYTHON
42  virtual PyObject* pyqwidget() = 0;
43 #else
44  virtual void* pyqwidget() = 0;
45 #endif
46 
47  virtual void set_y_axis(double min, double max) = 0;
48  virtual void set_x_axis(double min, double max) = 0;
49 
50  virtual void set_update_time(double t) = 0;
51  virtual void set_title(const std::string& title) = 0;
52  virtual void set_line_label(unsigned int which, const std::string& label) = 0;
53  virtual void set_line_color(unsigned int which, const std::string& color) = 0;
54  virtual void set_line_width(unsigned int which, int width) = 0;
55  virtual void set_line_style(unsigned int which, int style) = 0;
56  virtual void set_line_marker(unsigned int which, int marker) = 0;
57 
58  virtual void set_line_alpha(unsigned int which, double alpha) = 0;
59 
60  virtual std::string title() = 0;
61  virtual std::string line_label(unsigned int which) = 0;
62  virtual std::string line_color(unsigned int which) = 0;
63  virtual int line_width(unsigned int which) = 0;
64  virtual int line_style(unsigned int which) = 0;
65  virtual int line_marker(unsigned int which) = 0;
66  virtual double line_alpha(unsigned int which) = 0;
67 
68  virtual void set_size(int width, int height) = 0;
69 
70  virtual void enable_menu(bool en = true) = 0;
71  virtual void enable_autoscale(bool en) = 0;
72  virtual int nsamps() const = 0;
73 
74  QApplication* d_qApplication;
75 };
76 
77 } /* namespace qtgui */
78 } /* namespace gr */
79 
80 #endif /* INCLUDED_QTGUI_BER_SINK_B_H */
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:60
Definition: ber_sink_b.h:27
virtual std::string line_label(unsigned int which)=0
virtual void set_y_axis(double min, double max)=0
virtual std::string line_color(unsigned int which)=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:74
virtual void set_line_style(unsigned int which, int style)=0
virtual void set_line_alpha(unsigned int which, double alpha)=0
virtual int line_width(unsigned int which)=0
virtual int line_style(unsigned int which)=0
virtual void exec_()=0
virtual int nsamps() const =0
std::shared_ptr< ber_sink_b > sptr
Definition: ber_sink_b.h:30
virtual void set_line_label(unsigned int which, const std::string &label)=0
virtual void set_size(int width, int height)=0
virtual void set_line_marker(unsigned int which, int marker)=0
virtual int line_marker(unsigned int which)=0
virtual void set_update_time(double t)=0
virtual void set_line_color(unsigned int which, const std::string &color)=0
virtual std::string title()=0
virtual double line_alpha(unsigned int which)=0
virtual void set_line_width(unsigned int which, int width)=0
virtual void enable_autoscale(bool en)=0
virtual void enable_menu(bool en=true)=0
virtual void set_title(const std::string &title)=0
virtual void set_x_axis(double min, double max)=0
virtual void * pyqwidget()=0
#define QTGUI_API
Definition: gr-qtgui/include/gnuradio/qtgui/api.h:18
float min(float a, float b)
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:29