aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/e3xx
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/dboard/e3xx
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/dboard/e3xx')
-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
4 files changed, 91 insertions, 87 deletions
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