/* -*- c++ -*- */ /* * Copyright 2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef INCLUDED_VRT_QUADRADIO_SOURCE_32FC_H #define INCLUDED_VRT_QUADRADIO_SOURCE_32FC_H #include namespace vrt { class quadradio; }; class vrt_quadradio_source_32fc; typedef boost::shared_ptr vrt_quadradio_source_32fc_sptr; vrt_quadradio_source_32fc_sptr vrt_make_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize = 0, size_t samples_per_pkt = 0); class vrt_quadradio_source_32fc : public vrt_source_32fc { size_t d_samples_per_pkt; boost::shared_ptr d_qr; vrt_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize, size_t samples_per_pkt); friend vrt_quadradio_source_32fc_sptr vrt_make_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize, size_t samples_per_pkt); public: virtual ~vrt_quadradio_source_32fc(); virtual vrt::rx::sptr vrt_rx() const; /*! * \brief Called by scheduler when starting flowgraph */ virtual bool start(); /*! * \brief Called by scheduler when stopping flowgraph */ virtual bool stop(); /*! * \brief Set the LO frequency (actually just sets the band select for now). */ bool set_center_freq(double target_freq); /*! * \brief Set the band select dboard bits. * \param band "A", "B", "C", "D" */ bool set_band_select(const std::string &band); /*! * \brief Turn the 10 dB attenuation on/off. */ //void set_10dB_atten(bool on); /*! * \brief Set the antenna type to the main rf or calibrator. * \param ant "rf" or "cal" */ bool select_rx_antenna(const std::string &ant); /*! * \brief Set the attenuation. * \param attenuation 0 to 31 in dB */ bool set_attenuation0(int attenuation); bool set_attenuation1(int attenuation); void set_iq_imbal_taps(const std::vector taps); void set_adc_gain(bool on); void set_dc_offset_comp(bool on); void set_digital_gain(float gain); void set_test_signal(int type); bool set_setting_reg(int regno, int value); /*! * \brief write \p v to daugherboard control setting register */ bool set_dboard_pins(int which_dboard, int v); bool set_hsadc_conf(int which_dboard, int regno, int value); bool set_lsdac(int which_dboard, int which_dac, int value); bool set_mem32(int addr, int value); bool set_lo_freq(double freq); bool set_cal_freq(double freq); bool set_beamforming(std::vector gains); }; #endif /* INCLUDED_VRT_QUADRADIO_SOURCE_32FC_H */