GNU Radio Manual and C++ API Reference 3.7.14.0
The Free & Open Software Radio Ecosystem
oscope_sink_x.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2003,2004,2013 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_GR_OSCOPE_SINK_X_H
24#define INCLUDED_GR_OSCOPE_SINK_X_H
25
26#include <gnuradio/sync_block.h>
27#include <gnuradio/wxgui/api.h>
30
31namespace gr {
32namespace wxgui {
33
34/*!
35 * \brief Abstract class for python oscilloscope module.
36 * \ingroup sink_blk
37 *
38 * Don't instantiate this. Use gr::blocks::oscope_sink_f instead.
39 */
41{
42protected:
45
47 oscope_sink_x(const std::string name,
48 gr::io_signature::sptr input_sig,
49 double sampling_rate);
50
51public:
52 virtual ~oscope_sink_x();
53
54 //// gr::blocks::oscope_sink_x::sptr
55 // typedef boost::shared_ptr<oscope_sink_x> sptr;
56 //
57 // static sptr make(const std::string name,
58 // gnuradio/io_signature.h_sptr input_sig,
59 // double sampling_rate);
60
61 bool set_update_rate(double update_rate);
62 bool set_decimation_count(int decimation_count);
63 bool set_trigger_channel(int channel);
66 bool set_trigger_level(double trigger_level);
68 bool set_sample_rate(double sample_rate);
69 bool set_num_channels(int nchannels);
70
71 // ACCESSORS
72 int num_channels() const;
73 double sample_rate() const;
74 double update_rate() const;
79 double get_trigger_level() const;
80
81 // # of samples written to each output record.
83
84 virtual int work(int noutput_items,
85 gr_vector_const_void_star& input_items,
86 gr_vector_void_star& output_items) = 0;
87};
88
89} /* namespace wxgui */
90} /* namespace gr */
91
92#endif /* INCLUDED_GR_OSCOPE_SINK_X_H */
boost::shared_ptr< io_signature > sptr
Definition: io_signature.h:46
synchronous 1:1 input to output with history
Definition: sync_block.h:38
guts of oscilloscope trigger and buffer module
Definition: oscope_guts.h:49
Abstract class for python oscilloscope module.
Definition: oscope_sink_x.h:41
bool set_num_channels(int nchannels)
oscope_guts * d_guts
Definition: oscope_sink_x.h:44
double get_trigger_level() const
bool set_decimation_count(int decimation_count)
int get_trigger_channel() const
trigger_slope get_trigger_slope() const
oscope_sink_x()
Definition: oscope_sink_x.h:46
bool set_update_rate(double update_rate)
trigger_mode get_trigger_mode() const
bool set_trigger_level(double trigger_level)
bool set_trigger_slope(trigger_slope slope)
double sample_rate() const
virtual int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)=0
just like gr::block::general_work, only this arranges to call consume_each for you
double update_rate() const
bool set_trigger_channel(int channel)
bool set_trigger_mode(trigger_mode mode)
int get_samples_per_output_record() const
bool set_sample_rate(double sample_rate)
oscope_sink_x(const std::string name, gr::io_signature::sptr input_sig, double sampling_rate)
double d_sampling_rate
Definition: oscope_sink_x.h:43
int get_decimation_count() const
std::vector< const void * > gr_vector_const_void_star
Definition: gnuradio-runtime/include/gnuradio/types.h:40
std::vector< void * > gr_vector_void_star
Definition: gnuradio-runtime/include/gnuradio/types.h:39
#define WXGUI_API
Definition: gr-wxgui/include/gnuradio/wxgui/api.h:30
trigger_slope
Definition: gr-wxgui/include/gnuradio/wxgui/trigger_mode.h:36
trigger_mode
Definition: gr-wxgui/include/gnuradio/wxgui/trigger_mode.h:29
Include this header to use the message passing features.
Definition: basic_block.h:45