diff options
| -rw-r--r-- | host/include/uhd/rfnoc/radio_ctrl.hpp | 17 | ||||
| -rw-r--r-- | host/lib/rfnoc/radio_ctrl_impl.cpp | 12 | ||||
| -rw-r--r-- | host/lib/rfnoc/radio_ctrl_impl.hpp | 3 | 
3 files changed, 32 insertions, 0 deletions
diff --git a/host/include/uhd/rfnoc/radio_ctrl.hpp b/host/include/uhd/rfnoc/radio_ctrl.hpp index 8d24f9868..3a887bf02 100644 --- a/host/include/uhd/rfnoc/radio_ctrl.hpp +++ b/host/include/uhd/rfnoc/radio_ctrl.hpp @@ -154,6 +154,23 @@ public:       *       * \return The actual bandwidth value       */ +    virtual double get_tx_bandwidth(const size_t chan) = 0; + +    /*! Set the analog filter bandwidth channel \p chan +     * +     * This function will attempt to set the analog bandwidth. +     * +     * \return The actual bandwidth value +     */ +    virtual double set_tx_bandwidth( +        const double bandwidth, +        const size_t chan +    ) = 0; + +    /*! Return the analog filter bandwidth channel \p chan +     * +     * \return The actual bandwidth value +     */      virtual double get_rx_bandwidth(const size_t chan) = 0;      /*! Set the analog filter bandwidth channel \p chan diff --git a/host/lib/rfnoc/radio_ctrl_impl.cpp b/host/lib/rfnoc/radio_ctrl_impl.cpp index 8d77ff36b..827443ffd 100644 --- a/host/lib/rfnoc/radio_ctrl_impl.cpp +++ b/host/lib/rfnoc/radio_ctrl_impl.cpp @@ -184,6 +184,13 @@ double radio_ctrl_impl::set_rx_gain(const double gain, const size_t chan)      return _rx_gain[chan] = gain;  } +double radio_ctrl_impl::set_tx_bandwidth( +        const double bandwidth, +        const size_t chan +) { +    return _tx_bandwidth[chan] = bandwidth; +} +  double radio_ctrl_impl::set_rx_bandwidth(const double bandwidth, const size_t chan)  {      return _rx_bandwidth[chan] = bandwidth; @@ -229,6 +236,11 @@ double radio_ctrl_impl::get_rx_gain(const size_t chan) /* const */      return _rx_gain[chan];  } +double radio_ctrl_impl::get_tx_bandwidth(const size_t chan) /* const */ +{ +    return _tx_bandwidth[chan]; +} +  double radio_ctrl_impl::get_rx_bandwidth(const size_t chan) /* const */  {      return _rx_bandwidth[chan]; diff --git a/host/lib/rfnoc/radio_ctrl_impl.hpp b/host/lib/rfnoc/radio_ctrl_impl.hpp index 9d6f43008..85ae860d4 100644 --- a/host/lib/rfnoc/radio_ctrl_impl.hpp +++ b/host/lib/rfnoc/radio_ctrl_impl.hpp @@ -49,6 +49,7 @@ public:      virtual double set_rx_frequency(const double freq, const size_t chan);      virtual double set_tx_gain(const double gain, const size_t chan);      virtual double set_rx_gain(const double gain, const size_t chan); +    virtual double set_tx_bandwidth(const double bandwidth, const size_t chan);      virtual double set_rx_bandwidth(const double bandwidth, const size_t chan);      virtual double get_rate() const; @@ -58,6 +59,7 @@ public:      virtual double get_rx_frequency(const size_t) /* const */;      virtual double get_tx_gain(const size_t) /* const */;      virtual double get_rx_gain(const size_t) /* const */; +    virtual double get_tx_bandwidth(const size_t) /* const */;      virtual double get_rx_bandwidth(const size_t) /* const */;      virtual std::vector<std::string> get_rx_lo_names(const size_t chan); @@ -231,6 +233,7 @@ private:      std::map<size_t, double> _rx_freq;      std::map<size_t, double> _tx_gain;      std::map<size_t, double> _rx_gain; +    std::map<size_t, double> _tx_bandwidth;      std::map<size_t, double> _rx_bandwidth;      std::vector<bool> _continuous_streaming;  | 
