GNU Radio's HOWTO Package
gn3s_source_cc.h
Go to the documentation of this file.
1 /*!
2  * \file gn3s_source_cc.h
3  * \brief GNU Radio source block to acces to SiGe GN3S USB sampler v2.
4  * \author Javier Arribas, 2012. jarribas(at)cttc.es
5  *
6  * -------------------------------------------------------------------------
7  *
8  * Copyright (C) 2010-2012 (see AUTHORS file for a list of contributors)
9  *
10  * GNSS-SDR is a software defined Global Navigation
11  * Satellite Systems receiver
12  *
13  * This file is part of GNSS-SDR.
14  *
15  * GNSS-SDR is free software: you can redistribute it and/or modify
16  * it under the terms of the GNU General Public License as published by
17  * the Free Software Foundation, either version 3 of the License, or
18  * at your option) any later version.
19  *
20  * GNSS-SDR is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU General Public License for more details.
24  *
25  * You should have received a copy of the GNU General Public License
26  * along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
27  *
28  * -------------------------------------------------------------------------
29  */
30 #ifndef INCLUDED_GN3S_SOURCE_CC_H
31 #define INCLUDED_GN3S_SOURCE_CC_H
32 
33 #include "gn3s_api.h"
34 #include <gnuradio/block.h>
35 
36 class gn3s_source_cc;
37 
38 /*
39  * We use boost::shared_ptr's instead of raw pointers for all access
40  * to gr_blocks (and many other data structures). The shared_ptr gets
41  * us transparent reference counting, which greatly simplifies storage
42  * management issues. This is especially helpful in our hybrid
43  * C++ / Python system.
44  *
45  * See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
46  *
47  * As a convention, the _sptr suffix indicates a boost::shared_ptr
48  */
49 typedef boost::shared_ptr<gn3s_source_cc> gn3s_source_cc_sptr;
50 
51 /*!
52  * \brief Return a shared_ptr to a new instance of howto_square_ff.
53  *
54  * To avoid accidental use of raw pointers, gn3s_source's
55  * constructor is private. gn3s_source is the public
56  * interface for creating new instances.
57  */
58 GN3S_API gn3s_source_cc_sptr gn3s_make_source_cc ();
59 
60 /*!
61  * \brief SiGe GN3S V2 sampler USB driver.
62  * \ingroup block
63  *
64  * \sa gn3s_source for a version that subclasses gr_block.
65  */
66 class GN3S_API gn3s_source_cc : public gr::block
67 {
68 private:
69  // The friend declaration allows gn3s_source to
70  // access the private constructor.
71 
72  friend GN3S_API gn3s_source_cc_sptr gn3s_make_source_cc ();
73 
74  /*!
75  * \brief
76  */
77  gn3s_source_cc (); // private constructor
78 
79  public:
80  ~gn3s_source_cc (); // public destructor
81 
82  // Where all the action really happens
83 
84  int general_work (int noutput_items,
85  gr_vector_int &ninput_items,
86  gr_vector_const_void_star &input_items,
87  gr_vector_void_star &output_items);
88 };
89 
90 #endif /* INCLUDED_GN3S_SOURCE_CC_H */
GNU Radio source block to acces to SiGe GN3S USB sampler.
GN3S_API gn3s_source_cc_sptr gn3s_make_source_cc()
Return a shared_ptr to a new instance of howto_square_ff.
SiGe GN3S V2 sampler USB driver.
Definition: gn3s_source_cc.h:66
#define GN3S_API
Definition: gn3s_api.h:39