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_XCVR2450_H 00023 #define DB_XCVR2450_H 00024 00025 #include <usrp/db_base.h> 00026 #include <boost/shared_ptr.hpp> 00027 00028 class xcvr2450; 00029 typedef boost::shared_ptr<xcvr2450> xcvr2450_sptr; 00030 00031 00032 /******************************************************************************/ 00033 00034 00035 class db_xcvr2450_base: public db_base 00036 { 00037 /* 00038 * Abstract base class for all xcvr2450 boards. 00039 * 00040 * Derive board specific subclasses from db_xcvr2450_base_{tx,rx} 00041 */ 00042 public: 00043 db_xcvr2450_base(usrp_basic_sptr usrp, int which); 00044 ~db_xcvr2450_base(); 00045 struct freq_result_t set_freq(double target_freq); 00046 bool is_quadrature(); 00047 double freq_min(); 00048 double freq_max(); 00049 00050 protected: 00051 xcvr2450_sptr d_xcvr; 00052 void shutdown_common(); 00053 }; 00054 00055 00056 /******************************************************************************/ 00057 00058 00059 class db_xcvr2450_tx : public db_xcvr2450_base 00060 { 00061 protected: 00062 void shutdown(); 00063 00064 public: 00065 db_xcvr2450_tx(usrp_basic_sptr usrp, int which); 00066 ~db_xcvr2450_tx(); 00067 00068 float gain_min(); 00069 float gain_max(); 00070 float gain_db_per_step(); 00071 bool set_gain(float gain); 00072 bool i_and_q_swapped(); 00073 }; 00074 00075 class db_xcvr2450_rx : public db_xcvr2450_base 00076 { 00077 protected: 00078 void shutdown(); 00079 00080 public: 00081 db_xcvr2450_rx(usrp_basic_sptr usrp, int which); 00082 ~db_xcvr2450_rx(); 00083 00084 float gain_min(); 00085 float gain_max(); 00086 float gain_db_per_step(); 00087 bool set_gain(float gain); 00088 }; 00089 00090 00091 00092 #endif