Imported Upstream version 3.2.2
[debian/gnuradio] / usrp / host / lib / legacy / db_basic.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 asversion 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 #ifndef DB_BASIC_H
23 #define DB_BASIC_H
24
25 #include <db_base.h>
26
27
28 /******************************************************************************/
29
30
31 class db_basic_tx : public db_base
32 {
33 public:
34   db_basic_tx(usrp_basic_sptr usrp, int which);
35   ~db_basic_tx();
36   
37   float gain_min();
38   float gain_max();
39   float gain_db_per_step();
40   double freq_min();
41   double freq_max();
42   struct freq_result_t set_freq(double target_freq);
43   bool  set_gain(float gain);
44   bool  is_quadrature();
45 };
46
47
48 /******************************************************************************/
49
50
51 class db_basic_rx : public db_base
52 {
53  public:
54   db_basic_rx(usrp_basic_sptr usrp, int which, int subdev);
55   ~db_basic_rx();
56   
57   float gain_min();
58   float gain_max();
59   float gain_db_per_step();
60   double freq_min();
61   double freq_max();
62   struct freq_result_t set_freq(double target_freq);
63   bool set_gain(float gain);
64   bool is_quadrature();
65
66 private:
67   int d_subdev;
68 };
69
70
71 /******************************************************************************/
72
73
74 class db_lf_rx : public db_basic_rx
75 {
76  public:
77   db_lf_rx(usrp_basic_sptr usrp, int which, int subdev);
78   ~db_lf_rx();
79   
80   double freq_min();
81   double freq_max();
82 };
83
84
85 /******************************************************************************/
86
87
88 class db_lf_tx : public db_basic_tx
89
90  public:
91   db_lf_tx(usrp_basic_sptr usrp, int which);
92   ~db_lf_tx();
93   
94   double freq_min();
95   double freq_max();
96 };
97
98
99 #endif