3 // Copyright 2009 Free Software Foundation, Inc.
5 // This file is part of GNU Radio
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)
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.
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.
22 #ifndef INCLUDED_DB_WBXNG_H
23 #define INCLUDED_DB_WBXNG_H
25 #include <usrp/db_base.h>
30 class wbxng_base : public db_base
33 wbxng_base(usrp_basic_sptr usrp, int which, int _power_on=0);
36 struct freq_result_t set_freq(double freq);
43 int _refclk_divisor();
45 bool _set_pga(float pga_gain);
47 int power_on() { return d_power_on; }
48 int power_off() { return 0; }
59 // ----------------------------------------------------------------
61 class wbxng_base_tx : public wbxng_base
67 wbxng_base_tx(usrp_basic_sptr usrp, int which, int _power_on=0);
72 float gain_db_per_step();
74 bool set_auto_tr(bool on);
75 bool set_enable(bool on);
76 bool set_gain(float gain);
79 class wbxng_base_rx : public wbxng_base
83 bool _set_attn(float attn);
86 wbxng_base_rx(usrp_basic_sptr usrp, int which, int _power_on=0);
89 bool set_auto_tr(bool on);
90 bool select_rx_antenna(int which_antenna);
91 bool select_rx_antenna(const std::string &which_antenna);
92 bool set_gain(float gain);
95 // ----------------------------------------------------------------
97 class db_wbxng_tx : public wbxng_base_tx
100 db_wbxng_tx(usrp_basic_sptr usrp, int which);
104 class db_wbxng_rx : public wbxng_base_rx
107 db_wbxng_rx(usrp_basic_sptr usrp, int which);
112 float gain_db_per_step();
113 bool i_and_q_swapped();
116 #endif /* INCLUDED_DB_WBXNG_H */