GNU Radio 3.3.0 C++ API
|
00001 /* -*- c++ -*- */ 00002 // 00003 // Copyright 2008,2009 Free Software Foundation, Inc. 00004 // 00005 // This file is part of GNU Radio 00006 // 00007 // GNU Radio is free software; you can redistribute it and/or modify 00008 // it under the terms of the GNU General Public License as published by 00009 // the Free Software Foundation; either asversion 3, or (at your option) 00010 // any later version. 00011 // 00012 // GNU Radio is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with GNU Radio; see the file COPYING. If not, write to 00019 // the Free Software Foundation, Inc., 51 Franklin Street, 00020 // Boston, MA 02110-1301, USA. 00021 00022 #ifndef DB_BASIC_H 00023 #define DB_BASIC_H 00024 00025 #include <usrp/db_base.h> 00026 00027 00028 /******************************************************************************/ 00029 00030 00031 class db_basic_tx : public db_base 00032 { 00033 public: 00034 db_basic_tx(usrp_basic_sptr usrp, int which); 00035 ~db_basic_tx(); 00036 00037 float gain_min(); 00038 float gain_max(); 00039 float gain_db_per_step(); 00040 double freq_min(); 00041 double freq_max(); 00042 struct freq_result_t set_freq(double target_freq); 00043 bool set_gain(float gain); 00044 bool is_quadrature(); 00045 }; 00046 00047 00048 /******************************************************************************/ 00049 00050 00051 class db_basic_rx : public db_base 00052 { 00053 public: 00054 db_basic_rx(usrp_basic_sptr usrp, int which, int subdev); 00055 ~db_basic_rx(); 00056 00057 float gain_min(); 00058 float gain_max(); 00059 float gain_db_per_step(); 00060 double freq_min(); 00061 double freq_max(); 00062 struct freq_result_t set_freq(double target_freq); 00063 bool set_gain(float gain); 00064 bool is_quadrature(); 00065 00066 private: 00067 int d_subdev; 00068 }; 00069 00070 00071 /******************************************************************************/ 00072 00073 00074 class db_lf_rx : public db_basic_rx 00075 { 00076 public: 00077 db_lf_rx(usrp_basic_sptr usrp, int which, int subdev); 00078 ~db_lf_rx(); 00079 00080 double freq_min(); 00081 double freq_max(); 00082 }; 00083 00084 00085 /******************************************************************************/ 00086 00087 00088 class db_lf_tx : public db_basic_tx 00089 { 00090 public: 00091 db_lf_tx(usrp_basic_sptr usrp, int which); 00092 ~db_lf_tx(); 00093 00094 double freq_min(); 00095 double freq_max(); 00096 }; 00097 00098 00099 #endif