GNU Radio 3.4.2 C++ API
|
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_USRP_SINK_C_H 00024 #define INCLUDED_USRP_SINK_C_H 00025 00026 #include <usrp_sink_base.h> 00027 00028 class usrp_sink_c; 00029 typedef boost::shared_ptr<usrp_sink_c> usrp_sink_c_sptr; 00030 00031 00032 // public shared_ptr constructor 00033 00034 usrp_sink_c_sptr 00035 usrp_make_sink_c (int which_board=0, 00036 unsigned int interp_rate=32, 00037 int nchan=1, 00038 int mux=-1, 00039 int fusb_block_size=0, 00040 int fusb_nblocks=0, 00041 const std::string fpga_filename="", 00042 const std::string firmware_filename="" 00043 ) throw (std::runtime_error); 00044 00045 00046 /*! 00047 * \brief Interface to Universal Software Radio Peripheral Tx path 00048 * \ingroup usrp 00049 * \ingroup sink_blk 00050 * 00051 * input: gr_complex 00052 */ 00053 class usrp_sink_c : public usrp_sink_base { 00054 private: 00055 00056 friend usrp_sink_c_sptr 00057 usrp_make_sink_c (int which_board, 00058 unsigned int interp_rate, 00059 int nchan, 00060 int mux, 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 usrp_sink_c (int which_board, 00069 unsigned int interp_rate, 00070 int nchan, 00071 int mux, 00072 int fusb_block_size, 00073 int fusb_nblocks, 00074 const std::string fpga_filename, 00075 const std::string firmware_filename 00076 ) throw (std::runtime_error); 00077 00078 virtual void copy_to_usrp_buffer (gr_vector_const_void_star &input_items, 00079 int input_index, 00080 int input_items_available, 00081 int &input_items_consumed, 00082 void *usrp_buffer, 00083 int usrp_buffer_length, 00084 int &bytes_written); 00085 public: 00086 ~usrp_sink_c (); 00087 }; 00088 00089 #endif /* INCLUDED_USRP_SINK_C_H */