Imported Upstream version 3.2.2
[debian/gnuradio] / gr-usrp / apps / usrp_rx_cfile.h
1 /*
2  * Copyright 2008 Free Software Foundation, Inc.
3  * 
4  * This file is part of GNU Radio
5  * 
6  * GNU Radio is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3, or (at your option)
9  * any later version.
10  * 
11  * GNU Radio is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License
17  * along with GNU Radio; see the file COPYING.  If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street,
19  * Boston, MA 02110-1301, USA.
20  */
21
22 #include <gr_top_block.h>
23 #include <usrp_source_base.h>
24 #include <usrp_source_c.h>
25 #include <usrp_source_s.h>
26 #include <gr_file_sink.h>
27
28 class usrp_rx_cfile;
29 typedef boost::shared_ptr<usrp_rx_cfile> usrp_rx_cfile_sptr;
30 usrp_rx_cfile_sptr make_usrp_rx_cfile(int which, usrp_subdev_spec spec, 
31                                       int decim, double freq, float gain,
32                                       bool width8, bool nohb,
33                                       bool output_shorts, int nsamples,
34                                       const std::string &filename);
35
36 class usrp_rx_cfile : public gr_top_block
37 {
38 private:
39     usrp_rx_cfile(int which, usrp_subdev_spec spec, 
40                   int decim, double freq, float gain,
41                   bool width8, bool nohb,
42                   bool output_shorts, int nsamples,
43                   const std::string &filename);
44     friend usrp_rx_cfile_sptr make_usrp_rx_cfile(int which, usrp_subdev_spec spec, 
45                                                  int decim, double freq, float gain,
46                                                  bool width8, bool nohb,
47                                                  bool output_shorts, int nsamples,
48                                                  const std::string &filename);
49
50     int d_which;
51     usrp_subdev_spec d_spec;
52     int d_decim;
53     double d_freq;
54     float d_gain;
55     bool d_width8, d_nohb;
56     int d_nsamples;
57     std::string d_filename;
58
59  public:
60     gr_block_sptr d_head;
61     gr_block_sptr d_dst;
62 };