Imported Upstream version 3.0.4
[debian/gnuradio] / gr-usrp / src / usrp1_sink_s.h
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2004 Free Software Foundation, Inc.
4  * 
5  * This file is part of GNU Radio
6  * 
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  * 
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING.  If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22
23 #ifndef INCLUDED_USRP1_SINK_S_H
24 #define INCLUDED_USRP1_SINK_S_H
25
26 #include <usrp1_sink_base.h>
27
28 class usrp1_sink_s;
29 typedef boost::shared_ptr<usrp1_sink_s> usrp1_sink_s_sptr;
30
31
32 // public shared_ptr constructor
33
34 usrp1_sink_s_sptr
35 usrp1_make_sink_s (int which_board,
36                    unsigned int interp_rate,
37                    int nchan,
38                    int mux,
39                    int fusb_block_size,
40                    int fusb_nblocks,
41                    const std::string fpga_filename,
42                    const std::string firmware_filename
43                    ) throw (std::runtime_error);
44
45 /*!
46  * \brief interface to Universal Software Radio Peripheral Tx path (Rev 1)
47  *
48  * input: short
49  */
50 class usrp1_sink_s : public usrp1_sink_base {
51  private:
52
53   friend usrp1_sink_s_sptr
54   usrp1_make_sink_s (int which_board,
55                      unsigned int interp_rate,
56                      int nchan,
57                      int mux,
58                      int fusb_block_size,
59                      int fusb_nblocks,
60                      const std::string fpga_filename,
61                      const std::string firmware_filename
62                      ) throw (std::runtime_error);
63
64  protected:
65   usrp1_sink_s (int which_board,
66                 unsigned int interp_rate,
67                 int nchan,
68                 int mux,
69                 int fusb_block_size,
70                 int fusb_nblocks,
71                 const std::string fpga_filename,
72                 const std::string firmware_filename
73                 ) throw (std::runtime_error);
74
75   virtual void copy_to_usrp_buffer (gr_vector_const_void_star &input_items,
76                                     int  input_index,
77                                     int  input_items_available,
78                                     int  &input_items_consumed,
79                                     void *usrp_buffer,
80                                     int  usrp_buffer_length,
81                                     int  &bytes_written);
82  public:
83   ~usrp1_sink_s ();
84 };
85
86 #endif /* INCLUDED_USRP1_SINK_S_H */