Imported Upstream version 3.2.2
[debian/gnuradio] / gnuradio-core / src / lib / io / gr_oscope_sink_x.cc
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 #ifdef HAVE_CONFIG_H
24 #include "config.h"
25 #endif
26
27 #include <gr_oscope_sink_x.h>
28 #include <gr_io_signature.h>
29 #include <gr_oscope_guts.h>
30
31
32 gr_oscope_sink_x::gr_oscope_sink_x (const std::string name,
33                                     gr_io_signature_sptr input_sig,
34                                     double sampling_rate)
35   : gr_sync_block (name, input_sig, gr_make_io_signature (0, 0, 0)),
36     d_sampling_rate (sampling_rate), d_guts (0)
37 {
38 }
39
40 gr_oscope_sink_x::~gr_oscope_sink_x ()
41 {
42   delete d_guts;
43 }
44
45 // ----------------------------------------------------------------
46
47 bool
48 gr_oscope_sink_x::set_update_rate (double update_rate)
49 {
50   return d_guts->set_update_rate (update_rate);
51 }
52
53 bool
54 gr_oscope_sink_x::set_decimation_count (int decimation_count)
55 {
56   return d_guts->set_decimation_count (decimation_count);
57 }
58
59 bool
60 gr_oscope_sink_x::set_trigger_channel (int channel)
61 {
62   return d_guts->set_trigger_channel (channel);
63 }
64
65 bool
66 gr_oscope_sink_x::set_trigger_mode (gr_trigger_mode mode)
67 {
68   return d_guts->set_trigger_mode (mode);
69 }
70
71 bool
72 gr_oscope_sink_x::set_trigger_slope (gr_trigger_slope slope)
73 {
74   return d_guts->set_trigger_slope (slope);
75 }
76
77 bool
78 gr_oscope_sink_x::set_trigger_level (double trigger_level)
79 {
80   return d_guts->set_trigger_level (trigger_level);
81 }
82
83
84 bool
85 gr_oscope_sink_x::set_trigger_level_auto ()
86 {
87   return d_guts->set_trigger_level_auto ();
88 }
89
90 bool
91 gr_oscope_sink_x::set_sample_rate (double sample_rate)
92 {
93   return d_guts->set_sample_rate (sample_rate);
94 }
95
96 bool
97 gr_oscope_sink_x::set_num_channels (int nchannels)
98 {
99   return d_guts->set_num_channels (nchannels);
100 }
101
102 // ACCESSORS
103
104 int
105 gr_oscope_sink_x::num_channels () const
106 {
107   return d_guts->num_channels ();
108 }
109
110 double
111 gr_oscope_sink_x::sample_rate () const
112 {
113   return d_guts->sample_rate ();
114 }
115
116 double
117 gr_oscope_sink_x::update_rate () const
118 {
119   return d_guts->update_rate ();
120 }
121
122 int
123 gr_oscope_sink_x::get_decimation_count () const
124 {
125   return d_guts->get_decimation_count ();
126 }
127
128 int
129 gr_oscope_sink_x::get_trigger_channel () const
130 {
131   return d_guts->get_trigger_channel ();
132 }
133
134 gr_trigger_mode
135 gr_oscope_sink_x::get_trigger_mode () const
136 {
137   return d_guts->get_trigger_mode ();
138 }
139
140 gr_trigger_slope
141 gr_oscope_sink_x::get_trigger_slope () const
142 {
143   return d_guts->get_trigger_slope ();
144 }
145
146 double
147 gr_oscope_sink_x::get_trigger_level () const
148 {
149   return d_guts->get_trigger_level ();
150 }
151
152 int
153 gr_oscope_sink_x::get_samples_per_output_record () const
154 {
155   return d_guts->get_samples_per_output_record ();
156 }