usrp1_source_s.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2004 Free Software Foundation, Inc.
00004  * 
00005  * This file is part of GNU Radio
00006  * 
00007  * GNU Radio is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 3, or (at your option)
00010  * any later version.
00011  * 
00012  * GNU Radio is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  * 
00017  * You should have received a copy of the GNU General Public License
00018  * along with GNU Radio; see the file COPYING.  If not, write to
00019  * the Free Software Foundation, Inc., 51 Franklin Street,
00020  * Boston, MA 02110-1301, USA.
00021  */
00022 
00023 #ifndef INCLUDED_USRP1_SOURCE_S_H
00024 #define INCLUDED_USRP1_SOURCE_S_H
00025 
00026 #include <usrp1_source_base.h>
00027 #include <stdexcept>
00028 
00029 class usrp_standard_rx;
00030 
00031 
00032 class usrp1_source_s;
00033 typedef boost::shared_ptr<usrp1_source_s> usrp1_source_s_sptr;
00034 
00035 
00036 // public shared_ptr constructor
00037 
00038 usrp1_source_s_sptr
00039 usrp1_make_source_s (int which_board, 
00040                      unsigned int decim_rate,
00041                      int nchan,
00042                      int mux,
00043                      int mode,
00044                      int fusb_block_size,
00045                      int fusb_nblocks,
00046                      const std::string fpga_filename,
00047                      const std::string firmware_filename
00048                      ) throw (std::runtime_error);
00049 
00055 class usrp1_source_s : public usrp1_source_base {
00056  private:
00057   friend usrp1_source_s_sptr
00058   usrp1_make_source_s (int which_board, 
00059                        unsigned int decim_rate,
00060                        int nchan,
00061                        int mux,
00062                        int mode,
00063                        int fusb_block_size,
00064                        int fusb_nblocks,
00065                        const std::string fpga_filename,
00066                        const std::string firmware_filename
00067                        ) throw (std::runtime_error);
00068 
00069  protected:
00070   usrp1_source_s (int which_board, 
00071                   unsigned int decim_rate,
00072                   int nchan,
00073                   int mux,
00074                   int mode,
00075                   int fusb_block_size,
00076                   int fusb_nblocks,
00077                   const std::string fpga_filename,
00078                   const std::string firmware_filename
00079                   ) throw (std::runtime_error);
00080 
00081   virtual int ninput_bytes_reqd_for_noutput_items (int noutput_items);
00082 
00083   virtual void copy_from_usrp_buffer (gr_vector_void_star &output_items,
00084                                       int output_index,
00085                                       int output_items_available,
00086                                       int &output_items_produced,
00087                                       const void *usrp_buffer,
00088                                       int usrp_buffer_length,
00089                                       int &bytes_read);
00090  public:
00091   ~usrp1_source_s ();
00092 };
00093 
00094 #endif /* INCLUDED_USRP1_SOURCE_S_H */

Generated on Thu Mar 5 09:01:19 2009 for GNU Radio 3.1.3 by  doxygen 1.5.8