095233d41ee45b66495c9d1c79a627812aaec535
[debian/gnuradio] / gr-msdd6000 / src / msdd_source_simple.h
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2008 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 along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21 #ifndef INCLUDED_MSDD_SOURCE_SIMPLE_H
22 #define INCLUDED_MSDD_SOURCE_SIMPLE_H
23
24 #include <gr_sync_block.h>
25 #include <msdd6000.h>
26 #include <boost/scoped_ptr.hpp>
27
28
29 class msdd_source_simple;
30 typedef boost::shared_ptr<msdd_source_simple> msdd_source_simple_sptr;
31
32
33 // public shared_ptr constructor
34
35 msdd_source_simple_sptr msdd_make_source_simple ( const char *src, unsigned short port_src);
36
37
38 class msdd_source_simple : public gr_sync_block {
39  private:
40   friend msdd_source_simple_sptr
41   msdd_make_source_simple ( const char *src, unsigned short port_src);
42
43   boost::scoped_ptr<MSDD6000> rcv;
44   int d_lastseq;
45
46  protected:
47   msdd_source_simple (const char *src, unsigned short port_src);
48
49  public:
50   ~msdd_source_simple ();
51   bool stop();
52   bool start();
53
54   bool set_decim_rate(unsigned int);
55   bool set_rx_freq(int,double);
56   bool set_pga(int,double);
57
58   int work(int, gr_vector_const_void_star&, gr_vector_void_star&);
59   
60   long adc_freq();
61   int decim_rate();
62   std::vector<int> gain_range();
63   std::vector<float> freq_range();
64 };
65
66 #endif /* INCLUDED_MSDD_SOURCE_C_H */