GNU Radio's FOSPHOR Package

base_sink_c.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2013-2014 Sylvain Munaut <tnt@246tNt.com>
4 *
5 * This is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3, or (at your option)
8 * any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; see the file COPYING. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street,
18 * Boston, MA 02110-1301, USA.
19 */
20
21
22#ifndef INCLUDED_GR_FOSPHOR_BASE_SINK_C_H
23#define INCLUDED_GR_FOSPHOR_BASE_SINK_C_H
24
25#include <gnuradio/fosphor/api.h>
26
27#include <gnuradio/sync_block.h>
28#include <gnuradio/fft/window.h>
29
30 namespace gr {
31 namespace fosphor {
32
33 /*!
34 * \brief Base fosphor sink API interface
35 * \ingroup fosphor
36 */
37 class GR_FOSPHOR_API base_sink_c : public gr::sync_block
38 {
39 protected:
40 base_sink_c(const char *name = NULL);
41
42 public:
43
44 enum ui_action_t {
45 DB_PER_DIV_UP,
46 DB_PER_DIV_DOWN,
47 REF_UP,
48 REF_DOWN,
49 ZOOM_TOGGLE,
50 ZOOM_WIDTH_UP,
51 ZOOM_WIDTH_DOWN,
52 ZOOM_CENTER_UP,
53 ZOOM_CENTER_DOWN,
54 RATIO_UP,
55 RATIO_DOWN,
56 FREEZE_TOGGLE,
57 };
58
59 virtual void execute_ui_action(enum ui_action_t action) = 0;
60
61 virtual void set_frequency_range(const double center,
62 const double span) = 0;
63 virtual void set_frequency_center(const double center) = 0;
64 virtual void set_frequency_span(const double span) = 0;
65
66 virtual void set_fft_window(const gr::fft::window::win_type win) = 0;
67 };
68
69 } // namespace fosphor
70} // namespace gr
71
72#endif /* INCLUDED_GR_FOSPHOR_BASE_SINK_C_H */
73
api.h
GR_FOSPHOR_API
#define GR_FOSPHOR_API
Definition: api.h:30
gr::fosphor::base_sink_c
Base fosphor sink API interface.
Definition: base_sink_c.h:38
gr::fosphor::base_sink_c::ui_action_t
ui_action_t
Definition: base_sink_c.h:44
gr::fosphor::base_sink_c::REF_UP
@ REF_UP
Definition: base_sink_c.h:47
gr::fosphor::base_sink_c::ZOOM_CENTER_UP
@ ZOOM_CENTER_UP
Definition: base_sink_c.h:52
gr::fosphor::base_sink_c::DB_PER_DIV_UP
@ DB_PER_DIV_UP
Definition: base_sink_c.h:45
gr::fosphor::base_sink_c::DB_PER_DIV_DOWN
@ DB_PER_DIV_DOWN
Definition: base_sink_c.h:46
gr::fosphor::base_sink_c::ZOOM_TOGGLE
@ ZOOM_TOGGLE
Definition: base_sink_c.h:49
gr::fosphor::base_sink_c::FREEZE_TOGGLE
@ FREEZE_TOGGLE
Definition: base_sink_c.h:56
gr::fosphor::base_sink_c::ZOOM_WIDTH_DOWN
@ ZOOM_WIDTH_DOWN
Definition: base_sink_c.h:51
gr::fosphor::base_sink_c::REF_DOWN
@ REF_DOWN
Definition: base_sink_c.h:48
gr::fosphor::base_sink_c::RATIO_DOWN
@ RATIO_DOWN
Definition: base_sink_c.h:55
gr::fosphor::base_sink_c::ZOOM_CENTER_DOWN
@ ZOOM_CENTER_DOWN
Definition: base_sink_c.h:53
gr::fosphor::base_sink_c::RATIO_UP
@ RATIO_UP
Definition: base_sink_c.h:54
gr::fosphor::base_sink_c::ZOOM_WIDTH_UP
@ ZOOM_WIDTH_UP
Definition: base_sink_c.h:50
gr::fosphor::base_sink_c::execute_ui_action
virtual void execute_ui_action(enum ui_action_t action)=0
gr::fosphor::base_sink_c::base_sink_c
base_sink_c(const char *name=NULL)
gr::fosphor::base_sink_c::set_frequency_range
virtual void set_frequency_range(const double center, const double span)=0
gr::fosphor::base_sink_c::set_frequency_center
virtual void set_frequency_center(const double center)=0
gr::fosphor::base_sink_c::set_frequency_span
virtual void set_frequency_span(const double span)=0
gr::fosphor::base_sink_c::set_fft_window
virtual void set_fft_window(const gr::fft::window::win_type win)=0
gr
Definition: base_sink_c.h:30
fosphor
Definition: private.h:44