Imported Upstream version 3.2.2
[debian/gnuradio] / gnuradio-core / src / lib / io / gr_oscope_sink_x.h
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2003,2004 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 <gr_sync_block.h>
27 #include <gr_trigger_mode.h>
28
29 class gr_oscope_guts;
30
31 /*!
32  * \brief Abstract class for python oscilloscope module.
33  * \ingroup sink_blk
34  *
35  * Don't instantiate this.  Use gr_oscope_sink_f or gr_oscope_sink_c instead.
36  */
37 class gr_oscope_sink_x : public gr_sync_block
38 {
39 protected:
40   double                         d_sampling_rate;
41   gr_oscope_guts                *d_guts;
42   
43   gr_oscope_sink_x (const std::string name,
44                     gr_io_signature_sptr input_sig,
45                     double sampling_rate);
46
47 public:
48   ~gr_oscope_sink_x ();
49
50   bool set_update_rate (double update_rate);
51   bool set_decimation_count (int decimation_count);
52   bool set_trigger_channel (int channel);
53   bool set_trigger_mode (gr_trigger_mode mode);
54   bool set_trigger_slope (gr_trigger_slope slope);
55   bool set_trigger_level (double trigger_level);
56   bool set_trigger_level_auto ();                               // set to 50% level
57   bool set_sample_rate(double sample_rate);
58   bool set_num_channels (int nchannels);
59
60
61   // ACCESSORS
62   int num_channels () const;
63   double sample_rate () const;
64   double update_rate () const;
65   int get_decimation_count () const;
66   int get_trigger_channel () const;
67   gr_trigger_mode get_trigger_mode () const;
68   gr_trigger_slope get_trigger_slope () const;
69   double get_trigger_level () const;
70
71   // # of samples written to each output record.
72   int get_samples_per_output_record () const;
73   
74 };
75
76 #endif /* INCLUDED_GR_OSCOPE_SINK_X_H */