base_sink_c.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2013-2021 Sylvain Munaut <tnt@246tNt.com>
*
* This file is part of gr-fosphor
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#pragma once
#include <gnuradio/fosphor/api.h>
#include <gnuradio/sync_block.h>
#include <gnuradio/fft/window.h>
namespace gr {
namespace fosphor {
/*!
* \brief Base fosphor sink API interface
* \ingroup fosphor
*/
class GR_FOSPHOR_API base_sink_c : public gr::sync_block
{
protected:
base_sink_c(const char *name = NULL);
public:
enum ui_action_t {
DB_PER_DIV_UP,
DB_PER_DIV_DOWN,
REF_UP,
REF_DOWN,
ZOOM_TOGGLE,
ZOOM_WIDTH_UP,
ZOOM_WIDTH_DOWN,
ZOOM_CENTER_UP,
ZOOM_CENTER_DOWN,
RATIO_UP,
RATIO_DOWN,
FREEZE_TOGGLE,
};
enum mouse_action_t {
CLICK,
};
virtual void execute_ui_action(enum ui_action_t action) = 0;
virtual void execute_mouse_action(enum mouse_action_t action, int x, int y) = 0;
virtual void set_frequency_range(const double center,
const double span) = 0;
virtual void set_frequency_center(const double center) = 0;
virtual void set_frequency_span(const double span) = 0;
virtual void set_fft_window(const gr::fft::window::win_type win) = 0;
};
} // namespace fosphor
} // namespace gr
api.h
GR_FOSPHOR_API
#define GR_FOSPHOR_API
Definition api.h:17
gr::fosphor::base_sink_c::ui_action_t
ui_action_t
Definition base_sink_c.h:31
gr::fosphor::base_sink_c::REF_UP
@ REF_UP
Definition base_sink_c.h:34
gr::fosphor::base_sink_c::ZOOM_CENTER_UP
@ ZOOM_CENTER_UP
Definition base_sink_c.h:39
gr::fosphor::base_sink_c::DB_PER_DIV_UP
@ DB_PER_DIV_UP
Definition base_sink_c.h:32
gr::fosphor::base_sink_c::DB_PER_DIV_DOWN
@ DB_PER_DIV_DOWN
Definition base_sink_c.h:33
gr::fosphor::base_sink_c::ZOOM_TOGGLE
@ ZOOM_TOGGLE
Definition base_sink_c.h:36
gr::fosphor::base_sink_c::FREEZE_TOGGLE
@ FREEZE_TOGGLE
Definition base_sink_c.h:43
gr::fosphor::base_sink_c::ZOOM_WIDTH_DOWN
@ ZOOM_WIDTH_DOWN
Definition base_sink_c.h:38
gr::fosphor::base_sink_c::REF_DOWN
@ REF_DOWN
Definition base_sink_c.h:35
gr::fosphor::base_sink_c::RATIO_DOWN
@ RATIO_DOWN
Definition base_sink_c.h:42
gr::fosphor::base_sink_c::ZOOM_CENTER_DOWN
@ ZOOM_CENTER_DOWN
Definition base_sink_c.h:40
gr::fosphor::base_sink_c::RATIO_UP
@ RATIO_UP
Definition base_sink_c.h:41
gr::fosphor::base_sink_c::ZOOM_WIDTH_UP
@ ZOOM_WIDTH_UP
Definition base_sink_c.h:37
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::mouse_action_t
mouse_action_t
Definition base_sink_c.h:46
gr::fosphor::base_sink_c::CLICK
@ CLICK
Definition base_sink_c.h:47
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::fosphor::base_sink_c::execute_mouse_action
virtual void execute_mouse_action(enum mouse_action_t action, int x, int y)=0
gr::fosphor
Definition base_sink_c.h:18
gr
Definition base_sink_c.h:17