diff options
author | Niki <niki@aveer.io> | 2020-07-13 21:37:02 -0400 |
---|---|---|
committer | Martin Braun <martin@gnuradio.org> | 2021-01-24 10:57:00 -0800 |
commit | f17a453de62681141641f1da414bdbed56a2e5a9 (patch) | |
tree | 24265e90ac1801b074f2bc73658773534038e3be /gr-uhd/lib/usrp_source_impl.h | |
parent | c40e82ae17a9dfefc95b15ab22eaf8dbf1a45d29 (diff) |
uhd: Control of frequency and gain in both directions at the same moment
It implements the ability to control frequency and gain in both
directions (Tx and Rx) with use of a single UHD source or sink - in the
same moment. It is possible to do that in separate moments with current
UHD blocks but this way it is not possible to change both Rx and Tx
settings for the same burst. Now, a single message can do that.
Note that there is a bit of an oddity here: The GNU Radio USRP blocks
are either Rx or Tx (source or sink). However, they all encapsulate an
underlying multi_usrp object. That means that under the hood, a USRP
source or a USRP sink potentially has access to the "other" direction.
This is made use in this patch.
To use this feature, add a direction key to the message dictionary going
to the block.
Signed-off-by: Martin Braun <martin@gnuradio.org>
Diffstat (limited to 'gr-uhd/lib/usrp_source_impl.h')
-rw-r--r-- | gr-uhd/lib/usrp_source_impl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gr-uhd/lib/usrp_source_impl.h b/gr-uhd/lib/usrp_source_impl.h index 3067fec819..8a03134ec3 100644 --- a/gr-uhd/lib/usrp_source_impl.h +++ b/gr-uhd/lib/usrp_source_impl.h @@ -72,7 +72,8 @@ public: void set_samp_rate(double rate) override; ::uhd::tune_result_t set_center_freq(const ::uhd::tune_request_t tune_request, size_t chan) override; - void set_gain(double gain, size_t chan) override; + void + set_gain(double gain, size_t chan = 0, pmt::pmt_t direction = pmt::PMT_NIL) override; void set_gain(double gain, const std::string& name, size_t chan) override; void set_rx_agc(const bool enable, size_t chan) override; void set_normalized_gain(double gain, size_t chan) override; |