diff options
author | Mark Meserve <mark.meserve@ni.com> | 2017-08-09 15:17:44 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:04:00 -0800 |
commit | 309a2f04e3da6667bc44c78121064b2d03e24e75 (patch) | |
tree | 08b453917053ac0a445ee261c694a706d9f5e180 /host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp | |
parent | 8ee3da3ef9b812eda2ac3269927191e09916dc3c (diff) | |
download | uhd-309a2f04e3da6667bc44c78121064b2d03e24e75.tar.gz uhd-309a2f04e3da6667bc44c78121064b2d03e24e75.tar.bz2 uhd-309a2f04e3da6667bc44c78121064b2d03e24e75.zip |
mg: General fixes
- Make DB probe-able
- Add RPC client
Diffstat (limited to 'host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp')
-rw-r--r-- | host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp index ea8282532..0bb1b26b8 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp @@ -19,6 +19,7 @@ #define INCLUDED_LIBUHD_RFNOC_MAGNESIUM_RADIO_CTRL_IMPL_HPP #include "radio_ctrl_impl.hpp" +#include "rpc_block_ctrl.hpp" #include <uhd/usrp/dboard_manager.hpp> #include <uhd/usrp/gpio_defs.hpp> @@ -27,7 +28,7 @@ namespace uhd { /*! \brief Provide access to an Magnesium radio. */ -class magnesium_radio_ctrl_impl : public radio_ctrl_impl +class magnesium_radio_ctrl_impl : public radio_ctrl_impl, public rpc_block_ctrl { public: typedef boost::shared_ptr<magnesium_radio_ctrl_impl> sptr; @@ -49,9 +50,6 @@ public: double set_tx_frequency(const double freq, const size_t chan); double set_rx_frequency(const double freq, const size_t chan); double set_rx_bandwidth(const double bandwidth, const size_t chan); - double get_tx_frequency(const size_t chan); - double get_rx_frequency(const size_t chan); - double get_rx_bandwidth(const size_t chan); double set_tx_gain(const double gain, const size_t chan); double set_rx_gain(const double gain, const size_t chan); @@ -61,7 +59,22 @@ public: double get_output_samp_rate(size_t port); + void set_rpc_client( + uhd::rpc_client::sptr rpcc, + const uhd::device_addr_t &block_args + ); +private: + double _set_freq(const double freq, const size_t chan, const direction_t dir); + double _set_gain(const double gain, const size_t chan, const direction_t dir); + + std::string _radio_slot; + std::string _slot_prefix; + //! Additional block args; gets set during set_rpc_client() + uhd::device_addr_t _block_args; + + //! Reference to the RPC client + uhd::rpc_client::sptr _rpcc; }; /* class radio_ctrl_impl */ |