aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-01-08 09:33:36 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2021-03-04 08:07:26 -0600
commit107a49c0c236940da7d3bd0f57da4bc1e2a34cb4 (patch)
treefdeaad56030a02948377c45838dab97beb7a5c84 /host/lib/usrp
parent7d5e48032baa62cbe7467833b9e057900602f4b9 (diff)
downloaduhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.gz
uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.bz2
uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.zip
host: Update code base using clang-tidy
The checks from the new clang-tidy file are applied to the source tree using: $ find . -name "*.cpp" | sort -u | xargs \ --max-procs 8 --max-args 1 clang-tidy --format-style=file \ --fix -p /path/to/compile_commands.json
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/b100/b100_impl.hpp8
-rw-r--r--host/lib/usrp/b100/dboard_iface.cpp50
-rw-r--r--host/lib/usrp/b100/fifo_ctrl_excelsior.cpp20
-rw-r--r--host/lib/usrp/b100/usb_zero_copy_wrapper.cpp18
-rw-r--r--host/lib/usrp/b200/b200_cores.hpp6
-rw-r--r--host/lib/usrp/b200/b200_iface.cpp29
-rw-r--r--host/lib/usrp/b200/b200_iface.hpp8
-rw-r--r--host/lib/usrp/b200/b200_image_loader.cpp4
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp20
-rw-r--r--host/lib/usrp/b200/b200_impl.hpp8
-rw-r--r--host/lib/usrp/b200/b200_io_impl.cpp5
-rw-r--r--host/lib/usrp/b200/b200_uart.cpp6
-rw-r--r--host/lib/usrp/common/ad9361_ctrl.cpp42
-rw-r--r--host/lib/usrp/common/ad936x_manager.cpp13
-rw-r--r--host/lib/usrp/common/fx2_ctrl.cpp30
-rw-r--r--host/lib/usrp/common/io_service_mgr.cpp5
-rw-r--r--host/lib/usrp/common/pwr_cal_mgr.cpp24
-rw-r--r--host/lib/usrp/common/recv_packet_demuxer.cpp5
-rw-r--r--host/lib/usrp/common/validate_subdev_spec.cpp2
-rw-r--r--host/lib/usrp/cores/dma_fifo_core_3000.cpp14
-rw-r--r--host/lib/usrp/cores/gpio_atr_3000.cpp42
-rw-r--r--host/lib/usrp/cores/gpio_core_200.cpp31
-rw-r--r--host/lib/usrp/cores/i2c_core_100_wb32.cpp10
-rw-r--r--host/lib/usrp/cores/i2c_core_200.cpp6
-rw-r--r--host/lib/usrp/cores/radio_ctrl_core_3000.cpp20
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_200.cpp28
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_3000.cpp24
-rw-r--r--host/lib/usrp/cores/rx_frontend_core_200.cpp10
-rw-r--r--host/lib/usrp/cores/rx_frontend_core_3000.cpp14
-rw-r--r--host/lib/usrp/cores/rx_vita_core_3000.cpp20
-rw-r--r--host/lib/usrp/cores/spi_core_3000.cpp4
-rw-r--r--host/lib/usrp/cores/time64_core_200.cpp16
-rw-r--r--host/lib/usrp/cores/time_core_3000.cpp16
-rw-r--r--host/lib/usrp/cores/tx_dsp_core_200.cpp20
-rw-r--r--host/lib/usrp/cores/tx_dsp_core_3000.cpp20
-rw-r--r--host/lib/usrp/cores/tx_frontend_core_200.cpp8
-rw-r--r--host/lib/usrp/cores/tx_vita_core_3000.cpp9
-rw-r--r--host/lib/usrp/cores/user_settings_core_200.cpp2
-rw-r--r--host/lib/usrp/cores/user_settings_core_3000.cpp8
-rw-r--r--host/lib/usrp/dboard/db_basic_and_lf.cpp4
-rw-r--r--host/lib/usrp/dboard/db_sbx_common.hpp14
-rw-r--r--host/lib/usrp/dboard/db_twinrx.cpp6
-rw-r--r--host/lib/usrp/dboard/db_wbx_common.hpp26
-rw-r--r--host/lib/usrp/dboard/e3xx/e31x_radio_control_impl.hpp20
-rw-r--r--host/lib/usrp/dboard/e3xx/e320_radio_control_impl.hpp20
-rw-r--r--host/lib/usrp/dboard/e3xx/e3xx_ad9361_iface.cpp36
-rw-r--r--host/lib/usrp/dboard/e3xx/e3xx_radio_control_impl.hpp102
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp106
-rw-r--r--host/lib/usrp/dboard/rhodium/rhodium_radio_control.hpp103
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_experts.hpp20
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_io.hpp4
-rw-r--r--host/lib/usrp/dboard_manager.cpp8
-rw-r--r--host/lib/usrp/gps_ctrl.cpp10
-rw-r--r--host/lib/usrp/mpmd/mpmd_find.cpp2
-rw-r--r--host/lib/usrp/mpmd/mpmd_impl.hpp4
-rw-r--r--host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp12
-rw-r--r--host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.hpp10
-rw-r--r--host/lib/usrp/mpmd/mpmd_link_if_mgr.cpp10
-rw-r--r--host/lib/usrp/mpmd/mpmd_mb_iface.hpp26
-rw-r--r--host/lib/usrp/mpmd/mpmd_mboard_impl.cpp2
-rw-r--r--host/lib/usrp/mpmd/sim_find.cpp2
-rw-r--r--host/lib/usrp/multi_usrp.cpp319
-rw-r--r--host/lib/usrp/multi_usrp_rfnoc.cpp332
-rw-r--r--host/lib/usrp/subdev_spec.cpp2
-rw-r--r--host/lib/usrp/usrp1/dboard_iface.cpp50
-rw-r--r--host/lib/usrp/usrp1/io_impl.cpp18
-rw-r--r--host/lib/usrp/usrp1/soft_time_ctrl.cpp16
-rw-r--r--host/lib/usrp/usrp1/usrp1_iface.cpp16
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp4
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.hpp8
-rw-r--r--host/lib/usrp/usrp2/n200_image_loader.cpp20
-rw-r--r--host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp18
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp36
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.hpp8
-rw-r--r--host/lib/usrp/x300/x300_dac_ctrl.cpp8
-rw-r--r--host/lib/usrp/x300/x300_dboard_iface.hpp71
-rw-r--r--host/lib/usrp/x300/x300_device_args.hpp4
-rw-r--r--host/lib/usrp/x300/x300_eth_mgr.cpp2
-rw-r--r--host/lib/usrp/x300/x300_eth_mgr.hpp8
-rw-r--r--host/lib/usrp/x300/x300_fw_ctrl.cpp20
-rw-r--r--host/lib/usrp/x300/x300_fw_uart.cpp4
-rw-r--r--host/lib/usrp/x300/x300_image_loader.cpp12
-rw-r--r--host/lib/usrp/x300/x300_impl.hpp30
-rw-r--r--host/lib/usrp/x300/x300_mb_controller.hpp57
-rw-r--r--host/lib/usrp/x300/x300_mb_eeprom_iface.cpp10
-rw-r--r--host/lib/usrp/x300/x300_mb_eeprom_iface.hpp2
-rw-r--r--host/lib/usrp/x300/x300_pcie_mgr.hpp8
87 files changed, 1165 insertions, 1090 deletions
diff --git a/host/lib/usrp/b100/b100_impl.hpp b/host/lib/usrp/b100/b100_impl.hpp
index 0b46c4815..326b74103 100644
--- a/host/lib/usrp/b100/b100_impl.hpp
+++ b/host/lib/usrp/b100/b100_impl.hpp
@@ -84,12 +84,12 @@ class b100_impl : public uhd::device
public:
// structors
b100_impl(const uhd::device_addr_t&);
- ~b100_impl(void);
+ ~b100_impl(void) override;
// the io interface
- uhd::rx_streamer::sptr get_rx_stream(const uhd::stream_args_t& args);
- uhd::tx_streamer::sptr get_tx_stream(const uhd::stream_args_t& args);
- bool recv_async_msg(uhd::async_metadata_t&, double);
+ uhd::rx_streamer::sptr get_rx_stream(const uhd::stream_args_t& args) override;
+ uhd::tx_streamer::sptr get_tx_stream(const uhd::stream_args_t& args) override;
+ bool recv_async_msg(uhd::async_metadata_t&, double) override;
static uhd::usrp::mboard_eeprom_t get_mb_eeprom(uhd::i2c_iface::sptr);
diff --git a/host/lib/usrp/b100/dboard_iface.cpp b/host/lib/usrp/b100/dboard_iface.cpp
index 627e7a876..f457b2095 100644
--- a/host/lib/usrp/b100/dboard_iface.cpp
+++ b/host/lib/usrp/b100/dboard_iface.cpp
@@ -40,12 +40,12 @@ public:
this->set_clock_rate(UNIT_TX, _clock->get_fpga_clock_rate());
}
- ~b100_dboard_iface(void)
+ ~b100_dboard_iface(void) override
{
/* NOP */
}
- special_props_t get_special_props(void)
+ special_props_t get_special_props(void) override
{
special_props_t props;
props.soft_clock_divider = false;
@@ -53,39 +53,39 @@ public:
return props;
}
- void write_aux_dac(unit_t, aux_dac_t, double);
- double read_aux_adc(unit_t, aux_adc_t);
+ void write_aux_dac(unit_t, aux_dac_t, double) override;
+ double read_aux_adc(unit_t, aux_adc_t) override;
- void set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_pin_ctrl(unit_t unit);
+ void set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_pin_ctrl(unit_t unit) override;
void set_atr_reg(
- unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
- void set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_gpio_ddr(unit_t unit);
- void set_gpio_out(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_gpio_out(unit_t unit);
- uint32_t read_gpio(unit_t unit);
+ unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_atr_reg(unit_t unit, atr_reg_t reg) override;
+ void set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_gpio_ddr(unit_t unit) override;
+ void set_gpio_out(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_gpio_out(unit_t unit) override;
+ uint32_t read_gpio(unit_t unit) override;
- void set_command_time(const uhd::time_spec_t& t);
- uhd::time_spec_t get_command_time(void);
+ void set_command_time(const uhd::time_spec_t& t) override;
+ uhd::time_spec_t get_command_time(void) override;
- void write_i2c(uint16_t, const byte_vector_t&);
- byte_vector_t read_i2c(uint16_t, size_t);
+ void write_i2c(uint16_t, const byte_vector_t&) override;
+ byte_vector_t read_i2c(uint16_t, size_t) override;
void write_spi(
- unit_t unit, const spi_config_t& config, uint32_t data, size_t num_bits);
+ unit_t unit, const spi_config_t& config, uint32_t data, size_t num_bits) override;
uint32_t read_write_spi(
- unit_t unit, const spi_config_t& config, uint32_t data, size_t num_bits);
+ unit_t unit, const spi_config_t& config, uint32_t data, size_t num_bits) override;
- void set_clock_rate(unit_t, double);
- std::vector<double> get_clock_rates(unit_t);
- double get_clock_rate(unit_t);
- void set_clock_enabled(unit_t, bool);
- double get_codec_rate(unit_t);
+ void set_clock_rate(unit_t, double) override;
+ std::vector<double> get_clock_rates(unit_t) override;
+ double get_clock_rate(unit_t) override;
+ void set_clock_enabled(unit_t, bool) override;
+ double get_codec_rate(unit_t) override;
void set_fe_connection(
- unit_t unit, const std::string&, const fe_connection_t& fe_conn);
+ unit_t unit, const std::string&, const fe_connection_t& fe_conn) override;
private:
timed_wb_iface::sptr _wb_iface;
diff --git a/host/lib/usrp/b100/fifo_ctrl_excelsior.cpp b/host/lib/usrp/b100/fifo_ctrl_excelsior.cpp
index 4a21770b8..2d899a6b8 100644
--- a/host/lib/usrp/b100/fifo_ctrl_excelsior.cpp
+++ b/host/lib/usrp/b100/fifo_ctrl_excelsior.cpp
@@ -58,7 +58,7 @@ public:
this->init_spi();
}
- ~fifo_ctrl_excelsior_impl(void)
+ ~fifo_ctrl_excelsior_impl(void) override
{
_timeout = ACK_TIMEOUT; // reset timeout to something small
UHD_SAFE_CALL(
@@ -66,7 +66,7 @@ public:
)
}
- bool pop_async_msg(async_metadata_t& async_metadata, double timeout)
+ bool pop_async_msg(async_metadata_t& async_metadata, double timeout) override
{
return _async_fifo.pop_with_timed_wait(async_metadata, timeout);
}
@@ -109,7 +109,7 @@ public:
/*******************************************************************
* Peek and poke 32 bit implementation
******************************************************************/
- void poke32(const wb_addr_type addr, const uint32_t data)
+ void poke32(const wb_addr_type addr, const uint32_t data) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -118,7 +118,7 @@ public:
this->wait_for_ack(_seq_out - MAX_SEQS_OUT);
}
- uint32_t peek32(const wb_addr_type addr)
+ uint32_t peek32(const wb_addr_type addr) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -130,12 +130,12 @@ public:
/*******************************************************************
* Peek and poke 16 bit not implemented
******************************************************************/
- void poke16(const wb_addr_type, const uint16_t)
+ void poke16(const wb_addr_type, const uint16_t) override
{
throw uhd::not_implemented_error("poke16 not implemented in fifo ctrl module");
}
- uint16_t peek16(const wb_addr_type)
+ uint16_t peek16(const wb_addr_type) override
{
throw uhd::not_implemented_error("peek16 not implemented in fifo ctrl module");
}
@@ -157,7 +157,7 @@ public:
const spi_config_t& config,
uint32_t data,
size_t num_bits,
- bool readback)
+ bool readback) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -196,7 +196,7 @@ public:
/*******************************************************************
* Update methods for time
******************************************************************/
- void set_time(const uhd::time_spec_t& time)
+ void set_time(const uhd::time_spec_t& time) override
{
std::lock_guard<std::mutex> lock(_mutex);
_time = time;
@@ -205,13 +205,13 @@ public:
_timeout = MASSIVE_TIMEOUT; // permanently sets larger timeout
}
- uhd::time_spec_t get_time(void)
+ uhd::time_spec_t get_time(void) override
{
std::lock_guard<std::mutex> lock(_mutex);
return _time;
}
- void set_tick_rate(const double rate)
+ void set_tick_rate(const double rate) override
{
std::lock_guard<std::mutex> lock(_mutex);
_tick_rate = rate;
diff --git a/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp b/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp
index 908841462..b2348c3a9 100644
--- a/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp
+++ b/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp
@@ -34,7 +34,7 @@ public:
{ /*NOP*/
}
- void release(void)
+ void release(void) override
{
_mrb.reset(); // decrement ref count, other MRB's may hold a ref
_claimer.release();
@@ -90,13 +90,13 @@ public:
_task = uhd::task::make(std::bind(&usb_zero_copy_wrapper_msb::auto_flush, this));
}
- ~usb_zero_copy_wrapper_msb(void)
+ ~usb_zero_copy_wrapper_msb(void) override
{
// ensure the task has exited before anything auto deconstructs
_task.reset();
}
- void release(void)
+ void release(void) override
{
boost::mutex::scoped_lock lock(_mutex);
_ok_to_auto_flush = true;
@@ -185,7 +185,7 @@ public:
std::make_shared<usb_zero_copy_wrapper_msb>(usb_zc, frame_boundary);
}
- managed_recv_buffer::sptr get_recv_buff(double timeout)
+ managed_recv_buffer::sptr get_recv_buff(double timeout) override
{
// lazy flush mechanism - negative timeout
if (timeout < 0.0) {
@@ -208,28 +208,28 @@ public:
_last_recv_buff, _last_recv_offset, timeout, _next_recv_buff_index);
}
- size_t get_num_recv_frames(void) const
+ size_t get_num_recv_frames(void) const override
{
return (_internal_zc->get_num_recv_frames() * _internal_zc->get_recv_frame_size())
/ this->get_recv_frame_size();
}
- size_t get_recv_frame_size(void) const
+ size_t get_recv_frame_size(void) const override
{
return std::min(_frame_boundary, _internal_zc->get_recv_frame_size());
}
- managed_send_buffer::sptr get_send_buff(double timeout)
+ managed_send_buffer::sptr get_send_buff(double timeout) override
{
return _the_only_msb->get_new(timeout);
}
- size_t get_num_send_frames(void) const
+ size_t get_num_send_frames(void) const override
{
return _internal_zc->get_num_send_frames();
}
- size_t get_send_frame_size(void) const
+ size_t get_send_frame_size(void) const override
{
return std::min(_frame_boundary, _internal_zc->get_send_frame_size());
}
diff --git a/host/lib/usrp/b200/b200_cores.hpp b/host/lib/usrp/b200/b200_cores.hpp
index 7054fd068..1042cf422 100644
--- a/host/lib/usrp/b200/b200_cores.hpp
+++ b/host/lib/usrp/b200/b200_cores.hpp
@@ -24,11 +24,11 @@ public:
b200_local_spi_core(uhd::wb_iface::sptr iface, perif_t default_perif);
- virtual uint32_t transact_spi(int which_slave,
+ uint32_t transact_spi(int which_slave,
const uhd::spi_config_t& config,
uint32_t data,
size_t num_bits,
- bool readback);
+ bool readback) override;
void change_perif(perif_t perif);
void restore_perif();
@@ -48,7 +48,7 @@ public:
typedef std::shared_ptr<b200_ref_pll_ctrl> sptr;
b200_ref_pll_ctrl(b200_local_spi_core::sptr spi);
- virtual void set_lock_to_ext_ref(bool external);
+ void set_lock_to_ext_ref(bool external) override;
private:
b200_local_spi_core::sptr _spi;
diff --git a/host/lib/usrp/b200/b200_iface.cpp b/host/lib/usrp/b200/b200_iface.cpp
index 2efc9efb5..aa8b14cc6 100644
--- a/host/lib/usrp/b200/b200_iface.cpp
+++ b/host/lib/usrp/b200/b200_iface.cpp
@@ -161,18 +161,20 @@ public:
timeout); // timeout
}
- void write_i2c(UHD_UNUSED(uint16_t addr), UHD_UNUSED(const byte_vector_t& bytes))
+ void write_i2c(
+ UHD_UNUSED(uint16_t addr), UHD_UNUSED(const byte_vector_t& bytes)) override
{
throw uhd::not_implemented_error("b200 write i2c");
}
- byte_vector_t read_i2c(UHD_UNUSED(uint16_t addr), UHD_UNUSED(size_t num_bytes))
+ byte_vector_t read_i2c(
+ UHD_UNUSED(uint16_t addr), UHD_UNUSED(size_t num_bytes)) override
{
throw uhd::not_implemented_error("b200 read i2c");
}
- void write_eeprom(uint16_t addr, uint16_t offset, const byte_vector_t& bytes)
+ void write_eeprom(uint16_t addr, uint16_t offset, const byte_vector_t& bytes) override
{
int ret = fx3_control_write(B200_VREQ_EEPROM_WRITE,
0,
@@ -191,7 +193,7 @@ public:
.str());
}
- byte_vector_t read_eeprom(uint16_t addr, uint16_t offset, size_t num_bytes)
+ byte_vector_t read_eeprom(uint16_t addr, uint16_t offset, size_t num_bytes) override
{
byte_vector_t recv_bytes(num_bytes);
int bytes_read = fx3_control_read(B200_VREQ_EEPROM_READ,
@@ -213,7 +215,8 @@ public:
return recv_bytes;
}
- void load_firmware(const std::string filestring, UHD_UNUSED(bool force) = false)
+ void load_firmware(
+ const std::string filestring, UHD_UNUSED(bool force) = false) override
{
if (load_img_msg) {
UHD_LOGGER_INFO("B200") << "Loading firmware image: " << filestring << "...";
@@ -244,7 +247,7 @@ public:
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
}
- void reset_fx3(void)
+ void reset_fx3(void) override
{
unsigned char data[4];
memset(data, 0x00, sizeof(data));
@@ -262,7 +265,7 @@ public:
.str());
}
- void reset_gpif(void)
+ void reset_gpif(void) override
{
unsigned char data[4];
memset(data, 0x00, sizeof(data));
@@ -281,7 +284,7 @@ public:
.str());
}
- void set_fpga_reset_pin(const bool reset)
+ void set_fpga_reset_pin(const bool reset) override
{
unsigned char data[4];
memset(data, (reset) ? 0xFF : 0x00, sizeof(data));
@@ -301,7 +304,7 @@ public:
*/
}
- uint8_t get_usb_speed(void)
+ uint8_t get_usb_speed(void) override
{
unsigned char rx_data[1];
memset(rx_data, 0x00, sizeof(rx_data));
@@ -321,7 +324,7 @@ public:
return boost::lexical_cast<uint8_t>(rx_data[0]);
}
- uint8_t get_fx3_status(void)
+ uint8_t get_fx3_status(void) override
{
unsigned char rx_data[1];
memset(rx_data, 0x00, sizeof(rx_data));
@@ -343,7 +346,7 @@ public:
return boost::lexical_cast<uint8_t>(rx_data[0]);
}
- uint16_t get_compat_num(void)
+ uint16_t get_compat_num(void) override
{
unsigned char rx_data[2];
memset(rx_data, 0x00, sizeof(rx_data));
@@ -482,7 +485,7 @@ public:
return static_cast<size_t>(filesize);
}
- uint32_t load_fpga(const std::string filestring, bool force)
+ uint32_t load_fpga(const std::string filestring, bool force) override
{
uint8_t fx3_state = 0;
uint32_t wait_count;
@@ -660,7 +663,7 @@ public:
return 0;
}
- uint32_t load_bootloader(const std::string filestring)
+ uint32_t load_bootloader(const std::string filestring) override
{
// open bootloader file
const char* filename = filestring.c_str();
diff --git a/host/lib/usrp/b200/b200_iface.hpp b/host/lib/usrp/b200/b200_iface.hpp
index 7d7e169d4..5450fb7b6 100644
--- a/host/lib/usrp/b200/b200_iface.hpp
+++ b/host/lib/usrp/b200/b200_iface.hpp
@@ -94,11 +94,11 @@ public:
//! load a bootloader image onto device EEPROM
virtual uint32_t load_bootloader(const std::string filestring) = 0;
- virtual void write_eeprom(
- uint16_t addr, uint16_t offset, const uhd::byte_vector_t& bytes) = 0;
+ void write_eeprom(
+ uint16_t addr, uint16_t offset, const uhd::byte_vector_t& bytes) override = 0;
- virtual uhd::byte_vector_t read_eeprom(
- uint16_t addr, uint16_t offset, size_t num_bytes) = 0;
+ uhd::byte_vector_t read_eeprom(
+ uint16_t addr, uint16_t offset, size_t num_bytes) override = 0;
static std::string fx3_state_string(uint8_t state);
};
diff --git a/host/lib/usrp/b200/b200_image_loader.cpp b/host/lib/usrp/b200/b200_image_loader.cpp
index 25bf7ce2f..675819018 100644
--- a/host/lib/usrp/b200/b200_image_loader.cpp
+++ b/host/lib/usrp/b200/b200_image_loader.cpp
@@ -34,7 +34,7 @@ static b200_iface::sptr get_b200_iface(
b200_iface::sptr iface;
mboard_eeprom_t eeprom; // Internal use
- if (dev_handles.size() > 0) {
+ if (!dev_handles.empty()) {
for (usb_device_handle::sptr dev_handle : dev_handles) {
if (dev_handle->firmware_loaded()) {
iface = b200_iface::make(usb_control::make(dev_handle, 0));
@@ -104,7 +104,7 @@ static bool b200_image_loader(const image_loader::image_loader_args_t& image_loa
return false; // No initialized B2x0 found
std::string fpga_path;
- if (image_loader_args.fpga_path == "") {
+ if (image_loader_args.fpga_path.empty()) {
/*
* Normally, we can auto-generate the FPGA filename from what's in the EEPROM,
* but if the applicable value is not in the EEPROM, the user must give a specific
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 7f250fd42..e43eff045 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -42,8 +42,8 @@ constexpr int64_t REENUMERATION_TIMEOUT_MS = 3000;
class b200_ad9361_client_t : public ad9361_params
{
public:
- ~b200_ad9361_client_t() {}
- double get_band_edge(frequency_band_t band)
+ ~b200_ad9361_client_t() override {}
+ double get_band_edge(frequency_band_t band) override
{
switch (band) {
case AD9361_RX_BAND0:
@@ -56,15 +56,15 @@ public:
return 0;
}
}
- clocking_mode_t get_clocking_mode()
+ clocking_mode_t get_clocking_mode() override
{
return clocking_mode_t::AD9361_XTAL_N_CLK_PATH;
}
- digital_interface_mode_t get_digital_interface_mode()
+ digital_interface_mode_t get_digital_interface_mode() override
{
return AD9361_DDR_FDD_LVCMOS;
}
- digital_interface_delays_t get_digital_interface_timing()
+ digital_interface_delays_t get_digital_interface_timing() override
{
digital_interface_delays_t delays;
delays.rx_clk_delay = 0;
@@ -79,8 +79,8 @@ public:
class b2xxmini_ad9361_client_t : public ad9361_params
{
public:
- ~b2xxmini_ad9361_client_t() {}
- double get_band_edge(frequency_band_t band)
+ ~b2xxmini_ad9361_client_t() override {}
+ double get_band_edge(frequency_band_t band) override
{
switch (band) {
case AD9361_RX_BAND0:
@@ -93,15 +93,15 @@ public:
return 0; // On both Rx and Tx
}
}
- clocking_mode_t get_clocking_mode()
+ clocking_mode_t get_clocking_mode() override
{
return clocking_mode_t::AD9361_XTAL_N_CLK_PATH;
}
- digital_interface_mode_t get_digital_interface_mode()
+ digital_interface_mode_t get_digital_interface_mode() override
{
return AD9361_DDR_FDD_LVCMOS;
}
- digital_interface_delays_t get_digital_interface_timing()
+ digital_interface_delays_t get_digital_interface_timing() override
{
digital_interface_delays_t delays;
delays.rx_clk_delay = 0;
diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp
index cb2edea80..44205f03a 100644
--- a/host/lib/usrp/b200/b200_impl.hpp
+++ b/host/lib/usrp/b200/b200_impl.hpp
@@ -115,12 +115,12 @@ class b200_impl : public uhd::device
public:
// structors
b200_impl(const uhd::device_addr_t&, uhd::transport::usb_device_handle::sptr& handle);
- ~b200_impl(void);
+ ~b200_impl(void) override;
// the io interface
- uhd::rx_streamer::sptr get_rx_stream(const uhd::stream_args_t& args);
- uhd::tx_streamer::sptr get_tx_stream(const uhd::stream_args_t& args);
- bool recv_async_msg(uhd::async_metadata_t&, double);
+ uhd::rx_streamer::sptr get_rx_stream(const uhd::stream_args_t& args) override;
+ uhd::tx_streamer::sptr get_tx_stream(const uhd::stream_args_t& args) override;
+ bool recv_async_msg(uhd::async_metadata_t&, double) override;
//! Check that the combination of stream args and tick rate are valid.
//
diff --git a/host/lib/usrp/b200/b200_io_impl.cpp b/host/lib/usrp/b200/b200_io_impl.cpp
index 57a1b18c7..ac87a0e34 100644
--- a/host/lib/usrp/b200/b200_io_impl.cpp
+++ b/host/lib/usrp/b200/b200_io_impl.cpp
@@ -255,7 +255,8 @@ uhd::usrp::subdev_spec_t b200_impl::coerce_subdev_spec(
//
// Any other spec is probably illegal and will be caught by
// validate_subdev_spec().
- if (spec.size() and (_product == B200 or _product == B200MINI or _product == B205MINI)
+ if (!spec.empty()
+ and (_product == B200 or _product == B200MINI or _product == B205MINI)
and spec[0].sd_name == "B") {
spec[0].sd_name = "A";
}
@@ -266,7 +267,7 @@ void b200_impl::update_subdev_spec(
const std::string& tx_rx, const uhd::usrp::subdev_spec_t& spec)
{
// sanity checking
- if (spec.size()) {
+ if (!spec.empty()) {
validate_subdev_spec(_tree, spec, tx_rx);
}
diff --git a/host/lib/usrp/b200/b200_uart.cpp b/host/lib/usrp/b200/b200_uart.cpp
index b78690705..089c6c9b3 100644
--- a/host/lib/usrp/b200/b200_uart.cpp
+++ b/host/lib/usrp/b200/b200_uart.cpp
@@ -57,21 +57,21 @@ struct b200_uart_impl : b200_uart
buff->commit(packet_info.num_packet_words32 * sizeof(uint32_t));
}
- void write_uart(const std::string& buff)
+ void write_uart(const std::string& buff) override
{
for (const char ch : buff) {
this->send_char(ch);
}
}
- std::string read_uart(double timeout)
+ std::string read_uart(double timeout) override
{
std::string line;
_line_queue.pop_with_timed_wait(line, timeout);
return line;
}
- void handle_uart_packet(managed_recv_buffer::sptr buff)
+ void handle_uart_packet(managed_recv_buffer::sptr buff) override
{
const uint32_t* packet_buff = buff->cast<const uint32_t*>();
vrt::if_packet_info_t packet_info;
diff --git a/host/lib/usrp/common/ad9361_ctrl.cpp b/host/lib/usrp/common/ad9361_ctrl.cpp
index a584ef0f7..55abd025c 100644
--- a/host/lib/usrp/common/ad9361_ctrl.cpp
+++ b/host/lib/usrp/common/ad9361_ctrl.cpp
@@ -28,9 +28,9 @@ public:
{
}
- virtual ~ad9361_io_spi() {}
+ ~ad9361_io_spi() override {}
- virtual uint8_t peek8(uint32_t reg)
+ uint8_t peek8(uint32_t reg) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -51,7 +51,7 @@ public:
return static_cast<uint8_t>(val);
}
- virtual void poke8(uint32_t reg, uint8_t val)
+ void poke8(uint32_t reg, uint8_t val) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -93,7 +93,7 @@ public:
{
_device.initialize();
}
- double set_gain(const std::string& which, const double value)
+ double set_gain(const std::string& which, const double value) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -103,7 +103,7 @@ public:
return return_val;
}
- void set_agc(const std::string& which, bool enable)
+ void set_agc(const std::string& which, bool enable) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -111,7 +111,7 @@ public:
_device.set_agc(chain, enable);
}
- void set_agc_mode(const std::string& which, const std::string& mode)
+ void set_agc_mode(const std::string& which, const std::string& mode) override
{
std::lock_guard<std::mutex> lock(_mutex);
ad9361_device_t::chain_t chain = _get_chain_from_antenna(which);
@@ -125,7 +125,7 @@ public:
}
//! set a new clock rate, return the exact value
- double set_clock_rate(const double rate)
+ double set_clock_rate(const double rate) override
{
std::lock_guard<std::mutex> lock(_mutex);
// clip to known bounds
@@ -144,14 +144,14 @@ public:
}
//! set which RX and TX chains/antennas are active
- void set_active_chains(bool tx1, bool tx2, bool rx1, bool rx2)
+ void set_active_chains(bool tx1, bool tx2, bool rx1, bool rx2) override
{
std::lock_guard<std::mutex> lock(_mutex);
_device.set_active_chains(tx1, tx2, rx1, rx2);
}
//! set which timing mode to use - 1R1T, 2R2T
- void set_timing_mode(const std::string& timing_mode)
+ void set_timing_mode(const std::string& timing_mode) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -164,7 +164,7 @@ public:
}
//! tune the given frontend, return the exact value
- double tune(const std::string& which, const double freq)
+ double tune(const std::string& which, const double freq) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -179,7 +179,7 @@ public:
}
//! get the current frequency for the given frontend
- double get_freq(const std::string& which)
+ double get_freq(const std::string& which) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -188,7 +188,7 @@ public:
}
//! turn on/off data port loopback
- void data_port_loopback(const bool on)
+ void data_port_loopback(const bool on) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -196,7 +196,7 @@ public:
}
//! read internal RSSI sensor
- sensor_value_t get_rssi(const std::string& which)
+ sensor_value_t get_rssi(const std::string& which) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -205,12 +205,12 @@ public:
}
//! read the internal temp sensor. Average over 3 results
- sensor_value_t get_temperature()
+ sensor_value_t get_temperature() override
{
return sensor_value_t("temp", _device.get_average_temperature(), "C");
}
- void set_dc_offset_auto(const std::string& which, const bool on)
+ void set_dc_offset_auto(const std::string& which, const bool on) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -218,7 +218,7 @@ public:
_device.set_dc_offset_auto(direction, on);
}
- void set_iq_balance_auto(const std::string& which, const bool on)
+ void set_iq_balance_auto(const std::string& which, const bool on) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -226,7 +226,7 @@ public:
_device.set_iq_balance_auto(direction, on);
}
- double set_bw_filter(const std::string& which, const double bw)
+ double set_bw_filter(const std::string& which, const double bw) override
{
ad9361_device_t::direction_t direction = _get_direction_from_antenna(which);
double actual_bw = bw;
@@ -248,7 +248,7 @@ public:
return actual_bw;
}
- std::vector<std::string> get_filter_names(const std::string& which)
+ std::vector<std::string> get_filter_names(const std::string& which) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -257,7 +257,7 @@ public:
}
filter_info_base::sptr get_filter(
- const std::string& which, const std::string& filter_name)
+ const std::string& which, const std::string& filter_name) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -268,7 +268,7 @@ public:
void set_filter(const std::string& which,
const std::string& filter_name,
- const filter_info_base::sptr filter)
+ const filter_info_base::sptr filter) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -277,7 +277,7 @@ public:
_device.set_filter(direction, chain, filter_name, filter);
}
- void output_digital_test_tone(bool enb)
+ void output_digital_test_tone(bool enb) override
{
_device.digital_test_tone(enb);
}
diff --git a/host/lib/usrp/common/ad936x_manager.cpp b/host/lib/usrp/common/ad936x_manager.cpp
index 9646f0427..31e823d32 100644
--- a/host/lib/usrp/common/ad936x_manager.cpp
+++ b/host/lib/usrp/common/ad936x_manager.cpp
@@ -57,7 +57,7 @@ public:
/************************************************************************
* API Calls
***********************************************************************/
- void init_codec()
+ void init_codec() override
{
for (const std::string& rx_fe : _rx_frontends) {
_codec_ctrl->set_gain(rx_fe, DEFAULT_GAIN);
@@ -86,7 +86,7 @@ public:
// worst case conditions to stress the interface.
//
void loopback_self_test(std::function<void(uint32_t)> poker_functor,
- std::function<uint64_t()> peeker_functor)
+ std::function<uint64_t()> peeker_functor) override
{
// Put AD936x in loopback mode
_codec_ctrl->data_port_loopback(true);
@@ -135,7 +135,7 @@ public:
}
- double get_auto_tick_rate(const double lcm_rate, size_t num_chans)
+ double get_auto_tick_rate(const double lcm_rate, size_t num_chans) override
{
UHD_ASSERT_THROW(num_chans >= 1 and num_chans <= _n_frontends);
const uhd::meta_range_t rate_range = _codec_ctrl->get_clock_rate_range();
@@ -186,7 +186,7 @@ public:
return new_rate;
}
- bool check_bandwidth(double rate, const std::string dir)
+ bool check_bandwidth(double rate, const std::string dir) override
{
double bw = _bw[dir == "Rx" ? "RX1" : "TX1"];
if (bw == 0.) // 0 indicates bandwidth is default value.
@@ -208,8 +208,9 @@ public:
return (rate <= bw);
}
- void populate_frontend_subtree(
- uhd::property_tree::sptr subtree, const std::string& key, uhd::direction_t dir)
+ void populate_frontend_subtree(uhd::property_tree::sptr subtree,
+ const std::string& key,
+ uhd::direction_t dir) override
{
subtree->create<std::string>("name").set("FE-" + key);
diff --git a/host/lib/usrp/common/fx2_ctrl.cpp b/host/lib/usrp/common/fx2_ctrl.cpp
index cbb108dae..82e84c6d9 100644
--- a/host/lib/usrp/common/fx2_ctrl.cpp
+++ b/host/lib/usrp/common/fx2_ctrl.cpp
@@ -134,7 +134,7 @@ public:
_ctrl_transport = ctrl_transport;
}
- void usrp_fx2_reset(void)
+ void usrp_fx2_reset(void) override
{
unsigned char reset_y = 1;
unsigned char reset_n = 0;
@@ -144,7 +144,7 @@ public:
std::this_thread::sleep_for(std::chrono::milliseconds(2000));
}
- void usrp_load_firmware(std::string filestring, bool force)
+ void usrp_load_firmware(std::string filestring, bool force) override
{
const char* filename = filestring.c_str();
@@ -218,7 +218,7 @@ public:
throw uhd::io_error("usrp_load_firmware: bad record");
}
- void usrp_init(void)
+ void usrp_init(void) override
{
// disable
usrp_rx_enable(false);
@@ -231,7 +231,7 @@ public:
usrp_tx_reset(false);
}
- void usrp_load_fpga(std::string filestring)
+ void usrp_load_fpga(std::string filestring) override
{
const char* filename = filestring.c_str();
@@ -283,7 +283,7 @@ public:
UHD_LOGGER_INFO("FX2") << "FPGA image loaded";
}
- void usrp_load_eeprom(std::string filestring)
+ void usrp_load_eeprom(std::string filestring) override
{
if (load_img_msg)
UHD_LOGGER_INFO("FX2") << "Loading EEPROM image: " << filestring << "...";
@@ -369,13 +369,13 @@ public:
>= 0);
}
- void usrp_tx_enable(bool on)
+ void usrp_tx_enable(bool on) override
{
UHD_ASSERT_THROW(usrp_control_write_cmd(VRQ_FPGA_SET_TX_ENABLE, on, 0) >= 0);
}
- void usrp_rx_enable(bool on)
+ void usrp_rx_enable(bool on) override
{
UHD_ASSERT_THROW(usrp_control_write_cmd(VRQ_FPGA_SET_RX_ENABLE, on, 0) >= 0);
}
@@ -392,7 +392,7 @@ public:
UHD_ASSERT_THROW(usrp_control_write_cmd(VRQ_FPGA_SET_RX_RESET, on, 0) >= 0);
}
- void usrp_fpga_reset(bool on)
+ void usrp_fpga_reset(bool on) override
{
UHD_ASSERT_THROW(usrp_control_write_cmd(VRQ_FPGA_SET_RESET, on, 0) >= 0);
}
@@ -401,7 +401,7 @@ public:
uint16_t value,
uint16_t index,
unsigned char* buff,
- uint16_t length)
+ uint16_t length) override
{
return _ctrl_transport->submit(VRT_VENDOR_OUT, // bmReqeustType
request, // bRequest
@@ -416,7 +416,7 @@ public:
uint16_t value,
uint16_t index,
unsigned char* buff,
- uint16_t length)
+ uint16_t length) override
{
return _ctrl_transport->submit(VRT_VENDOR_IN, // bmReqeustType
request, // bRequest
@@ -432,18 +432,18 @@ public:
return usrp_control_write(request, value, index, 0, 0);
}
- byte_vector_t read_eeprom(uint16_t addr, uint16_t offset, size_t num_bytes)
+ byte_vector_t read_eeprom(uint16_t addr, uint16_t offset, size_t num_bytes) override
{
this->write_i2c(addr, byte_vector_t(1, uint8_t(offset)));
return this->read_i2c(addr, num_bytes);
}
- int usrp_i2c_write(uint16_t i2c_addr, unsigned char* buf, uint16_t len)
+ int usrp_i2c_write(uint16_t i2c_addr, unsigned char* buf, uint16_t len) override
{
return usrp_control_write(VRQ_I2C_WRITE, i2c_addr, 0, buf, len);
}
- int usrp_i2c_read(uint16_t i2c_addr, unsigned char* buf, uint16_t len)
+ int usrp_i2c_read(uint16_t i2c_addr, unsigned char* buf, uint16_t len) override
{
return usrp_control_read(VRQ_I2C_READ, i2c_addr, 0, buf, len);
}
@@ -451,7 +451,7 @@ public:
static const bool iface_debug = false;
static const size_t max_i2c_data_bytes = 64;
- void write_i2c(uint16_t addr, const byte_vector_t& bytes)
+ void write_i2c(uint16_t addr, const byte_vector_t& bytes) override
{
UHD_ASSERT_THROW(bytes.size() < max_i2c_data_bytes);
@@ -462,7 +462,7 @@ public:
uhd::runtime_error("USRP: failed i2c write");
}
- byte_vector_t read_i2c(uint16_t addr, size_t num_bytes)
+ byte_vector_t read_i2c(uint16_t addr, size_t num_bytes) override
{
UHD_ASSERT_THROW(num_bytes < max_i2c_data_bytes);
diff --git a/host/lib/usrp/common/io_service_mgr.cpp b/host/lib/usrp/common/io_service_mgr.cpp
index e30fa422d..0c2af5f68 100644
--- a/host/lib/usrp/common/io_service_mgr.cpp
+++ b/host/lib/usrp/common/io_service_mgr.cpp
@@ -416,9 +416,10 @@ public:
const link_type_t link_type,
const io_service_args_t& default_args,
const uhd::device_addr_t& stream_args,
- const std::string& streamer_id);
+ const std::string& streamer_id) override;
- void disconnect_links(recv_link_if::sptr recv_link, send_link_if::sptr send_link);
+ void disconnect_links(
+ recv_link_if::sptr recv_link, send_link_if::sptr send_link) override;
private:
enum io_service_type_t { INLINE_IO_SRV, BLOCKING_IO_SRV, POLLING_IO_SRV };
diff --git a/host/lib/usrp/common/pwr_cal_mgr.cpp b/host/lib/usrp/common/pwr_cal_mgr.cpp
index 0c30be7ad..d2838cbe9 100644
--- a/host/lib/usrp/common/pwr_cal_mgr.cpp
+++ b/host/lib/usrp/common/pwr_cal_mgr.cpp
@@ -55,19 +55,19 @@ public:
set_serial(serial);
}
- void set_gain_group(uhd::gain_group::sptr gain_group)
+ void set_gain_group(uhd::gain_group::sptr gain_group) override
{
_gain_group = gain_group;
}
- bool has_power_data()
+ bool has_power_data() override
{
const std::string key = _get_key();
_load_cal_data(key);
return _cal_data.count(key) && bool(_cal_data.at(key));
}
- void populate_subtree(uhd::property_tree::sptr subtree)
+ void populate_subtree(uhd::property_tree::sptr subtree) override
{
subtree->create<std::string>(uhd::fs_path("ref_power/key"))
.set_coercer([](const std::string&) -> std::string {
@@ -93,7 +93,7 @@ public:
.set_publisher([this]() { return this->get_power_range(); });
}
- double set_power(const double power_dbm)
+ double set_power(const double power_dbm) override
{
const std::string key = _get_key();
_load_cal_data(key);
@@ -128,7 +128,7 @@ public:
return coerced_total_power;
}
- double get_power()
+ double get_power() override
{
const std::string key = _get_key();
_load_cal_data(key);
@@ -148,14 +148,14 @@ public:
return hw_power + (_gain_group->get_value() - hw_gain);
}
- void update_power()
+ void update_power() override
{
if (_mode == tracking_mode::TRACK_POWER) {
set_power(_desired_power);
}
}
- uhd::meta_range_t get_power_range()
+ uhd::meta_range_t get_power_range() override
{
const std::string key = _get_key();
_load_cal_data(key);
@@ -171,7 +171,7 @@ public:
return cal_data->get_power_limits(freq);
}
- void set_temperature(const int temp_C)
+ void set_temperature(const int temp_C) override
{
for (auto& cal_data : _cal_data) {
if (cal_data.second) {
@@ -180,12 +180,12 @@ public:
}
}
- void set_tracking_mode(const tracking_mode mode)
+ void set_tracking_mode(const tracking_mode mode) override
{
_mode = mode;
}
- void set_serial(const std::string& serial)
+ void set_serial(const std::string& serial) override
{
if (serial == _serial || serial.empty()) {
return;
@@ -233,12 +233,12 @@ public:
}
}
- std::string get_serial() const
+ std::string get_serial() const override
{
return _serial;
}
- std::string get_key()
+ std::string get_key() override
{
return _get_key();
}
diff --git a/host/lib/usrp/common/recv_packet_demuxer.cpp b/host/lib/usrp/common/recv_packet_demuxer.cpp
index c5ed1563e..9d3067286 100644
--- a/host/lib/usrp/common/recv_packet_demuxer.cpp
+++ b/host/lib/usrp/common/recv_packet_demuxer.cpp
@@ -26,7 +26,7 @@ public:
{ /*NOP*/
}
- void release(void)
+ void release(void) override
{
delete this;
}
@@ -56,7 +56,8 @@ public:
/* NOP */
}
- managed_recv_buffer::sptr get_recv_buff(const size_t index, const double timeout)
+ managed_recv_buffer::sptr get_recv_buff(
+ const size_t index, const double timeout) override
{
boost::mutex::scoped_lock lock(_mutex);
managed_recv_buffer::sptr buff;
diff --git a/host/lib/usrp/common/validate_subdev_spec.cpp b/host/lib/usrp/common/validate_subdev_spec.cpp
index 61895a7f8..dc9c7700a 100644
--- a/host/lib/usrp/common/validate_subdev_spec.cpp
+++ b/host/lib/usrp/common/validate_subdev_spec.cpp
@@ -32,7 +32,7 @@ void uhd::usrp::validate_subdev_spec(property_tree::sptr tree,
tree->list(str(boost::format("/mboards/%s/%s_dsps") % mb % type)).size();
// sanity checking on the length
- if (spec.size() == 0)
+ if (spec.empty())
throw uhd::value_error(
str(boost::format("Empty %s subdevice specification is not supported.\n")
% type));
diff --git a/host/lib/usrp/cores/dma_fifo_core_3000.cpp b/host/lib/usrp/cores/dma_fifo_core_3000.cpp
index 382006b67..405ff24d8 100644
--- a/host/lib/usrp/cores/dma_fifo_core_3000.cpp
+++ b/host/lib/usrp/cores/dma_fifo_core_3000.cpp
@@ -83,12 +83,12 @@ public:
<< dma_fifo_core_3000_impl::get_fifo_timeout() << " cycles");
}
- virtual ~dma_fifo_core_3000_impl() {}
+ ~dma_fifo_core_3000_impl() override {}
/**************************************************************************
* API
*************************************************************************/
- bool has_bist() const
+ bool has_bist() const override
{
return _has_bist;
}
@@ -101,17 +101,17 @@ public:
// TODO: read suppress API
// fullness in bytes
- uint64_t get_fifo_fullness()
+ uint64_t get_fifo_fullness() override
{
return peek64(REG_FIFO_FULLNESS);
}
- uint16_t get_fifo_timeout()
+ uint16_t get_fifo_timeout() override
{
return peek32(REG_FIFO_TIMEOUT) & 0xFFF;
}
- void set_fifo_timeout(const uint16_t timeout_cycles)
+ void set_fifo_timeout(const uint16_t timeout_cycles) override
{
UHD_ASSERT_THROW(timeout_cycles <= 0xFFF);
poke32(timeout_cycles, REG_FIFO_TIMEOUT);
@@ -138,7 +138,7 @@ public:
poke64(REG_FIFO_ADDR_BASE, base_addr);
}
- uint32_t get_packet_count()
+ uint32_t get_packet_count() override
{
return peek32(REG_FIFO_PACKET_CNT);
}
@@ -197,7 +197,7 @@ public:
poke32(REG_BIST_CTRL, 1 << 2);
}
- double run_bist(const uint64_t num_bytes, const double timeout_s)
+ double run_bist(const uint64_t num_bytes, const double timeout_s) override
{
// The number of cycles it will take to transfer all the BIST data if
// there is a transfer on every clock cycle (this is the minimum time it
diff --git a/host/lib/usrp/cores/gpio_atr_3000.cpp b/host/lib/usrp/cores/gpio_atr_3000.cpp
index 14996f659..875752ee2 100644
--- a/host/lib/usrp/cores/gpio_atr_3000.cpp
+++ b/host/lib/usrp/cores/gpio_atr_3000.cpp
@@ -64,7 +64,7 @@ public:
}
}
- virtual void set_atr_mode(const gpio_atr_mode_t mode, const uint32_t mask)
+ void set_atr_mode(const gpio_atr_mode_t mode, const uint32_t mask) override
{
// Each bit in the "ATR Disable" register determines whether the respective bit in
// the GPIO output bus is driven by the ATR engine or a static register. For each
@@ -79,7 +79,7 @@ public:
_update_attr_state(GPIO_CTRL, ~value, mask);
}
- virtual void set_gpio_ddr(const gpio_ddr_t dir, const uint32_t mask)
+ void set_gpio_ddr(const gpio_ddr_t dir, const uint32_t mask) override
{
// Each bit in the "DDR" register determines whether the respective bit in the
// GPIO bus is an input or an output. For each bit position, a 1 means that the
@@ -92,9 +92,9 @@ public:
_update_attr_state(GPIO_DDR, value, mask);
}
- virtual void set_atr_reg(const gpio_atr_reg_t atr,
+ void set_atr_reg(const gpio_atr_reg_t atr,
const uint32_t value,
- const uint32_t mask = MASK_SET_ALL)
+ const uint32_t mask = MASK_SET_ALL) override
{
// Set the value of the specified ATR register. For bits with ATR Disable set to
// 1, the IDLE register will hold the output state This setting will only get
@@ -135,7 +135,7 @@ public:
_update_attr_state(attr, value, mask);
}
- virtual void set_gpio_out(const uint32_t value, const uint32_t mask = MASK_SET_ALL)
+ void set_gpio_out(const uint32_t value, const uint32_t mask = MASK_SET_ALL) override
{
// Set the value of the specified GPIO output register.
// This setting will only get applied to all bits in the "mask" that are 1. All
@@ -148,7 +148,7 @@ public:
_update_attr_state(GPIO_OUT, value, mask);
}
- virtual uint32_t read_gpio()
+ uint32_t read_gpio() override
{
// Read the state of the GPIO pins
// If a pin is configured as an input, reads the actual value of the pin
@@ -160,7 +160,7 @@ public:
}
}
- virtual uint32_t get_attr_reg(const gpio_attr_t attr)
+ uint32_t get_attr_reg(const gpio_attr_t attr) override
{
if (attr == GPIO_SRC) {
throw uhd::runtime_error("Can't get GPIO source by GPIO ATR interface.");
@@ -175,7 +175,7 @@ public:
return _attr_reg_state.at(attr);
}
- inline virtual void set_gpio_attr(const gpio_attr_t attr, const uint32_t value)
+ inline void set_gpio_attr(const gpio_attr_t attr, const uint32_t value) override
{
// An attribute based API to configure all settings for the GPIO bus in one
// function call. This API does not have a mask so it configures all bits at the
@@ -243,7 +243,7 @@ protected:
return uhd::soft_reg32_wo_t::get(uhd::soft_reg32_wo_t::REGISTER);
}
- virtual void flush()
+ void flush() override
{
uhd::soft_reg32_wo_t::flush();
}
@@ -260,12 +260,12 @@ protected:
{
}
- virtual void set_with_mask(const uint32_t value, const uint32_t mask)
+ void set_with_mask(const uint32_t value, const uint32_t mask) override
{
_atr_idle_cache = (value & mask) | (_atr_idle_cache & (~mask));
}
- virtual uint32_t get()
+ uint32_t get() override
{
return _atr_idle_cache;
}
@@ -280,7 +280,7 @@ protected:
return _gpio_out_cache;
}
- virtual void flush()
+ void flush() override
{
set(REGISTER,
(_atr_idle_cache & (~_atr_disable_reg.get()))
@@ -344,26 +344,26 @@ public:
}
inline void set_pin_ctrl(
- const db_unit_t unit, const uint32_t value, const uint32_t mask)
+ const db_unit_t unit, const uint32_t value, const uint32_t mask) override
{
gpio_atr_3000_impl::set_atr_mode(MODE_ATR, compute_mask(unit, value & mask));
gpio_atr_3000_impl::set_atr_mode(MODE_GPIO, compute_mask(unit, (~value) & mask));
}
- inline uint32_t get_pin_ctrl(const db_unit_t unit)
+ inline uint32_t get_pin_ctrl(const db_unit_t unit) override
{
return (~_atr_disable_reg.get()) >> compute_shift(unit);
}
using gpio_atr_3000_impl::set_gpio_ddr;
inline void set_gpio_ddr(
- const db_unit_t unit, const uint32_t value, const uint32_t mask)
+ const db_unit_t unit, const uint32_t value, const uint32_t mask) override
{
gpio_atr_3000_impl::set_gpio_ddr(DDR_OUTPUT, compute_mask(unit, value & mask));
gpio_atr_3000_impl::set_gpio_ddr(DDR_INPUT, compute_mask(unit, (~value) & mask));
}
- inline uint32_t get_gpio_ddr(const db_unit_t unit)
+ inline uint32_t get_gpio_ddr(const db_unit_t unit) override
{
return _ddr_reg.get() >> compute_shift(unit);
}
@@ -372,13 +372,13 @@ public:
inline void set_atr_reg(const db_unit_t unit,
const gpio_atr_reg_t atr,
const uint32_t value,
- const uint32_t mask)
+ const uint32_t mask) override
{
gpio_atr_3000_impl::set_atr_reg(
atr, value << compute_shift(unit), compute_mask(unit, mask));
}
- inline uint32_t get_atr_reg(const db_unit_t unit, const gpio_atr_reg_t atr)
+ inline uint32_t get_atr_reg(const db_unit_t unit, const gpio_atr_reg_t atr) override
{
masked_reg_t* reg = NULL;
switch (atr) {
@@ -403,21 +403,21 @@ public:
using gpio_atr_3000_impl::set_gpio_out;
inline void set_gpio_out(
- const db_unit_t unit, const uint32_t value, const uint32_t mask)
+ const db_unit_t unit, const uint32_t value, const uint32_t mask) override
{
gpio_atr_3000_impl::set_gpio_out(
static_cast<uint32_t>(value) << compute_shift(unit),
compute_mask(unit, mask));
}
- inline uint32_t get_gpio_out(const db_unit_t unit)
+ inline uint32_t get_gpio_out(const db_unit_t unit) override
{
return (_atr_idle_reg.get_gpio_out() & compute_mask(unit, MASK_SET_ALL))
>> compute_shift(unit);
}
using gpio_atr_3000_impl::read_gpio;
- inline uint32_t read_gpio(const db_unit_t unit)
+ inline uint32_t read_gpio(const db_unit_t unit) override
{
return (gpio_atr_3000_impl::read_gpio() & compute_mask(unit, MASK_SET_ALL))
>> compute_shift(unit);
diff --git a/host/lib/usrp/cores/gpio_core_200.cpp b/host/lib/usrp/cores/gpio_core_200.cpp
index 7ee0daf70..b39cd0b75 100644
--- a/host/lib/usrp/cores/gpio_core_200.cpp
+++ b/host/lib/usrp/cores/gpio_core_200.cpp
@@ -36,7 +36,8 @@ public:
{ /* NOP */
}
- void set_pin_ctrl(const unit_t unit, const uint16_t value, const uint16_t mask)
+ void set_pin_ctrl(
+ const unit_t unit, const uint16_t value, const uint16_t mask) override
{
if (unit == dboard_iface::UNIT_BOTH)
throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
@@ -44,15 +45,17 @@ public:
update(); // full update
}
- uint16_t get_pin_ctrl(unit_t unit)
+ uint16_t get_pin_ctrl(unit_t unit) override
{
if (unit == dboard_iface::UNIT_BOTH)
throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
return _pin_ctrl[unit];
}
- void set_atr_reg(
- const unit_t unit, const atr_reg_t atr, const uint16_t value, const uint16_t mask)
+ void set_atr_reg(const unit_t unit,
+ const atr_reg_t atr,
+ const uint16_t value,
+ const uint16_t mask) override
{
if (unit == dboard_iface::UNIT_BOTH)
throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
@@ -65,14 +68,15 @@ public:
update(atr);
}
- uint16_t get_atr_reg(unit_t unit, atr_reg_t reg)
+ uint16_t get_atr_reg(unit_t unit, atr_reg_t reg) override
{
if (unit == dboard_iface::UNIT_BOTH)
throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
return _atr_regs[unit][reg];
}
- void set_gpio_ddr(const unit_t unit, const uint16_t value, const uint16_t mask)
+ void set_gpio_ddr(
+ const unit_t unit, const uint16_t value, const uint16_t mask) override
{
if (unit == dboard_iface::UNIT_BOTH)
throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
@@ -84,14 +88,15 @@ public:
<< shift_by_unit(dboard_iface::UNIT_TX)));
}
- uint16_t get_gpio_ddr(unit_t unit)
+ uint16_t get_gpio_ddr(unit_t unit) override
{
if (unit == dboard_iface::UNIT_BOTH)
throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
return _gpio_ddr[unit];
}
- void set_gpio_out(const unit_t unit, const uint16_t value, const uint16_t mask)
+ void set_gpio_out(
+ const unit_t unit, const uint16_t value, const uint16_t mask) override
{
if (unit == dboard_iface::UNIT_BOTH)
throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
@@ -99,14 +104,14 @@ public:
this->update(); // full update
}
- uint16_t get_gpio_out(unit_t unit)
+ uint16_t get_gpio_out(unit_t unit) override
{
if (unit == dboard_iface::UNIT_BOTH)
throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
return _gpio_out[unit];
}
- uint16_t read_gpio(const unit_t unit)
+ uint16_t read_gpio(const unit_t unit) override
{
if (unit == dboard_iface::UNIT_BOTH)
throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
@@ -197,13 +202,13 @@ public:
set_ddr_reg();
}
- void set_ddr_reg()
+ void set_ddr_reg() override
{
_iface->poke32(REG_GPIO_DDR, 0xffffffff);
}
- void set_atr_reg(const atr_reg_t atr, const uint32_t value)
+ void set_atr_reg(const atr_reg_t atr, const uint32_t value) override
{
if (atr == gpio_atr::ATR_REG_IDLE)
_iface->poke32(REG_GPIO_IDLE, value);
@@ -217,7 +222,7 @@ public:
UHD_THROW_INVALID_CODE_PATH();
}
- void set_all_regs(const uint32_t value)
+ void set_all_regs(const uint32_t value) override
{
set_atr_reg(gpio_atr::ATR_REG_IDLE, value);
set_atr_reg(gpio_atr::ATR_REG_TX_ONLY, value);
diff --git a/host/lib/usrp/cores/i2c_core_100_wb32.cpp b/host/lib/usrp/cores/i2c_core_100_wb32.cpp
index d3d0a135a..d1f1f9fe0 100644
--- a/host/lib/usrp/cores/i2c_core_100_wb32.cpp
+++ b/host/lib/usrp/cores/i2c_core_100_wb32.cpp
@@ -61,7 +61,7 @@ public:
_iface->poke32(REG_I2C_CTRL, I2C_CTRL_EN); // enable I2C core
}
- void set_clock_rate(const double rate)
+ void set_clock_rate(const double rate) override
{
static const uint32_t i2c_datarate = 400000;
uint16_t prescaler = uint16_t(rate / (i2c_datarate * 5) - 1);
@@ -69,11 +69,11 @@ public:
_iface->poke32(REG_I2C_PRESCALER_HI, (prescaler >> 8) & 0xFF);
}
- void write_i2c(uint16_t addr, const byte_vector_t& bytes)
+ void write_i2c(uint16_t addr, const byte_vector_t& bytes) override
{
_iface->poke32(REG_I2C_DATA, (addr << 1) | 0); // addr and read bit (0)
_iface->poke32(REG_I2C_CMD_STATUS,
- I2C_CMD_WR | I2C_CMD_START | (bytes.size() == 0 ? I2C_CMD_STOP : 0));
+ I2C_CMD_WR | I2C_CMD_START | (bytes.empty() ? I2C_CMD_STOP : 0));
// wait for previous transfer to complete
if (not wait_chk_ack()) {
@@ -92,7 +92,7 @@ public:
}
}
- byte_vector_t read_i2c(uint16_t addr, size_t num_bytes)
+ byte_vector_t read_i2c(uint16_t addr, size_t num_bytes) override
{
byte_vector_t bytes;
if (num_bytes == 0)
@@ -119,7 +119,7 @@ public:
// override read_eeprom so we can write once, read all N bytes
// the default implementation calls read i2c once per byte
- byte_vector_t read_eeprom(uint16_t addr, uint16_t offset, size_t num_bytes)
+ byte_vector_t read_eeprom(uint16_t addr, uint16_t offset, size_t num_bytes) override
{
this->write_i2c(addr, byte_vector_t(1, uint8_t(offset)));
return this->read_i2c(addr, num_bytes);
diff --git a/host/lib/usrp/cores/i2c_core_200.cpp b/host/lib/usrp/cores/i2c_core_200.cpp
index 431ba194c..93e3fedf8 100644
--- a/host/lib/usrp/cores/i2c_core_200.cpp
+++ b/host/lib/usrp/cores/i2c_core_200.cpp
@@ -70,11 +70,11 @@ public:
this->poke(REG_I2C_WR_CTRL, I2C_CTRL_EN); // enable I2C core
}
- void write_i2c(uint16_t addr, const byte_vector_t& bytes)
+ void write_i2c(uint16_t addr, const byte_vector_t& bytes) override
{
this->poke(REG_I2C_WR_DATA, (addr << 1) | 0); // addr and read bit (0)
this->poke(REG_I2C_WR_CMD,
- I2C_CMD_WR | I2C_CMD_START | (bytes.size() == 0 ? I2C_CMD_STOP : 0));
+ I2C_CMD_WR | I2C_CMD_START | (bytes.empty() ? I2C_CMD_STOP : 0));
// wait for previous transfer to complete
if (not wait_chk_ack()) {
@@ -93,7 +93,7 @@ public:
}
}
- byte_vector_t read_i2c(uint16_t addr, size_t num_bytes)
+ byte_vector_t read_i2c(uint16_t addr, size_t num_bytes) override
{
byte_vector_t bytes;
if (num_bytes == 0)
diff --git a/host/lib/usrp/cores/radio_ctrl_core_3000.cpp b/host/lib/usrp/cores/radio_ctrl_core_3000.cpp
index 7518bfe6f..6947da3f1 100644
--- a/host/lib/usrp/cores/radio_ctrl_core_3000.cpp
+++ b/host/lib/usrp/cores/radio_ctrl_core_3000.cpp
@@ -60,7 +60,7 @@ public:
this->set_tick_rate(1.0); // something possible but bogus
}
- ~radio_ctrl_core_3000_impl(void)
+ ~radio_ctrl_core_3000_impl(void) override
{
_timeout = ACK_TIMEOUT; // reset timeout to something small
UHD_SAFE_CALL(
@@ -72,14 +72,14 @@ public:
/*******************************************************************
* Peek and poke 32 bit implementation
******************************************************************/
- void poke32(const wb_addr_type addr, const uint32_t data)
+ void poke32(const wb_addr_type addr, const uint32_t data) override
{
boost::mutex::scoped_lock lock(_mutex);
this->send_pkt(addr / 4, data);
this->wait_for_ack(false);
}
- uint32_t peek32(const wb_addr_type addr)
+ uint32_t peek32(const wb_addr_type addr) override
{
boost::mutex::scoped_lock lock(_mutex);
this->send_pkt(SR_READBACK, addr / 8);
@@ -89,7 +89,7 @@ public:
return ((addr / 4) & 0x1) ? hi : lo;
}
- uint64_t peek64(const wb_addr_type addr)
+ uint64_t peek64(const wb_addr_type addr) override
{
boost::mutex::scoped_lock lock(_mutex);
this->send_pkt(SR_READBACK, addr / 8);
@@ -99,7 +99,7 @@ public:
/*******************************************************************
* Update methods for time
******************************************************************/
- void set_time(const uhd::time_spec_t& time)
+ void set_time(const uhd::time_spec_t& time) override
{
boost::mutex::scoped_lock lock(_mutex);
_time = time;
@@ -108,13 +108,13 @@ public:
_timeout = MASSIVE_TIMEOUT; // permanently sets larger timeout
}
- uhd::time_spec_t get_time(void)
+ uhd::time_spec_t get_time(void) override
{
boost::mutex::scoped_lock lock(_mutex);
return _time;
}
- void set_tick_rate(const double rate)
+ void set_tick_rate(const double rate) override
{
boost::mutex::scoped_lock lock(_mutex);
_tick_rate = rate;
@@ -298,7 +298,7 @@ private:
uhd::msg_task::msg_payload_t msg;
do {
msg = _async_task->get_msg_from_dump_queue(recv_sid);
- } while (msg.size() < min_buff_size && msg.size() != 0);
+ } while (msg.size() < min_buff_size && !msg.empty());
if (msg.size() >= min_buff_size) {
memcpy(b.data, &msg.front(), std::min(msg.size(), sizeof(b.data)));
@@ -307,14 +307,14 @@ private:
return false;
}
- void push_response(const uint32_t* buff)
+ void push_response(const uint32_t* buff) override
{
resp_buff_type resp_buff;
std::memcpy(resp_buff.data, buff, sizeof(resp_buff));
_resp_queue.push_with_haste(resp_buff);
}
- void hold_task(uhd::msg_task::sptr task)
+ void hold_task(uhd::msg_task::sptr task) override
{
_async_task = task;
}
diff --git a/host/lib/usrp/cores/rx_dsp_core_200.cpp b/host/lib/usrp/cores/rx_dsp_core_200.cpp
index 89b44290f..5e2c3804f 100644
--- a/host/lib/usrp/cores/rx_dsp_core_200.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_200.cpp
@@ -82,14 +82,14 @@ public:
this->clear();
}
- ~rx_dsp_core_200_impl(void)
+ ~rx_dsp_core_200_impl(void) override
{
UHD_SAFE_CALL(
// shutdown any possible streaming
this->clear();)
}
- void clear(void)
+ void clear(void) override
{
_iface->poke32(REG_RX_CTRL_NCHANNELS, 0); // also reset
_iface->poke32(REG_RX_CTRL_VRT_HDR,
@@ -101,12 +101,12 @@ public:
_iface->poke32(REG_RX_CTRL_VRT_TLR, 0);
}
- void set_nsamps_per_packet(const size_t nsamps)
+ void set_nsamps_per_packet(const size_t nsamps) override
{
_iface->poke32(REG_RX_CTRL_NSAMPS_PP, nsamps);
}
- void issue_stream_command(const stream_cmd_t& stream_cmd)
+ void issue_stream_command(const stream_cmd_t& stream_cmd) override
{
UHD_ASSERT_THROW(stream_cmd.num_samps <= 0x0fffffff);
_continuous_streaming = stream_cmd.stream_mode
@@ -147,7 +147,7 @@ public:
_iface->poke32(REG_RX_CTRL_TIME_LO, uint32_t(ticks >> 0)); // latches the command
}
- void set_mux(const std::string& mode, const bool fe_swapped)
+ void set_mux(const std::string& mode, const bool fe_swapped) override
{
static const uhd::dict<std::string, uint32_t> mode_to_mux =
boost::assign::map_list_of("IQ", 0)("QI", FLAG_DSP_RX_MUX_SWAP_IQ)(
@@ -157,18 +157,18 @@ public:
mode_to_mux[mode] ^ (fe_swapped ? FLAG_DSP_RX_MUX_SWAP_IQ : 0));
}
- void set_tick_rate(const double rate)
+ void set_tick_rate(const double rate) override
{
_tick_rate = rate;
}
- void set_link_rate(const double rate)
+ void set_link_rate(const double rate) override
{
//_link_rate = rate/sizeof(uint32_t); //in samps/s
_link_rate = rate / sizeof(uint16_t); // in samps/s (allows for 8sc)
}
- uhd::meta_range_t get_host_rates(void)
+ uhd::meta_range_t get_host_rates(void) override
{
meta_range_t range;
for (int rate = 512; rate > 256; rate -= 4) {
@@ -183,7 +183,7 @@ public:
return range;
}
- double set_host_rate(const double rate)
+ double set_host_rate(const double rate) override
{
const size_t decim_rate =
boost::math::iround(_tick_rate / this->get_host_rates().clip(rate, true));
@@ -235,12 +235,12 @@ public:
_iface->poke32(REG_DSP_RX_SCALE_IQ, actual_scalar);
}
- double get_scaling_adjustment(void)
+ double get_scaling_adjustment(void) override
{
return _fxpt_scalar_correction * _host_extra_scaling / 32767.;
}
- double set_freq(const double requested_freq)
+ double set_freq(const double requested_freq) override
{
double actual_freq;
int32_t freq_word;
@@ -249,19 +249,19 @@ public:
return actual_freq;
}
- uhd::meta_range_t get_freq_range(void)
+ uhd::meta_range_t get_freq_range(void) override
{
return uhd::meta_range_t(
-_tick_rate / 2, +_tick_rate / 2, _tick_rate / std::pow(2.0, 32));
}
- void handle_overflow(void)
+ void handle_overflow(void) override
{
if (_continuous_streaming)
issue_stream_command(stream_cmd_t::STREAM_MODE_START_CONTINUOUS);
}
- void setup(const uhd::stream_args_t& stream_args)
+ void setup(const uhd::stream_args_t& stream_args) override
{
if (not stream_args.args.has_key("noclear"))
this->clear();
diff --git a/host/lib/usrp/cores/rx_dsp_core_3000.cpp b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
index 3724ca827..ff431fd41 100644
--- a/host/lib/usrp/cores/rx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
@@ -54,13 +54,13 @@ public:
{
}
- ~rx_dsp_core_3000_impl(void)
+ ~rx_dsp_core_3000_impl(void) override
{
UHD_SAFE_CALL(; // NOP
)
}
- void set_mux(const uhd::usrp::fe_connection_t& fe_conn)
+ void set_mux(const uhd::usrp::fe_connection_t& fe_conn) override
{
uint32_t reg_val = 0;
switch (fe_conn.get_sampling_mode()) {
@@ -101,19 +101,19 @@ public:
}
}
- void set_tick_rate(const double rate)
+ void set_tick_rate(const double rate) override
{
_tick_rate = rate;
set_freq(_current_freq);
}
- void set_link_rate(const double rate)
+ void set_link_rate(const double rate) override
{
//_link_rate = rate/sizeof(uint32_t); //in samps/s
_link_rate = rate / sizeof(uint16_t); // in samps/s (allows for 8sc)
}
- uhd::meta_range_t get_host_rates(void)
+ uhd::meta_range_t get_host_rates(void) override
{
meta_range_t range;
if (!_is_b200) {
@@ -133,7 +133,7 @@ public:
return range;
}
- double set_host_rate(const double rate)
+ double set_host_rate(const double rate) override
{
const size_t decim_rate =
boost::math::iround(_tick_rate / this->get_host_rates().clip(rate, true));
@@ -237,12 +237,12 @@ public:
_iface->poke32(REG_DSP_RX_SCALE_IQ, actual_scalar);
}
- double get_scaling_adjustment(void)
+ double get_scaling_adjustment(void) override
{
return _fxpt_scalar_correction * _host_extra_scaling / 32767.;
}
- double set_freq(const double requested_freq)
+ double set_freq(const double requested_freq) override
{
double actual_freq;
int32_t freq_word;
@@ -253,12 +253,12 @@ public:
return actual_freq;
}
- double get_freq(void)
+ double get_freq(void) override
{
return _current_freq;
}
- uhd::meta_range_t get_freq_range(void)
+ uhd::meta_range_t get_freq_range(void) override
{
// Too keep the DSP range symmetric about 0, we use abs(_dsp_freq_offset)
const double offset = std::abs<double>(_dsp_freq_offset);
@@ -267,7 +267,7 @@ public:
_tick_rate / std::pow(2.0, 32));
}
- void setup(const uhd::stream_args_t& stream_args)
+ void setup(const uhd::stream_args_t& stream_args) override
{
if (stream_args.otw_format == "sc16") {
_dsp_extra_scaling = 1.0;
@@ -294,7 +294,7 @@ public:
this->update_scalar();
}
- void populate_subtree(property_tree::sptr subtree)
+ void populate_subtree(property_tree::sptr subtree) override
{
subtree->create<meta_range_t>("rate/range")
.set_publisher(std::bind(&rx_dsp_core_3000::get_host_rates, this));
diff --git a/host/lib/usrp/cores/rx_frontend_core_200.cpp b/host/lib/usrp/cores/rx_frontend_core_200.cpp
index b16de0d9e..d96672da4 100644
--- a/host/lib/usrp/cores/rx_frontend_core_200.cpp
+++ b/host/lib/usrp/cores/rx_frontend_core_200.cpp
@@ -52,17 +52,17 @@ public:
// NOP
}
- void set_mux(const bool swap)
+ void set_mux(const bool swap) override
{
_iface->poke32(REG_RX_FE_SWAP_IQ, swap ? 1 : 0);
}
- void set_dc_offset_auto(const bool enb)
+ void set_dc_offset_auto(const bool enb) override
{
this->set_dc_offset(enb ? 0 : OFFSET_FIXED);
}
- std::complex<double> set_dc_offset(const std::complex<double>& off)
+ std::complex<double> set_dc_offset(const std::complex<double>& off) override
{
static const double scaler = double(1ul << 29);
_i_dc_off = boost::math::iround(off.real() * scaler);
@@ -79,13 +79,13 @@ public:
_iface->poke32(REG_RX_FE_OFFSET_Q, flags | (_q_dc_off & ~FLAG_MASK));
}
- void set_iq_balance(const std::complex<double>& cor)
+ void set_iq_balance(const std::complex<double>& cor) override
{
_iface->poke32(REG_RX_FE_MAG_CORRECTION, fs_to_bits(cor.real(), 18));
_iface->poke32(REG_RX_FE_PHASE_CORRECTION, fs_to_bits(cor.imag(), 18));
}
- void populate_subtree(uhd::property_tree::sptr subtree)
+ void populate_subtree(uhd::property_tree::sptr subtree) override
{
subtree->create<uhd::meta_range_t>("dc_offset/range")
.set(meta_range_t(DC_OFFSET_MIN, DC_OFFSET_MAX));
diff --git a/host/lib/usrp/cores/rx_frontend_core_3000.cpp b/host/lib/usrp/cores/rx_frontend_core_3000.cpp
index 756f0995d..abbe64b13 100644
--- a/host/lib/usrp/cores/rx_frontend_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_frontend_core_3000.cpp
@@ -79,12 +79,12 @@ public:
// NOP
}
- void set_adc_rate(const double rate)
+ void set_adc_rate(const double rate) override
{
_adc_rate = rate;
}
- void bypass_all(bool bypass_en)
+ void bypass_all(bool bypass_en) override
{
if (bypass_en) {
_iface->poke32(_rx_fe_mapping_reg, FLAG_DSP_RX_MAPPING_BYPASS_ALL);
@@ -93,7 +93,7 @@ public:
}
}
- void set_fe_connection(const fe_connection_t& fe_conn)
+ void set_fe_connection(const fe_connection_t& fe_conn) override
{
uint32_t mapping_reg_val = 0;
switch (fe_conn.get_sampling_mode()) {
@@ -143,12 +143,12 @@ public:
_fe_conn = fe_conn;
}
- void set_dc_offset_auto(const bool enb)
+ void set_dc_offset_auto(const bool enb) override
{
_set_dc_offset(enb ? 0 : OFFSET_FIXED);
}
- std::complex<double> set_dc_offset(const std::complex<double>& off)
+ std::complex<double> set_dc_offset(const std::complex<double>& off) override
{
static const double scaler = double(1ul << 29);
_i_dc_off = boost::math::iround(off.real() * scaler);
@@ -165,13 +165,13 @@ public:
_iface->poke32(_rx_fe_offset_q_reg, flags | (_q_dc_off & ~FLAG_MASK));
}
- void set_iq_balance(const std::complex<double>& cor)
+ void set_iq_balance(const std::complex<double>& cor) override
{
_iface->poke32(_rx_fe_mag_corr_reg, fs_to_bits(cor.real(), 18));
_iface->poke32(_rx_fe_phase_corr_reg, fs_to_bits(cor.imag(), 18));
}
- void populate_subtree(uhd::property_tree::sptr subtree)
+ void populate_subtree(uhd::property_tree::sptr subtree) override
{
subtree->create<uhd::meta_range_t>("dc_offset/range")
.set(meta_range_t(DC_OFFSET_MIN, DC_OFFSET_MAX));
diff --git a/host/lib/usrp/cores/rx_vita_core_3000.cpp b/host/lib/usrp/cores/rx_vita_core_3000.cpp
index fb3305ce8..622120d90 100644
--- a/host/lib/usrp/cores/rx_vita_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_vita_core_3000.cpp
@@ -41,12 +41,12 @@ struct rx_vita_core_3000_impl : rx_vita_core_3000
this->clear();
}
- ~rx_vita_core_3000_impl(void)
+ ~rx_vita_core_3000_impl(void) override
{
UHD_SAFE_CALL(this->clear();)
}
- void configure_flow_control(const size_t window_size)
+ void configure_flow_control(const size_t window_size) override
{
// The window needs to be disabled in the case where this object is
// uncleanly destroyed and the FC window is left enabled
@@ -63,19 +63,19 @@ struct rx_vita_core_3000_impl : rx_vita_core_3000
_iface->poke32(REG_FC_ENABLE, window_size ? 1 : 0);
}
- void clear(void)
+ void clear(void) override
{
// FC should never be disabled, this will actually become
// impossible in the future
// this->configure_flow_control(0); //disable fc
}
- void set_nsamps_per_packet(const size_t nsamps)
+ void set_nsamps_per_packet(const size_t nsamps) override
{
_iface->poke32(REG_FRAMER_MAXLEN, nsamps);
}
- void issue_stream_command(const uhd::stream_cmd_t& stream_cmd)
+ void issue_stream_command(const uhd::stream_cmd_t& stream_cmd) override
{
if (not _is_setup) {
// UHD_LOGGER_WARNING("CORES") << "rx vita core 3000 issue stream command -
@@ -134,28 +134,28 @@ struct rx_vita_core_3000_impl : rx_vita_core_3000
_iface->poke32(REG_CTRL_TIME_LO, uint32_t(ticks >> 0)); // latches the command
}
- void set_tick_rate(const double rate)
+ void set_tick_rate(const double rate) override
{
_tick_rate = rate;
}
- void set_sid(const uint32_t sid)
+ void set_sid(const uint32_t sid) override
{
_iface->poke32(REG_FRAMER_SID, sid);
}
- void handle_overflow(void)
+ void handle_overflow(void) override
{
if (_continuous_streaming)
this->issue_stream_command(stream_cmd_t::STREAM_MODE_START_CONTINUOUS);
}
- void setup(const uhd::stream_args_t&)
+ void setup(const uhd::stream_args_t&) override
{
_is_setup = true;
}
- bool in_continuous_streaming_mode(void)
+ bool in_continuous_streaming_mode(void) override
{
return _continuous_streaming;
}
diff --git a/host/lib/usrp/cores/spi_core_3000.cpp b/host/lib/usrp/cores/spi_core_3000.cpp
index e279ffa66..28a8782d5 100644
--- a/host/lib/usrp/cores/spi_core_3000.cpp
+++ b/host/lib/usrp/cores/spi_core_3000.cpp
@@ -46,7 +46,7 @@ public:
const spi_config_t& config,
uint32_t data,
size_t num_bits,
- bool readback)
+ bool readback) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -93,7 +93,7 @@ public:
return 0;
}
- void set_divider(const double div)
+ void set_divider(const double div) override
{
_div = size_t((div / 2) - 0.5);
}
diff --git a/host/lib/usrp/cores/time64_core_200.cpp b/host/lib/usrp/cores/time64_core_200.cpp
index a7d5427c1..f5cd7158f 100644
--- a/host/lib/usrp/cores/time64_core_200.cpp
+++ b/host/lib/usrp/cores/time64_core_200.cpp
@@ -54,17 +54,17 @@ public:
_sources.push_back("mimo");
}
- void enable_gpsdo(void)
+ void enable_gpsdo(void) override
{
_sources.push_back("gpsdo");
}
- void set_tick_rate(const double rate)
+ void set_tick_rate(const double rate) override
{
_tick_rate = rate;
}
- uhd::time_spec_t get_time_now(void)
+ uhd::time_spec_t get_time_now(void) override
{
for (size_t i = 0; i < 3;
i++) { // special algorithm because we cant read 64 bits synchronously
@@ -78,7 +78,7 @@ public:
throw uhd::runtime_error("time64_core_200: get time now timeout");
}
- uhd::time_spec_t get_time_last_pps(void)
+ uhd::time_spec_t get_time_last_pps(void) override
{
for (size_t i = 0; i < 3;
i++) { // special algorithm because we cant read 64 bits synchronously
@@ -92,7 +92,7 @@ public:
throw uhd::runtime_error("time64_core_200: get time last pps timeout");
}
- void set_time_now(const uhd::time_spec_t& time)
+ void set_time_now(const uhd::time_spec_t& time) override
{
const uint64_t ticks = time.to_ticks(_tick_rate);
_iface->poke32(REG_TIME64_TICKS_LO, uint32_t(ticks >> 0));
@@ -100,7 +100,7 @@ public:
_iface->poke32(REG_TIME64_TICKS_HI, uint32_t(ticks >> 32)); // latches all 3
}
- void set_time_next_pps(const uhd::time_spec_t& time)
+ void set_time_next_pps(const uhd::time_spec_t& time) override
{
const uint64_t ticks = time.to_ticks(_tick_rate);
_iface->poke32(REG_TIME64_TICKS_LO, uint32_t(ticks >> 0));
@@ -108,7 +108,7 @@ public:
_iface->poke32(REG_TIME64_TICKS_HI, uint32_t(ticks >> 32)); // latches all 3
}
- void set_time_source(const std::string& source)
+ void set_time_source(const std::string& source) override
{
assert_has(_sources, source, "time source");
@@ -130,7 +130,7 @@ public:
}
}
- std::vector<std::string> get_time_sources(void)
+ std::vector<std::string> get_time_sources(void) override
{
return _sources;
}
diff --git a/host/lib/usrp/cores/time_core_3000.cpp b/host/lib/usrp/cores/time_core_3000.cpp
index 852c3882e..8e32cf4b8 100644
--- a/host/lib/usrp/cores/time_core_3000.cpp
+++ b/host/lib/usrp/cores/time_core_3000.cpp
@@ -36,18 +36,18 @@ struct time_core_3000_impl : time_core_3000
this->set_tick_rate(1); // init to non zero
}
- ~time_core_3000_impl(void)
+ ~time_core_3000_impl(void) override
{
UHD_SAFE_CALL(; // NOP
)
}
- void set_tick_rate(const double rate)
+ void set_tick_rate(const double rate) override
{
_tick_rate = rate;
}
- void self_test(void)
+ void self_test(void) override
{
const size_t sleep_millis = 100;
UHD_LOGGER_DEBUG("CORES") << "Performing timer loopback test... ";
@@ -71,19 +71,19 @@ struct time_core_3000_impl : time_core_3000
<< "Approximate clock rate: " << (approx_rate / 1e6) << " MHz\n";
}
- uhd::time_spec_t get_time_now(void)
+ uhd::time_spec_t get_time_now(void) override
{
const uint64_t ticks = _iface->peek64(_readback_bases.rb_now);
return time_spec_t::from_ticks(ticks, _tick_rate);
}
- uhd::time_spec_t get_time_last_pps(void)
+ uhd::time_spec_t get_time_last_pps(void) override
{
const uint64_t ticks = _iface->peek64(_readback_bases.rb_pps);
return time_spec_t::from_ticks(ticks, _tick_rate);
}
- void set_time_now(const uhd::time_spec_t& time)
+ void set_time_now(const uhd::time_spec_t& time) override
{
const uint64_t ticks = time.to_ticks(_tick_rate);
_iface->poke32(REG_TIME_HI, uint32_t(ticks >> 32));
@@ -91,7 +91,7 @@ struct time_core_3000_impl : time_core_3000
_iface->poke32(REG_TIME_CTRL, CTRL_LATCH_TIME_NOW);
}
- void set_time_sync(const uhd::time_spec_t& time)
+ void set_time_sync(const uhd::time_spec_t& time) override
{
const uint64_t ticks = time.to_ticks(_tick_rate);
_iface->poke32(REG_TIME_HI, uint32_t(ticks >> 32));
@@ -99,7 +99,7 @@ struct time_core_3000_impl : time_core_3000
_iface->poke32(REG_TIME_CTRL, CTRL_LATCH_TIME_SYNC);
}
- void set_time_next_pps(const uhd::time_spec_t& time)
+ void set_time_next_pps(const uhd::time_spec_t& time) override
{
const uint64_t ticks = time.to_ticks(_tick_rate);
_iface->poke32(REG_TIME_HI, uint32_t(ticks >> 32));
diff --git a/host/lib/usrp/cores/tx_dsp_core_200.cpp b/host/lib/usrp/cores/tx_dsp_core_200.cpp
index 8dd48181c..1c743b0b0 100644
--- a/host/lib/usrp/cores/tx_dsp_core_200.cpp
+++ b/host/lib/usrp/cores/tx_dsp_core_200.cpp
@@ -70,7 +70,7 @@ public:
this->set_underflow_policy("next_packet");
}
- void clear(void)
+ void clear(void) override
{
_iface->poke32(REG_TX_CTRL_CLEAR, 1); // reset and flush technique
std::this_thread::sleep_for(std::chrono::milliseconds(10));
@@ -89,18 +89,18 @@ public:
"USRP TX cannot handle requested underflow policy: " + policy);
}
- void set_tick_rate(const double rate)
+ void set_tick_rate(const double rate) override
{
_tick_rate = rate;
}
- void set_link_rate(const double rate)
+ void set_link_rate(const double rate) override
{
//_link_rate = rate/sizeof(uint32_t); //in samps/s
_link_rate = rate / sizeof(uint16_t); // in samps/s (allows for 8sc)
}
- uhd::meta_range_t get_host_rates(void)
+ uhd::meta_range_t get_host_rates(void) override
{
meta_range_t range;
for (int rate = 512; rate > 256; rate -= 4) {
@@ -115,7 +115,7 @@ public:
return range;
}
- double set_host_rate(const double rate)
+ double set_host_rate(const double rate) override
{
const size_t interp_rate =
boost::math::iround(_tick_rate / this->get_host_rates().clip(rate, true));
@@ -165,12 +165,12 @@ public:
_iface->poke32(REG_DSP_TX_SCALE_IQ, actual_scalar);
}
- double get_scaling_adjustment(void)
+ double get_scaling_adjustment(void) override
{
return _fxpt_scalar_correction * _host_extra_scaling * 32767.;
}
- double set_freq(const double requested_freq)
+ double set_freq(const double requested_freq) override
{
double actual_freq;
int32_t freq_word;
@@ -179,13 +179,13 @@ public:
return actual_freq;
}
- uhd::meta_range_t get_freq_range(void)
+ uhd::meta_range_t get_freq_range(void) override
{
return uhd::meta_range_t(
-_tick_rate / 2, +_tick_rate / 2, _tick_rate / std::pow(2.0, 32));
}
- void set_updates(const size_t cycles_per_up, const size_t packets_per_up)
+ void set_updates(const size_t cycles_per_up, const size_t packets_per_up) override
{
_iface->poke32(REG_TX_CTRL_CYCLES_PER_UP,
(cycles_per_up == 0) ? 0 : (FLAG_TX_CTRL_UP_ENB | cycles_per_up));
@@ -193,7 +193,7 @@ public:
(packets_per_up == 0) ? 0 : (FLAG_TX_CTRL_UP_ENB | packets_per_up));
}
- void setup(const uhd::stream_args_t& stream_args)
+ void setup(const uhd::stream_args_t& stream_args) override
{
if (not stream_args.args.has_key("noclear"))
this->clear();
diff --git a/host/lib/usrp/cores/tx_dsp_core_3000.cpp b/host/lib/usrp/cores/tx_dsp_core_3000.cpp
index 3b0d85c00..f46938de3 100644
--- a/host/lib/usrp/cores/tx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/tx_dsp_core_3000.cpp
@@ -46,19 +46,19 @@ public:
this->set_tick_rate(1.0);
}
- void set_tick_rate(const double rate)
+ void set_tick_rate(const double rate) override
{
_tick_rate = rate;
set_freq(_current_freq);
}
- void set_link_rate(const double rate)
+ void set_link_rate(const double rate) override
{
//_link_rate = rate/sizeof(uint32_t); //in samps/s
_link_rate = rate / sizeof(uint16_t); // in samps/s (allows for 8sc)
}
- uhd::meta_range_t get_host_rates(void)
+ uhd::meta_range_t get_host_rates(void) override
{
meta_range_t range;
for (int rate = 512; rate > 256; rate -= 4) {
@@ -73,7 +73,7 @@ public:
return range;
}
- double set_host_rate(const double rate)
+ double set_host_rate(const double rate) override
{
const size_t interp_rate =
boost::math::iround(_tick_rate / this->get_host_rates().clip(rate, true));
@@ -128,12 +128,12 @@ public:
_iface->poke32(REG_DSP_TX_SCALE_IQ, actual_scalar);
}
- double get_scaling_adjustment(void)
+ double get_scaling_adjustment(void) override
{
return _fxpt_scalar_correction * _host_extra_scaling * 32767.;
}
- double set_freq(const double requested_freq)
+ double set_freq(const double requested_freq) override
{
double actual_freq;
int32_t freq_word;
@@ -143,18 +143,18 @@ public:
return actual_freq;
}
- double get_freq(void)
+ double get_freq(void) override
{
return _current_freq;
}
- uhd::meta_range_t get_freq_range(void)
+ uhd::meta_range_t get_freq_range(void) override
{
return uhd::meta_range_t(
-_tick_rate / 2, +_tick_rate / 2, _tick_rate / std::pow(2.0, 32));
}
- void setup(const uhd::stream_args_t& stream_args)
+ void setup(const uhd::stream_args_t& stream_args) override
{
if (stream_args.otw_format == "sc16") {
_dsp_extra_scaling = 1.0;
@@ -181,7 +181,7 @@ public:
this->update_scalar();
}
- void populate_subtree(property_tree::sptr subtree)
+ void populate_subtree(property_tree::sptr subtree) override
{
subtree->create<meta_range_t>("rate/range")
.set_publisher(std::bind(&tx_dsp_core_3000::get_host_rates, this));
diff --git a/host/lib/usrp/cores/tx_frontend_core_200.cpp b/host/lib/usrp/cores/tx_frontend_core_200.cpp
index 46a79c497..45b2045dd 100644
--- a/host/lib/usrp/cores/tx_frontend_core_200.cpp
+++ b/host/lib/usrp/cores/tx_frontend_core_200.cpp
@@ -51,7 +51,7 @@ public:
// NOP
}
- void set_mux(const std::string& mode)
+ void set_mux(const std::string& mode) override
{
static const uhd::dict<std::string, uint32_t> mode_to_mux =
boost::assign::map_list_of(
@@ -63,7 +63,7 @@ public:
_iface->poke32(REG_TX_FE_MUX, mode_to_mux[mode]);
}
- std::complex<double> set_dc_offset(const std::complex<double>& off)
+ std::complex<double> set_dc_offset(const std::complex<double>& off) override
{
static const double scaler = double(1ul << 23);
const int32_t i_dc_off = boost::math::iround(off.real() * scaler);
@@ -75,13 +75,13 @@ public:
return std::complex<double>(i_dc_off / scaler, q_dc_off / scaler);
}
- void set_iq_balance(const std::complex<double>& cor)
+ void set_iq_balance(const std::complex<double>& cor) override
{
_iface->poke32(REG_TX_FE_MAG_CORRECTION, fs_to_bits(cor.real(), 18));
_iface->poke32(REG_TX_FE_PHASE_CORRECTION, fs_to_bits(cor.imag(), 18));
}
- void populate_subtree(uhd::property_tree::sptr subtree)
+ void populate_subtree(uhd::property_tree::sptr subtree) override
{
subtree->create<uhd::meta_range_t>("dc_offset/range")
.set(meta_range_t(DC_OFFSET_MIN, DC_OFFSET_MAX));
diff --git a/host/lib/usrp/cores/tx_vita_core_3000.cpp b/host/lib/usrp/cores/tx_vita_core_3000.cpp
index c89301464..d586e2cfc 100644
--- a/host/lib/usrp/cores/tx_vita_core_3000.cpp
+++ b/host/lib/usrp/cores/tx_vita_core_3000.cpp
@@ -44,12 +44,12 @@ struct tx_vita_core_3000_impl : tx_vita_core_3000
this->clear();
}
- ~tx_vita_core_3000_impl(void)
+ ~tx_vita_core_3000_impl(void) override
{
UHD_SAFE_CALL(this->clear();)
}
- void clear(void)
+ void clear(void) override
{
this->configure_flow_control(0, 0);
this->set_underflow_policy(_policy); // clears the seq
@@ -69,14 +69,15 @@ struct tx_vita_core_3000_impl : tx_vita_core_3000
_policy = policy;
}
- void setup(const uhd::stream_args_t& stream_args)
+ void setup(const uhd::stream_args_t& stream_args) override
{
if (stream_args.args.has_key("underflow_policy")) {
this->set_underflow_policy(stream_args.args["underflow_policy"]);
}
}
- void configure_flow_control(const size_t cycs_per_up, const size_t pkts_per_up)
+ void configure_flow_control(
+ const size_t cycs_per_up, const size_t pkts_per_up) override
{
if (cycs_per_up == 0)
_iface->poke32(_fc_base + REG_CTRL_FC_CYCLE_OFFSET, 0);
diff --git a/host/lib/usrp/cores/user_settings_core_200.cpp b/host/lib/usrp/cores/user_settings_core_200.cpp
index c3606738a..abe1bee5f 100644
--- a/host/lib/usrp/cores/user_settings_core_200.cpp
+++ b/host/lib/usrp/cores/user_settings_core_200.cpp
@@ -26,7 +26,7 @@ public:
// NOP
}
- void set_reg(const user_reg_t& reg)
+ void set_reg(const user_reg_t& reg) override
{
_iface->poke32(REG_USER_ADDR, reg.first);
_iface->poke32(REG_USER_DATA, reg.second);
diff --git a/host/lib/usrp/cores/user_settings_core_3000.cpp b/host/lib/usrp/cores/user_settings_core_3000.cpp
index 7518756f7..9e04175c2 100644
--- a/host/lib/usrp/cores/user_settings_core_3000.cpp
+++ b/host/lib/usrp/cores/user_settings_core_3000.cpp
@@ -25,7 +25,7 @@ public:
{
}
- void poke64(const wb_addr_type offset, const uint64_t value)
+ void poke64(const wb_addr_type offset, const uint64_t value) override
{
if (offset % sizeof(uint64_t) != 0)
throw uhd::value_error("poke64: Incorrect address alignment");
@@ -33,7 +33,7 @@ public:
poke32(offset + 4, static_cast<uint32_t>(value >> 32));
}
- uint64_t peek64(const wb_addr_type offset)
+ uint64_t peek64(const wb_addr_type offset) override
{
if (offset % sizeof(uint64_t) != 0)
throw uhd::value_error("peek64: Incorrect address alignment");
@@ -44,7 +44,7 @@ public:
return _iface->peek64(_rb_reg_addr);
}
- void poke32(const wb_addr_type offset, const uint32_t value)
+ void poke32(const wb_addr_type offset, const uint32_t value) override
{
if (offset % sizeof(uint32_t) != 0)
throw uhd::value_error("poke32: Incorrect address alignment");
@@ -55,7 +55,7 @@ public:
_iface->poke32(REG_USER_SR_DATA, value);
}
- uint32_t peek32(const wb_addr_type offset)
+ uint32_t peek32(const wb_addr_type offset) override
{
if (offset % sizeof(uint32_t) != 0)
throw uhd::value_error("peek32: Incorrect address alignment");
diff --git a/host/lib/usrp/dboard/db_basic_and_lf.cpp b/host/lib/usrp/dboard/db_basic_and_lf.cpp
index 3282d53c3..d97220fde 100644
--- a/host/lib/usrp/dboard/db_basic_and_lf.cpp
+++ b/host/lib/usrp/dboard/db_basic_and_lf.cpp
@@ -28,7 +28,7 @@ class basic_rx : public rx_dboard_base
{
public:
basic_rx(ctor_args_t args, double max_freq);
- virtual ~basic_rx(void);
+ ~basic_rx(void) override;
private:
double _max_freq;
@@ -38,7 +38,7 @@ class basic_tx : public tx_dboard_base
{
public:
basic_tx(ctor_args_t args, double max_freq);
- virtual ~basic_tx(void);
+ ~basic_tx(void) override;
private:
double _max_freq;
diff --git a/host/lib/usrp/dboard/db_sbx_common.hpp b/host/lib/usrp/dboard/db_sbx_common.hpp
index c11f0bbe2..235d45fd2 100644
--- a/host/lib/usrp/dboard/db_sbx_common.hpp
+++ b/host/lib/usrp/dboard/db_sbx_common.hpp
@@ -124,7 +124,7 @@ class sbx_xcvr : public xcvr_dboard_base
{
public:
sbx_xcvr(ctor_args_t args);
- virtual ~sbx_xcvr(void);
+ ~sbx_xcvr(void) override;
protected:
uhd::dict<std::string, double> _tx_gains, _rx_gains;
@@ -182,9 +182,9 @@ protected:
{
public:
sbx_version3(sbx_xcvr* _self_sbx_xcvr);
- virtual ~sbx_version3(void);
+ ~sbx_version3(void) override;
- double set_lo_freq(dboard_iface::unit_t unit, double target_freq);
+ double set_lo_freq(dboard_iface::unit_t unit, double target_freq) override;
/*! This is the registered instance of the wrapper class, sbx_base. */
sbx_xcvr* self_base;
@@ -204,9 +204,9 @@ protected:
{
public:
sbx_version4(sbx_xcvr* _self_sbx_xcvr);
- virtual ~sbx_version4(void);
+ ~sbx_version4(void) override;
- double set_lo_freq(dboard_iface::unit_t unit, double target_freq);
+ double set_lo_freq(dboard_iface::unit_t unit, double target_freq) override;
/*! This is the registered instance of the wrapper class, sbx_base. */
sbx_xcvr* self_base;
@@ -231,9 +231,9 @@ protected:
{
public:
cbx(sbx_xcvr* _self_sbx_xcvr);
- virtual ~cbx(void);
+ ~cbx(void) override;
- double set_lo_freq(dboard_iface::unit_t unit, double target_freq);
+ double set_lo_freq(dboard_iface::unit_t unit, double target_freq) override;
/*! This is the registered instance of the wrapper class, sbx_base. */
sbx_xcvr* self_base;
diff --git a/host/lib/usrp/dboard/db_twinrx.cpp b/host/lib/usrp/dboard/db_twinrx.cpp
index a7c57979d..9aa67318b 100644
--- a/host/lib/usrp/dboard/db_twinrx.cpp
+++ b/host/lib/usrp/dboard/db_twinrx.cpp
@@ -247,7 +247,7 @@ public:
_expert, prepend_ch("synth/LO2/mapping", _ch_name), MAPPING_NONE);
}
- virtual ~twinrx_rcvr_fe(void) {}
+ ~twinrx_rcvr_fe(void) override {}
sensor_value_t get_lo_locked()
{
@@ -287,7 +287,7 @@ public:
_expert = expert_factory::create_container("twinrx_expert");
}
- virtual ~twinrx_rcvr(void) {}
+ ~twinrx_rcvr(void) override {}
inline expert_container::sptr get_expert()
{
@@ -299,7 +299,7 @@ public:
return _ctrl;
}
- virtual void initialize()
+ void initialize() override
{
//---------------------------------------------------------
// Add internal channel-agnostic data nodes to expert
diff --git a/host/lib/usrp/dboard/db_wbx_common.hpp b/host/lib/usrp/dboard/db_wbx_common.hpp
index e7beabd8b..63a40c504 100644
--- a/host/lib/usrp/dboard/db_wbx_common.hpp
+++ b/host/lib/usrp/dboard/db_wbx_common.hpp
@@ -95,7 +95,7 @@ class wbx_base : public xcvr_dboard_base
{
public:
wbx_base(ctor_args_t args);
- virtual ~wbx_base(void);
+ ~wbx_base(void) override;
protected:
virtual double set_rx_gain(double gain, const std::string& name);
@@ -156,11 +156,11 @@ protected:
{
public:
wbx_version2(wbx_base* _self_wbx_base);
- virtual ~wbx_version2(void);
+ ~wbx_version2(void) override;
- double set_tx_gain(double gain, const std::string& name);
- void set_tx_enabled(bool enb);
- double set_lo_freq(dboard_iface::unit_t unit, double target_freq);
+ double set_tx_gain(double gain, const std::string& name) override;
+ void set_tx_enabled(bool enb) override;
+ double set_lo_freq(dboard_iface::unit_t unit, double target_freq) override;
};
/*!
@@ -172,11 +172,11 @@ protected:
{
public:
wbx_version3(wbx_base* _self_wbx_base);
- virtual ~wbx_version3(void);
+ ~wbx_version3(void) override;
- double set_tx_gain(double gain, const std::string& name);
- void set_tx_enabled(bool enb);
- double set_lo_freq(dboard_iface::unit_t unit, double target_freq);
+ double set_tx_gain(double gain, const std::string& name) override;
+ void set_tx_enabled(bool enb) override;
+ double set_lo_freq(dboard_iface::unit_t unit, double target_freq) override;
};
/*!
@@ -188,11 +188,11 @@ protected:
{
public:
wbx_version4(wbx_base* _self_wbx_base);
- virtual ~wbx_version4(void);
+ ~wbx_version4(void) override;
- double set_tx_gain(double gain, const std::string& name);
- void set_tx_enabled(bool enb);
- double set_lo_freq(dboard_iface::unit_t unit, double target_freq);
+ double set_tx_gain(double gain, const std::string& name) override;
+ void set_tx_enabled(bool enb) override;
+ double set_lo_freq(dboard_iface::unit_t unit, double target_freq) override;
};
/*!
diff --git a/host/lib/usrp/dboard/e3xx/e31x_radio_control_impl.hpp b/host/lib/usrp/dboard/e3xx/e31x_radio_control_impl.hpp
index 04fa800e2..0fe0ccd56 100644
--- a/host/lib/usrp/dboard/e3xx/e31x_radio_control_impl.hpp
+++ b/host/lib/usrp/dboard/e3xx/e31x_radio_control_impl.hpp
@@ -29,9 +29,9 @@ public:
* Structors and deinit
***********************************************************************/
e31x_radio_control_impl(make_args_ptr make_args);
- virtual ~e31x_radio_control_impl();
+ ~e31x_radio_control_impl() override;
- std::vector<std::string> get_gpio_banks() const
+ std::vector<std::string> get_gpio_banks() const override
{
return {E31x_GPIO_BANK};
}
@@ -117,22 +117,22 @@ private:
/************************************************************************
* E3XX API calls
***********************************************************************/
- const std::string get_default_timing_mode()
+ const std::string get_default_timing_mode() override
{
return TIMING_MODE_1R1T;
};
uint32_t get_rx_switches(
- const size_t chan, const double freq, const std::string& ant);
+ const size_t chan, const double freq, const std::string& ant) override;
- uint32_t get_tx_switches(const size_t chan, const double freq);
+ uint32_t get_tx_switches(const size_t chan, const double freq) override;
- uint32_t get_idle_switches();
+ uint32_t get_idle_switches() override;
- uint32_t get_tx_led();
- uint32_t get_rx_led();
- uint32_t get_txrx_led();
- uint32_t get_idle_led();
+ uint32_t get_tx_led() override;
+ uint32_t get_rx_led() override;
+ uint32_t get_txrx_led() override;
+ uint32_t get_idle_led() override;
};
}} /* namespace uhd::rfnoc */
diff --git a/host/lib/usrp/dboard/e3xx/e320_radio_control_impl.hpp b/host/lib/usrp/dboard/e3xx/e320_radio_control_impl.hpp
index f781eb49d..7ba64b0ab 100644
--- a/host/lib/usrp/dboard/e3xx/e320_radio_control_impl.hpp
+++ b/host/lib/usrp/dboard/e3xx/e320_radio_control_impl.hpp
@@ -28,9 +28,9 @@ public:
* Structors
***********************************************************************/
e320_radio_control_impl(make_args_ptr make_args);
- virtual ~e320_radio_control_impl();
+ ~e320_radio_control_impl() override;
- std::vector<std::string> get_gpio_banks() const
+ std::vector<std::string> get_gpio_banks() const override
{
return {E320_GPIO_BANK};
}
@@ -103,22 +103,22 @@ protected:
/************************************************************************
* E3XX API calls
***********************************************************************/
- const std::string get_default_timing_mode()
+ const std::string get_default_timing_mode() override
{
return TIMING_MODE_2R2T;
};
uint32_t get_rx_switches(
- const size_t chan, const double freq, const std::string& ant);
+ const size_t chan, const double freq, const std::string& ant) override;
- uint32_t get_tx_switches(const size_t chan, const double freq);
+ uint32_t get_tx_switches(const size_t chan, const double freq) override;
- uint32_t get_idle_switches();
+ uint32_t get_idle_switches() override;
- uint32_t get_tx_led();
- uint32_t get_rx_led();
- uint32_t get_txrx_led();
- uint32_t get_idle_led();
+ uint32_t get_tx_led() override;
+ uint32_t get_rx_led() override;
+ uint32_t get_txrx_led() override;
+ uint32_t get_idle_led() override;
};
}} /* namespace uhd::rfnoc */
diff --git a/host/lib/usrp/dboard/e3xx/e3xx_ad9361_iface.cpp b/host/lib/usrp/dboard/e3xx/e3xx_ad9361_iface.cpp
index acd0be211..108b94a80 100644
--- a/host/lib/usrp/dboard/e3xx/e3xx_ad9361_iface.cpp
+++ b/host/lib/usrp/dboard/e3xx/e3xx_ad9361_iface.cpp
@@ -21,94 +21,94 @@ public:
_log_prefix, "Initialized controls with RPC prefix " << _rpc_prefix);
}
- double set_bw_filter(const std::string& which, const double bw)
+ double set_bw_filter(const std::string& which, const double bw) override
{
return _rpcc->request_with_token<double>(
this->_rpc_prefix + "set_bw_filter", which, bw);
}
- double set_gain(const std::string& which, const double value)
+ double set_gain(const std::string& which, const double value) override
{
return _rpcc->request_with_token<double>(
this->_rpc_prefix + "set_gain", which, value);
}
- void set_agc(const std::string& which, bool enable)
+ void set_agc(const std::string& which, bool enable) override
{
_rpcc->request_with_token<void>(this->_rpc_prefix + "set_agc", which, enable);
}
- void set_agc_mode(const std::string& which, const std::string& mode)
+ void set_agc_mode(const std::string& which, const std::string& mode) override
{
_rpcc->request_with_token<void>(this->_rpc_prefix + "set_agc_mode", which, mode);
}
- double set_clock_rate(const double rate)
+ double set_clock_rate(const double rate) override
{
return _rpcc->request_with_token<double>(
E3XX_RATE_TIMEOUT, this->_rpc_prefix + "set_catalina_clock_rate", rate);
}
- void set_active_chains(bool tx1, bool tx2, bool rx1, bool rx2)
+ void set_active_chains(bool tx1, bool tx2, bool rx1, bool rx2) override
{
_rpcc->request_with_token<void>(
this->_rpc_prefix + "set_active_chains", tx1, tx2, rx1, rx2);
}
- double tune(const std::string& which, const double value)
+ double tune(const std::string& which, const double value) override
{
return _rpcc->request_with_token<double>(
E3XX_TUNE_TIMEOUT, this->_rpc_prefix + "catalina_tune", which, value);
}
- void set_dc_offset_auto(const std::string& which, const bool on)
+ void set_dc_offset_auto(const std::string& which, const bool on) override
{
_rpcc->request_with_token<void>(
this->_rpc_prefix + "set_dc_offset_auto", which, on);
}
- void set_timing_mode(const std::string& timing_mode)
+ void set_timing_mode(const std::string& timing_mode) override
{
_rpcc->request_with_token<void>(
this->_rpc_prefix + "set_timing_mode", timing_mode);
}
- void set_iq_balance_auto(const std::string& which, const bool on)
+ void set_iq_balance_auto(const std::string& which, const bool on) override
{
_rpcc->request_with_token<void>(
this->_rpc_prefix + "set_iq_balance_auto", which, on);
}
- double get_freq(const std::string& which)
+ double get_freq(const std::string& which) override
{
return _rpcc->request_with_token<double>(this->_rpc_prefix + "get_freq", which);
}
- void data_port_loopback(const bool on)
+ void data_port_loopback(const bool on) override
{
_rpcc->request_with_token<void>(this->_rpc_prefix + "data_port_loopback", on);
}
- sensor_value_t get_rssi(const std::string& which)
+ sensor_value_t get_rssi(const std::string& which) override
{
return sensor_value_t(_rpcc->request_with_token<sensor_value_t::sensor_map_t>(
this->_rpc_prefix + "get_rssi", which));
}
- sensor_value_t get_temperature()
+ sensor_value_t get_temperature() override
{
return sensor_value_t(_rpcc->request_with_token<sensor_value_t::sensor_map_t>(
this->_rpc_prefix + "get_temperature"));
}
- std::vector<std::string> get_filter_names(const std::string& which)
+ std::vector<std::string> get_filter_names(const std::string& which) override
{
return _rpcc->request_with_token<std::vector<std::string>>(
this->_rpc_prefix + "get_filter_names", which);
}
filter_info_base::sptr get_filter(
- const std::string& /*which*/, const std::string& /*filter_name*/)
+ const std::string& /*which*/, const std::string& /*filter_name*/) override
{
throw uhd::runtime_error(
"ad9361_ctrl::get_filter is not supported over an RPC connection");
@@ -116,13 +116,13 @@ public:
void set_filter(const std::string& /*which*/,
const std::string& /*filter_name*/,
- const filter_info_base::sptr /*filter*/)
+ const filter_info_base::sptr /*filter*/) override
{
throw uhd::runtime_error(
"ad9361_ctrl::set_filter is not supported over an RPC connection");
}
- void output_digital_test_tone(bool enb)
+ void output_digital_test_tone(bool enb) override
{
_rpcc->request_with_token<void>(
this->_rpc_prefix + "output_digital_test_tone", enb);
diff --git a/host/lib/usrp/dboard/e3xx/e3xx_radio_control_impl.hpp b/host/lib/usrp/dboard/e3xx/e3xx_radio_control_impl.hpp
index d5714634c..658edc987 100644
--- a/host/lib/usrp/dboard/e3xx/e3xx_radio_control_impl.hpp
+++ b/host/lib/usrp/dboard/e3xx/e3xx_radio_control_impl.hpp
@@ -71,90 +71,94 @@ public:
* Structors
***********************************************************************/
e3xx_radio_control_impl(make_args_ptr make_args);
- virtual ~e3xx_radio_control_impl();
+ ~e3xx_radio_control_impl() override;
/************************************************************************
* node_t && noc_block_base API calls
***********************************************************************/
- void deinit();
+ void deinit() override;
bool check_topology(const std::vector<size_t>& connected_inputs,
- const std::vector<size_t>& connected_outputs);
+ const std::vector<size_t>& connected_outputs) override;
/************************************************************************
* radio_control API calls
***********************************************************************/
- double set_rate(const double rate);
- uhd::meta_range_t get_rate_range() const;
+ double set_rate(const double rate) override;
+ uhd::meta_range_t get_rate_range() const override;
// Setters
- void set_tx_antenna(const std::string& ant, const size_t chan);
- void set_rx_antenna(const std::string& ant, const size_t chan);
- double set_tx_frequency(const double freq, const size_t chan);
- double set_rx_frequency(const double freq, 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);
- void set_rx_agc(const bool enable, const size_t chan);
- double set_tx_bandwidth(const double bandwidth, const size_t chan);
- double set_rx_bandwidth(const double bandwidth, const size_t chan);
+ void set_tx_antenna(const std::string& ant, const size_t chan) override;
+ void set_rx_antenna(const std::string& ant, const size_t chan) override;
+ double set_tx_frequency(const double freq, const size_t chan) override;
+ double set_rx_frequency(const double freq, const size_t chan) override;
+ double set_tx_gain(const double gain, const size_t chan) override;
+ double set_rx_gain(const double gain, const size_t chan) override;
+ void set_rx_agc(const bool enable, const size_t chan) override;
+ double set_tx_bandwidth(const double bandwidth, const size_t chan) override;
+ double set_rx_bandwidth(const double bandwidth, const size_t chan) override;
// Getters
- std::vector<std::string> get_tx_antennas(const size_t chan) const;
- std::vector<std::string> get_rx_antennas(const size_t chan) const;
- uhd::freq_range_t get_tx_frequency_range(const size_t chan) const;
- uhd::freq_range_t get_rx_frequency_range(const size_t chan) const;
- uhd::gain_range_t get_tx_gain_range(const size_t) const;
- uhd::gain_range_t get_rx_gain_range(const size_t) const;
- meta_range_t get_tx_bandwidth_range(size_t chan) const;
- meta_range_t get_rx_bandwidth_range(size_t chan) const;
+ std::vector<std::string> get_tx_antennas(const size_t chan) const override;
+ std::vector<std::string> get_rx_antennas(const size_t chan) const override;
+ uhd::freq_range_t get_tx_frequency_range(const size_t chan) const override;
+ uhd::freq_range_t get_rx_frequency_range(const size_t chan) const override;
+ uhd::gain_range_t get_tx_gain_range(const size_t) const override;
+ uhd::gain_range_t get_rx_gain_range(const size_t) const override;
+ meta_range_t get_tx_bandwidth_range(size_t chan) const override;
+ meta_range_t get_rx_bandwidth_range(size_t chan) const override;
/**************************************************************************
* Calibration-Related API Calls
*************************************************************************/
- virtual void set_rx_dc_offset(const bool enb, size_t chan = ALL_CHANS);
- virtual void set_rx_iq_balance(const bool enb, size_t chan);
+ void set_rx_dc_offset(const bool enb, size_t chan = ALL_CHANS) override;
+ void set_rx_iq_balance(const bool enb, size_t chan) override;
/**************************************************************************
* GPIO Controls
*************************************************************************/
- virtual void set_gpio_attr(
- const std::string& bank, const std::string& attr, const uint32_t value);
- virtual uint32_t get_gpio_attr(const std::string& bank, const std::string& attr);
+ void set_gpio_attr(
+ const std::string& bank, const std::string& attr, const uint32_t value) override;
+ uint32_t get_gpio_attr(const std::string& bank, const std::string& attr) override;
/**************************************************************************
* Sensor API
*************************************************************************/
- std::vector<std::string> get_rx_sensor_names(size_t chan) const;
- uhd::sensor_value_t get_rx_sensor(const std::string& name, size_t chan);
- std::vector<std::string> get_tx_sensor_names(size_t chan) const;
- uhd::sensor_value_t get_tx_sensor(const std::string& name, size_t chan);
+ std::vector<std::string> get_rx_sensor_names(size_t chan) const override;
+ uhd::sensor_value_t get_rx_sensor(const std::string& name, size_t chan) override;
+ std::vector<std::string> get_tx_sensor_names(size_t chan) const override;
+ uhd::sensor_value_t get_tx_sensor(const std::string& name, size_t chan) override;
/**************************************************************************
* Filter API
*************************************************************************/
- std::vector<std::string> get_rx_filter_names(const size_t chan) const;
- uhd::filter_info_base::sptr get_rx_filter(const std::string& name, const size_t chan);
- void set_rx_filter(
- const std::string& name, uhd::filter_info_base::sptr filter, const size_t chan);
-
- std::vector<std::string> get_tx_filter_names(const size_t chan) const;
- uhd::filter_info_base::sptr get_tx_filter(const std::string& name, const size_t chan);
- void set_tx_filter(
- const std::string& name, uhd::filter_info_base::sptr filter, const size_t chan);
+ std::vector<std::string> get_rx_filter_names(const size_t chan) const override;
+ uhd::filter_info_base::sptr get_rx_filter(
+ const std::string& name, const size_t chan) override;
+ void set_rx_filter(const std::string& name,
+ uhd::filter_info_base::sptr filter,
+ const size_t chan) override;
+
+ std::vector<std::string> get_tx_filter_names(const size_t chan) const override;
+ uhd::filter_info_base::sptr get_tx_filter(
+ const std::string& name, const size_t chan) override;
+ void set_tx_filter(const std::string& name,
+ uhd::filter_info_base::sptr filter,
+ const size_t chan) override;
/**************************************************************************
* Radio Identification API Calls
*************************************************************************/
- std::string get_slot_name() const
+ std::string get_slot_name() const override
{
return "A";
}
- virtual size_t get_chan_from_dboard_fe(
- const std::string& fe, const uhd::direction_t direction) const;
- virtual std::string get_dboard_fe_from_chan(
- const size_t chan, const uhd::direction_t direction) const;
- virtual std::string get_fe_name(
- const size_t chan, const uhd::direction_t direction) const;
+ size_t get_chan_from_dboard_fe(
+ const std::string& fe, const uhd::direction_t direction) const override;
+ std::string get_dboard_fe_from_chan(
+ const size_t chan, const uhd::direction_t direction) const override;
+ std::string get_fe_name(
+ const size_t chan, const uhd::direction_t direction) const override;
protected:
//! Map a frequency in Hz to an rx_band value. Will return
@@ -239,9 +243,9 @@ private:
void _set_atr_bits(const size_t chan);
- void set_db_eeprom(const uhd::eeprom_map_t& db_eeprom);
+ void set_db_eeprom(const uhd::eeprom_map_t& db_eeprom) override;
- uhd::eeprom_map_t get_db_eeprom();
+ uhd::eeprom_map_t get_db_eeprom() override;
/**************************************************************************
* Private attributes
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp
index e8c252605..897e00868 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp
@@ -67,99 +67,107 @@ public:
* Structors
***********************************************************************/
magnesium_radio_control_impl(make_args_ptr make_args);
- virtual ~magnesium_radio_control_impl();
+ ~magnesium_radio_control_impl() override;
/************************************************************************
* RF API calls
***********************************************************************/
// Note: We use the cached values in radio_ctrl_impl, so most getters are
// not reimplemented here
- double set_rate(double rate);
+ double set_rate(double rate) override;
// Setters
- void set_tx_antenna(const std::string& ant, const size_t chan);
- void set_rx_antenna(const std::string& ant, const size_t chan);
- double set_tx_frequency(const double freq, const size_t chan);
- double set_rx_frequency(const double freq, const size_t chan);
- double set_tx_gain(const double gain, const size_t chan);
- double set_tx_gain(const double gain, const std::string& name, const size_t chan);
- double set_rx_gain(const double gain, const size_t chan);
- double set_rx_gain(const double gain, const std::string& name, const size_t chan);
- double set_tx_bandwidth(const double bandwidth, const size_t chan);
- double set_rx_bandwidth(const double bandwidth, const size_t chan);
+ void set_tx_antenna(const std::string& ant, const size_t chan) override;
+ void set_rx_antenna(const std::string& ant, const size_t chan) override;
+ double set_tx_frequency(const double freq, const size_t chan) override;
+ double set_rx_frequency(const double freq, const size_t chan) override;
+ double set_tx_gain(const double gain, const size_t chan) override;
+ double set_tx_gain(
+ const double gain, const std::string& name, const size_t chan) override;
+ double set_rx_gain(const double gain, const size_t chan) override;
+ double set_rx_gain(
+ const double gain, const std::string& name, const size_t chan) override;
+ double set_tx_bandwidth(const double bandwidth, const size_t chan) override;
+ double set_rx_bandwidth(const double bandwidth, const size_t chan) override;
// Getters
- std::vector<std::string> get_tx_antennas(const size_t chan) const;
- std::vector<std::string> get_rx_antennas(const size_t chan) const;
- uhd::freq_range_t get_tx_frequency_range(const size_t chan) const;
- uhd::freq_range_t get_rx_frequency_range(const size_t chan) const;
- std::vector<std::string> get_tx_gain_names(const size_t) const;
- std::vector<std::string> get_rx_gain_names(const size_t) const;
- double get_tx_gain(const std::string&, size_t);
- double get_rx_gain(const std::string&, size_t);
- uhd::gain_range_t get_tx_gain_range(const size_t) const;
- uhd::gain_range_t get_tx_gain_range(const std::string&, const size_t) const;
- uhd::gain_range_t get_rx_gain_range(const size_t) const;
- uhd::gain_range_t get_rx_gain_range(const std::string&, const size_t) const;
- uhd::meta_range_t get_tx_bandwidth_range(size_t chan) const;
- uhd::meta_range_t get_rx_bandwidth_range(size_t chan) const;
+ std::vector<std::string> get_tx_antennas(const size_t chan) const override;
+ std::vector<std::string> get_rx_antennas(const size_t chan) const override;
+ uhd::freq_range_t get_tx_frequency_range(const size_t chan) const override;
+ uhd::freq_range_t get_rx_frequency_range(const size_t chan) const override;
+ std::vector<std::string> get_tx_gain_names(const size_t) const override;
+ std::vector<std::string> get_rx_gain_names(const size_t) const override;
+ double get_tx_gain(const std::string&, size_t) override;
+ double get_rx_gain(const std::string&, size_t) override;
+ uhd::gain_range_t get_tx_gain_range(const size_t) const override;
+ uhd::gain_range_t get_tx_gain_range(const std::string&, const size_t) const override;
+ uhd::gain_range_t get_rx_gain_range(const size_t) const override;
+ uhd::gain_range_t get_rx_gain_range(const std::string&, const size_t) const override;
+ uhd::meta_range_t get_tx_bandwidth_range(size_t chan) const override;
+ uhd::meta_range_t get_rx_bandwidth_range(size_t chan) const override;
/**************************************************************************
* LO Controls
*************************************************************************/
- std::vector<std::string> get_rx_lo_names(const size_t chan) const;
+ std::vector<std::string> get_rx_lo_names(const size_t chan) const override;
std::vector<std::string> get_rx_lo_sources(
- const std::string& name, const size_t chan) const;
- freq_range_t get_rx_lo_freq_range(const std::string& name, const size_t chan) const;
+ const std::string& name, const size_t chan) const override;
+ freq_range_t get_rx_lo_freq_range(
+ const std::string& name, const size_t chan) const override;
void set_rx_lo_source(
- const std::string& src, const std::string& name, const size_t chan);
+ const std::string& src, const std::string& name, const size_t chan) override;
const std::string get_rx_lo_source(const std::string& name, const size_t chan) const;
- double set_rx_lo_freq(double freq, const std::string& name, const size_t chan);
- double get_rx_lo_freq(const std::string& name, const size_t chan);
- std::vector<std::string> get_tx_lo_names(const size_t chan) const;
+ double set_rx_lo_freq(
+ double freq, const std::string& name, const size_t chan) override;
+ double get_rx_lo_freq(const std::string& name, const size_t chan) override;
+ std::vector<std::string> get_tx_lo_names(const size_t chan) const override;
std::vector<std::string> get_tx_lo_sources(
const std::string& name, const size_t chan) const;
- freq_range_t get_tx_lo_freq_range(const std::string& name, const size_t chan);
+ freq_range_t get_tx_lo_freq_range(
+ const std::string& name, const size_t chan) override;
void set_tx_lo_source(
- const std::string& src, const std::string& name, const size_t chan);
- const std::string get_tx_lo_source(const std::string& name, const size_t chan);
- double set_tx_lo_freq(const double freq, const std::string& name, const size_t chan);
- double get_tx_lo_freq(const std::string& name, const size_t chan);
+ const std::string& src, const std::string& name, const size_t chan) override;
+ const std::string get_tx_lo_source(
+ const std::string& name, const size_t chan) override;
+ double set_tx_lo_freq(
+ const double freq, const std::string& name, const size_t chan) override;
+ double get_tx_lo_freq(const std::string& name, const size_t chan) override;
/**************************************************************************
* GPIO Controls
*************************************************************************/
- std::vector<std::string> get_gpio_banks() const;
+ std::vector<std::string> get_gpio_banks() const override;
void set_gpio_attr(
- const std::string& bank, const std::string& attr, const uint32_t value);
- uint32_t get_gpio_attr(const std::string& bank, const std::string& attr);
+ const std::string& bank, const std::string& attr, const uint32_t value) override;
+ uint32_t get_gpio_attr(const std::string& bank, const std::string& attr) override;
/**************************************************************************
* EEPROM API
*************************************************************************/
- void set_db_eeprom(const uhd::eeprom_map_t& db_eeprom);
- uhd::eeprom_map_t get_db_eeprom();
+ void set_db_eeprom(const uhd::eeprom_map_t& db_eeprom) override;
+ uhd::eeprom_map_t get_db_eeprom() override;
/**************************************************************************
* Sensor API
*************************************************************************/
std::vector<std::string> get_rx_sensor_names(size_t chan);
- uhd::sensor_value_t get_rx_sensor(const std::string& name, size_t chan);
+ uhd::sensor_value_t get_rx_sensor(const std::string& name, size_t chan) override;
std::vector<std::string> get_tx_sensor_names(size_t chan);
- uhd::sensor_value_t get_tx_sensor(const std::string& name, size_t chan);
+ uhd::sensor_value_t get_tx_sensor(const std::string& name, size_t chan) override;
/**************************************************************************
* Radio Identification API Calls
*************************************************************************/
- std::string get_slot_name() const
+ std::string get_slot_name() const override
{
return _radio_slot;
}
size_t get_chan_from_dboard_fe(
- const std::string& fe, const uhd::direction_t direction) const;
+ const std::string& fe, const uhd::direction_t direction) const override;
std::string get_dboard_fe_from_chan(
- const size_t chan, const uhd::direction_t direction) const;
- std::string get_fe_name(const size_t chan, const uhd::direction_t direction) const;
+ const size_t chan, const uhd::direction_t direction) const override;
+ std::string get_fe_name(
+ const size_t chan, const uhd::direction_t direction) const override;
private:
/**************************************************************************
diff --git a/host/lib/usrp/dboard/rhodium/rhodium_radio_control.hpp b/host/lib/usrp/dboard/rhodium/rhodium_radio_control.hpp
index 1d33f0357..4d5ce2cbd 100644
--- a/host/lib/usrp/dboard/rhodium/rhodium_radio_control.hpp
+++ b/host/lib/usrp/dboard/rhodium/rhodium_radio_control.hpp
@@ -61,98 +61,105 @@ public:
* Structors
***********************************************************************/
rhodium_radio_control_impl(make_args_ptr make_args);
- virtual ~rhodium_radio_control_impl();
+ ~rhodium_radio_control_impl() override;
/************************************************************************
* RF API calls
***********************************************************************/
// Note: We use the cached values in radio_ctrl_impl, so most getters are
// not reimplemented here
- double set_rate(double rate);
+ double set_rate(double rate) override;
// Setters
- void set_tx_antenna(const std::string& ant, const size_t chan);
- void set_rx_antenna(const std::string& ant, const size_t chan);
- double set_tx_frequency(const double freq, const size_t chan);
- double set_rx_frequency(const double freq, const size_t chan);
- void set_tx_tune_args(const uhd::device_addr_t&, const size_t chan);
- void set_rx_tune_args(const uhd::device_addr_t&, 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);
+ void set_tx_antenna(const std::string& ant, const size_t chan) override;
+ void set_rx_antenna(const std::string& ant, const size_t chan) override;
+ double set_tx_frequency(const double freq, const size_t chan) override;
+ double set_rx_frequency(const double freq, const size_t chan) override;
+ void set_tx_tune_args(const uhd::device_addr_t&, const size_t chan) override;
+ void set_rx_tune_args(const uhd::device_addr_t&, const size_t chan) override;
+ double set_tx_gain(const double gain, const size_t chan) override;
+ double set_rx_gain(const double gain, const size_t chan) override;
// Getters
- std::vector<std::string> get_tx_antennas(const size_t) const;
- std::vector<std::string> get_rx_antennas(const size_t) const;
- uhd::freq_range_t get_tx_frequency_range(const size_t) const;
- uhd::freq_range_t get_rx_frequency_range(const size_t) const;
- uhd::gain_range_t get_tx_gain_range(const size_t) const;
- uhd::gain_range_t get_rx_gain_range(const size_t) const;
- uhd::meta_range_t get_tx_bandwidth_range(size_t) const;
- uhd::meta_range_t get_rx_bandwidth_range(size_t) const;
+ std::vector<std::string> get_tx_antennas(const size_t) const override;
+ std::vector<std::string> get_rx_antennas(const size_t) const override;
+ uhd::freq_range_t get_tx_frequency_range(const size_t) const override;
+ uhd::freq_range_t get_rx_frequency_range(const size_t) const override;
+ uhd::gain_range_t get_tx_gain_range(const size_t) const override;
+ uhd::gain_range_t get_rx_gain_range(const size_t) const override;
+ uhd::meta_range_t get_tx_bandwidth_range(size_t) const override;
+ uhd::meta_range_t get_rx_bandwidth_range(size_t) const override;
/**************************************************************************
* LO Controls
*************************************************************************/
- std::vector<std::string> get_rx_lo_names(const size_t chan) const;
+ std::vector<std::string> get_rx_lo_names(const size_t chan) const override;
std::vector<std::string> get_rx_lo_sources(
- const std::string& name, const size_t chan) const;
- freq_range_t get_rx_lo_freq_range(const std::string& name, const size_t chan) const;
+ const std::string& name, const size_t chan) const override;
+ freq_range_t get_rx_lo_freq_range(
+ const std::string& name, const size_t chan) const override;
void set_rx_lo_source(
- const std::string& src, const std::string& name, const size_t chan);
- const std::string get_rx_lo_source(const std::string& name, const size_t chan);
- double set_rx_lo_freq(double freq, const std::string& name, const size_t chan);
- double get_rx_lo_freq(const std::string& name, const size_t chan);
- std::vector<std::string> get_tx_lo_names(const size_t chan) const;
+ const std::string& src, const std::string& name, const size_t chan) override;
+ const std::string get_rx_lo_source(
+ const std::string& name, const size_t chan) override;
+ double set_rx_lo_freq(
+ double freq, const std::string& name, const size_t chan) override;
+ double get_rx_lo_freq(const std::string& name, const size_t chan) override;
+ std::vector<std::string> get_tx_lo_names(const size_t chan) const override;
std::vector<std::string> get_tx_lo_sources(
const std::string& name, const size_t chan) const;
- freq_range_t get_tx_lo_freq_range(const std::string& name, const size_t chan);
+ freq_range_t get_tx_lo_freq_range(
+ const std::string& name, const size_t chan) override;
void set_tx_lo_source(
- const std::string& src, const std::string& name, const size_t chan);
- const std::string get_tx_lo_source(const std::string& name, const size_t chan);
- double set_tx_lo_freq(const double freq, const std::string& name, const size_t chan);
- double get_tx_lo_freq(const std::string& name, const size_t chan);
+ const std::string& src, const std::string& name, const size_t chan) override;
+ const std::string get_tx_lo_source(
+ const std::string& name, const size_t chan) override;
+ double set_tx_lo_freq(
+ const double freq, const std::string& name, const size_t chan) override;
+ double get_tx_lo_freq(const std::string& name, const size_t chan) override;
// LO Export Control
void set_tx_lo_export_enabled(
- const bool enabled, const std::string& name, const size_t chan);
+ const bool enabled, const std::string& name, const size_t chan) override;
void set_rx_lo_export_enabled(
- const bool enabled, const std::string& name, const size_t chan);
- bool get_tx_lo_export_enabled(const std::string& name, const size_t chan);
+ const bool enabled, const std::string& name, const size_t chan) override;
+ bool get_tx_lo_export_enabled(const std::string& name, const size_t chan) override;
bool get_rx_lo_export_enabled(const std::string& name, const size_t chan);
/**************************************************************************
* GPIO Controls
*************************************************************************/
- std::vector<std::string> get_gpio_banks() const;
+ std::vector<std::string> get_gpio_banks() const override;
void set_gpio_attr(
- const std::string& bank, const std::string& attr, const uint32_t value);
- uint32_t get_gpio_attr(const std::string& bank, const std::string& attr);
+ const std::string& bank, const std::string& attr, const uint32_t value) override;
+ uint32_t get_gpio_attr(const std::string& bank, const std::string& attr) override;
/**************************************************************************
* EEPROM API
*************************************************************************/
- void set_db_eeprom(const uhd::eeprom_map_t& db_eeprom);
- uhd::eeprom_map_t get_db_eeprom();
+ void set_db_eeprom(const uhd::eeprom_map_t& db_eeprom) override;
+ uhd::eeprom_map_t get_db_eeprom() override;
/**************************************************************************
* Sensor API
*************************************************************************/
- std::vector<std::string> get_rx_sensor_names(size_t chan) const;
- uhd::sensor_value_t get_rx_sensor(const std::string& name, size_t chan);
- std::vector<std::string> get_tx_sensor_names(size_t chan) const;
- uhd::sensor_value_t get_tx_sensor(const std::string& name, size_t chan);
+ std::vector<std::string> get_rx_sensor_names(size_t chan) const override;
+ uhd::sensor_value_t get_rx_sensor(const std::string& name, size_t chan) override;
+ std::vector<std::string> get_tx_sensor_names(size_t chan) const override;
+ uhd::sensor_value_t get_tx_sensor(const std::string& name, size_t chan) override;
/**************************************************************************
* Radio Identification API Calls
*************************************************************************/
- std::string get_slot_name() const
+ std::string get_slot_name() const override
{
return _radio_slot;
}
size_t get_chan_from_dboard_fe(
- const std::string& fe, const uhd::direction_t direction) const;
+ const std::string& fe, const uhd::direction_t direction) const override;
std::string get_dboard_fe_from_chan(
- const size_t chan, const uhd::direction_t direction) const;
- std::string get_fe_name(const size_t chan, const uhd::direction_t direction) const;
+ const size_t chan, const uhd::direction_t direction) const override;
+ std::string get_fe_name(
+ const size_t chan, const uhd::direction_t direction) const override;
/************************************************************************
* ??? calls
@@ -201,7 +208,7 @@ private:
//! Safely shut down all peripherals
//
// Reminder: After this is called, no peeks and pokes are allowed!
- void deinit()
+ void deinit() override
{
RFNOC_LOG_TRACE("deinit()");
// Remove access to all peripherals
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp b/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp
index 9d2269916..0d5fea42c 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp
@@ -77,7 +77,7 @@ public:
}
private:
- virtual void resolve();
+ void resolve() override;
// Inputs
experts::data_reader_t<time_spec_t> _command_time;
@@ -126,7 +126,7 @@ public:
}
private:
- virtual void resolve();
+ void resolve() override;
static lo_inj_side_t _compute_lo2_inj_side(
double lo1_freq, double if1_freq, double if2_freq, double bandwidth);
static bool _has_mixer_spurs(double lo1_freq,
@@ -189,7 +189,7 @@ public:
}
private:
- virtual void resolve();
+ void resolve() override;
// Inputs
experts::data_reader_t<std::string> _lo_source_ch0;
@@ -240,7 +240,7 @@ public:
}
private:
- virtual void resolve();
+ void resolve() override;
// Inputs
experts::data_reader_t<twinrx_ctrl::lo_source_t> _lox_src_ch0;
@@ -282,7 +282,7 @@ public:
}
private:
- virtual void resolve();
+ void resolve() override;
// Inputs
experts::data_reader_t<double> _lo1_freq_c;
@@ -331,7 +331,7 @@ public:
}
private:
- virtual void resolve();
+ void resolve() override;
// Inputs
const std::string _channel;
@@ -390,7 +390,7 @@ public:
}
private:
- virtual void resolve();
+ void resolve() override;
// Inputs
experts::data_reader_t<std::string> _antenna_ch0;
@@ -449,7 +449,7 @@ public:
}
private:
- virtual void resolve();
+ void resolve() override;
// Inputs
experts::data_reader_t<double> _gain;
@@ -519,7 +519,7 @@ public:
}
private:
- virtual void resolve();
+ void resolve() override;
// Inputs
experts::data_reader_t<twinrx_ctrl::antenna_mapping_t> _ant_mapping;
@@ -610,7 +610,7 @@ public:
}
private:
- virtual void resolve();
+ void resolve() override;
void _resolve_lox_freq(lo_stage_t lo_stage,
experts::data_reader_t<double>& ch0_freq_d,
experts::data_reader_t<double>& ch1_freq_d,
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_io.hpp b/host/lib/usrp/dboard/twinrx/twinrx_io.hpp
index 2949138dd..538b0bfa8 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_io.hpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_io.hpp
@@ -88,7 +88,7 @@ public:
_db_iface->set_gpio_out(dboard_iface::UNIT_BOTH, 0, ~GPIO_PINCTRL_MASK);
}
- ~twinrx_gpio()
+ ~twinrx_gpio() override
{
_db_iface->set_gpio_ddr(dboard_iface::UNIT_BOTH, ~GPIO_OUTPUT_MASK, SET_ALL_BITS);
}
@@ -111,7 +111,7 @@ public:
}
// CPLD register write-only interface
- void poke32(const wb_addr_type addr, const uint32_t data)
+ void poke32(const wb_addr_type addr, const uint32_t data) override
{
boost::lock_guard<boost::mutex> lock(_mutex);
using namespace soft_reg_field;
diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp
index dc7ca6ac9..4fe3e8a00 100644
--- a/host/lib/usrp/dboard_manager.cpp
+++ b/host/lib/usrp/dboard_manager.cpp
@@ -198,19 +198,19 @@ public:
dboard_iface::sptr iface,
property_tree::sptr subtree,
bool defer_db_init);
- virtual ~dboard_manager_impl(void);
+ ~dboard_manager_impl(void) override;
- inline const std::vector<std::string>& get_rx_frontends() const
+ inline const std::vector<std::string>& get_rx_frontends() const override
{
return _rx_frontends;
}
- inline const std::vector<std::string>& get_tx_frontends() const
+ inline const std::vector<std::string>& get_tx_frontends() const override
{
return _tx_frontends;
}
- void initialize_dboards();
+ void initialize_dboards() override;
private:
void init(dboard_eeprom_t, dboard_eeprom_t, property_tree::sptr, bool);
diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp
index 60866b85e..bcf938863 100644
--- a/host/lib/usrp/gps_ctrl.cpp
+++ b/host/lib/usrp/gps_ctrl.cpp
@@ -248,20 +248,20 @@ public:
update_cache();
}
- ~gps_ctrl_impl(void)
+ ~gps_ctrl_impl(void) override
{
/* NOP */
}
// return a list of supported sensors
- std::vector<std::string> get_sensors(void)
+ std::vector<std::string> get_sensors(void) override
{
std::vector<std::string> ret{
"gps_gpgga", "gps_gprmc", "gps_time", "gps_locked", "gps_servo"};
return ret;
}
- uhd::sensor_value_t get_sensor(std::string key)
+ uhd::sensor_value_t get_sensor(std::string key) override
{
if (key == "gps_gpgga" or key == "gps_gprmc") {
return sensor_value_t(boost::to_upper_copy(key),
@@ -333,7 +333,7 @@ private:
std::string datestr = get_token(reply, 9);
std::string timestr = get_token(reply, 1);
- if (datestr.size() == 0 or timestr.size() == 0) {
+ if (datestr.empty() or timestr.empty()) {
throw uhd::value_error(
str(boost::format("Invalid response \"%s\"") % reply));
}
@@ -368,7 +368,7 @@ private:
return (get_time() - from_time_t(0)).total_seconds();
}
- bool gps_detected(void)
+ bool gps_detected(void) override
{
return (_gps_type != GPS_TYPE_NONE);
}
diff --git a/host/lib/usrp/mpmd/mpmd_find.cpp b/host/lib/usrp/mpmd/mpmd_find.cpp
index 5d5aab1ba..97e6fab80 100644
--- a/host/lib/usrp/mpmd/mpmd_find.cpp
+++ b/host/lib/usrp/mpmd/mpmd_find.cpp
@@ -160,7 +160,7 @@ device_addrs_t mpmd_find_with_addrs(const device_addrs_t& hints)
UHD_LOG_TRACE("MPMD FIND", "Device responded: " << reply_addrs[0].to_string());
found_devices.push_back(reply_addrs[0]);
}
- if (found_devices.size() == 0) {
+ if (found_devices.empty()) {
return device_addrs_t();
} else if (found_devices.size() == 1) {
return found_devices;
diff --git a/host/lib/usrp/mpmd/mpmd_impl.hpp b/host/lib/usrp/mpmd/mpmd_impl.hpp
index 5b19bcc00..a8d7909e0 100644
--- a/host/lib/usrp/mpmd/mpmd_impl.hpp
+++ b/host/lib/usrp/mpmd/mpmd_impl.hpp
@@ -222,12 +222,12 @@ public:
* Structors
************************************************************************/
mpmd_impl(const uhd::device_addr_t& device_addr);
- ~mpmd_impl();
+ ~mpmd_impl() override;
/**************************************************************************
* API
************************************************************************/
- uhd::rfnoc::mb_iface& get_mb_iface(const size_t mb_idx)
+ uhd::rfnoc::mb_iface& get_mb_iface(const size_t mb_idx) override
{
if (mb_idx >= _mb.size()) {
throw uhd::index_error(
diff --git a/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp b/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp
index 56557bc39..dcb5d3473 100644
--- a/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp
+++ b/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.cpp
@@ -82,13 +82,12 @@ std::vector<std::string> get_addrs_from_mb_args(const uhd::device_addr_t& mb_arg
const mpmd_link_if_ctrl_udp::udp_link_info_map& link_info_list)
{
std::vector<std::string> addrs;
- if(link_info_list.size() > 0 &&
- link_info_list.begin()->second.link_type == "internal") {
+ if (!link_info_list.empty()
+ && link_info_list.begin()->second.link_type == "internal") {
// If link_type is "internal" we are local. In this case
// use this address always. MPM knows better than us.
addrs.push_back(link_info_list.begin()->first);
- }
- else {
+ } else {
if (mb_args.has_key(FIRST_ADDR_KEY)) {
addrs.push_back(mb_args[FIRST_ADDR_KEY]);
}
@@ -97,10 +96,9 @@ std::vector<std::string> get_addrs_from_mb_args(const uhd::device_addr_t& mb_arg
}
}
if(addrs.empty()) {
- if(link_info_list.size() > 0) {
+ if (!link_info_list.empty()) {
addrs.push_back(link_info_list.begin()->first);
- }
- else {
+ } else {
UHD_LOG_WARNING("MPMD::XPORT::UDP",
"The `" << FIRST_ADDR_KEY
<< "' key must be specified in "
diff --git a/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.hpp b/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.hpp
index 13d28e42b..876109aa4 100644
--- a/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.hpp
+++ b/host/lib/usrp/mpmd/mpmd_link_if_ctrl_udp.hpp
@@ -36,16 +36,16 @@ public:
const mpmd_link_if_mgr::xport_info_list_t& xport_info,
const uhd::rfnoc::chdr_w_t chdr_w);
- size_t get_num_links() const;
+ size_t get_num_links() const override;
uhd::transport::both_links_t get_link(const size_t link_idx,
const uhd::transport::link_type_t link_type,
- const uhd::device_addr_t& link_args);
- size_t get_mtu(const uhd::direction_t) const
+ const uhd::device_addr_t& link_args) override;
+ size_t get_mtu(const uhd::direction_t) const override
{
return _mtu;
}
- double get_link_rate(const size_t link_idx) const;
- const uhd::rfnoc::chdr::chdr_packet_factory& get_packet_factory() const;
+ double get_link_rate(const size_t link_idx) const override;
+ const uhd::rfnoc::chdr::chdr_packet_factory& get_packet_factory() const override;
private:
const uhd::device_addr_t _mb_args;
diff --git a/host/lib/usrp/mpmd/mpmd_link_if_mgr.cpp b/host/lib/usrp/mpmd/mpmd_link_if_mgr.cpp
index 558570257..2b27e83cb 100644
--- a/host/lib/usrp/mpmd/mpmd_link_if_mgr.cpp
+++ b/host/lib/usrp/mpmd/mpmd_link_if_mgr.cpp
@@ -35,7 +35,7 @@ public:
*************************************************************************/
bool connect(const std::string& link_type,
const xport_info_list_t& xport_info,
- const uhd::rfnoc::chdr_w_t chdr_w)
+ const uhd::rfnoc::chdr_w_t chdr_w) override
{
auto link_if_ctrl = make_link_if_ctrl(link_type, xport_info, chdr_w);
if (!link_if_ctrl) {
@@ -57,14 +57,14 @@ public:
return true;
}
- size_t get_num_links()
+ size_t get_num_links() override
{
return _link_link_if_ctrl_map.size();
}
uhd::transport::both_links_t get_link(const size_t link_idx,
const uhd::transport::link_type_t link_type,
- const uhd::device_addr_t& link_args)
+ const uhd::device_addr_t& link_args) override
{
const size_t link_if_ctrl_idx = _link_link_if_ctrl_map.at(link_idx).first;
const size_t xport_link_idx = _link_link_if_ctrl_map.at(link_idx).second;
@@ -72,13 +72,13 @@ public:
->get_link(xport_link_idx, link_type, link_args);
}
- size_t get_mtu(const size_t link_idx, const uhd::direction_t dir) const
+ size_t get_mtu(const size_t link_idx, const uhd::direction_t dir) const override
{
return _link_if_ctrls.at(_link_link_if_ctrl_map.at(link_idx).first)->get_mtu(dir);
}
const uhd::rfnoc::chdr::chdr_packet_factory& get_packet_factory(
- const size_t link_idx) const
+ const size_t link_idx) const override
{
const size_t link_if_ctrl_idx = _link_link_if_ctrl_map.at(link_idx).first;
return _link_if_ctrls.at(link_if_ctrl_idx)->get_packet_factory();
diff --git a/host/lib/usrp/mpmd/mpmd_mb_iface.hpp b/host/lib/usrp/mpmd/mpmd_mb_iface.hpp
index 4e54cfc12..f1b7285ec 100644
--- a/host/lib/usrp/mpmd/mpmd_mb_iface.hpp
+++ b/host/lib/usrp/mpmd/mpmd_mb_iface.hpp
@@ -22,24 +22,26 @@ public:
using uptr = std::unique_ptr<mpmd_mb_iface>;
using clock_iface_list_t = std::vector<std::map<std::string, std::string>>;
mpmd_mb_iface(const uhd::device_addr_t& mb_args, uhd::rpc_client::sptr rpc);
- ~mpmd_mb_iface() = default;
+ ~mpmd_mb_iface() override = default;
/*** mpmd_mb_iface API calls *****************************************/
//! Initialize transports
void init();
/*** mb_iface API calls **********************************************/
- uint16_t get_proto_ver();
- uhd::rfnoc::chdr_w_t get_chdr_w();
- uhd::endianness_t get_endianness(const uhd::rfnoc::device_id_t local_device_id);
- uhd::rfnoc::device_id_t get_remote_device_id();
- std::vector<uhd::rfnoc::device_id_t> get_local_device_ids();
+ uint16_t get_proto_ver() override;
+ uhd::rfnoc::chdr_w_t get_chdr_w() override;
+ uhd::endianness_t get_endianness(
+ const uhd::rfnoc::device_id_t local_device_id) override;
+ uhd::rfnoc::device_id_t get_remote_device_id() override;
+ std::vector<uhd::rfnoc::device_id_t> get_local_device_ids() override;
uhd::transport::adapter_id_t get_adapter_id(
- const uhd::rfnoc::device_id_t local_device_id);
- void reset_network();
- uhd::rfnoc::clock_iface::sptr get_clock_iface(const std::string& clock_name);
+ const uhd::rfnoc::device_id_t local_device_id) override;
+ void reset_network() override;
+ uhd::rfnoc::clock_iface::sptr get_clock_iface(const std::string& clock_name) override;
uhd::rfnoc::chdr_ctrl_xport::sptr make_ctrl_transport(
- uhd::rfnoc::device_id_t local_device_id, const uhd::rfnoc::sep_id_t& local_epid);
+ uhd::rfnoc::device_id_t local_device_id,
+ const uhd::rfnoc::sep_id_t& local_epid) override;
uhd::rfnoc::chdr_rx_data_xport::uptr make_rx_data_transport(
uhd::rfnoc::mgmt::mgmt_portal& mgmt_portal,
const uhd::rfnoc::sep_addr_pair_t& addrs,
@@ -47,7 +49,7 @@ public:
const uhd::rfnoc::sw_buff_t pyld_buff_fmt,
const uhd::rfnoc::sw_buff_t mdata_buff_fmt,
const uhd::device_addr_t& xport_args,
- const std::string& streamer_id);
+ const std::string& streamer_id) override;
uhd::rfnoc::chdr_tx_data_xport::uptr make_tx_data_transport(
uhd::rfnoc::mgmt::mgmt_portal& mgmt_portal,
const uhd::rfnoc::sep_addr_pair_t& addrs,
@@ -55,7 +57,7 @@ public:
const uhd::rfnoc::sw_buff_t pyld_buff_fmt,
const uhd::rfnoc::sw_buff_t mdata_buff_fmt,
const uhd::device_addr_t& xport_args,
- const std::string& streamer_id);
+ const std::string& streamer_id) override;
private:
uhd::device_addr_t _mb_args;
diff --git a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
index ac620f3e0..6e67b4b7e 100644
--- a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
+++ b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp
@@ -293,7 +293,7 @@ mpmd_mboard_impl::mpmd_mboard_impl(
UHD_LOG_DEBUG("MPMD", "MPM reports device info: " << device_info.to_string());
/// Get dboard info
const auto dboards_info = rpc->request<std::vector<dev_info>>("get_dboard_info");
- UHD_ASSERT_THROW(this->dboard_info.size() == 0);
+ UHD_ASSERT_THROW(this->dboard_info.empty());
for (const auto& dboard_info_dict : dboards_info) {
uhd::device_addr_t this_db_info;
for (const auto& info_pair : dboard_info_dict) {
diff --git a/host/lib/usrp/mpmd/sim_find.cpp b/host/lib/usrp/mpmd/sim_find.cpp
index 2f957977e..d41d8dc10 100644
--- a/host/lib/usrp/mpmd/sim_find.cpp
+++ b/host/lib/usrp/mpmd/sim_find.cpp
@@ -81,7 +81,7 @@ public:
{
}
- ~sim_impl()
+ ~sim_impl() override
{
// Destroys the mb_ifaces, causing mpm to be unclaimed before shutting down the
// simulator
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 78205fbdd..b80790f64 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -404,17 +404,17 @@ public:
_tree = _dev->get_tree();
}
- device::sptr get_device(void)
+ device::sptr get_device(void) override
{
return _dev;
}
- uhd::property_tree::sptr get_tree() const
+ uhd::property_tree::sptr get_tree() const override
{
return _tree;
}
- dict<std::string, std::string> get_usrp_rx_info(size_t chan)
+ dict<std::string, std::string> get_usrp_rx_info(size_t chan) override
{
mboard_chan_pair mcp = rx_chan_to_mcp(chan);
dict<std::string, std::string> usrp_info;
@@ -453,7 +453,7 @@ public:
return usrp_info;
}
- dict<std::string, std::string> get_usrp_tx_info(size_t chan)
+ dict<std::string, std::string> get_usrp_tx_info(size_t chan) override
{
mboard_chan_pair mcp = tx_chan_to_mcp(chan);
dict<std::string, std::string> usrp_info;
@@ -495,7 +495,7 @@ public:
/*******************************************************************
* Mboard methods
******************************************************************/
- void set_master_clock_rate(double rate, size_t mboard)
+ void set_master_clock_rate(double rate, size_t mboard) override
{
if (mboard != ALL_MBOARDS) {
if (_tree->exists(mb_root(mboard) / "auto_tick_rate")
@@ -512,12 +512,12 @@ public:
}
}
- double get_master_clock_rate(size_t mboard)
+ double get_master_clock_rate(size_t mboard) override
{
return _tree->access<double>(mb_root(mboard) / "tick_rate").get();
}
- meta_range_t get_master_clock_rate_range(const size_t mboard)
+ meta_range_t get_master_clock_rate_range(const size_t mboard) override
{
if (_tree->exists(mb_root(mboard) / "tick_rate/range")) {
return _tree->access<meta_range_t>(mb_root(mboard) / "tick_rate/range").get();
@@ -528,7 +528,7 @@ public:
return meta_range_t(tick_rate, tick_rate, 0);
}
- std::string get_pp_string(void)
+ std::string get_pp_string(void) override
{
std::string buff = str(boost::format("%s USRP:\n"
" Device: %s\n")
@@ -570,22 +570,22 @@ public:
return buff;
}
- std::string get_mboard_name(size_t mboard)
+ std::string get_mboard_name(size_t mboard) override
{
return _tree->access<std::string>(mb_root(mboard) / "name").get();
}
- time_spec_t get_time_now(size_t mboard = 0)
+ time_spec_t get_time_now(size_t mboard = 0) override
{
return _tree->access<time_spec_t>(mb_root(mboard) / "time/now").get();
}
- time_spec_t get_time_last_pps(size_t mboard = 0)
+ time_spec_t get_time_last_pps(size_t mboard = 0) override
{
return _tree->access<time_spec_t>(mb_root(mboard) / "time/pps").get();
}
- void set_time_now(const time_spec_t& time_spec, size_t mboard)
+ void set_time_now(const time_spec_t& time_spec, size_t mboard) override
{
if (mboard != ALL_MBOARDS) {
_tree->access<time_spec_t>(mb_root(mboard) / "time/now").set(time_spec);
@@ -596,7 +596,7 @@ public:
}
}
- void set_time_next_pps(const time_spec_t& time_spec, size_t mboard)
+ void set_time_next_pps(const time_spec_t& time_spec, size_t mboard) override
{
if (mboard != ALL_MBOARDS) {
_tree->access<time_spec_t>(mb_root(mboard) / "time/pps").set(time_spec);
@@ -607,7 +607,7 @@ public:
}
}
- void set_time_unknown_pps(const time_spec_t& time_spec)
+ void set_time_unknown_pps(const time_spec_t& time_spec) override
{
UHD_LOGGER_INFO("MULTI_USRP") << " 1) catch time transition at pps edge";
auto end_time =
@@ -643,7 +643,7 @@ public:
}
}
- bool get_time_synchronized(void)
+ bool get_time_synchronized(void) override
{
for (size_t m = 1; m < get_num_mboards(); m++) {
time_spec_t time_0 = this->get_time_now(0);
@@ -654,7 +654,7 @@ public:
return true;
}
- void set_command_time(const time_spec_t& time_spec, size_t mboard)
+ void set_command_time(const time_spec_t& time_spec, size_t mboard) override
{
if (mboard != ALL_MBOARDS) {
if (not _tree->exists(mb_root(mboard) / "time/cmd")) {
@@ -669,7 +669,7 @@ public:
}
}
- void clear_command_time(size_t mboard)
+ void clear_command_time(size_t mboard) override
{
if (mboard != ALL_MBOARDS) {
_tree->access<time_spec_t>(mb_root(mboard) / "time/cmd")
@@ -681,7 +681,7 @@ public:
}
}
- void issue_stream_cmd(const stream_cmd_t& stream_cmd, size_t chan)
+ void issue_stream_cmd(const stream_cmd_t& stream_cmd, size_t chan) override
{
if (chan != ALL_CHANS) {
_tree->access<stream_cmd_t>(rx_dsp_root(chan) / "stream_cmd").set(stream_cmd);
@@ -692,7 +692,7 @@ public:
}
}
- void set_time_source(const std::string& source, const size_t mboard)
+ void set_time_source(const std::string& source, const size_t mboard) override
{
if (mboard != ALL_MBOARDS) {
const auto time_source_path = mb_root(mboard) / "time_source/value";
@@ -713,7 +713,7 @@ public:
}
}
- std::string get_time_source(const size_t mboard)
+ std::string get_time_source(const size_t mboard) override
{
const auto time_source_path = mb_root(mboard) / "time_source/value";
if (_tree->exists(time_source_path)) {
@@ -729,7 +729,7 @@ public:
throw uhd::runtime_error("Cannot query time_source on this device!");
}
- std::vector<std::string> get_time_sources(const size_t mboard)
+ std::vector<std::string> get_time_sources(const size_t mboard) override
{
const auto time_source_path = mb_root(mboard) / "time_source/options";
if (_tree->exists(time_source_path)) {
@@ -746,7 +746,7 @@ public:
throw uhd::runtime_error("Cannot query time_source on this device!");
}
- void set_clock_source(const std::string& source, const size_t mboard)
+ void set_clock_source(const std::string& source, const size_t mboard) override
{
if (mboard != ALL_MBOARDS) {
const auto clock_source_path = mb_root(mboard) / "clock_source/value";
@@ -767,7 +767,7 @@ public:
}
}
- std::string get_clock_source(const size_t mboard)
+ std::string get_clock_source(const size_t mboard) override
{
const auto clock_source_path = mb_root(mboard) / "clock_source/value";
if (_tree->exists(clock_source_path)) {
@@ -786,7 +786,7 @@ public:
void set_sync_source(const std::string& clock_source,
const std::string& time_source,
- const size_t mboard)
+ const size_t mboard) override
{
device_addr_t sync_args;
sync_args["clock_source"] = clock_source;
@@ -794,7 +794,7 @@ public:
set_sync_source(sync_args, mboard);
}
- void set_sync_source(const device_addr_t& sync_source, const size_t mboard)
+ void set_sync_source(const device_addr_t& sync_source, const size_t mboard) override
{
if (mboard != ALL_MBOARDS) {
const auto sync_source_path = mb_root(mboard) / "sync_source/value";
@@ -818,7 +818,7 @@ public:
}
}
- device_addr_t get_sync_source(const size_t mboard)
+ device_addr_t get_sync_source(const size_t mboard) override
{
const auto sync_source_path = mb_root(mboard) / "sync_source/value";
if (_tree->exists(sync_source_path)) {
@@ -834,7 +834,7 @@ public:
return sync_source;
}
- std::vector<device_addr_t> get_sync_sources(const size_t mboard)
+ std::vector<device_addr_t> get_sync_sources(const size_t mboard) override
{
const auto sync_source_path = mb_root(mboard) / "sync_source/options";
if (_tree->exists(sync_source_path)) {
@@ -857,7 +857,7 @@ public:
return sync_sources;
}
- std::vector<std::string> get_clock_sources(const size_t mboard)
+ std::vector<std::string> get_clock_sources(const size_t mboard) override
{
const auto clock_source_path = mb_root(mboard) / "clock_source/options";
if (_tree->exists(clock_source_path)) {
@@ -874,7 +874,7 @@ public:
throw uhd::runtime_error("Cannot query clock_source on this device!");
}
- void set_clock_source_out(const bool enb, const size_t mboard)
+ void set_clock_source_out(const bool enb, const size_t mboard) override
{
if (mboard != ALL_MBOARDS) {
if (_tree->exists(mb_root(mboard) / "clock_source" / "output")) {
@@ -890,7 +890,7 @@ public:
}
}
- void set_time_source_out(const bool enb, const size_t mboard)
+ void set_time_source_out(const bool enb, const size_t mboard) override
{
if (mboard != ALL_MBOARDS) {
if (_tree->exists(mb_root(mboard) / "time_source" / "output")) {
@@ -906,17 +906,17 @@ public:
}
}
- size_t get_num_mboards(void)
+ size_t get_num_mboards(void) override
{
return _tree->list("/mboards").size();
}
- sensor_value_t get_mboard_sensor(const std::string& name, size_t mboard)
+ sensor_value_t get_mboard_sensor(const std::string& name, size_t mboard) override
{
return _tree->access<sensor_value_t>(mb_root(mboard) / "sensors" / name).get();
}
- std::vector<std::string> get_mboard_sensor_names(size_t mboard)
+ std::vector<std::string> get_mboard_sensor_names(size_t mboard) override
{
if (_tree->exists(mb_root(mboard) / "sensors")) {
return _tree->list(mb_root(mboard) / "sensors");
@@ -924,7 +924,8 @@ public:
return {};
}
- void set_user_register(const uint8_t addr, const uint32_t data, size_t mboard)
+ void set_user_register(
+ const uint8_t addr, const uint32_t data, size_t mboard) override
{
if (mboard != ALL_MBOARDS) {
typedef std::pair<uint8_t, uint32_t> user_reg_t;
@@ -937,7 +938,7 @@ public:
}
}
- wb_iface::sptr get_user_settings_iface(const size_t chan)
+ wb_iface::sptr get_user_settings_iface(const size_t chan) override
{
const auto user_settings_path = rx_rf_fe_root(chan) / "user_settings" / "iface";
if (_tree->exists(user_settings_path)) {
@@ -948,7 +949,7 @@ public:
return nullptr;
}
- uhd::rfnoc::radio_control& get_radio_control(const size_t)
+ uhd::rfnoc::radio_control& get_radio_control(const size_t) override
{
throw uhd::not_implemented_error(
"get_radio_control() not supported on this device!");
@@ -957,7 +958,7 @@ public:
/*******************************************************************
* RX methods
******************************************************************/
- rx_streamer::sptr get_rx_stream(const stream_args_t& args)
+ rx_streamer::sptr get_rx_stream(const stream_args_t& args) override
{
_check_link_rate(args, false);
stream_args_t args_ = args;
@@ -972,7 +973,7 @@ public:
return this->get_device()->get_rx_stream(args_);
}
- void set_rx_subdev_spec(const subdev_spec_t& spec, size_t mboard)
+ void set_rx_subdev_spec(const subdev_spec_t& spec, size_t mboard) override
{
if (mboard != ALL_MBOARDS) {
_tree->access<subdev_spec_t>(mb_root(mboard) / "rx_subdev_spec").set(spec);
@@ -983,7 +984,7 @@ public:
}
}
- subdev_spec_t get_rx_subdev_spec(size_t mboard)
+ subdev_spec_t get_rx_subdev_spec(size_t mboard) override
{
subdev_spec_t spec =
_tree->access<subdev_spec_t>(mb_root(mboard) / "rx_subdev_spec").get();
@@ -1009,7 +1010,7 @@ public:
return spec;
}
- size_t get_rx_num_channels(void)
+ size_t get_rx_num_channels(void) override
{
size_t sum = 0;
for (size_t m = 0; m < get_num_mboards(); m++) {
@@ -1018,12 +1019,12 @@ public:
return sum;
}
- std::string get_rx_subdev_name(size_t chan)
+ std::string get_rx_subdev_name(size_t chan) override
{
return _tree->access<std::string>(rx_rf_fe_root(chan) / "name").get();
}
- void set_rx_rate(double rate, size_t chan)
+ void set_rx_rate(double rate, size_t chan) override
{
if (chan != ALL_CHANS) {
_tree->access<double>(rx_dsp_root(chan) / "rate" / "value").set(rate);
@@ -1035,22 +1036,22 @@ public:
}
}
- void set_rx_spp(const size_t spp, const size_t chan = ALL_CHANS)
+ void set_rx_spp(const size_t spp, const size_t chan = ALL_CHANS) override
{
_rx_spp[chan] = spp;
}
- double get_rx_rate(size_t chan)
+ double get_rx_rate(size_t chan) override
{
return _tree->access<double>(rx_dsp_root(chan) / "rate" / "value").get();
}
- meta_range_t get_rx_rates(size_t chan)
+ meta_range_t get_rx_rates(size_t chan) override
{
return _tree->access<meta_range_t>(rx_dsp_root(chan) / "rate" / "range").get();
}
- tune_result_t set_rx_freq(const tune_request_t& tune_request, size_t chan)
+ tune_result_t set_rx_freq(const tune_request_t& tune_request, size_t chan) override
{
// If any mixer is driven by an external LO the daughterboard assumes that no
// CORDIC correction is necessary. Since the LO might be sourced from another
@@ -1080,14 +1081,14 @@ public:
return result;
}
- double get_rx_freq(size_t chan)
+ double get_rx_freq(size_t chan) override
{
return derive_freq_from_xx_subdev_and_dsp(RX_SIGN,
_tree->subtree(rx_dsp_root(chan)),
_tree->subtree(rx_rf_fe_root(chan)));
}
- freq_range_t get_rx_freq_range(size_t chan)
+ freq_range_t get_rx_freq_range(size_t chan) override
{
return make_overall_tune_range(
_tree->access<meta_range_t>(rx_rf_fe_root(chan) / "freq" / "range").get(),
@@ -1095,7 +1096,7 @@ public:
this->get_rx_bandwidth(chan));
}
- freq_range_t get_fe_rx_freq_range(size_t chan)
+ freq_range_t get_fe_rx_freq_range(size_t chan) override
{
return _tree->access<meta_range_t>(rx_rf_fe_root(chan) / "freq" / "range").get();
}
@@ -1103,7 +1104,7 @@ public:
/**************************************************************************
* LO controls
*************************************************************************/
- std::vector<std::string> get_rx_lo_names(size_t chan = 0)
+ std::vector<std::string> get_rx_lo_names(size_t chan = 0) override
{
std::vector<std::string> lo_names;
if (_tree->exists(rx_rf_fe_root(chan) / "los")) {
@@ -1114,8 +1115,9 @@ public:
return lo_names;
}
- void set_rx_lo_source(
- const std::string& src, const std::string& name = ALL_LOS, size_t chan = 0)
+ void set_rx_lo_source(const std::string& src,
+ const std::string& name = ALL_LOS,
+ size_t chan = 0) override
{
if (_tree->exists(rx_rf_fe_root(chan) / "los")) {
if (name == ALL_LOS) {
@@ -1148,7 +1150,8 @@ public:
}
}
- const std::string get_rx_lo_source(const std::string& name = ALL_LOS, size_t chan = 0)
+ const std::string get_rx_lo_source(
+ const std::string& name = ALL_LOS, size_t chan = 0) override
{
if (_tree->exists(rx_rf_fe_root(chan) / "los")) {
if (name == ALL_LOS) {
@@ -1174,7 +1177,7 @@ public:
}
std::vector<std::string> get_rx_lo_sources(
- const std::string& name = ALL_LOS, size_t chan = 0)
+ const std::string& name = ALL_LOS, size_t chan = 0) override
{
if (_tree->exists(rx_rf_fe_root(chan) / "los")) {
if (name == ALL_LOS) {
@@ -1205,7 +1208,7 @@ public:
}
void set_rx_lo_export_enabled(
- bool enabled, const std::string& name = ALL_LOS, size_t chan = 0)
+ bool enabled, const std::string& name = ALL_LOS, size_t chan = 0) override
{
if (_tree->exists(rx_rf_fe_root(chan) / "los")) {
if (name == ALL_LOS) {
@@ -1234,7 +1237,8 @@ public:
}
}
- bool get_rx_lo_export_enabled(const std::string& name = ALL_LOS, size_t chan = 0)
+ bool get_rx_lo_export_enabled(
+ const std::string& name = ALL_LOS, size_t chan = 0) override
{
if (_tree->exists(rx_rf_fe_root(chan) / "los")) {
if (name == ALL_LOS) {
@@ -1257,7 +1261,8 @@ public:
}
}
- double set_rx_lo_freq(double freq, const std::string& name = ALL_LOS, size_t chan = 0)
+ double set_rx_lo_freq(
+ double freq, const std::string& name = ALL_LOS, size_t chan = 0) override
{
if (_tree->exists(rx_rf_fe_root(chan) / "los")) {
if (name == ALL_LOS) {
@@ -1283,7 +1288,7 @@ public:
}
}
- double get_rx_lo_freq(const std::string& name = ALL_LOS, size_t chan = 0)
+ double get_rx_lo_freq(const std::string& name = ALL_LOS, size_t chan = 0) override
{
if (_tree->exists(rx_rf_fe_root(chan) / "los")) {
if (name == ALL_LOS) {
@@ -1305,7 +1310,8 @@ public:
}
}
- freq_range_t get_rx_lo_freq_range(const std::string& name = ALL_LOS, size_t chan = 0)
+ freq_range_t get_rx_lo_freq_range(
+ const std::string& name = ALL_LOS, size_t chan = 0) override
{
if (_tree->exists(rx_rf_fe_root(chan) / "los")) {
if (name == ALL_LOS) {
@@ -1328,7 +1334,7 @@ public:
}
}
- std::vector<std::string> get_tx_lo_names(const size_t chan = 0)
+ std::vector<std::string> get_tx_lo_names(const size_t chan = 0) override
{
std::vector<std::string> lo_names;
if (_tree->exists(tx_rf_fe_root(chan) / "los")) {
@@ -1339,8 +1345,9 @@ public:
return lo_names;
}
- void set_tx_lo_source(
- const std::string& src, const std::string& name = ALL_LOS, const size_t chan = 0)
+ void set_tx_lo_source(const std::string& src,
+ const std::string& name = ALL_LOS,
+ const size_t chan = 0) override
{
if (_tree->exists(tx_rf_fe_root(chan) / "los")) {
if (name == ALL_LOS) {
@@ -1373,7 +1380,7 @@ public:
}
const std::string get_tx_lo_source(
- const std::string& name = ALL_LOS, const size_t chan = 0)
+ const std::string& name = ALL_LOS, const size_t chan = 0) override
{
if (_tree->exists(tx_rf_fe_root(chan) / "los")) {
if (_tree->exists(tx_rf_fe_root(chan) / "los")) {
@@ -1392,7 +1399,7 @@ public:
}
std::vector<std::string> get_tx_lo_sources(
- const std::string& name = ALL_LOS, const size_t chan = 0)
+ const std::string& name = ALL_LOS, const size_t chan = 0) override
{
if (_tree->exists(tx_rf_fe_root(chan) / "los")) {
if (name == ALL_LOS) {
@@ -1423,8 +1430,9 @@ public:
}
}
- void set_tx_lo_export_enabled(
- const bool enabled, const std::string& name = ALL_LOS, const size_t chan = 0)
+ void set_tx_lo_export_enabled(const bool enabled,
+ const std::string& name = ALL_LOS,
+ const size_t chan = 0) override
{
if (_tree->exists(tx_rf_fe_root(chan) / "los")) {
if (name == ALL_LOS) {
@@ -1454,7 +1462,7 @@ public:
}
bool get_tx_lo_export_enabled(
- const std::string& name = ALL_LOS, const size_t chan = 0)
+ const std::string& name = ALL_LOS, const size_t chan = 0) override
{
if (_tree->exists(tx_rf_fe_root(chan) / "los")) {
if (_tree->exists(tx_rf_fe_root(chan) / "los")) {
@@ -1470,8 +1478,9 @@ public:
}
}
- double set_tx_lo_freq(
- const double freq, const std::string& name = ALL_LOS, const size_t chan = 0)
+ double set_tx_lo_freq(const double freq,
+ const std::string& name = ALL_LOS,
+ const size_t chan = 0) override
{
if (_tree->exists(tx_rf_fe_root(chan) / "los")) {
if (name == ALL_LOS) {
@@ -1494,7 +1503,8 @@ public:
}
}
- double get_tx_lo_freq(const std::string& name = ALL_LOS, const size_t chan = 0)
+ double get_tx_lo_freq(
+ const std::string& name = ALL_LOS, const size_t chan = 0) override
{
if (_tree->exists(tx_rf_fe_root(chan) / "los")) {
if (name == ALL_LOS) {
@@ -1518,7 +1528,7 @@ public:
}
freq_range_t get_tx_lo_freq_range(
- const std::string& name = ALL_LOS, const size_t chan = 0)
+ const std::string& name = ALL_LOS, const size_t chan = 0) override
{
if (_tree->exists(tx_rf_fe_root(chan) / "los")) {
if (name == ALL_LOS) {
@@ -1545,7 +1555,7 @@ public:
/**************************************************************************
* Gain control
*************************************************************************/
- void set_rx_gain(double gain, const std::string& name, size_t chan)
+ void set_rx_gain(double gain, const std::string& name, size_t chan) override
{
/* Check if any AGC mode is enable and if so warn the user */
if (chan != ALL_CHANS) {
@@ -1581,7 +1591,7 @@ public:
}
}
- void set_rx_gain_profile(const std::string& profile, const size_t chan)
+ void set_rx_gain_profile(const std::string& profile, const size_t chan) override
{
if (chan != ALL_CHANS) {
if (_tree->exists(rx_rf_fe_root(chan) / "gains/all/profile/value")) {
@@ -1601,7 +1611,7 @@ public:
}
}
- std::string get_rx_gain_profile(const size_t chan)
+ std::string get_rx_gain_profile(const size_t chan) override
{
if (chan != ALL_CHANS) {
if (_tree->exists(rx_rf_fe_root(chan) / "gains/all/profile/value")) {
@@ -1616,7 +1626,7 @@ public:
return "";
}
- std::vector<std::string> get_rx_gain_profile_names(const size_t chan)
+ std::vector<std::string> get_rx_gain_profile_names(const size_t chan) override
{
if (chan != ALL_CHANS) {
if (_tree->exists(rx_rf_fe_root(chan) / "gains/all/profile/options")) {
@@ -1632,7 +1642,7 @@ public:
return std::vector<std::string>();
}
- void set_normalized_rx_gain(double gain, size_t chan = 0)
+ void set_normalized_rx_gain(double gain, size_t chan = 0) override
{
if (gain > 1.0 || gain < 0.0) {
throw uhd::runtime_error("Normalized gain out of range, "
@@ -1644,7 +1654,7 @@ public:
set_rx_gain(abs_gain, ALL_GAINS, chan);
}
- void set_rx_agc(bool enable, size_t chan = 0)
+ void set_rx_agc(bool enable, size_t chan = 0) override
{
if (chan != ALL_CHANS) {
if (_tree->exists(rx_rf_fe_root(chan) / "gain" / "agc" / "enable")) {
@@ -1661,7 +1671,7 @@ public:
}
}
- double get_rx_gain(const std::string& name, size_t chan)
+ double get_rx_gain(const std::string& name, size_t chan) override
{
try {
return rx_gain_group(chan)->get_value(name);
@@ -1670,7 +1680,7 @@ public:
}
}
- double get_normalized_rx_gain(size_t chan)
+ double get_normalized_rx_gain(size_t chan) override
{
gain_range_t gain_range = get_rx_gain_range(ALL_GAINS, chan);
double gain_range_width = gain_range.stop() - gain_range.start();
@@ -1688,7 +1698,7 @@ public:
return norm_gain;
}
- gain_range_t get_rx_gain_range(const std::string& name, size_t chan)
+ gain_range_t get_rx_gain_range(const std::string& name, size_t chan) override
{
try {
return rx_gain_group(chan)->get_range(name);
@@ -1697,7 +1707,7 @@ public:
}
}
- std::vector<std::string> get_rx_gain_names(size_t chan)
+ std::vector<std::string> get_rx_gain_names(size_t chan) override
{
return rx_gain_group(chan)->get_names();
}
@@ -1705,12 +1715,12 @@ public:
/**************************************************************************
* RX Power control
*************************************************************************/
- bool has_rx_power_reference(const size_t chan)
+ bool has_rx_power_reference(const size_t chan) override
{
return _tree->exists(rx_rf_fe_root(chan) / "ref_power/value");
}
- void set_rx_power_reference(const double power_dbm, const size_t chan = 0)
+ void set_rx_power_reference(const double power_dbm, const size_t chan = 0) override
{
const auto power_ref_path = rx_rf_fe_root(chan) / "ref_power/value";
if (!_tree->exists(power_ref_path)) {
@@ -1720,7 +1730,7 @@ public:
_tree->access<double>(power_ref_path).set(power_dbm);
}
- double get_rx_power_reference(const size_t chan = 0)
+ double get_rx_power_reference(const size_t chan = 0) override
{
const auto power_ref_path = rx_rf_fe_root(chan) / "ref_power/value";
if (!_tree->exists(power_ref_path)) {
@@ -1730,7 +1740,7 @@ public:
return _tree->access<double>(power_ref_path).get();
}
- meta_range_t get_rx_power_range(const size_t chan)
+ meta_range_t get_rx_power_range(const size_t chan) override
{
const auto power_ref_path = rx_rf_fe_root(chan) / "ref_power/range";
if (!_tree->exists(power_ref_path)) {
@@ -1741,18 +1751,18 @@ public:
}
- void set_rx_antenna(const std::string& ant, size_t chan)
+ void set_rx_antenna(const std::string& ant, size_t chan) override
{
_tree->access<std::string>(rx_rf_fe_root(chan) / "antenna" / "value").set(ant);
}
- std::string get_rx_antenna(size_t chan)
+ std::string get_rx_antenna(size_t chan) override
{
return _tree->access<std::string>(rx_rf_fe_root(chan) / "antenna" / "value")
.get();
}
- std::vector<std::string> get_rx_antennas(size_t chan)
+ std::vector<std::string> get_rx_antennas(size_t chan) override
{
return _tree
->access<std::vector<std::string>>(
@@ -1760,23 +1770,23 @@ public:
.get();
}
- void set_rx_bandwidth(double bandwidth, size_t chan)
+ void set_rx_bandwidth(double bandwidth, size_t chan) override
{
_tree->access<double>(rx_rf_fe_root(chan) / "bandwidth" / "value").set(bandwidth);
}
- double get_rx_bandwidth(size_t chan)
+ double get_rx_bandwidth(size_t chan) override
{
return _tree->access<double>(rx_rf_fe_root(chan) / "bandwidth" / "value").get();
}
- meta_range_t get_rx_bandwidth_range(size_t chan)
+ meta_range_t get_rx_bandwidth_range(size_t chan) override
{
return _tree->access<meta_range_t>(rx_rf_fe_root(chan) / "bandwidth" / "range")
.get();
}
- dboard_iface::sptr get_rx_dboard_iface(size_t chan)
+ dboard_iface::sptr get_rx_dboard_iface(size_t chan) override
{
return _tree
->access<dboard_iface::sptr>(
@@ -1784,13 +1794,13 @@ public:
.get();
}
- sensor_value_t get_rx_sensor(const std::string& name, size_t chan)
+ sensor_value_t get_rx_sensor(const std::string& name, size_t chan) override
{
return _tree->access<sensor_value_t>(rx_rf_fe_root(chan) / "sensors" / name)
.get();
}
- std::vector<std::string> get_rx_sensor_names(size_t chan)
+ std::vector<std::string> get_rx_sensor_names(size_t chan) override
{
std::vector<std::string> sensor_names;
if (_tree->exists(rx_rf_fe_root(chan) / "sensors")) {
@@ -1799,7 +1809,7 @@ public:
return sensor_names;
}
- void set_rx_dc_offset(const bool enb, size_t chan)
+ void set_rx_dc_offset(const bool enb, size_t chan) override
{
if (chan != ALL_CHANS) {
if (_tree->exists(rx_fe_root(chan) / "dc_offset" / "enable")) {
@@ -1820,7 +1830,7 @@ public:
}
}
- void set_rx_dc_offset(const std::complex<double>& offset, size_t chan)
+ void set_rx_dc_offset(const std::complex<double>& offset, size_t chan) override
{
if (chan != ALL_CHANS) {
if (_tree->exists(rx_fe_root(chan) / "dc_offset" / "value")) {
@@ -1839,7 +1849,7 @@ public:
}
}
- meta_range_t get_rx_dc_offset_range(size_t chan)
+ meta_range_t get_rx_dc_offset_range(size_t chan) override
{
if (_tree->exists(rx_fe_root(chan) / "dc_offset" / "range")) {
return _tree
@@ -1852,7 +1862,7 @@ public:
}
}
- void set_rx_iq_balance(const bool enb, size_t chan)
+ void set_rx_iq_balance(const bool enb, size_t chan) override
{
if (chan != ALL_CHANS) {
if (_tree->exists(rx_rf_fe_root(chan) / "iq_balance" / "enable")) {
@@ -1869,7 +1879,7 @@ public:
}
}
- void set_rx_iq_balance(const std::complex<double>& offset, size_t chan)
+ void set_rx_iq_balance(const std::complex<double>& offset, size_t chan) override
{
if (chan != ALL_CHANS) {
if (_tree->exists(rx_fe_root(chan) / "iq_balance" / "value")) {
@@ -1888,7 +1898,7 @@ public:
}
}
- std::vector<std::string> get_rx_filter_names(const size_t chan)
+ std::vector<std::string> get_rx_filter_names(const size_t chan) override
{
if (chan >= get_rx_num_channels()) {
throw uhd::index_error("Attempting to get non-existent RX filter names");
@@ -1913,7 +1923,8 @@ public:
return ret;
}
- uhd::filter_info_base::sptr get_rx_filter(const std::string& name, const size_t chan)
+ uhd::filter_info_base::sptr get_rx_filter(
+ const std::string& name, const size_t chan) override
{
std::vector<std::string> possible_names = get_rx_filter_names(chan);
std::vector<std::string>::iterator it;
@@ -1925,8 +1936,9 @@ public:
return _tree->access<filter_info_base::sptr>(fs_path(name) / "value").get();
}
- void set_rx_filter(
- const std::string& name, uhd::filter_info_base::sptr filter, const size_t chan)
+ void set_rx_filter(const std::string& name,
+ uhd::filter_info_base::sptr filter,
+ const size_t chan) override
{
std::vector<std::string> possible_names = get_rx_filter_names(chan);
std::vector<std::string>::iterator it;
@@ -1938,7 +1950,7 @@ public:
_tree->access<filter_info_base::sptr>(fs_path(name) / "value").set(filter);
}
- std::vector<std::string> get_tx_filter_names(const size_t chan)
+ std::vector<std::string> get_tx_filter_names(const size_t chan) override
{
if (chan >= get_tx_num_channels()) {
throw uhd::index_error("Attempting to get non-existent TX filter names");
@@ -1963,7 +1975,8 @@ public:
return ret;
}
- uhd::filter_info_base::sptr get_tx_filter(const std::string& name, const size_t chan)
+ uhd::filter_info_base::sptr get_tx_filter(
+ const std::string& name, const size_t chan) override
{
std::vector<std::string> possible_names = get_tx_filter_names(chan);
std::vector<std::string>::iterator it;
@@ -1975,8 +1988,9 @@ public:
return _tree->access<filter_info_base::sptr>(fs_path(name) / "value").get();
}
- void set_tx_filter(
- const std::string& name, uhd::filter_info_base::sptr filter, const size_t chan)
+ void set_tx_filter(const std::string& name,
+ uhd::filter_info_base::sptr filter,
+ const size_t chan) override
{
std::vector<std::string> possible_names = get_tx_filter_names(chan);
std::vector<std::string>::iterator it;
@@ -1991,13 +2005,13 @@ public:
/*******************************************************************
* TX methods
******************************************************************/
- tx_streamer::sptr get_tx_stream(const stream_args_t& args)
+ tx_streamer::sptr get_tx_stream(const stream_args_t& args) override
{
_check_link_rate(args, true);
return this->get_device()->get_tx_stream(args);
}
- void set_tx_subdev_spec(const subdev_spec_t& spec, size_t mboard)
+ void set_tx_subdev_spec(const subdev_spec_t& spec, size_t mboard) override
{
if (mboard != ALL_MBOARDS) {
_tree->access<subdev_spec_t>(mb_root(mboard) / "tx_subdev_spec").set(spec);
@@ -2008,7 +2022,7 @@ public:
}
}
- subdev_spec_t get_tx_subdev_spec(size_t mboard)
+ subdev_spec_t get_tx_subdev_spec(size_t mboard) override
{
subdev_spec_t spec =
_tree->access<subdev_spec_t>(mb_root(mboard) / "tx_subdev_spec").get();
@@ -2034,7 +2048,7 @@ public:
return spec;
}
- size_t get_tx_num_channels(void)
+ size_t get_tx_num_channels(void) override
{
size_t sum = 0;
for (size_t m = 0; m < get_num_mboards(); m++) {
@@ -2043,12 +2057,12 @@ public:
return sum;
}
- std::string get_tx_subdev_name(size_t chan)
+ std::string get_tx_subdev_name(size_t chan) override
{
return _tree->access<std::string>(tx_rf_fe_root(chan) / "name").get();
}
- void set_tx_rate(double rate, size_t chan)
+ void set_tx_rate(double rate, size_t chan) override
{
if (chan != ALL_CHANS) {
_tree->access<double>(tx_dsp_root(chan) / "rate" / "value").set(rate);
@@ -2060,17 +2074,17 @@ public:
}
}
- double get_tx_rate(size_t chan)
+ double get_tx_rate(size_t chan) override
{
return _tree->access<double>(tx_dsp_root(chan) / "rate" / "value").get();
}
- meta_range_t get_tx_rates(size_t chan)
+ meta_range_t get_tx_rates(size_t chan) override
{
return _tree->access<meta_range_t>(tx_dsp_root(chan) / "rate" / "range").get();
}
- tune_result_t set_tx_freq(const tune_request_t& tune_request, size_t chan)
+ tune_result_t set_tx_freq(const tune_request_t& tune_request, size_t chan) override
{
tune_result_t result = tune_xx_subdev_and_dsp(TX_SIGN,
_tree->subtree(tx_dsp_root(chan)),
@@ -2080,14 +2094,14 @@ public:
return result;
}
- double get_tx_freq(size_t chan)
+ double get_tx_freq(size_t chan) override
{
return derive_freq_from_xx_subdev_and_dsp(TX_SIGN,
_tree->subtree(tx_dsp_root(chan)),
_tree->subtree(tx_rf_fe_root(chan)));
}
- freq_range_t get_tx_freq_range(size_t chan)
+ freq_range_t get_tx_freq_range(size_t chan) override
{
return make_overall_tune_range(
_tree->access<meta_range_t>(tx_rf_fe_root(chan) / "freq" / "range").get(),
@@ -2095,12 +2109,12 @@ public:
this->get_tx_bandwidth(chan));
}
- freq_range_t get_fe_tx_freq_range(size_t chan)
+ freq_range_t get_fe_tx_freq_range(size_t chan) override
{
return _tree->access<meta_range_t>(tx_rf_fe_root(chan) / "freq" / "range").get();
}
- void set_tx_gain(double gain, const std::string& name, size_t chan)
+ void set_tx_gain(double gain, const std::string& name, size_t chan) override
{
try {
return tx_gain_group(chan)->set_value(gain, name);
@@ -2109,7 +2123,7 @@ public:
}
}
- void set_tx_gain_profile(const std::string& profile, const size_t chan)
+ void set_tx_gain_profile(const std::string& profile, const size_t chan) override
{
if (chan != ALL_CHANS) {
if (_tree->exists(tx_rf_fe_root(chan) / "gains/all/profile/value")) {
@@ -2129,7 +2143,7 @@ public:
}
}
- std::string get_tx_gain_profile(const size_t chan)
+ std::string get_tx_gain_profile(const size_t chan) override
{
if (chan != ALL_CHANS) {
if (_tree->exists(tx_rf_fe_root(chan) / "gains/all/profile/value")) {
@@ -2144,7 +2158,7 @@ public:
return "";
}
- std::vector<std::string> get_tx_gain_profile_names(const size_t chan)
+ std::vector<std::string> get_tx_gain_profile_names(const size_t chan) override
{
if (chan != ALL_CHANS) {
if (_tree->exists(tx_rf_fe_root(chan) / "gains/all/profile/options")) {
@@ -2160,7 +2174,7 @@ public:
return std::vector<std::string>();
}
- void set_normalized_tx_gain(double gain, size_t chan = 0)
+ void set_normalized_tx_gain(double gain, size_t chan = 0) override
{
if (gain > 1.0 || gain < 0.0) {
throw uhd::runtime_error("Normalized gain out of range, must be in [0, 1].");
@@ -2172,7 +2186,7 @@ public:
}
- double get_tx_gain(const std::string& name, size_t chan)
+ double get_tx_gain(const std::string& name, size_t chan) override
{
try {
return tx_gain_group(chan)->get_value(name);
@@ -2181,7 +2195,7 @@ public:
}
}
- double get_normalized_tx_gain(size_t chan)
+ double get_normalized_tx_gain(size_t chan) override
{
gain_range_t gain_range = get_tx_gain_range(ALL_GAINS, chan);
double gain_range_width = gain_range.stop() - gain_range.start();
@@ -2199,7 +2213,7 @@ public:
return norm_gain;
}
- gain_range_t get_tx_gain_range(const std::string& name, size_t chan)
+ gain_range_t get_tx_gain_range(const std::string& name, size_t chan) override
{
try {
return tx_gain_group(chan)->get_range(name);
@@ -2208,7 +2222,7 @@ public:
}
}
- std::vector<std::string> get_tx_gain_names(size_t chan)
+ std::vector<std::string> get_tx_gain_names(size_t chan) override
{
return tx_gain_group(chan)->get_names();
}
@@ -2216,12 +2230,12 @@ public:
/**************************************************************************
* TX Power Controls
*************************************************************************/
- bool has_tx_power_reference(const size_t chan)
+ bool has_tx_power_reference(const size_t chan) override
{
return _tree->exists(tx_rf_fe_root(chan) / "ref_power/value");
}
- void set_tx_power_reference(const double power_dbm, const size_t chan = 0)
+ void set_tx_power_reference(const double power_dbm, const size_t chan = 0) override
{
const auto power_ref_path = tx_rf_fe_root(chan) / "ref_power/value";
if (!_tree->exists(power_ref_path)) {
@@ -2231,7 +2245,7 @@ public:
_tree->access<double>(power_ref_path).set(power_dbm);
}
- double get_tx_power_reference(const size_t chan = 0)
+ double get_tx_power_reference(const size_t chan = 0) override
{
const auto power_ref_path = tx_rf_fe_root(chan) / "ref_power/value";
if (!_tree->exists(power_ref_path)) {
@@ -2241,7 +2255,7 @@ public:
return _tree->access<double>(power_ref_path).get();
}
- meta_range_t get_tx_power_range(const size_t chan)
+ meta_range_t get_tx_power_range(const size_t chan) override
{
const auto power_ref_path = tx_rf_fe_root(chan) / "ref_power/range";
if (!_tree->exists(power_ref_path)) {
@@ -2251,18 +2265,18 @@ public:
return _tree->access<meta_range_t>(power_ref_path).get();
}
- void set_tx_antenna(const std::string& ant, size_t chan)
+ void set_tx_antenna(const std::string& ant, size_t chan) override
{
_tree->access<std::string>(tx_rf_fe_root(chan) / "antenna" / "value").set(ant);
}
- std::string get_tx_antenna(size_t chan)
+ std::string get_tx_antenna(size_t chan) override
{
return _tree->access<std::string>(tx_rf_fe_root(chan) / "antenna" / "value")
.get();
}
- std::vector<std::string> get_tx_antennas(size_t chan)
+ std::vector<std::string> get_tx_antennas(size_t chan) override
{
return _tree
->access<std::vector<std::string>>(
@@ -2270,23 +2284,23 @@ public:
.get();
}
- void set_tx_bandwidth(double bandwidth, size_t chan)
+ void set_tx_bandwidth(double bandwidth, size_t chan) override
{
_tree->access<double>(tx_rf_fe_root(chan) / "bandwidth" / "value").set(bandwidth);
}
- double get_tx_bandwidth(size_t chan)
+ double get_tx_bandwidth(size_t chan) override
{
return _tree->access<double>(tx_rf_fe_root(chan) / "bandwidth" / "value").get();
}
- meta_range_t get_tx_bandwidth_range(size_t chan)
+ meta_range_t get_tx_bandwidth_range(size_t chan) override
{
return _tree->access<meta_range_t>(tx_rf_fe_root(chan) / "bandwidth" / "range")
.get();
}
- dboard_iface::sptr get_tx_dboard_iface(size_t chan)
+ dboard_iface::sptr get_tx_dboard_iface(size_t chan) override
{
return _tree
->access<dboard_iface::sptr>(
@@ -2294,13 +2308,13 @@ public:
.get();
}
- sensor_value_t get_tx_sensor(const std::string& name, size_t chan)
+ sensor_value_t get_tx_sensor(const std::string& name, size_t chan) override
{
return _tree->access<sensor_value_t>(tx_rf_fe_root(chan) / "sensors" / name)
.get();
}
- std::vector<std::string> get_tx_sensor_names(size_t chan)
+ std::vector<std::string> get_tx_sensor_names(size_t chan) override
{
std::vector<std::string> sensor_names;
if (_tree->exists(rx_rf_fe_root(chan) / "sensors")) {
@@ -2309,7 +2323,7 @@ public:
return sensor_names;
}
- void set_tx_dc_offset(const std::complex<double>& offset, size_t chan)
+ void set_tx_dc_offset(const std::complex<double>& offset, size_t chan) override
{
if (chan != ALL_CHANS) {
if (_tree->exists(tx_fe_root(chan) / "dc_offset" / "value")) {
@@ -2328,7 +2342,7 @@ public:
}
}
- meta_range_t get_tx_dc_offset_range(size_t chan)
+ meta_range_t get_tx_dc_offset_range(size_t chan) override
{
if (_tree->exists(tx_fe_root(chan) / "dc_offset" / "range")) {
return _tree
@@ -2341,7 +2355,7 @@ public:
}
}
- void set_tx_iq_balance(const std::complex<double>& offset, size_t chan)
+ void set_tx_iq_balance(const std::complex<double>& offset, size_t chan) override
{
if (chan != ALL_CHANS) {
if (_tree->exists(tx_fe_root(chan) / "iq_balance" / "value")) {
@@ -2363,7 +2377,7 @@ public:
/*******************************************************************
* GPIO methods
******************************************************************/
- std::vector<std::string> get_gpio_banks(const size_t mboard)
+ std::vector<std::string> get_gpio_banks(const size_t mboard) override
{
std::vector<std::string> banks;
if (_tree->exists(mb_root(mboard) / "gpio")) {
@@ -2382,7 +2396,7 @@ public:
const std::string& attr,
const uint32_t value,
const uint32_t mask,
- const size_t mboard)
+ const size_t mboard) override
{
std::vector<std::string> attr_value;
if (_tree->exists(mb_root(mboard) / "gpio" / bank)) {
@@ -2466,7 +2480,7 @@ public:
}
uint32_t get_gpio_attr(
- const std::string& bank, const std::string& attr, const size_t mboard)
+ const std::string& bank, const std::string& attr, const size_t mboard) override
{
std::vector<std::string> str_val;
@@ -2533,31 +2547,32 @@ public:
}
// The next four methods are only for RFNoC devices
- std::vector<std::string> get_gpio_src_banks(const size_t)
+ std::vector<std::string> get_gpio_src_banks(const size_t) override
{
throw uhd::not_implemented_error(
"get_gpio_src_banks() not implemented for this motherboard!");
}
- std::vector<std::string> get_gpio_srcs(const std::string&, const size_t)
+ std::vector<std::string> get_gpio_srcs(const std::string&, const size_t) override
{
throw uhd::not_implemented_error(
"get_gpio_srcs() not implemented for this motherboard!");
}
- std::vector<std::string> get_gpio_src(const std::string&, const size_t)
+ std::vector<std::string> get_gpio_src(const std::string&, const size_t) override
{
throw uhd::not_implemented_error(
"get_gpio_src() not implemented for this motherboard!");
}
- void set_gpio_src(const std::string&, const std::vector<std::string>&, const size_t)
+ void set_gpio_src(
+ const std::string&, const std::vector<std::string>&, const size_t) override
{
throw uhd::not_implemented_error(
"set_gpio_src() not implemented for this motherboard!");
}
- uhd::rfnoc::mb_controller& get_mb_controller(const size_t /*mboard*/)
+ uhd::rfnoc::mb_controller& get_mb_controller(const size_t /*mboard*/) override
{
throw uhd::not_implemented_error(
"get_mb_controller() not supported on this device!");
diff --git a/host/lib/usrp/multi_usrp_rfnoc.cpp b/host/lib/usrp/multi_usrp_rfnoc.cpp
index b9e8f0a1f..bed364e60 100644
--- a/host/lib/usrp/multi_usrp_rfnoc.cpp
+++ b/host/lib/usrp/multi_usrp_rfnoc.cpp
@@ -76,19 +76,19 @@ class redirector_device : public uhd::device
public:
redirector_device(multi_usrp* musrp_ptr) : _musrp(musrp_ptr) {}
- rx_streamer::sptr get_rx_stream(const stream_args_t& args)
+ rx_streamer::sptr get_rx_stream(const stream_args_t& args) override
{
return _musrp->get_rx_stream(args);
}
- tx_streamer::sptr get_tx_stream(const stream_args_t& args)
+ tx_streamer::sptr get_tx_stream(const stream_args_t& args) override
{
auto streamer = _musrp->get_tx_stream(args);
_last_tx_streamer = streamer;
return streamer;
}
- bool recv_async_msg(async_metadata_t& md, double timeout)
+ bool recv_async_msg(async_metadata_t& md, double timeout) override
{
std::call_once(_async_warning_flag, []() {
UHD_LOG_WARNING(LOG_ID,
@@ -255,22 +255,22 @@ public:
_graph->commit();
}
- ~multi_usrp_rfnoc()
+ ~multi_usrp_rfnoc() override
{
// nop
}
- device::sptr get_device(void)
+ device::sptr get_device(void) override
{
return _device;
}
- uhd::property_tree::sptr get_tree() const
+ uhd::property_tree::sptr get_tree() const override
{
return _tree;
}
- rx_streamer::sptr get_rx_stream(const stream_args_t& args_)
+ rx_streamer::sptr get_rx_stream(const stream_args_t& args_) override
{
std::lock_guard<std::recursive_mutex> l(_graph_mutex);
stream_args_t args = sanitize_stream_args(args_);
@@ -355,7 +355,7 @@ public:
return rx_streamer;
}
- tx_streamer::sptr get_tx_stream(const stream_args_t& args_)
+ tx_streamer::sptr get_tx_stream(const stream_args_t& args_) override
{
std::lock_guard<std::recursive_mutex> l(_graph_mutex);
stream_args_t args = sanitize_stream_args(args_);
@@ -467,7 +467,7 @@ public:
return range;
}
- dict<std::string, std::string> get_usrp_rx_info(size_t chan)
+ dict<std::string, std::string> get_usrp_rx_info(size_t chan) override
{
auto& rx_chain = _get_rx_chan(chan);
const size_t mb_idx = rx_chain.radio->get_block_id().get_device_no();
@@ -501,7 +501,7 @@ public:
return usrp_info;
}
- dict<std::string, std::string> get_usrp_tx_info(size_t chan)
+ dict<std::string, std::string> get_usrp_tx_info(size_t chan) override
{
auto& tx_chain = _get_tx_chan(chan);
const size_t mb_idx = tx_chain.radio->get_block_id().get_device_no();
@@ -640,7 +640,7 @@ public:
/*******************************************************************
* Mboard methods
******************************************************************/
- void set_master_clock_rate(double rate, size_t mboard)
+ void set_master_clock_rate(double rate, size_t mboard) override
{
for (auto& chain : _rx_chans) {
auto radio = chain.second.radio;
@@ -658,7 +658,7 @@ public:
}
}
- double get_master_clock_rate(size_t mboard)
+ double get_master_clock_rate(size_t mboard) override
{
// We pick the first radio we can find on this mboard, and hope that all
// radios have the same range.
@@ -677,7 +677,7 @@ public:
throw uhd::key_error("Invalid mboard index!");
}
- meta_range_t get_master_clock_rate_range(const size_t mboard)
+ meta_range_t get_master_clock_rate_range(const size_t mboard) override
{
// We pick the first radio we can find on this mboard, and hope that all
// radios have the same range.
@@ -696,7 +696,7 @@ public:
throw uhd::key_error("Invalid mboard index!");
}
- std::string get_pp_string(void)
+ std::string get_pp_string(void) override
{
std::string buff = str(boost::format("%s USRP:\n"
" Device: %s\n")
@@ -735,34 +735,35 @@ public:
return buff;
}
- std::string get_mboard_name(size_t mboard = 0)
+ std::string get_mboard_name(size_t mboard = 0) override
{
return _get_mbc(mboard)->get_mboard_name();
}
- time_spec_t get_time_now(size_t mboard = 0)
+ time_spec_t get_time_now(size_t mboard = 0) override
{
return _get_mbc(mboard)->get_timekeeper(0)->get_time_now();
}
- time_spec_t get_time_last_pps(size_t mboard = 0)
+ time_spec_t get_time_last_pps(size_t mboard = 0) override
{
return _get_mbc(mboard)->get_timekeeper(0)->get_time_last_pps();
}
- void set_time_now(const time_spec_t& time_spec, size_t mboard = ALL_MBOARDS)
+ void set_time_now(const time_spec_t& time_spec, size_t mboard = ALL_MBOARDS) override
{
MUX_MB_API_CALL(set_time_now, time_spec);
_get_mbc(mboard)->get_timekeeper(0)->set_time_now(time_spec);
}
- void set_time_next_pps(const time_spec_t& time_spec, size_t mboard = ALL_MBOARDS)
+ void set_time_next_pps(
+ const time_spec_t& time_spec, size_t mboard = ALL_MBOARDS) override
{
MUX_MB_API_CALL(set_time_next_pps, time_spec);
_get_mbc(mboard)->get_timekeeper(0)->set_time_next_pps(time_spec);
}
- void set_time_unknown_pps(const time_spec_t& time_spec)
+ void set_time_unknown_pps(const time_spec_t& time_spec) override
{
UHD_LOGGER_INFO("MULTI_USRP") << " 1) catch time transition at pps edge";
auto end_time = std::chrono::steady_clock::now() + 1100ms;
@@ -796,7 +797,7 @@ public:
}
}
- bool get_time_synchronized(void)
+ bool get_time_synchronized(void) override
{
for (size_t m = 1; m < get_num_mboards(); m++) {
time_spec_t time_0 = this->get_time_now(0);
@@ -808,7 +809,8 @@ public:
return true;
}
- void set_command_time(const uhd::time_spec_t& time_spec, size_t mboard = ALL_MBOARDS)
+ void set_command_time(
+ const uhd::time_spec_t& time_spec, size_t mboard = ALL_MBOARDS) override
{
MUX_MB_API_CALL(set_command_time, time_spec);
@@ -833,7 +835,7 @@ public:
}
}
- void clear_command_time(size_t mboard = ALL_MBOARDS)
+ void clear_command_time(size_t mboard = ALL_MBOARDS) override
{
if (mboard == ALL_MBOARDS) {
for (size_t i = 0; i < get_num_mboards(); ++i) {
@@ -863,7 +865,8 @@ public:
}
}
- void issue_stream_cmd(const stream_cmd_t& stream_cmd, size_t chan = ALL_CHANS)
+ void issue_stream_cmd(
+ const stream_cmd_t& stream_cmd, size_t chan = ALL_CHANS) override
{
MUX_RX_API_CALL(issue_stream_cmd, stream_cmd);
auto& rx_chain = _get_rx_chan(chan);
@@ -874,104 +877,106 @@ public:
}
}
- void set_time_source(const std::string& source, const size_t mboard = ALL_MBOARDS)
+ void set_time_source(
+ const std::string& source, const size_t mboard = ALL_MBOARDS) override
{
MUX_MB_API_CALL(set_time_source, source);
_get_mbc(mboard)->set_time_source(source);
}
- std::string get_time_source(const size_t mboard)
+ std::string get_time_source(const size_t mboard) override
{
return _get_mbc(mboard)->get_time_source();
}
- std::vector<std::string> get_time_sources(const size_t mboard)
+ std::vector<std::string> get_time_sources(const size_t mboard) override
{
return _get_mbc(mboard)->get_time_sources();
}
- void set_clock_source(const std::string& source, const size_t mboard = ALL_MBOARDS)
+ void set_clock_source(
+ const std::string& source, const size_t mboard = ALL_MBOARDS) override
{
MUX_MB_API_CALL(set_clock_source, source);
_get_mbc(mboard)->set_clock_source(source);
}
- std::string get_clock_source(const size_t mboard)
+ std::string get_clock_source(const size_t mboard) override
{
return _get_mbc(mboard)->get_clock_source();
}
- std::vector<std::string> get_clock_sources(const size_t mboard)
+ std::vector<std::string> get_clock_sources(const size_t mboard) override
{
return _get_mbc(mboard)->get_clock_sources();
}
void set_sync_source(const std::string& clock_source,
const std::string& time_source,
- const size_t mboard = ALL_MBOARDS)
+ const size_t mboard = ALL_MBOARDS) override
{
MUX_MB_API_CALL(set_sync_source, clock_source, time_source);
_get_mbc(mboard)->set_sync_source(clock_source, time_source);
}
void set_sync_source(
- const device_addr_t& sync_source, const size_t mboard = ALL_MBOARDS)
+ const device_addr_t& sync_source, const size_t mboard = ALL_MBOARDS) override
{
MUX_MB_API_CALL(set_sync_source, sync_source);
_get_mbc(mboard)->set_sync_source(sync_source);
}
- device_addr_t get_sync_source(const size_t mboard)
+ device_addr_t get_sync_source(const size_t mboard) override
{
return _get_mbc(mboard)->get_sync_source();
}
- std::vector<device_addr_t> get_sync_sources(const size_t mboard)
+ std::vector<device_addr_t> get_sync_sources(const size_t mboard) override
{
return _get_mbc(mboard)->get_sync_sources();
}
- void set_clock_source_out(const bool enb, const size_t mboard = ALL_MBOARDS)
+ void set_clock_source_out(const bool enb, const size_t mboard = ALL_MBOARDS) override
{
MUX_MB_API_CALL(set_clock_source_out, enb);
_get_mbc(mboard)->set_clock_source_out(enb);
}
- void set_time_source_out(const bool enb, const size_t mboard = ALL_MBOARDS)
+ void set_time_source_out(const bool enb, const size_t mboard = ALL_MBOARDS) override
{
MUX_MB_API_CALL(set_time_source_out, enb);
_get_mbc(mboard)->set_time_source_out(enb);
}
- size_t get_num_mboards(void)
+ size_t get_num_mboards(void) override
{
return _graph->get_num_mboards();
}
- sensor_value_t get_mboard_sensor(const std::string& name, size_t mboard = 0)
+ sensor_value_t get_mboard_sensor(const std::string& name, size_t mboard = 0) override
{
return _get_mbc(mboard)->get_sensor(name);
}
- std::vector<std::string> get_mboard_sensor_names(size_t mboard = 0)
+ std::vector<std::string> get_mboard_sensor_names(size_t mboard = 0) override
{
return _get_mbc(mboard)->get_sensor_names();
}
// This only works on the USRP2 and B100, both of which are not rfnoc_device
- void set_user_register(const uint8_t, const uint32_t, size_t)
+ void set_user_register(const uint8_t, const uint32_t, size_t) override
{
throw uhd::not_implemented_error(
"set_user_register(): Not implemented on this device!");
}
// This only works on the B200, which is not an rfnoc_device
- uhd::wb_iface::sptr get_user_settings_iface(const size_t)
+ uhd::wb_iface::sptr get_user_settings_iface(const size_t) override
{
return nullptr;
}
- uhd::rfnoc::radio_control& get_radio_control(const size_t chan = 0)
+ uhd::rfnoc::radio_control& get_radio_control(const size_t chan = 0) override
{
return *_get_rx_chan(chan).radio;
}
@@ -1075,7 +1080,7 @@ public:
}
void set_rx_subdev_spec(
- const uhd::usrp::subdev_spec_t& spec, size_t mboard = ALL_MBOARDS)
+ const uhd::usrp::subdev_spec_t& spec, size_t mboard = ALL_MBOARDS) override
{
// First, generate a vector of the RX channels that we need to register
auto new_rx_chans = [this, spec, mboard]() {
@@ -1127,7 +1132,7 @@ public:
}
}
- uhd::usrp::subdev_spec_t get_rx_subdev_spec(size_t mboard = 0)
+ uhd::usrp::subdev_spec_t get_rx_subdev_spec(size_t mboard = 0) override
{
uhd::usrp::subdev_spec_t result;
for (size_t rx_chan = 0; rx_chan < get_rx_num_channels(); rx_chan++) {
@@ -1143,18 +1148,18 @@ public:
return result;
}
- size_t get_rx_num_channels(void)
+ size_t get_rx_num_channels(void) override
{
return _rx_chans.size();
}
- std::string get_rx_subdev_name(size_t chan = 0)
+ std::string get_rx_subdev_name(size_t chan = 0) override
{
auto rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_fe_name(rx_chain.block_chan, uhd::RX_DIRECTION);
}
- void set_rx_rate(double rate, size_t chan = ALL_CHANS)
+ void set_rx_rate(double rate, size_t chan = ALL_CHANS) override
{
std::lock_guard<std::recursive_mutex> l(_graph_mutex);
MUX_RX_API_CALL(set_rx_rate, rate);
@@ -1175,7 +1180,7 @@ public:
_rx_rates[chan] = actual_rate;
}
- void set_rx_spp(const size_t spp, const size_t chan = ALL_CHANS)
+ void set_rx_spp(const size_t spp, const size_t chan = ALL_CHANS) override
{
std::lock_guard<std::recursive_mutex> l(_graph_mutex);
MUX_RX_API_CALL(set_rx_spp, spp);
@@ -1184,7 +1189,7 @@ public:
"spp", narrow_cast<int>(spp), rx_chain.block_chan);
}
- double get_rx_rate(size_t chan = 0)
+ double get_rx_rate(size_t chan = 0) override
{
std::lock_guard<std::recursive_mutex> l(_graph_mutex);
auto& rx_chain = _get_rx_chan(chan);
@@ -1194,7 +1199,7 @@ public:
return rx_chain.radio->get_rate();
}
- meta_range_t get_rx_rates(size_t chan = 0)
+ meta_range_t get_rx_rates(size_t chan = 0) override
{
std::lock_guard<std::recursive_mutex> l(_graph_mutex);
auto rx_chain = _get_rx_chan(chan);
@@ -1204,7 +1209,8 @@ public:
return rx_chain.radio->get_rate_range();
}
- tune_result_t set_rx_freq(const tune_request_t& tune_request, size_t chan = 0)
+ tune_result_t set_rx_freq(
+ const tune_request_t& tune_request, size_t chan = 0) override
{
std::lock_guard<std::recursive_mutex> l(_graph_mutex);
@@ -1254,7 +1260,7 @@ public:
tune_request);
}
- double get_rx_freq(size_t chan = 0)
+ double get_rx_freq(size_t chan = 0) override
{
auto& rx_chain = _get_rx_chan(chan);
@@ -1267,7 +1273,7 @@ public:
return actual_rf_freq - actual_dsp_freq * RX_SIGN;
}
- freq_range_t get_rx_freq_range(size_t chan = 0)
+ freq_range_t get_rx_freq_range(size_t chan = 0) override
{
auto fe_freq_range = get_fe_rx_freq_range(chan);
@@ -1280,7 +1286,7 @@ public:
return dsp_freq_range;
}
- freq_range_t get_fe_rx_freq_range(size_t chan = 0)
+ freq_range_t get_fe_rx_freq_range(size_t chan = 0) override
{
auto rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_frequency_range(rx_chain.block_chan);
@@ -1289,74 +1295,78 @@ public:
/**************************************************************************
* LO controls
*************************************************************************/
- std::vector<std::string> get_rx_lo_names(size_t chan = 0)
+ std::vector<std::string> get_rx_lo_names(size_t chan = 0) override
{
auto rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_lo_names(rx_chain.block_chan);
}
- void set_rx_lo_source(
- const std::string& src, const std::string& name = ALL_LOS, size_t chan = 0)
+ void set_rx_lo_source(const std::string& src,
+ const std::string& name = ALL_LOS,
+ size_t chan = 0) override
{
MUX_RX_API_CALL(set_rx_lo_source, src, name);
auto rx_chain = _get_rx_chan(chan);
rx_chain.radio->set_rx_lo_source(src, name, rx_chain.block_chan);
}
- const std::string get_rx_lo_source(const std::string& name = ALL_LOS, size_t chan = 0)
+ const std::string get_rx_lo_source(
+ const std::string& name = ALL_LOS, size_t chan = 0) override
{
auto rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_lo_source(name, rx_chain.block_chan);
}
std::vector<std::string> get_rx_lo_sources(
- const std::string& name = ALL_LOS, size_t chan = 0)
+ const std::string& name = ALL_LOS, size_t chan = 0) override
{
auto rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_lo_sources(name, rx_chain.block_chan);
}
void set_rx_lo_export_enabled(
- bool enabled, const std::string& name = ALL_LOS, size_t chan = 0)
+ bool enabled, const std::string& name = ALL_LOS, size_t chan = 0) override
{
MUX_RX_API_CALL(set_rx_lo_export_enabled, enabled, name);
auto rx_chain = _get_rx_chan(chan);
rx_chain.radio->set_rx_lo_export_enabled(enabled, name, rx_chain.block_chan);
}
- bool get_rx_lo_export_enabled(const std::string& name = ALL_LOS, size_t chan = 0)
+ bool get_rx_lo_export_enabled(
+ const std::string& name = ALL_LOS, size_t chan = 0) override
{
auto rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_lo_export_enabled(name, rx_chain.block_chan);
}
- double set_rx_lo_freq(double freq, const std::string& name, size_t chan = 0)
+ double set_rx_lo_freq(double freq, const std::string& name, size_t chan = 0) override
{
auto rx_chain = _get_rx_chan(chan);
return rx_chain.radio->set_rx_lo_freq(freq, name, rx_chain.block_chan);
}
- double get_rx_lo_freq(const std::string& name, size_t chan = 0)
+ double get_rx_lo_freq(const std::string& name, size_t chan = 0) override
{
auto rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_lo_freq(name, rx_chain.block_chan);
}
- freq_range_t get_rx_lo_freq_range(const std::string& name, size_t chan = 0)
+ freq_range_t get_rx_lo_freq_range(const std::string& name, size_t chan = 0) override
{
auto rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_lo_freq_range(name, rx_chain.block_chan);
}
/*** TX LO API ***/
- std::vector<std::string> get_tx_lo_names(size_t chan = 0)
+ std::vector<std::string> get_tx_lo_names(size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_lo_names(tx_chain.block_chan);
}
- void set_tx_lo_source(
- const std::string& src, const std::string& name = ALL_LOS, const size_t chan = 0)
+ void set_tx_lo_source(const std::string& src,
+ const std::string& name = ALL_LOS,
+ const size_t chan = 0) override
{
MUX_TX_API_CALL(set_tx_lo_source, src, name);
auto tx_chain = _get_tx_chan(chan);
@@ -1364,21 +1374,22 @@ public:
}
const std::string get_tx_lo_source(
- const std::string& name = ALL_LOS, const size_t chan = 0)
+ const std::string& name = ALL_LOS, const size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_lo_source(name, tx_chain.block_chan);
}
std::vector<std::string> get_tx_lo_sources(
- const std::string& name = ALL_LOS, const size_t chan = 0)
+ const std::string& name = ALL_LOS, const size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_lo_sources(name, tx_chain.block_chan);
}
- void set_tx_lo_export_enabled(
- const bool enabled, const std::string& name = ALL_LOS, const size_t chan = 0)
+ void set_tx_lo_export_enabled(const bool enabled,
+ const std::string& name = ALL_LOS,
+ const size_t chan = 0) override
{
MUX_TX_API_CALL(set_tx_lo_export_enabled, enabled, name);
auto tx_chain = _get_tx_chan(chan);
@@ -1386,26 +1397,27 @@ public:
}
bool get_tx_lo_export_enabled(
- const std::string& name = ALL_LOS, const size_t chan = 0)
+ const std::string& name = ALL_LOS, const size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_lo_export_enabled(name, tx_chain.block_chan);
}
double set_tx_lo_freq(
- const double freq, const std::string& name, const size_t chan = 0)
+ const double freq, const std::string& name, const size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->set_tx_lo_freq(freq, name, tx_chain.block_chan);
}
- double get_tx_lo_freq(const std::string& name, const size_t chan = 0)
+ double get_tx_lo_freq(const std::string& name, const size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_lo_freq(name, tx_chain.block_chan);
}
- freq_range_t get_tx_lo_freq_range(const std::string& name, const size_t chan = 0)
+ freq_range_t get_tx_lo_freq_range(
+ const std::string& name, const size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_lo_freq_range(name, tx_chain.block_chan);
@@ -1414,33 +1426,33 @@ public:
/**************************************************************************
* Gain controls
*************************************************************************/
- void set_rx_gain(double gain, const std::string& name, size_t chan = 0)
+ void set_rx_gain(double gain, const std::string& name, size_t chan = 0) override
{
MUX_RX_API_CALL(set_rx_gain, gain, name);
auto rx_chain = _get_rx_chan(chan);
rx_chain.radio->set_rx_gain(gain, name, rx_chain.block_chan);
}
- std::vector<std::string> get_rx_gain_profile_names(const size_t chan = 0)
+ std::vector<std::string> get_rx_gain_profile_names(const size_t chan = 0) override
{
auto rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_gain_profile_names(rx_chain.block_chan);
}
- void set_rx_gain_profile(const std::string& profile, const size_t chan = 0)
+ void set_rx_gain_profile(const std::string& profile, const size_t chan = 0) override
{
MUX_RX_API_CALL(set_rx_gain_profile, profile);
auto rx_chain = _get_rx_chan(chan);
rx_chain.radio->set_rx_gain_profile(profile, rx_chain.block_chan);
}
- std::string get_rx_gain_profile(const size_t chan = 0)
+ std::string get_rx_gain_profile(const size_t chan = 0) override
{
auto rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_gain_profile(rx_chain.block_chan);
}
- void set_normalized_rx_gain(double gain, size_t chan = 0)
+ void set_normalized_rx_gain(double gain, size_t chan = 0) override
{
if (gain > 1.0 || gain < 0.0) {
throw uhd::runtime_error("Normalized gain out of range, must be in [0, 1].");
@@ -1452,20 +1464,20 @@ public:
set_rx_gain(abs_gain, ALL_GAINS, chan);
}
- void set_rx_agc(bool enable, size_t chan = 0)
+ void set_rx_agc(bool enable, size_t chan = 0) override
{
MUX_RX_API_CALL(set_rx_agc, enable);
auto& rx_chain = _get_rx_chan(chan);
rx_chain.radio->set_rx_agc(enable, rx_chain.block_chan);
}
- double get_rx_gain(const std::string& name, size_t chan = 0)
+ double get_rx_gain(const std::string& name, size_t chan = 0) override
{
auto& rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_gain(name, rx_chain.block_chan);
}
- double get_normalized_rx_gain(size_t chan = 0)
+ double get_normalized_rx_gain(size_t chan = 0) override
{
gain_range_t gain_range = get_rx_gain_range(ALL_GAINS, chan);
const double gain_range_width = gain_range.stop() - gain_range.start();
@@ -1479,120 +1491,121 @@ public:
return std::max(std::min(norm_gain, 1.0), 0.0);
}
- gain_range_t get_rx_gain_range(const std::string& name, size_t chan = 0)
+ gain_range_t get_rx_gain_range(const std::string& name, size_t chan = 0) override
{
auto& rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_gain_range(name, rx_chain.block_chan);
}
- std::vector<std::string> get_rx_gain_names(size_t chan = 0)
+ std::vector<std::string> get_rx_gain_names(size_t chan = 0) override
{
auto& rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_gain_names(rx_chain.block_chan);
}
- bool has_rx_power_reference(const size_t chan = 0)
+ bool has_rx_power_reference(const size_t chan = 0) override
{
auto& rx_chain = _get_rx_chan(chan);
return rx_chain.radio->has_rx_power_reference(rx_chain.block_chan);
}
- void set_rx_power_reference(const double power_dbm, const size_t chan = 0)
+ void set_rx_power_reference(const double power_dbm, const size_t chan = 0) override
{
MUX_RX_API_CALL(set_rx_power_reference, power_dbm);
auto& rx_chain = _get_rx_chan(chan);
rx_chain.radio->set_rx_power_reference(power_dbm, rx_chain.block_chan);
}
- double get_rx_power_reference(const size_t chan = 0)
+ double get_rx_power_reference(const size_t chan = 0) override
{
auto& rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_power_reference(rx_chain.block_chan);
}
- meta_range_t get_rx_power_range(const size_t chan)
+ meta_range_t get_rx_power_range(const size_t chan) override
{
auto& rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_power_range(rx_chain.block_chan);
}
- void set_rx_antenna(const std::string& ant, size_t chan = 0)
+ void set_rx_antenna(const std::string& ant, size_t chan = 0) override
{
MUX_RX_API_CALL(set_rx_antenna, ant);
auto& rx_chain = _get_rx_chan(chan);
rx_chain.radio->set_rx_antenna(ant, rx_chain.block_chan);
}
- std::string get_rx_antenna(size_t chan = 0)
+ std::string get_rx_antenna(size_t chan = 0) override
{
auto& rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_antenna(rx_chain.block_chan);
}
- std::vector<std::string> get_rx_antennas(size_t chan = 0)
+ std::vector<std::string> get_rx_antennas(size_t chan = 0) override
{
auto& rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_antennas(rx_chain.block_chan);
}
- void set_rx_bandwidth(double bandwidth, size_t chan = 0)
+ void set_rx_bandwidth(double bandwidth, size_t chan = 0) override
{
MUX_RX_API_CALL(set_rx_bandwidth, bandwidth);
auto& rx_chain = _get_rx_chan(chan);
rx_chain.radio->set_rx_bandwidth(bandwidth, rx_chain.block_chan);
}
- double get_rx_bandwidth(size_t chan = 0)
+ double get_rx_bandwidth(size_t chan = 0) override
{
auto& rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_bandwidth(rx_chain.block_chan);
}
- meta_range_t get_rx_bandwidth_range(size_t chan = 0)
+ meta_range_t get_rx_bandwidth_range(size_t chan = 0) override
{
auto& rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_bandwidth_range(rx_chain.block_chan);
}
- dboard_iface::sptr get_rx_dboard_iface(size_t chan = 0)
+ dboard_iface::sptr get_rx_dboard_iface(size_t chan = 0) override
{
auto& rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_tree()->access<dboard_iface::sptr>("iface").get();
}
- sensor_value_t get_rx_sensor(const std::string& name, size_t chan = 0)
+ sensor_value_t get_rx_sensor(const std::string& name, size_t chan = 0) override
{
auto rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_sensor(name, rx_chain.block_chan);
}
- std::vector<std::string> get_rx_sensor_names(size_t chan = 0)
+ std::vector<std::string> get_rx_sensor_names(size_t chan = 0) override
{
auto rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_sensor_names(rx_chain.block_chan);
}
- void set_rx_dc_offset(const bool enb, size_t chan = ALL_CHANS)
+ void set_rx_dc_offset(const bool enb, size_t chan = ALL_CHANS) override
{
MUX_RX_API_CALL(set_rx_dc_offset, enb);
const auto rx_chain = _get_rx_chan(chan);
rx_chain.radio->set_rx_dc_offset(enb, rx_chain.block_chan);
}
- void set_rx_dc_offset(const std::complex<double>& offset, size_t chan = ALL_CHANS)
+ void set_rx_dc_offset(
+ const std::complex<double>& offset, size_t chan = ALL_CHANS) override
{
MUX_RX_API_CALL(set_rx_dc_offset, offset);
const auto rx_chain = _get_rx_chan(chan);
rx_chain.radio->set_rx_dc_offset(offset, rx_chain.block_chan);
}
- meta_range_t get_rx_dc_offset_range(size_t chan = 0)
+ meta_range_t get_rx_dc_offset_range(size_t chan = 0) override
{
auto rx_chain = _get_rx_chan(chan);
return rx_chain.radio->get_rx_dc_offset_range(rx_chain.block_chan);
}
- void set_rx_iq_balance(const bool enb, size_t chan)
+ void set_rx_iq_balance(const bool enb, size_t chan) override
{
MUX_RX_API_CALL(set_rx_iq_balance, enb);
auto rx_chain = _get_rx_chan(chan);
@@ -1600,7 +1613,7 @@ public:
}
void set_rx_iq_balance(
- const std::complex<double>& correction, size_t chan = ALL_CHANS)
+ const std::complex<double>& correction, size_t chan = ALL_CHANS) override
{
MUX_RX_API_CALL(set_rx_iq_balance, correction);
const auto rx_chain = _get_rx_chan(chan);
@@ -1707,7 +1720,7 @@ public:
}
void set_tx_subdev_spec(
- const uhd::usrp::subdev_spec_t& spec, size_t mboard = ALL_MBOARDS)
+ const uhd::usrp::subdev_spec_t& spec, size_t mboard = ALL_MBOARDS) override
{
/* TODO: Refactor with get_rx_subdev_spec- the algorithms are the same, just the
* types are different
@@ -1762,7 +1775,7 @@ public:
}
}
- uhd::usrp::subdev_spec_t get_tx_subdev_spec(size_t mboard = 0)
+ uhd::usrp::subdev_spec_t get_tx_subdev_spec(size_t mboard = 0) override
{
uhd::usrp::subdev_spec_t result;
for (size_t tx_chan = 0; tx_chan < get_tx_num_channels(); tx_chan++) {
@@ -1778,18 +1791,18 @@ public:
return result;
}
- size_t get_tx_num_channels(void)
+ size_t get_tx_num_channels(void) override
{
return _tx_chans.size();
}
- std::string get_tx_subdev_name(size_t chan = 0)
+ std::string get_tx_subdev_name(size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_fe_name(tx_chain.block_chan, uhd::TX_DIRECTION);
}
- void set_tx_rate(double rate, size_t chan = ALL_CHANS)
+ void set_tx_rate(double rate, size_t chan = ALL_CHANS) override
{
std::lock_guard<std::recursive_mutex> l(_graph_mutex);
MUX_TX_API_CALL(set_tx_rate, rate);
@@ -1810,7 +1823,7 @@ public:
_tx_rates[chan] = actual_rate;
}
- double get_tx_rate(size_t chan = 0)
+ double get_tx_rate(size_t chan = 0) override
{
std::lock_guard<std::recursive_mutex> l(_graph_mutex);
auto& tx_chain = _get_tx_chan(chan);
@@ -1820,7 +1833,7 @@ public:
return tx_chain.radio->get_rate();
}
- meta_range_t get_tx_rates(size_t chan = 0)
+ meta_range_t get_tx_rates(size_t chan = 0) override
{
std::lock_guard<std::recursive_mutex> l(_graph_mutex);
auto tx_chain = _get_tx_chan(chan);
@@ -1830,7 +1843,8 @@ public:
return tx_chain.radio->get_rate_range();
}
- tune_result_t set_tx_freq(const tune_request_t& tune_request, size_t chan = 0)
+ tune_result_t set_tx_freq(
+ const tune_request_t& tune_request, size_t chan = 0) override
{
std::lock_guard<std::recursive_mutex> l(_graph_mutex);
auto tx_chain = _get_tx_chan(chan);
@@ -1877,7 +1891,7 @@ public:
tune_request);
}
- double get_tx_freq(size_t chan = 0)
+ double get_tx_freq(size_t chan = 0) override
{
auto& tx_chain = _get_tx_chan(chan);
// extract actual dsp and IF frequencies
@@ -1889,7 +1903,7 @@ public:
return actual_rf_freq - actual_dsp_freq * TX_SIGN;
}
- freq_range_t get_tx_freq_range(size_t chan = 0)
+ freq_range_t get_tx_freq_range(size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return (tx_chain.duc)
@@ -1899,39 +1913,39 @@ public:
: get_fe_tx_freq_range(chan);
}
- freq_range_t get_fe_tx_freq_range(size_t chan = 0)
+ freq_range_t get_fe_tx_freq_range(size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_frequency_range(tx_chain.block_chan);
}
- void set_tx_gain(double gain, const std::string& name, size_t chan = 0)
+ void set_tx_gain(double gain, const std::string& name, size_t chan = 0) override
{
MUX_TX_API_CALL(set_tx_gain, gain, name);
auto tx_chain = _get_tx_chan(chan);
tx_chain.radio->set_tx_gain(gain, name, tx_chain.block_chan);
}
- std::vector<std::string> get_tx_gain_profile_names(const size_t chan = 0)
+ std::vector<std::string> get_tx_gain_profile_names(const size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_gain_profile_names(tx_chain.block_chan);
}
- void set_tx_gain_profile(const std::string& profile, const size_t chan = 0)
+ void set_tx_gain_profile(const std::string& profile, const size_t chan = 0) override
{
MUX_TX_API_CALL(set_tx_gain_profile, profile);
auto tx_chain = _get_tx_chan(chan);
tx_chain.radio->set_tx_gain_profile(profile, tx_chain.block_chan);
}
- std::string get_tx_gain_profile(const size_t chan = 0)
+ std::string get_tx_gain_profile(const size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_gain_profile(tx_chain.block_chan);
}
- void set_normalized_tx_gain(double gain, size_t chan = 0)
+ void set_normalized_tx_gain(double gain, size_t chan = 0) override
{
if (gain > 1.0 || gain < 0.0) {
throw uhd::runtime_error("Normalized gain out of range, must be in [0, 1].");
@@ -1943,13 +1957,13 @@ public:
set_tx_gain(abs_gain, ALL_GAINS, chan);
}
- double get_tx_gain(const std::string& name, size_t chan = 0)
+ double get_tx_gain(const std::string& name, size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_gain(name, tx_chain.block_chan);
}
- double get_normalized_tx_gain(size_t chan = 0)
+ double get_normalized_tx_gain(size_t chan = 0) override
{
gain_range_t gain_range = get_tx_gain_range(ALL_GAINS, chan);
const double gain_range_width = gain_range.stop() - gain_range.start();
@@ -1963,114 +1977,115 @@ public:
return std::max(std::min(norm_gain, 1.0), 0.0);
}
- gain_range_t get_tx_gain_range(const std::string& name, size_t chan = 0)
+ gain_range_t get_tx_gain_range(const std::string& name, size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_gain_range(name, tx_chain.block_chan);
}
- std::vector<std::string> get_tx_gain_names(size_t chan = 0)
+ std::vector<std::string> get_tx_gain_names(size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_gain_names(tx_chain.block_chan);
}
- bool has_tx_power_reference(const size_t chan = 0)
+ bool has_tx_power_reference(const size_t chan = 0) override
{
auto& tx_chain = _get_tx_chan(chan);
return tx_chain.radio->has_rx_power_reference(tx_chain.block_chan);
}
- void set_tx_power_reference(const double power_dbm, const size_t chan = 0)
+ void set_tx_power_reference(const double power_dbm, const size_t chan = 0) override
{
MUX_TX_API_CALL(set_tx_power_reference, power_dbm);
auto& tx_chain = _get_tx_chan(chan);
tx_chain.radio->set_tx_power_reference(power_dbm, tx_chain.block_chan);
}
- double get_tx_power_reference(const size_t chan = 0)
+ double get_tx_power_reference(const size_t chan = 0) override
{
auto& tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_power_reference(tx_chain.block_chan);
}
- meta_range_t get_tx_power_range(const size_t chan)
+ meta_range_t get_tx_power_range(const size_t chan) override
{
auto& tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_power_range(tx_chain.block_chan);
}
- void set_tx_antenna(const std::string& ant, size_t chan = 0)
+ void set_tx_antenna(const std::string& ant, size_t chan = 0) override
{
MUX_TX_API_CALL(set_tx_antenna, ant);
auto tx_chain = _get_tx_chan(chan);
tx_chain.radio->set_tx_antenna(ant, tx_chain.block_chan);
}
- std::string get_tx_antenna(size_t chan = 0)
+ std::string get_tx_antenna(size_t chan = 0) override
{
auto& tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_antenna(tx_chain.block_chan);
}
- std::vector<std::string> get_tx_antennas(size_t chan = 0)
+ std::vector<std::string> get_tx_antennas(size_t chan = 0) override
{
auto& tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_antennas(tx_chain.block_chan);
}
- void set_tx_bandwidth(double bandwidth, size_t chan = 0)
+ void set_tx_bandwidth(double bandwidth, size_t chan = 0) override
{
MUX_TX_API_CALL(set_tx_bandwidth, bandwidth);
auto tx_chain = _get_tx_chan(chan);
tx_chain.radio->set_tx_bandwidth(bandwidth, tx_chain.block_chan);
}
- double get_tx_bandwidth(size_t chan = 0)
+ double get_tx_bandwidth(size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_bandwidth(tx_chain.block_chan);
}
- meta_range_t get_tx_bandwidth_range(size_t chan = 0)
+ meta_range_t get_tx_bandwidth_range(size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_bandwidth_range(tx_chain.block_chan);
}
- dboard_iface::sptr get_tx_dboard_iface(size_t chan = 0)
+ dboard_iface::sptr get_tx_dboard_iface(size_t chan = 0) override
{
auto& tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tree()->access<dboard_iface::sptr>("iface").get();
}
- sensor_value_t get_tx_sensor(const std::string& name, size_t chan = 0)
+ sensor_value_t get_tx_sensor(const std::string& name, size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_sensor(name, tx_chain.block_chan);
}
- std::vector<std::string> get_tx_sensor_names(size_t chan = 0)
+ std::vector<std::string> get_tx_sensor_names(size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_sensor_names(tx_chain.block_chan);
}
- void set_tx_dc_offset(const std::complex<double>& offset, size_t chan = ALL_CHANS)
+ void set_tx_dc_offset(
+ const std::complex<double>& offset, size_t chan = ALL_CHANS) override
{
MUX_TX_API_CALL(set_tx_dc_offset, offset);
const auto tx_chain = _get_tx_chan(chan);
tx_chain.radio->set_tx_dc_offset(offset, tx_chain.block_chan);
}
- meta_range_t get_tx_dc_offset_range(size_t chan = 0)
+ meta_range_t get_tx_dc_offset_range(size_t chan = 0) override
{
auto tx_chain = _get_tx_chan(chan);
return tx_chain.radio->get_tx_dc_offset_range(tx_chain.block_chan);
}
void set_tx_iq_balance(
- const std::complex<double>& correction, size_t chan = ALL_CHANS)
+ const std::complex<double>& correction, size_t chan = ALL_CHANS) override
{
MUX_TX_API_CALL(set_tx_iq_balance, correction);
const auto tx_chain = _get_tx_chan(chan);
@@ -2133,7 +2148,7 @@ public:
return {radio, normalized_bank};
}
- std::vector<std::string> get_gpio_banks(const size_t mboard)
+ std::vector<std::string> get_gpio_banks(const size_t mboard) override
{
auto radio_blocks = _graph->find_blocks<uhd::rfnoc::radio_control>(
std::to_string(mboard) + "/Radio");
@@ -2153,7 +2168,7 @@ public:
const std::string& attr,
const uint32_t value,
const uint32_t mask = 0xffffffff,
- const size_t mboard = 0)
+ const size_t mboard = 0) override
{
auto radio_bank_pair = _get_gpio_radio_bank(bank, mboard);
const uint32_t current =
@@ -2162,33 +2177,34 @@ public:
radio_bank_pair.first->set_gpio_attr(radio_bank_pair.second, attr, new_value);
}
- uint32_t get_gpio_attr(
- const std::string& bank, const std::string& attr, const size_t mboard = 0)
+ uint32_t get_gpio_attr(const std::string& bank,
+ const std::string& attr,
+ const size_t mboard = 0) override
{
auto radio_bank_pair = _get_gpio_radio_bank(bank, mboard);
return radio_bank_pair.first->get_gpio_attr(radio_bank_pair.second, attr);
}
- std::vector<std::string> get_gpio_src_banks(const size_t mboard = 0)
+ std::vector<std::string> get_gpio_src_banks(const size_t mboard = 0) override
{
return _get_mbc(mboard)->get_gpio_banks();
}
std::vector<std::string> get_gpio_srcs(
- const std::string& bank, const size_t mboard = 0)
+ const std::string& bank, const size_t mboard = 0) override
{
return _get_mbc(mboard)->get_gpio_srcs(bank);
}
std::vector<std::string> get_gpio_src(
- const std::string& bank, const size_t mboard = 0)
+ const std::string& bank, const size_t mboard = 0) override
{
return _get_mbc(mboard)->get_gpio_src(bank);
}
void set_gpio_src(const std::string& bank,
const std::vector<std::string>& src,
- const size_t mboard = 0)
+ const size_t mboard = 0) override
{
_get_mbc(mboard)->set_gpio_src(bank, src);
}
@@ -2196,7 +2212,7 @@ public:
/*******************************************************************
* Filter API methods
******************************************************************/
- std::vector<std::string> get_rx_filter_names(const size_t chan)
+ std::vector<std::string> get_rx_filter_names(const size_t chan) override
{
std::vector<std::string> filter_names;
// Grab the Radio's filters
@@ -2238,7 +2254,8 @@ public:
return filter_names;
}
- uhd::filter_info_base::sptr get_rx_filter(const std::string& name, const size_t chan)
+ uhd::filter_info_base::sptr get_rx_filter(
+ const std::string& name, const size_t chan) override
{
try {
// The block_id_t constructor is pretty smart; let it handle the parsing.
@@ -2276,8 +2293,9 @@ public:
}
}
- void set_rx_filter(
- const std::string& name, uhd::filter_info_base::sptr filter, const size_t chan)
+ void set_rx_filter(const std::string& name,
+ uhd::filter_info_base::sptr filter,
+ const size_t chan) override
{
MUX_RX_API_CALL(set_rx_filter, name, filter);
try {
@@ -2317,7 +2335,7 @@ public:
}
}
- std::vector<std::string> get_tx_filter_names(const size_t chan)
+ std::vector<std::string> get_tx_filter_names(const size_t chan) override
{
std::vector<std::string> filter_names;
// Grab the Radio's filters
@@ -2359,7 +2377,8 @@ public:
return filter_names;
}
- uhd::filter_info_base::sptr get_tx_filter(const std::string& name, const size_t chan)
+ uhd::filter_info_base::sptr get_tx_filter(
+ const std::string& name, const size_t chan) override
{
try {
// The block_id_t constructor is pretty smart; let it handle the parsing.
@@ -2397,8 +2416,9 @@ public:
}
}
- void set_tx_filter(
- const std::string& name, uhd::filter_info_base::sptr filter, const size_t chan)
+ void set_tx_filter(const std::string& name,
+ uhd::filter_info_base::sptr filter,
+ const size_t chan) override
{
MUX_TX_API_CALL(set_tx_filter, name, filter);
try {
@@ -2438,7 +2458,7 @@ public:
}
}
- mb_controller& get_mb_controller(const size_t mboard)
+ mb_controller& get_mb_controller(const size_t mboard) override
{
return *_get_mbc(mboard);
}
diff --git a/host/lib/usrp/subdev_spec.cpp b/host/lib/usrp/subdev_spec.cpp
index 0d271e832..657584e92 100644
--- a/host/lib/usrp/subdev_spec.cpp
+++ b/host/lib/usrp/subdev_spec.cpp
@@ -63,7 +63,7 @@ subdev_spec_t::subdev_spec_t(const std::string& markup)
std::string subdev_spec_t::to_pp_string(void) const
{
- if (this->size() == 0)
+ if (this->empty())
return "Empty Subdevice Specification";
std::stringstream ss;
diff --git a/host/lib/usrp/usrp1/dboard_iface.cpp b/host/lib/usrp/usrp1/dboard_iface.cpp
index 8ad7a5466..7d2a44f39 100644
--- a/host/lib/usrp/usrp1/dboard_iface.cpp
+++ b/host/lib/usrp/usrp1/dboard_iface.cpp
@@ -81,12 +81,12 @@ public:
// else _codec->bypass_adc_buffers(false); //don't think this is necessary
}
- ~usrp1_dboard_iface()
+ ~usrp1_dboard_iface() override
{
/* NOP */
}
- special_props_t get_special_props()
+ special_props_t get_special_props() override
{
special_props_t props;
props.soft_clock_divider = true;
@@ -94,44 +94,44 @@ public:
return props;
}
- void write_aux_dac(unit_t, aux_dac_t, double);
- double read_aux_adc(unit_t, aux_adc_t);
+ void write_aux_dac(unit_t, aux_dac_t, double) override;
+ double read_aux_adc(unit_t, aux_adc_t) override;
- void set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_pin_ctrl(unit_t unit);
+ void set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_pin_ctrl(unit_t unit) override;
void set_atr_reg(
- unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
- void set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_gpio_ddr(unit_t unit);
- void set_gpio_out(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_gpio_out(unit_t unit);
- uint32_t read_gpio(unit_t unit);
+ unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_atr_reg(unit_t unit, atr_reg_t reg) override;
+ void set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_gpio_ddr(unit_t unit) override;
+ void set_gpio_out(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_gpio_out(unit_t unit) override;
+ uint32_t read_gpio(unit_t unit) override;
void _set_pin_ctrl(unit_t, uint16_t);
void _set_atr_reg(unit_t, atr_reg_t, uint16_t);
void _set_gpio_ddr(unit_t, uint16_t);
void _set_gpio_out(unit_t, uint16_t);
- void set_command_time(const uhd::time_spec_t& t);
- uhd::time_spec_t get_command_time(void);
+ void set_command_time(const uhd::time_spec_t& t) override;
+ uhd::time_spec_t get_command_time(void) override;
- void write_i2c(uint16_t, const byte_vector_t&);
- byte_vector_t read_i2c(uint16_t, size_t);
+ void write_i2c(uint16_t, const byte_vector_t&) override;
+ byte_vector_t read_i2c(uint16_t, size_t) override;
void write_spi(
- unit_t unit, const spi_config_t& config, uint32_t data, size_t num_bits);
+ unit_t unit, const spi_config_t& config, uint32_t data, size_t num_bits) override;
uint32_t read_write_spi(
- unit_t unit, const spi_config_t& config, uint32_t data, size_t num_bits);
+ unit_t unit, const spi_config_t& config, uint32_t data, size_t num_bits) override;
- void set_clock_rate(unit_t, double);
- std::vector<double> get_clock_rates(unit_t);
- double get_clock_rate(unit_t);
- void set_clock_enabled(unit_t, bool);
- double get_codec_rate(unit_t);
+ void set_clock_rate(unit_t, double) override;
+ std::vector<double> get_clock_rates(unit_t) override;
+ double get_clock_rate(unit_t) override;
+ void set_clock_enabled(unit_t, bool) override;
+ double get_codec_rate(unit_t) override;
void set_fe_connection(
- unit_t unit, const std::string&, const fe_connection_t& fe_conn);
+ unit_t unit, const std::string&, const fe_connection_t& fe_conn) override;
private:
usrp1_iface::sptr _iface;
diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp
index 4788c3d9e..b93cfa094 100644
--- a/host/lib/usrp/usrp1/io_impl.cpp
+++ b/host/lib/usrp/usrp1/io_impl.cpp
@@ -86,7 +86,7 @@ public:
/* NOP */
}
- void release(void)
+ void release(void) override
{
this->_commit_cb(_curr_buff, _next_buff, size());
}
@@ -337,12 +337,12 @@ public:
_stc = stc;
}
- size_t get_num_channels(void) const
+ size_t get_num_channels(void) const override
{
return this->size();
}
- size_t get_max_num_samps(void) const
+ size_t get_max_num_samps(void) const override
{
return _max_num_samps;
}
@@ -351,7 +351,7 @@ public:
const size_t nsamps_per_buff,
uhd::rx_metadata_t& metadata,
const double timeout,
- const bool one_packet)
+ const bool one_packet) override
{
// interleave a "soft" inline message into the receive stream:
if (_stc->get_inline_queue().pop_with_haste(metadata))
@@ -363,7 +363,7 @@ public:
return _stc->recv_post(metadata, num_samps_recvd);
}
- void issue_stream_cmd(const stream_cmd_t& stream_cmd)
+ void issue_stream_cmd(const stream_cmd_t& stream_cmd) override
{
_stc->issue_stream_cmd(stream_cmd);
}
@@ -389,12 +389,12 @@ public:
_tx_enb_fcn = tx_enb_fcn;
}
- size_t get_num_channels(void) const
+ size_t get_num_channels(void) const override
{
return this->size();
}
- size_t get_max_num_samps(void) const
+ size_t get_max_num_samps(void) const override
{
return _max_num_samps;
}
@@ -402,7 +402,7 @@ public:
size_t send(const tx_streamer::buffs_type& buffs,
const size_t nsamps_per_buff,
const uhd::tx_metadata_t& metadata,
- const double timeout_)
+ const double timeout_) override
{
double timeout = timeout_; // rw copy
_stc->send_pre(metadata, timeout);
@@ -426,7 +426,7 @@ public:
return num_samps_sent;
}
- bool recv_async_msg(async_metadata_t& async_metadata, double timeout = 0.1)
+ bool recv_async_msg(async_metadata_t& async_metadata, double timeout = 0.1) override
{
return _stc->get_async_queue().pop_with_timed_wait(async_metadata, timeout);
}
diff --git a/host/lib/usrp/usrp1/soft_time_ctrl.cpp b/host/lib/usrp/usrp1/soft_time_ctrl.cpp
index 42a1e9712..1c3015480 100644
--- a/host/lib/usrp/usrp1/soft_time_ctrl.cpp
+++ b/host/lib/usrp/usrp1/soft_time_ctrl.cpp
@@ -50,13 +50,13 @@ public:
/*******************************************************************
* Time control
******************************************************************/
- void set_time(const time_spec_t& time)
+ void set_time(const time_spec_t& time) override
{
boost::mutex::scoped_lock lock(_update_mutex);
_time_offset = uhd::get_system_time() - time;
}
- time_spec_t get_time(void)
+ time_spec_t get_time(void) override
{
boost::mutex::scoped_lock lock(_update_mutex);
return time_now();
@@ -80,7 +80,7 @@ public:
/*******************************************************************
* Receive control
******************************************************************/
- size_t recv_post(rx_metadata_t& md, const size_t nsamps)
+ size_t recv_post(rx_metadata_t& md, const size_t nsamps) override
{
boost::mutex::scoped_lock lock(_update_mutex);
@@ -125,7 +125,7 @@ public:
return nsamps;
}
- void issue_stream_cmd(const stream_cmd_t& cmd)
+ void issue_stream_cmd(const stream_cmd_t& cmd) override
{
_cmd_queue.push_with_wait(std::make_shared<stream_cmd_t>(cmd));
}
@@ -139,7 +139,7 @@ public:
/*******************************************************************
* Transmit control
******************************************************************/
- void send_pre(const tx_metadata_t& md, double& timeout)
+ void send_pre(const tx_metadata_t& md, double& timeout) override
{
if (not md.has_time_spec)
return;
@@ -211,17 +211,17 @@ public:
}
}
- bounded_buffer<async_metadata_t>& get_async_queue(void)
+ bounded_buffer<async_metadata_t>& get_async_queue(void) override
{
return _async_msg_queue;
}
- bounded_buffer<rx_metadata_t>& get_inline_queue(void)
+ bounded_buffer<rx_metadata_t>& get_inline_queue(void) override
{
return _inline_msg_queue;
}
- void stop(void)
+ void stop(void) override
{
_recv_cmd_task.reset();
}
diff --git a/host/lib/usrp/usrp1/usrp1_iface.cpp b/host/lib/usrp/usrp1/usrp1_iface.cpp
index 574dec51c..bcd416769 100644
--- a/host/lib/usrp/usrp1/usrp1_iface.cpp
+++ b/host/lib/usrp/usrp1/usrp1_iface.cpp
@@ -28,7 +28,7 @@ public:
_ctrl_transport = ctrl_transport;
}
- ~usrp1_iface_impl(void)
+ ~usrp1_iface_impl(void) override
{
/* NOP */
}
@@ -36,7 +36,7 @@ public:
/*******************************************************************
* Peek and Poke
******************************************************************/
- void poke32(const uint32_t addr, const uint32_t value)
+ void poke32(const uint32_t addr, const uint32_t value) override
{
uint32_t swapped = uhd::htonx(value);
@@ -56,7 +56,7 @@ public:
throw uhd::io_error("USRP1: failed control write");
}
- uint32_t peek32(const uint32_t addr)
+ uint32_t peek32(const uint32_t addr) override
{
UHD_LOGGER_TRACE("USRP1") << "peek32(" << std::dec << std::setw(2) << addr << ")";
@@ -77,12 +77,12 @@ public:
return uhd::ntohx(value_out);
}
- void poke16(const uint32_t, const uint16_t)
+ void poke16(const uint32_t, const uint16_t) override
{
throw uhd::not_implemented_error("Unhandled command poke16()");
}
- uint16_t peek16(const uint32_t)
+ uint16_t peek16(const uint32_t) override
{
throw uhd::not_implemented_error("Unhandled command peek16()");
return 0;
@@ -91,12 +91,12 @@ public:
/*******************************************************************
* I2C
******************************************************************/
- void write_i2c(uint16_t addr, const byte_vector_t& bytes)
+ void write_i2c(uint16_t addr, const byte_vector_t& bytes) override
{
return _ctrl_transport->write_i2c(addr, bytes);
}
- byte_vector_t read_i2c(uint16_t addr, size_t num_bytes)
+ byte_vector_t read_i2c(uint16_t addr, size_t num_bytes) override
{
return _ctrl_transport->read_i2c(addr, num_bytes);
}
@@ -116,7 +116,7 @@ public:
const spi_config_t&,
uint32_t bits,
size_t num_bits,
- bool readback)
+ bool readback) override
{
UHD_LOGGER_TRACE("USRP1")
<< "transact_spi: "
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index d86bf6d56..6ed1a6a69 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -439,9 +439,9 @@ usrp1_impl::usrp1_impl(const device_addr_t& device_addr)
_tree->access<double>(mb_path / "rx_dsps" / name / "freq" / "value").set(0.0);
}
- if (_tree->list(mb_path / "rx_dsps").size() > 0)
+ if (!_tree->list(mb_path / "rx_dsps").empty())
_tree->access<subdev_spec_t>(mb_path / "rx_subdev_spec").set(_rx_subdev_spec);
- if (_tree->list(mb_path / "tx_dsps").size() > 0)
+ if (!_tree->list(mb_path / "tx_dsps").empty())
_tree->access<subdev_spec_t>(mb_path / "tx_subdev_spec").set(_tx_subdev_spec);
_tree->create<double>(mb_path / "link_max_rate").set(USRP1_MAX_RATE_USB2);
}
diff --git a/host/lib/usrp/usrp1/usrp1_impl.hpp b/host/lib/usrp/usrp1/usrp1_impl.hpp
index 336b82baa..a7f205c4a 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.hpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.hpp
@@ -63,12 +63,12 @@ public:
// structors
usrp1_impl(const uhd::device_addr_t&);
- ~usrp1_impl(void);
+ ~usrp1_impl(void) override;
// the io interface
- uhd::rx_streamer::sptr get_rx_stream(const uhd::stream_args_t& args);
- uhd::tx_streamer::sptr get_tx_stream(const uhd::stream_args_t& args);
- bool recv_async_msg(uhd::async_metadata_t&, double);
+ uhd::rx_streamer::sptr get_rx_stream(const uhd::stream_args_t& args) override;
+ uhd::tx_streamer::sptr get_tx_stream(const uhd::stream_args_t& args) override;
+ bool recv_async_msg(uhd::async_metadata_t&, double) override;
static uhd::usrp::mboard_eeprom_t get_mb_eeprom(uhd::i2c_iface::sptr);
diff --git a/host/lib/usrp/usrp2/n200_image_loader.cpp b/host/lib/usrp/usrp2/n200_image_loader.cpp
index 55b441c8b..9080a6dee 100644
--- a/host/lib/usrp/usrp2/n200_image_loader.cpp
+++ b/host/lib/usrp/usrp2/n200_image_loader.cpp
@@ -154,15 +154,15 @@ static void print_usrp2_error(const image_loader::image_loader_args_t& image_loa
if (image_loader_args.load_firmware) {
usrp2_card_burner_gui += str(boost::format("%s--fw=\"%s\"") % nl
- % ((image_loader_args.firmware_path == "")
- ? find_image_path("usrp2_fw.bin")
- : image_loader_args.firmware_path));
+ % ((image_loader_args.firmware_path.empty())
+ ? find_image_path("usrp2_fw.bin")
+ : image_loader_args.firmware_path));
}
if (image_loader_args.load_fpga) {
- usrp2_card_burner_gui +=
- str(boost::format("%s--fpga=\"%s\"") % nl
- % ((image_loader_args.fpga_path == "") ? find_image_path("usrp2_fpga.bin")
- : image_loader_args.fpga_path));
+ usrp2_card_burner_gui += str(
+ boost::format("%s--fpga=\"%s\"") % nl
+ % ((image_loader_args.fpga_path.empty()) ? find_image_path("usrp2_fpga.bin")
+ : image_loader_args.fpga_path));
}
throw uhd::runtime_error(str(
@@ -204,7 +204,7 @@ static uhd::device_addr_t n200_find(
uhd::device_addrs_t found = usrp2_find(image_loader_args.args);
- if (found.size() > 0) {
+ if (!found.empty()) {
uhd::device_addrs_t n200_found;
udp_simple::sptr rev_xport;
n200_fw_update_data_t pkt_out;
@@ -355,8 +355,8 @@ static void n200_setup_session(n200_session_t& session,
* EEPROM or is otherwise unable to provide its revision, this is
* impossible, and the user must manually provide a firmware file.
*/
- if ((session.fw and image_loader_args.firmware_path == "")
- or image_loader_args.fpga_path == "") {
+ if ((session.fw and image_loader_args.firmware_path.empty())
+ or image_loader_args.fpga_path.empty()) {
if (session.dev_addr["hw_rev"] == "n2xx") {
throw uhd::runtime_error("This device's revision cannot be determined. "
"You must manually specify a filepath.");
diff --git a/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp b/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp
index ca3a79ca5..116051216 100644
--- a/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp
@@ -45,7 +45,7 @@ public:
this->init_spi();
}
- ~usrp2_fifo_ctrl_impl(void)
+ ~usrp2_fifo_ctrl_impl(void) override
{
_timeout = ACK_TIMEOUT; // reset timeout to something small
UHD_SAFE_CALL(
@@ -56,7 +56,7 @@ public:
/*******************************************************************
* Peek and poke 32 bit implementation
******************************************************************/
- void poke32(const wb_addr_type addr, const uint32_t data)
+ void poke32(const wb_addr_type addr, const uint32_t data) override
{
boost::mutex::scoped_lock lock(_mutex);
@@ -65,7 +65,7 @@ public:
this->wait_for_ack(_seq_out - MAX_SEQS_OUT);
}
- uint32_t peek32(const wb_addr_type addr)
+ uint32_t peek32(const wb_addr_type addr) override
{
boost::mutex::scoped_lock lock(_mutex);
@@ -77,12 +77,12 @@ public:
/*******************************************************************
* Peek and poke 16 bit not implemented
******************************************************************/
- void poke16(const wb_addr_type, const uint16_t)
+ void poke16(const wb_addr_type, const uint16_t) override
{
throw uhd::not_implemented_error("poke16 not implemented in fifo ctrl module");
}
- uint16_t peek16(const wb_addr_type)
+ uint16_t peek16(const wb_addr_type) override
{
throw uhd::not_implemented_error("peek16 not implemented in fifo ctrl module");
}
@@ -104,7 +104,7 @@ public:
const spi_config_t& config,
uint32_t data,
size_t num_bits,
- bool readback)
+ bool readback) override
{
boost::mutex::scoped_lock lock(_mutex);
@@ -143,7 +143,7 @@ public:
/*******************************************************************
* Update methods for time
******************************************************************/
- void set_time(const uhd::time_spec_t& time)
+ void set_time(const uhd::time_spec_t& time) override
{
boost::mutex::scoped_lock lock(_mutex);
_time = time;
@@ -152,13 +152,13 @@ public:
_timeout = MASSIVE_TIMEOUT; // permanently sets larger timeout
}
- uhd::time_spec_t get_time()
+ uhd::time_spec_t get_time() override
{
boost::mutex::scoped_lock lock(_mutex);
return _time;
}
- void set_tick_rate(const double rate)
+ void set_tick_rate(const double rate) override
{
boost::mutex::scoped_lock lock(_mutex);
_tick_rate = rate;
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index 029d2b30a..23104d18f 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -76,7 +76,7 @@ public:
mb_eeprom = usrp2_impl::get_mb_eeprom(*this);
}
- ~usrp2_iface_impl(void)
+ ~usrp2_iface_impl(void) override
{
UHD_SAFE_CALL(this->lock_device(false);)
}
@@ -85,7 +85,7 @@ public:
* Device locking
**********************************************************************/
- void lock_device(bool lock)
+ void lock_device(bool lock) override
{
if (lock) {
this->pokefw(U2_FW_REG_LOCK_GPID, get_process_hash());
@@ -96,7 +96,7 @@ public:
}
}
- bool is_device_locked(void)
+ bool is_device_locked(void) override
{
// never assume lock with fpga image mismatch
if ((this->peek32(U2_REG_COMPAT_NUM_RB) >> 16) != USRP2_FPGA_COMPAT_NUM)
@@ -135,32 +135,32 @@ public:
/***********************************************************************
* Peek and Poke
**********************************************************************/
- void poke32(const wb_addr_type addr, const uint32_t data)
+ void poke32(const wb_addr_type addr, const uint32_t data) override
{
this->get_reg<uint32_t, USRP2_REG_ACTION_FPGA_POKE32>(addr, data);
}
- uint32_t peek32(const wb_addr_type addr)
+ uint32_t peek32(const wb_addr_type addr) override
{
return this->get_reg<uint32_t, USRP2_REG_ACTION_FPGA_PEEK32>(addr);
}
- void poke16(const wb_addr_type addr, const uint16_t data)
+ void poke16(const wb_addr_type addr, const uint16_t data) override
{
this->get_reg<uint16_t, USRP2_REG_ACTION_FPGA_POKE16>(addr, data);
}
- uint16_t peek16(const wb_addr_type addr)
+ uint16_t peek16(const wb_addr_type addr) override
{
return this->get_reg<uint16_t, USRP2_REG_ACTION_FPGA_PEEK16>(addr);
}
- void pokefw(wb_addr_type addr, uint32_t data)
+ void pokefw(wb_addr_type addr, uint32_t data) override
{
this->get_reg<uint32_t, USRP2_REG_ACTION_FW_POKE32>(addr, data);
}
- uint32_t peekfw(wb_addr_type addr)
+ uint32_t peekfw(wb_addr_type addr) override
{
return this->get_reg<uint32_t, USRP2_REG_ACTION_FW_PEEK32>(addr);
}
@@ -189,7 +189,7 @@ public:
const spi_config_t& config,
uint32_t data,
size_t num_bits,
- bool readback)
+ bool readback) override
{
static const uhd::dict<spi_config_t::edge_t, int> spi_edge_to_otw =
boost::assign::map_list_of(spi_config_t::EDGE_RISE, USRP2_CLK_EDGE_RISE)(
@@ -216,7 +216,7 @@ public:
/***********************************************************************
* I2C
**********************************************************************/
- void write_i2c(uint16_t addr, const byte_vector_t& buf)
+ void write_i2c(uint16_t addr, const byte_vector_t& buf) override
{
// setup the out data
usrp2_ctrl_data_t out_data = usrp2_ctrl_data_t();
@@ -236,7 +236,7 @@ public:
UHD_ASSERT_THROW(ntohl(in_data.id) == USRP2_CTRL_ID_COOL_IM_DONE_I2C_WRITE_DUDE);
}
- byte_vector_t read_i2c(uint16_t addr, size_t num_bytes)
+ byte_vector_t read_i2c(uint16_t addr, size_t num_bytes) override
{
// setup the out data
usrp2_ctrl_data_t out_data = usrp2_ctrl_data_t();
@@ -324,7 +324,7 @@ public:
throw timeout_error("no control response, possible packet loss");
}
- rev_type get_rev(void)
+ rev_type get_rev(void) override
{
std::string hw = mb_eeprom["hardware"];
if (hw.empty())
@@ -347,7 +347,7 @@ public:
return USRP_NXXX; // unknown type
}
- const std::string get_cname(void)
+ const std::string get_cname(void) override
{
switch (this->get_rev()) {
case USRP2_REV3:
@@ -368,14 +368,14 @@ public:
UHD_THROW_INVALID_CODE_PATH();
}
- const std::string get_fw_version_string(void)
+ const std::string get_fw_version_string(void) override
{
uint32_t minor =
this->get_reg<uint32_t, USRP2_REG_ACTION_FW_PEEK32>(U2_FW_REG_VER_MINOR);
return str(boost::format("%u.%u") % _protocol_compat % minor);
}
- std::string images_warn_help_message(void)
+ std::string images_warn_help_message(void) override
{
// determine the images names
std::string fw_image, fpga_image;
@@ -457,12 +457,12 @@ public:
}
}
- void set_time(const time_spec_t&)
+ void set_time(const time_spec_t&) override
{
throw uhd::not_implemented_error("Timed commands not supported");
}
- time_spec_t get_time(void)
+ time_spec_t get_time(void) override
{
return (0.0);
}
diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp
index 792c38a11..14e6ed993 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.hpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.hpp
@@ -61,12 +61,12 @@ class usrp2_impl : public uhd::device
{
public:
usrp2_impl(const uhd::device_addr_t&);
- ~usrp2_impl(void);
+ ~usrp2_impl(void) override;
// the io interface
- uhd::rx_streamer::sptr get_rx_stream(const uhd::stream_args_t& args);
- uhd::tx_streamer::sptr get_tx_stream(const uhd::stream_args_t& args);
- bool recv_async_msg(uhd::async_metadata_t&, double);
+ uhd::rx_streamer::sptr get_rx_stream(const uhd::stream_args_t& args) override;
+ uhd::tx_streamer::sptr get_tx_stream(const uhd::stream_args_t& args) override;
+ bool recv_async_msg(uhd::async_metadata_t&, double) override;
static uhd::usrp::mboard_eeprom_t get_mb_eeprom(usrp2_iface&);
diff --git a/host/lib/usrp/x300/x300_dac_ctrl.cpp b/host/lib/usrp/x300/x300_dac_ctrl.cpp
index 3a3dc7389..1254e035e 100644
--- a/host/lib/usrp/x300/x300_dac_ctrl.cpp
+++ b/host/lib/usrp/x300/x300_dac_ctrl.cpp
@@ -48,7 +48,7 @@ public:
reset();
}
- ~x300_dac_ctrl_impl(void)
+ ~x300_dac_ctrl_impl(void) override
{
UHD_SAFE_CALL(
// Power down all DAC subsystems
@@ -59,7 +59,7 @@ public:
)
}
- void reset()
+ void reset() override
{
// ADI recommendations:
//- soft reset the chip before configuration
@@ -75,7 +75,7 @@ public:
_sleep_mode(false);
}
- void sync()
+ void sync() override
{
try {
// Just return if PLL is locked and backend is synchronized
@@ -102,7 +102,7 @@ public:
throw uhd::runtime_error(err_str);
}
- void verify_sync()
+ void verify_sync() override
{
_check_pll();
_check_dac_sync();
diff --git a/host/lib/usrp/x300/x300_dboard_iface.hpp b/host/lib/usrp/x300/x300_dboard_iface.hpp
index 713c90748..607fe10dc 100644
--- a/host/lib/usrp/x300/x300_dboard_iface.hpp
+++ b/host/lib/usrp/x300/x300_dboard_iface.hpp
@@ -36,9 +36,9 @@ class x300_dboard_iface : public uhd::usrp::dboard_iface
{
public:
x300_dboard_iface(const x300_dboard_iface_config_t& config);
- ~x300_dboard_iface(void);
+ ~x300_dboard_iface(void) override;
- inline special_props_t get_special_props(void)
+ inline special_props_t get_special_props(void) override
{
special_props_t props;
props.soft_clock_divider = false;
@@ -46,39 +46,44 @@ public:
return props;
}
- void write_aux_dac(unit_t, aux_dac_t, double);
- double read_aux_adc(unit_t, aux_adc_t);
+ void write_aux_dac(unit_t, aux_dac_t, double) override;
+ double read_aux_adc(unit_t, aux_adc_t) override;
- void set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_pin_ctrl(unit_t unit);
+ void set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_pin_ctrl(unit_t unit) override;
void set_atr_reg(
- unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
- void set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_gpio_ddr(unit_t unit);
- void set_gpio_out(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_gpio_out(unit_t unit);
- uint32_t read_gpio(unit_t unit);
-
- void set_command_time(const uhd::time_spec_t& t);
- uhd::time_spec_t get_command_time(void);
-
- void write_i2c(uint16_t, const uhd::byte_vector_t&);
- uhd::byte_vector_t read_i2c(uint16_t, size_t);
-
- void set_clock_rate(unit_t, double);
- double get_clock_rate(unit_t);
- std::vector<double> get_clock_rates(unit_t);
- void set_clock_enabled(unit_t, bool);
- double get_codec_rate(unit_t);
-
- void write_spi(
- unit_t unit, const uhd::spi_config_t& config, uint32_t data, size_t num_bits);
-
- uint32_t read_write_spi(
- unit_t unit, const uhd::spi_config_t& config, uint32_t data, size_t num_bits);
- void set_fe_connection(
- unit_t unit, const std::string& name, const uhd::usrp::fe_connection_t& fe_conn);
+ unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_atr_reg(unit_t unit, atr_reg_t reg) override;
+ void set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_gpio_ddr(unit_t unit) override;
+ void set_gpio_out(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_gpio_out(unit_t unit) override;
+ uint32_t read_gpio(unit_t unit) override;
+
+ void set_command_time(const uhd::time_spec_t& t) override;
+ uhd::time_spec_t get_command_time(void) override;
+
+ void write_i2c(uint16_t, const uhd::byte_vector_t&) override;
+ uhd::byte_vector_t read_i2c(uint16_t, size_t) override;
+
+ void set_clock_rate(unit_t, double) override;
+ double get_clock_rate(unit_t) override;
+ std::vector<double> get_clock_rates(unit_t) override;
+ void set_clock_enabled(unit_t, bool) override;
+ double get_codec_rate(unit_t) override;
+
+ void write_spi(unit_t unit,
+ const uhd::spi_config_t& config,
+ uint32_t data,
+ size_t num_bits) override;
+
+ uint32_t read_write_spi(unit_t unit,
+ const uhd::spi_config_t& config,
+ uint32_t data,
+ size_t num_bits) override;
+ void set_fe_connection(unit_t unit,
+ const std::string& name,
+ const uhd::usrp::fe_connection_t& fe_conn) override;
// X300 can set the FE connection on the RX side
bool has_set_fe_connection(const unit_t unit) override
diff --git a/host/lib/usrp/x300/x300_device_args.hpp b/host/lib/usrp/x300/x300_device_args.hpp
index 7e17c36ce..3a620f7de 100644
--- a/host/lib/usrp/x300/x300_device_args.hpp
+++ b/host/lib/usrp/x300/x300_device_args.hpp
@@ -146,7 +146,7 @@ public:
return _orig_args;
}
- inline virtual std::string to_string() const
+ inline std::string to_string() const override
{
// We leave out blank_eeprom for safety reasons
return (!_first_addr.get().empty() ? (_first_addr.to_string() + ", ") : "")
@@ -185,7 +185,7 @@ public:
}
private:
- virtual void _parse(const device_addr_t& dev_args)
+ void _parse(const device_addr_t& dev_args) override
{
_orig_args = dev_args;
// Extract parameters from dev_args
diff --git a/host/lib/usrp/x300/x300_eth_mgr.cpp b/host/lib/usrp/x300/x300_eth_mgr.cpp
index 8cdba38cc..d7b8b15c4 100644
--- a/host/lib/usrp/x300/x300_eth_mgr.cpp
+++ b/host/lib/usrp/x300/x300_eth_mgr.cpp
@@ -555,7 +555,7 @@ void eth_manager::discover_eth(
}
}
- if (eth_conns.size() == 0) {
+ if (eth_conns.empty()) {
throw uhd::assertion_error(
"X300 Initialization Error: No valid Ethernet interfaces specified.");
}
diff --git a/host/lib/usrp/x300/x300_eth_mgr.hpp b/host/lib/usrp/x300/x300_eth_mgr.hpp
index 19b6064dd..ee1d1d726 100644
--- a/host/lib/usrp/x300/x300_eth_mgr.hpp
+++ b/host/lib/usrp/x300/x300_eth_mgr.hpp
@@ -39,12 +39,12 @@ public:
/*! Return a reference to a ZPU ctrl interface object
*/
- uhd::wb_iface::sptr get_ctrl_iface();
+ uhd::wb_iface::sptr get_ctrl_iface() override;
void init_link(
const mboard_eeprom_t& mb_eeprom, const std::string& loaded_fpga_image);
- size_t get_mtu(uhd::direction_t dir);
+ size_t get_mtu(uhd::direction_t dir) override;
/*! Safely release a ZPU control object
*
@@ -57,7 +57,7 @@ public:
*
* Note: this will only be valid after init_link() is called.
*/
- std::vector<uhd::rfnoc::device_id_t> get_local_device_ids()
+ std::vector<uhd::rfnoc::device_id_t> get_local_device_ids() override
{
return _local_device_ids;
}
@@ -66,7 +66,7 @@ public:
const uhd::rfnoc::device_id_t local_device_id,
const uhd::rfnoc::sep_id_t& local_epid,
const uhd::rfnoc::sep_id_t& remote_epid,
- const uhd::device_addr_t& link_args);
+ const uhd::device_addr_t& link_args) override;
private:
//! Function to create a udp_simple::sptr (kernel-based or DPDK-based)
diff --git a/host/lib/usrp/x300/x300_fw_ctrl.cpp b/host/lib/usrp/x300/x300_fw_ctrl.cpp
index cbe48bfe8..9cbad7576 100644
--- a/host/lib/usrp/x300/x300_fw_ctrl.cpp
+++ b/host/lib/usrp/x300/x300_fw_ctrl.cpp
@@ -39,7 +39,7 @@ public:
__flush();
}
- void poke32(const wb_addr_type addr, const uint32_t data)
+ void poke32(const wb_addr_type addr, const uint32_t data) override
{
for (size_t i = 1; i <= num_retries; i++) {
boost::mutex::scoped_lock lock(reg_access);
@@ -57,7 +57,7 @@ public:
}
}
- uint32_t peek32(const wb_addr_type addr)
+ uint32_t peek32(const wb_addr_type addr) override
{
for (size_t i = 1; i <= num_retries; i++) {
boost::mutex::scoped_lock lock(reg_access);
@@ -105,7 +105,7 @@ public:
}
protected:
- virtual void __poke32(const wb_addr_type addr, const uint32_t data)
+ void __poke32(const wb_addr_type addr, const uint32_t data) override
{
// load request struct
x300_fw_comms_t request = x300_fw_comms_t();
@@ -136,7 +136,7 @@ protected:
UHD_ASSERT_THROW(reply.data == request.data);
}
- virtual uint32_t __peek32(const wb_addr_type addr)
+ uint32_t __peek32(const wb_addr_type addr) override
{
// load request struct
x300_fw_comms_t request = x300_fw_comms_t();
@@ -169,14 +169,14 @@ protected:
return uhd::ntohx<uint32_t>(reply.data);
}
- virtual void __flush(void)
+ void __flush(void) override
{
char buff[X300_FW_COMMS_MTU] = {};
while (udp->recv(boost::asio::buffer(buff), 0.0)) {
} // flush
}
- virtual std::string __loc_info(void)
+ std::string __loc_info(void) override
{
return udp->get_send_addr();
}
@@ -233,7 +233,7 @@ public:
}
protected:
- virtual void __poke32(const wb_addr_type addr, const uint32_t data)
+ void __poke32(const wb_addr_type addr, const uint32_t data) override
{
nirio_status status = 0;
uint32_t reg_data = 0xffffffff;
@@ -261,7 +261,7 @@ protected:
throw uhd::io_error("x300 fw poke32 - operation timed out");
}
- virtual uint32_t __peek32(const wb_addr_type addr)
+ uint32_t __peek32(const wb_addr_type addr) override
{
nirio_status status = 0;
uint32_t reg_data = 0xffffffff;
@@ -293,12 +293,12 @@ protected:
return reg_data;
}
- virtual void __flush(void)
+ void __flush(void) override
{
__peek32(0);
}
- virtual std::string __loc_info(void)
+ std::string __loc_info(void) override
{
return std::to_string(_drv_proxy->get_interface_num());
}
diff --git a/host/lib/usrp/x300/x300_fw_uart.cpp b/host/lib/usrp/x300/x300_fw_uart.cpp
index 0dde87da5..1bfc2a2e4 100644
--- a/host/lib/usrp/x300/x300_fw_uart.cpp
+++ b/host/lib/usrp/x300/x300_fw_uart.cpp
@@ -50,7 +50,7 @@ struct x300_uart_iface : uart_iface
}
}
- void write_uart(const std::string& buff)
+ void write_uart(const std::string& buff) override
{
boost::mutex::scoped_lock lock(_write_mutex);
for (const char ch : buff) {
@@ -118,7 +118,7 @@ struct x300_uart_iface : uart_iface
}
}
- std::string read_uart(double timeout)
+ std::string read_uart(double timeout) override
{
boost::mutex::scoped_lock lock(_read_mutex);
const auto exit_time = std::chrono::steady_clock::now()
diff --git a/host/lib/usrp/x300/x300_image_loader.cpp b/host/lib/usrp/x300/x300_image_loader.cpp
index 474aed4cb..f18af02b7 100644
--- a/host/lib/usrp/x300/x300_image_loader.cpp
+++ b/host/lib/usrp/x300/x300_image_loader.cpp
@@ -180,7 +180,7 @@ static void x300_setup_session(x300_session_t& session,
const std::string& outpath)
{
device_addrs_t devs = x300_find(args);
- if (devs.size() == 0) {
+ if (devs.empty()) {
session.found = false;
return;
} else if (devs.size() > 1) {
@@ -224,8 +224,8 @@ static void x300_setup_session(x300_session_t& session,
* If this cannot be determined, then the user is forced to specify a filename.
*/
session.fpga_type = args.get("fpga", session.dev_addr.get("fpga", ""));
- if (filepath == "") {
- if (!session.dev_addr.has_key("product") or session.fpga_type == "") {
+ if (filepath.empty()) {
+ if (!session.dev_addr.has_key("product") or session.fpga_type.empty()) {
throw uhd::runtime_error(
"Found a device but could not auto-generate an image filename.");
} else {
@@ -243,8 +243,8 @@ static void x300_setup_session(x300_session_t& session,
* The user can specify an output image path, or UHD will use the
* system temporary path by default
*/
- if (outpath == "") {
- if (!session.dev_addr.has_key("product") or session.fpga_type == "") {
+ if (outpath.empty()) {
+ if (!session.dev_addr.has_key("product") or session.fpga_type.empty()) {
throw uhd::runtime_error(
"Found a device but could not auto-generate an image filename.");
}
@@ -598,7 +598,7 @@ static bool x300_image_loader(const image_loader::image_loader_args_t& image_loa
// See if any X3x0 with the given args is found
device_addrs_t devs = x300_find(image_loader_args.args);
- if (devs.size() == 0)
+ if (devs.empty())
return false;
x300_session_t session;
diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp
index c506fcf28..218582653 100644
--- a/host/lib/usrp/x300/x300_impl.hpp
+++ b/host/lib/usrp/x300/x300_impl.hpp
@@ -45,12 +45,12 @@ class x300_impl : public uhd::rfnoc::detail::rfnoc_device
public:
x300_impl(const uhd::device_addr_t&);
void setup_mb(const size_t which, const uhd::device_addr_t&);
- ~x300_impl(void);
+ ~x300_impl(void) override;
/**************************************************************************
* rfnoc_device API
*************************************************************************/
- virtual uhd::rfnoc::mb_iface& get_mb_iface(const size_t mb_idx)
+ uhd::rfnoc::mb_iface& get_mb_iface(const size_t mb_idx) override
{
if (mb_idx >= _mb_ifaces.size()) {
throw uhd::index_error(
@@ -101,19 +101,21 @@ private:
x300_mb_iface(uhd::usrp::x300::conn_manager::sptr conn_mgr,
const double radio_clk_freq,
const uhd::rfnoc::device_id_t remote_dev_id);
- ~x300_mb_iface();
- uint16_t get_proto_ver();
- uhd::rfnoc::chdr_w_t get_chdr_w();
- uhd::endianness_t get_endianness(const uhd::rfnoc::device_id_t local_device_id);
- uhd::rfnoc::device_id_t get_remote_device_id();
- std::vector<uhd::rfnoc::device_id_t> get_local_device_ids();
+ ~x300_mb_iface() override;
+ uint16_t get_proto_ver() override;
+ uhd::rfnoc::chdr_w_t get_chdr_w() override;
+ uhd::endianness_t get_endianness(
+ const uhd::rfnoc::device_id_t local_device_id) override;
+ uhd::rfnoc::device_id_t get_remote_device_id() override;
+ std::vector<uhd::rfnoc::device_id_t> get_local_device_ids() override;
uhd::transport::adapter_id_t get_adapter_id(
- const uhd::rfnoc::device_id_t local_device_id);
- void reset_network();
- uhd::rfnoc::clock_iface::sptr get_clock_iface(const std::string& clock_name);
+ const uhd::rfnoc::device_id_t local_device_id) override;
+ void reset_network() override;
+ uhd::rfnoc::clock_iface::sptr get_clock_iface(
+ const std::string& clock_name) override;
uhd::rfnoc::chdr_ctrl_xport::sptr make_ctrl_transport(
uhd::rfnoc::device_id_t local_device_id,
- const uhd::rfnoc::sep_id_t& local_epid);
+ const uhd::rfnoc::sep_id_t& local_epid) override;
uhd::rfnoc::chdr_rx_data_xport::uptr make_rx_data_transport(
uhd::rfnoc::mgmt::mgmt_portal& mgmt_portal,
const uhd::rfnoc::sep_addr_pair_t& addrs,
@@ -121,7 +123,7 @@ private:
const uhd::rfnoc::sw_buff_t pyld_buff_fmt,
const uhd::rfnoc::sw_buff_t mdata_buff_fmt,
const uhd::device_addr_t& xport_args,
- const std::string& streamer_id);
+ const std::string& streamer_id) override;
uhd::rfnoc::chdr_tx_data_xport::uptr make_tx_data_transport(
uhd::rfnoc::mgmt::mgmt_portal& mgmt_portal,
const uhd::rfnoc::sep_addr_pair_t& addrs,
@@ -129,7 +131,7 @@ private:
const uhd::rfnoc::sw_buff_t pyld_buff_fmt,
const uhd::rfnoc::sw_buff_t mdata_buff_fmt,
const uhd::device_addr_t& xport_args,
- const std::string& streamer_id);
+ const std::string& streamer_id) override;
private:
const uhd::rfnoc::device_id_t _remote_dev_id;
diff --git a/host/lib/usrp/x300/x300_mb_controller.hpp b/host/lib/usrp/x300/x300_mb_controller.hpp
index f33d629c7..6cfa3f525 100644
--- a/host/lib/usrp/x300/x300_mb_controller.hpp
+++ b/host/lib/usrp/x300/x300_mb_controller.hpp
@@ -42,7 +42,7 @@ public:
uhd::usrp::mboard_eeprom_t mb_eeprom,
uhd::usrp::x300::x300_device_args_t args);
- ~x300_mb_controller();
+ ~x300_mb_controller() override;
/**************************************************************************
* X300-Specific APIs
@@ -95,11 +95,11 @@ public:
{
set_tick_rate(tick_rate);
}
- uint64_t get_ticks_now();
- uint64_t get_ticks_last_pps();
- void set_ticks_now(const uint64_t ticks);
- void set_ticks_next_pps(const uint64_t ticks);
- void set_period(const uint64_t period_ns);
+ uint64_t get_ticks_now() override;
+ uint64_t get_ticks_last_pps() override;
+ void set_ticks_now(const uint64_t ticks) override;
+ void set_ticks_next_pps(const uint64_t ticks) override;
+ void set_period(const uint64_t period_ns) override;
private:
uint32_t get_tk_addr(const uint32_t tk_addr);
@@ -110,30 +110,31 @@ public:
/**************************************************************************
* Motherboard Control API (see mb_controller.hpp)
*************************************************************************/
- void init();
- std::string get_mboard_name() const;
- void set_time_source(const std::string& source);
- std::string get_time_source() const;
- std::vector<std::string> get_time_sources() const;
- void set_clock_source(const std::string& source);
- std::string get_clock_source() const;
- std::vector<std::string> get_clock_sources() const;
- void set_sync_source(const std::string& clock_source, const std::string& time_source);
- void set_sync_source(const device_addr_t& sync_source);
- device_addr_t get_sync_source() const;
- std::vector<device_addr_t> get_sync_sources();
- void set_clock_source_out(const bool enb);
- void set_time_source_out(const bool enb);
- sensor_value_t get_sensor(const std::string& name);
- std::vector<std::string> get_sensor_names();
- uhd::usrp::mboard_eeprom_t get_eeprom();
+ void init() override;
+ std::string get_mboard_name() const override;
+ void set_time_source(const std::string& source) override;
+ std::string get_time_source() const override;
+ std::vector<std::string> get_time_sources() const override;
+ void set_clock_source(const std::string& source) override;
+ std::string get_clock_source() const override;
+ std::vector<std::string> get_clock_sources() const override;
+ void set_sync_source(
+ const std::string& clock_source, const std::string& time_source) override;
+ void set_sync_source(const device_addr_t& sync_source) override;
+ device_addr_t get_sync_source() const override;
+ std::vector<device_addr_t> get_sync_sources() override;
+ void set_clock_source_out(const bool enb) override;
+ void set_time_source_out(const bool enb) override;
+ sensor_value_t get_sensor(const std::string& name) override;
+ std::vector<std::string> get_sensor_names() override;
+ uhd::usrp::mboard_eeprom_t get_eeprom() override;
bool synchronize(std::vector<mb_controller::sptr>& mb_controllers,
const uhd::time_spec_t& time_spec = uhd::time_spec_t(0.0),
- const bool quiet = false);
- std::vector<std::string> get_gpio_banks() const;
- std::vector<std::string> get_gpio_srcs(const std::string&) const;
- std::vector<std::string> get_gpio_src(const std::string&);
- void set_gpio_src(const std::string&, const std::vector<std::string>&);
+ const bool quiet = false) override;
+ std::vector<std::string> get_gpio_banks() const override;
+ std::vector<std::string> get_gpio_srcs(const std::string&) const override;
+ std::vector<std::string> get_gpio_src(const std::string&) override;
+ void set_gpio_src(const std::string&, const std::vector<std::string>&) override;
private:
//! Return a string X300::MB_CTRL#N
diff --git a/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp b/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp
index 42d0b32ca..4eaccccc4 100644
--- a/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp
+++ b/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp
@@ -41,7 +41,7 @@ public:
_compat_num = _wb->peek32(X300_FW_SHMEM_ADDR(X300_FW_SHMEM_COMPAT_NUM));
}
- ~x300_mb_eeprom_iface_impl()
+ ~x300_mb_eeprom_iface_impl() override
{
/* NOP */
}
@@ -51,7 +51,7 @@ public:
* \param addr the address
* \param buf the vector of bytes
*/
- void write_i2c(uint16_t addr, const byte_vector_t& buf)
+ void write_i2c(uint16_t addr, const byte_vector_t& buf) override
{
UHD_ASSERT_THROW(addr == MBOARD_EEPROM_ADDR);
if (uhd::usrp::x300::claim_status(_wb) != uhd::usrp::x300::CLAIMED_BY_US) {
@@ -66,7 +66,7 @@ public:
* \param num_bytes number of bytes to read
* \return a vector of bytes
*/
- byte_vector_t read_i2c(uint16_t addr, size_t num_bytes)
+ byte_vector_t read_i2c(uint16_t addr, size_t num_bytes) override
{
UHD_ASSERT_THROW(addr == MBOARD_EEPROM_ADDR);
byte_vector_t bytes;
@@ -93,7 +93,7 @@ public:
* \param offset byte offset
* \param buf the vector of bytes
*/
- void write_eeprom(uint16_t addr, uint16_t offset, const byte_vector_t& buf)
+ void write_eeprom(uint16_t addr, uint16_t offset, const byte_vector_t& buf) override
{
UHD_ASSERT_THROW(addr == MBOARD_EEPROM_ADDR);
if (uhd::usrp::x300::claim_status(_wb) != uhd::usrp::x300::CLAIMED_BY_US) {
@@ -109,7 +109,7 @@ public:
* \param num_bytes number of bytes to read
* \return a vector of bytes
*/
- byte_vector_t read_eeprom(uint16_t addr, uint16_t offset, size_t num_bytes)
+ byte_vector_t read_eeprom(uint16_t addr, uint16_t offset, size_t num_bytes) override
{
UHD_ASSERT_THROW(addr == MBOARD_EEPROM_ADDR);
byte_vector_t bytes;
diff --git a/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp b/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp
index 935f6302d..964a98b84 100644
--- a/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp
+++ b/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp
@@ -19,7 +19,7 @@ class x300_mb_eeprom_iface : public uhd::i2c_iface
public:
typedef std::shared_ptr<x300_mb_eeprom_iface> sptr;
- virtual ~x300_mb_eeprom_iface(void) = 0;
+ ~x300_mb_eeprom_iface(void) override = 0;
static sptr make(uhd::wb_iface::sptr wb, uhd::i2c_iface::sptr i2c);
};
diff --git a/host/lib/usrp/x300/x300_pcie_mgr.hpp b/host/lib/usrp/x300/x300_pcie_mgr.hpp
index f0a5ed911..d6cb03071 100644
--- a/host/lib/usrp/x300/x300_pcie_mgr.hpp
+++ b/host/lib/usrp/x300/x300_pcie_mgr.hpp
@@ -37,11 +37,11 @@ public:
/*! Return a reference to a ZPU ctrl interface object
*/
- uhd::wb_iface::sptr get_ctrl_iface();
+ uhd::wb_iface::sptr get_ctrl_iface() override;
void init_link();
- size_t get_mtu(uhd::direction_t dir);
+ size_t get_mtu(uhd::direction_t dir) override;
/*! Safely release a ZPU control object
*
@@ -52,7 +52,7 @@ public:
/*! Return list of local device IDs associated with this link
*/
- std::vector<uhd::rfnoc::device_id_t> get_local_device_ids()
+ std::vector<uhd::rfnoc::device_id_t> get_local_device_ids() override
{
return {_local_device_id};
}
@@ -61,7 +61,7 @@ public:
const uhd::rfnoc::device_id_t local_device_id,
const uhd::rfnoc::sep_id_t& local_epid,
const uhd::rfnoc::sep_id_t& remote_epid,
- const uhd::device_addr_t& link_args);
+ const uhd::device_addr_t& link_args) override;
private:
/*! Allocate or return a previously allocated PCIe channel pair