usrp1_source_c.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_C_H
00024 #define INCLUDED_USRP1_SOURCE_C_H
00025 
00026 #include <usrp1_source_base.h>
00027 #include <stdexcept>
00028 
00029 class usrp_standard_rx;
00030 
00031 
00032 class usrp1_source_c;
00033 typedef boost::shared_ptr<usrp1_source_c> usrp1_source_c_sptr;
00034 
00035 
00036 // public shared_ptr constructor
00037 
00038 usrp1_source_c_sptr
00039 usrp1_make_source_c (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 
00053 class usrp1_source_c : public usrp1_source_base {
00054  private:
00055   friend usrp1_source_c_sptr
00056   usrp1_make_source_c (int which_board,
00057                        unsigned int decim_rate,
00058                        int nchan,
00059                        int mux,
00060                        int mode,
00061                        int fusb_block_size,
00062                        int fusb_nblocks,
00063                        const std::string fpga_filename,
00064                        const std::string firmware_filename
00065                        ) throw (std::runtime_error);
00066 
00067  protected:
00068   usrp1_source_c (int which_board,
00069                   unsigned int decim_rate,
00070                   int nchan,
00071                   int mux,
00072                   int mode,
00073                   int fusb_block_size,
00074                   int fusb_nblocks,
00075                   const std::string fpga_filename,
00076                   const std::string firmware_filename
00077                   ) throw (std::runtime_error);
00078 
00079   virtual int ninput_bytes_reqd_for_noutput_items (int noutput_items);
00080 
00081   virtual void copy_from_usrp_buffer (gr_vector_void_star &output_items,
00082                                       int output_index,
00083                                       int output_items_available,
00084                                       int &output_items_produced,
00085                                       const void *usrp_buffer,
00086                                       int usrp_buffer_length,
00087                                       int &bytes_read);
00088 
00089  public:
00090   ~usrp1_source_c ();
00091 };
00092 
00093 #endif /* INCLUDED_USRP1_SOURCE_C_H */

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