root/vtcross/branches/hasan/rfic_rev2/db_rfic.h @ 549

Revision 549, 1.9 KB (checked in by hasan, 14 years ago)

revised version for the git copy

Line 
1#ifndef DB_rfic_H
2#define DB_rfic_H
3
4#include <usrp/db_base.h>
5#include <boost/shared_ptr.hpp>
6
7class rfic;
8typedef boost::shared_ptr<rfic> rfic_sptr;
9
10
11/******************************************************************************/
12
13class db_rfic_base: public db_base
14{
15  /*
16   * Abstract base class for all rfic boards.
17   *
18   * Derive board specific subclasses from db_rfic_base_{tx,rx}
19   */
20public:
21  db_rfic_base(usrp_basic_sptr usrp, int which);
22  ~db_rfic_base();
23  bool is_quadrature();
24  double freq_min();
25  double freq_max();
26 
27protected:
28  rfic_sptr d_rfic;
29  void shutdown_common();
30};
31
32
33/******************************************************************************/
34
35
36class db_rfic_tx : public db_rfic_base
37{
38protected:
39  void shutdown();
40
41public:
42  db_rfic_tx(usrp_basic_sptr usrp, int which);
43  ~db_rfic_tx();
44
45  float gain_min();
46  float gain_max();
47  bool select_tx_antenna(std::string which_antenna);
48  bool select_tx_antenna(int which_antenna);
49  struct freq_result_t set_freq(double target_frequency);
50  bool set_gain(float gain);
51  bool set_phase(int phase);
52  bool set_bw(float bw);
53  bool spectrum_inverted();
54  float gain_db_per_step();
55 
56};
57
58class db_rfic_rx : public db_rfic_base
59{
60protected:
61  void shutdown();
62
63public:
64  db_rfic_rx(usrp_basic_sptr usrp, int which);
65  ~db_rfic_rx();
66
67  float gain_min();
68  float gain_max();
69  bool select_rx_antenna(std::string which_antenna);
70  bool select_rx_antenna(int which_antenna);
71  struct freq_result_t set_freq(double target_frequency);
72  bool set_gain(float gain);
73  bool set_phase(int phase);
74  bool set_bw(float bw);
75  void enable_fb();
76  void disable_tx_fb();
77  float fb_gain_min();
78  float fb_gain_max();
79  void set_fb_gain(float gain);
80  bool set_fb_freq(double target_freq);
81  bool set_fb_phase(int phase);
82  void set_fb_bw(float bw); 
83  int RSSI_fade();
84  int RSSI_clip();
85  float gain_db_per_step();
86
87};
88
89
90
91
92#endif
Note: See TracBrowser for help on using the browser.