00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef INCLUDED_USRP_SOURCE_S_H
00024 #define INCLUDED_USRP_SOURCE_S_H
00025
00026 #include <usrp_source_base.h>
00027 #include <stdexcept>
00028
00029 class usrp_standard_rx;
00030
00031
00032 class usrp_source_s;
00033 typedef boost::shared_ptr<usrp_source_s> usrp_source_s_sptr;
00034
00035
00036
00037
00038 usrp_source_s_sptr
00039 usrp_make_source_s (int which_board=0,
00040 unsigned int decim_rate=16,
00041 int nchan=1,
00042 int mux=-1,
00043 int mode=0,
00044 int fusb_block_size=0,
00045 int fusb_nblocks=0,
00046 const std::string fpga_filename="",
00047 const std::string firmware_filename=""
00048 ) throw (std::runtime_error);
00049
00050
00051
00052
00053
00054
00055
00056
00057 class usrp_source_s : public usrp_source_base {
00058 private:
00059 friend usrp_source_s_sptr
00060 usrp_make_source_s (int which_board,
00061 unsigned int decim_rate,
00062 int nchan,
00063 int mux,
00064 int mode,
00065 int fusb_block_size,
00066 int fusb_nblocks,
00067 const std::string fpga_filename,
00068 const std::string firmware_filename
00069 ) throw (std::runtime_error);
00070
00071 protected:
00072 usrp_source_s (int which_board,
00073 unsigned int decim_rate,
00074 int nchan,
00075 int mux,
00076 int mode,
00077 int fusb_block_size,
00078 int fusb_nblocks,
00079 const std::string fpga_filename,
00080 const std::string firmware_filename
00081 ) throw (std::runtime_error);
00082
00083 virtual int ninput_bytes_reqd_for_noutput_items (int noutput_items);
00084
00085 virtual void copy_from_usrp_buffer (gr_vector_void_star &output_items,
00086 int output_index,
00087 int output_items_available,
00088 int &output_items_produced,
00089 const void *usrp_buffer,
00090 int usrp_buffer_length,
00091 int &bytes_read);
00092 public:
00093 ~usrp_source_s ();
00094 };
00095
00096 #endif