diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-07-02 16:22:57 +0200 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-07-16 15:17:26 -0500 |
commit | e4291f1ddcf9f23e4449201fc2677c0379b13ca6 (patch) | |
tree | 65d4fab6351e70cd0a201f64b79159e977120412 /host/include | |
parent | 35038421e1b3edd577037cd1dddc4e77df76a3ab (diff) | |
download | uhd-e4291f1ddcf9f23e4449201fc2677c0379b13ca6.tar.gz uhd-e4291f1ddcf9f23e4449201fc2677c0379b13ca6.tar.bz2 uhd-e4291f1ddcf9f23e4449201fc2677c0379b13ca6.zip |
multi_usrp: Add get_radio_control() API call
This is an advanced API call that allows direct underlying
access to the radio_control object for RFNoC devices.
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/usrp/multi_usrp.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp index 78b2e58df..1e2993bf4 100644 --- a/host/include/uhd/usrp/multi_usrp.hpp +++ b/host/include/uhd/usrp/multi_usrp.hpp @@ -36,6 +36,7 @@ #include <uhd/usrp/dboard_iface.hpp> #include <uhd/usrp/subdev_spec.hpp> #include <uhd/utils/noncopyable.hpp> +#include <uhd/rfnoc/radio_control.hpp> #include <complex> #include <memory> #include <string> @@ -587,6 +588,25 @@ public: */ virtual uhd::wb_iface::sptr get_user_settings_iface(const size_t chan = 0) = 0; + /*! Get direct access to the underlying RFNoC radio object. + * + * Note: This is an advanced API, created for corner cases where the + * application is using multi_usrp, but some special features from + * radio_control need to be used that are not exposed by multi_usrp. Note + * that it is possible to put the radio and multi_usrp into a broken state + * by directly accessing the radio. For typical radio operations (such as + * tuning, setting gain or antenna, etc.) it is therefore highly recommended + * to not use this API call, but use the native multi_usrp API calls. + * + * The lifetime of the radio is linked to the lifetime of the device object, + * so storing a reference from this function is not allowed. + * + * \param chan The channel index + * \returns A reference to the radio block matching the given channel + * \throws uhd::not_implemented_error if not on an RFNoC device. + */ + virtual uhd::rfnoc::radio_control& get_radio_control(const size_t chan = 0) = 0; + /******************************************************************* * RX methods ******************************************************************/ |