diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-10-20 17:41:17 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:04:03 -0800 |
commit | 54ec9dd8e90ed09a5e12bb9f2176942ac9e9238c (patch) | |
tree | 98ac95427b44f852494227e93360a13fa53ee5f3 /host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp | |
parent | a5452a42fe35f67e477279df13085fc609cbf6f1 (diff) | |
download | uhd-54ec9dd8e90ed09a5e12bb9f2176942ac9e9238c.tar.gz uhd-54ec9dd8e90ed09a5e12bb9f2176942ac9e9238c.tar.bz2 uhd-54ec9dd8e90ed09a5e12bb9f2176942ac9e9238c.zip |
mg: Refactored control class
- Reordered methods
- Renamed AD9371-specfic functions with _myk prefix
- Renamed _slot_prefix to _rpc_prefix
- Moved to 4-radio model (one RFNoC block per channel)
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 | 71 |
1 files changed, 60 insertions, 11 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 9535be824..1a5caaeff 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp @@ -75,20 +75,69 @@ public: ); private: - std::string _radio_slot; - std::string _slot_prefix; + /************************************************************************** + * Helpers + *************************************************************************/ + //! Return the path to the dboards property subtree + fs_path _get_fe_path(const size_t chan, const direction_t dir); + + //! Initialize all the peripherals connected to this block + void _init_peripherals(); + + //! Set state of this class to sensible defaults + void _init_defaults(); + + /************************************************************************** + * AD9371 Controls + *************************************************************************/ + double _myk_set_frequency( + const double freq, + const size_t chan, + const direction_t dir + ); + + double _myk_set_gain( + const double gain, + const size_t chan, + const direction_t dir + ); + void _myk_set_antenna( + const std::string &ant, + const size_t chan, + const direction_t dir + ); + + double _myk_set_bandwidth( + const double bandwidth, + const size_t chan, + const direction_t dir + ); - fs_path _get_fe_path(size_t chan, direction_t dir); + double _myk_get_frequency( + const size_t chan, + const direction_t dir + ); - double _set_frequency(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); - void _set_antenna(const std::string &ant, const size_t chan, const direction_t dir); - double _set_bandwidth(const double bandwidth, const size_t chan, const direction_t dir); + double _myk_get_gain( + const size_t chan, + const direction_t dir + ); + + std::string _myk_get_antenna( + const size_t chan, + const direction_t dir + ); + + double _myk_get_bandwidth( + const size_t chan, + const direction_t dir + ); + + //! Letter representation of the radio we're currently running + std::string _radio_slot; - double _get_frequency(const size_t chan, const direction_t dir); - double _get_gain(const size_t chan, const direction_t dir); - std::string _get_antenna(const size_t chan, const direction_t dir); - double _get_bandwidth(const size_t chan, const direction_t dir); + //! Stores the prefix to RPC calls + std::string _rpc_prefix; //! Additional block args; gets set during set_rpc_client() uhd::device_addr_t _block_args; |