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 version 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 along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef INCLUDED_VRT_QUADRADIO_SOURCE_32FC_H
22 #define INCLUDED_VRT_QUADRADIO_SOURCE_32FC_H
24 #include <vrt_source_32fc.h>
30 class vrt_quadradio_source_32fc;
31 typedef boost::shared_ptr<vrt_quadradio_source_32fc> vrt_quadradio_source_32fc_sptr;
33 vrt_quadradio_source_32fc_sptr
34 vrt_make_quadradio_source_32fc(const std::string &ip,
35 size_t rx_bufsize = 0,
36 size_t samples_per_pkt = 0,
39 class vrt_quadradio_source_32fc : public vrt_source_32fc
41 size_t d_samples_per_pkt;
42 boost::shared_ptr<vrt::quadradio> d_qr;
45 vrt_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize,
46 size_t samples_per_pkt, int rxdspno);
48 friend vrt_quadradio_source_32fc_sptr
49 vrt_make_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize,
50 size_t samples_per_pkt, int rxdspno);
53 virtual ~vrt_quadradio_source_32fc();
54 virtual vrt::rx::sptr vrt_rx() const;
57 * \brief Called by scheduler when starting flowgraph
62 * \brief Called by scheduler when stopping flowgraph
67 * \brief Set the LO frequency (actually just sets the band select for now).
69 bool set_center_freq(double target_freq);
72 * \brief Set the band select dboard bits.
74 bool set_band_select(int band);
75 int get_band_select(void);
78 * \brief Turn the 10 dB attenuation on/off.
80 //void set_10dB_atten(bool on);
83 * \brief Set the antenna type to the main rf or calibrator.
84 * \param ant "rf" or "cal"
86 bool select_rx_antenna(const std::string &ant);
89 * \brief Set the attenuation.
90 * \param attenuation 0 to 31 in dB
92 bool set_attenuation0(int attenuation);
93 bool set_attenuation1(int attenuation);
95 void set_iq_imbal_taps(const std::vector<gr_complex> taps);
97 void set_adc_gain(bool on);
98 void set_dc_offset_comp(bool on);
99 void set_digital_gain(float gain);
100 void set_test_signal(int type);
102 bool set_setting_reg(int regno, int value);
105 * \brief write \p v to daugherboard control setting register
107 bool set_dboard_pins(int which_dboard, int v);
108 bool set_hsadc_conf(int which_dboard, int regno, int value);
109 bool set_lsdac(int which_dboard, int which_dac, int value);
110 bool set_mem32(int addr, int value);
111 bool set_lo_freq(double freq);
112 bool set_cal_freq(double freq);
113 bool set_beamforming(std::vector<gr_complex> gains);
114 bool set_cal_enb(bool enb);
119 #endif /* INCLUDED_VRT_QUADRADIO_SOURCE_32FC_H */