GNU Radio 3.4.2 C++ API
|
00001 /* 00002 * Copyright 2008 Free Software Foundation, Inc. 00003 * 00004 * This file is part of GNU Radio 00005 * 00006 * GNU Radio is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 3, or (at your option) 00009 * any later version. 00010 * 00011 * GNU Radio is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with GNU Radio; see the file COPYING. If not, write to 00018 * the Free Software Foundation, Inc., 51 Franklin Street, 00019 * Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #include <gr_top_block.h> 00023 #include <usrp_source_base.h> 00024 #include <usrp_source_c.h> 00025 #include <usrp_source_s.h> 00026 #include <gr_file_sink.h> 00027 00028 class usrp_rx_cfile; 00029 typedef boost::shared_ptr<usrp_rx_cfile> usrp_rx_cfile_sptr; 00030 usrp_rx_cfile_sptr make_usrp_rx_cfile(int which, usrp_subdev_spec spec, 00031 int decim, double freq, float gain, 00032 bool width8, bool nohb, 00033 bool output_shorts, int nsamples, 00034 const std::string &filename); 00035 00036 class usrp_rx_cfile : public gr_top_block 00037 { 00038 private: 00039 usrp_rx_cfile(int which, usrp_subdev_spec spec, 00040 int decim, double freq, float gain, 00041 bool width8, bool nohb, 00042 bool output_shorts, int nsamples, 00043 const std::string &filename); 00044 friend usrp_rx_cfile_sptr make_usrp_rx_cfile(int which, usrp_subdev_spec spec, 00045 int decim, double freq, float gain, 00046 bool width8, bool nohb, 00047 bool output_shorts, int nsamples, 00048 const std::string &filename); 00049 00050 int d_which; 00051 usrp_subdev_spec d_spec; 00052 int d_decim; 00053 double d_freq; 00054 float d_gain; 00055 bool d_width8, d_nohb; 00056 int d_nsamples; 00057 std::string d_filename; 00058 00059 public: 00060 gr_block_sptr d_head; 00061 gr_block_sptr d_dst; 00062 };