diff options
author | Martin Braun <martin.braun@ettus.com> | 2021-01-08 09:33:36 +0100 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-03-04 08:07:26 -0600 |
commit | 107a49c0c236940da7d3bd0f57da4bc1e2a34cb4 (patch) | |
tree | fdeaad56030a02948377c45838dab97beb7a5c84 /host/lib/include | |
parent | 7d5e48032baa62cbe7467833b9e057900602f4b9 (diff) | |
download | uhd-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/include')
26 files changed, 293 insertions, 283 deletions
diff --git a/host/lib/include/uhdlib/experts/expert_container.hpp b/host/lib/include/uhdlib/experts/expert_container.hpp index a0245d598..bb05ae334 100644 --- a/host/lib/include/uhdlib/experts/expert_container.hpp +++ b/host/lib/include/uhdlib/experts/expert_container.hpp @@ -27,7 +27,7 @@ class UHD_API expert_container : private uhd::noncopyable, public node_retriever public: // Methods typedef std::shared_ptr<expert_container> sptr; - virtual ~expert_container(){}; + ~expert_container() override{}; /*! * Return the name of this container @@ -121,8 +121,8 @@ private: * \param name Name of the node to find * */ - virtual const dag_vertex_t& lookup(const std::string& name) const = 0; - virtual dag_vertex_t& retrieve(const std::string& name) const = 0; + const dag_vertex_t& lookup(const std::string& name) const override = 0; + dag_vertex_t& retrieve(const std::string& name) const override = 0; /*! * expert_factory is a friend of expert_container and diff --git a/host/lib/include/uhdlib/experts/expert_nodes.hpp b/host/lib/include/uhdlib/experts/expert_nodes.hpp index 7b8a62110..ce061ca26 100644 --- a/host/lib/include/uhdlib/experts/expert_nodes.hpp +++ b/host/lib/include/uhdlib/experts/expert_nodes.hpp @@ -149,13 +149,13 @@ public: } // Basic info - virtual const std::string& get_dtype() const + const std::string& get_dtype() const override { static const std::string dtype(boost::core::demangle(typeid(data_t).name())); return dtype; } - virtual std::string to_string() const + std::string to_string() const override { return data_node_printer::print(get()); } @@ -166,17 +166,17 @@ public: } // Graph resolution specific - virtual bool is_dirty() const + bool is_dirty() const override { return _data.is_dirty(); } - virtual void mark_clean() + void mark_clean() override { _data.mark_clean(); } - void resolve() + void resolve() override { // NOP } @@ -222,32 +222,32 @@ public: private: // External callbacks - virtual void set_write_callback(const callback_func_t& func) + void set_write_callback(const callback_func_t& func) override { _wr_callback = func; } - virtual bool has_write_callback() const + bool has_write_callback() const override { return bool(_wr_callback); } - virtual void clear_write_callback() + void clear_write_callback() override { _wr_callback = nullptr; } - virtual void set_read_callback(const callback_func_t& func) + void set_read_callback(const callback_func_t& func) override { _rd_callback = func; } - virtual bool has_read_callback() const + bool has_read_callback() const override { return bool(_rd_callback); } - virtual void clear_read_callback() + void clear_read_callback() override { _rd_callback = nullptr; } @@ -306,14 +306,14 @@ template <typename data_t> class data_accessor_base : public data_accessor_t { public: - virtual ~data_accessor_base() {} + ~data_accessor_base() override {} - virtual bool is_reader() const + bool is_reader() const override { return _access == ACCESS_READER; } - virtual bool is_writer() const + bool is_writer() const override { return _access == ACCESS_WRITER; } @@ -350,7 +350,7 @@ protected: const node_access_t _access; private: - virtual dag_vertex_t& node() const + dag_vertex_t& node() const override { return _vertex; } @@ -499,7 +499,7 @@ protected: private: // Graph resolution specific - virtual bool is_dirty() const + bool is_dirty() const override { bool inputs_dirty = false; for (data_accessor_t* acc : _inputs) { @@ -508,40 +508,40 @@ private: return inputs_dirty; } - virtual void mark_clean() + void mark_clean() override { for (data_accessor_t* acc : _inputs) { acc->node().mark_clean(); } } - virtual void resolve() = 0; + void resolve() override = 0; // Basic type info - virtual const std::string& get_dtype() const + const std::string& get_dtype() const override { static const std::string dtype = "<worker>"; return dtype; } - virtual std::string to_string() const + std::string to_string() const override { return "<worker>"; } // Workers don't have callbacks so implement stubs - virtual void set_write_callback(const callback_func_t&) {} - virtual bool has_write_callback() const + void set_write_callback(const callback_func_t&) override {} + bool has_write_callback() const override { return false; } - virtual void clear_write_callback() {} - virtual void set_read_callback(const callback_func_t&) {} - virtual bool has_read_callback() const + void clear_write_callback() override {} + void set_read_callback(const callback_func_t&) override {} + bool has_read_callback() const override { return false; } - virtual void clear_read_callback() {} + void clear_read_callback() override {} std::list<data_accessor_t*> _inputs; std::list<data_accessor_t*> _outputs; diff --git a/host/lib/include/uhdlib/features/discoverable_feature_registry.hpp b/host/lib/include/uhdlib/features/discoverable_feature_registry.hpp index f27f1a4f1..7a0d7c8bf 100644 --- a/host/lib/include/uhdlib/features/discoverable_feature_registry.hpp +++ b/host/lib/include/uhdlib/features/discoverable_feature_registry.hpp @@ -20,7 +20,7 @@ namespace uhd { namespace features { class discoverable_feature_registry : public virtual discoverable_feature_getter_iface { public: - virtual ~discoverable_feature_registry() = default; + ~discoverable_feature_registry() override = default; std::vector<std::string> enumerate_features() override; diff --git a/host/lib/include/uhdlib/rfnoc/ctrlport_endpoint.hpp b/host/lib/include/uhdlib/rfnoc/ctrlport_endpoint.hpp index ecedd09ca..b16b5d03b 100644 --- a/host/lib/include/uhdlib/rfnoc/ctrlport_endpoint.hpp +++ b/host/lib/include/uhdlib/rfnoc/ctrlport_endpoint.hpp @@ -28,7 +28,7 @@ public: //! The function to call when sending a packet to a remote device using send_fn_t = std::function<void(const chdr::ctrl_payload&, double)>; - virtual ~ctrlport_endpoint() = 0; + ~ctrlport_endpoint() override = 0; //! Handles an incoming control packet (request and response) // diff --git a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp index 2a93fbfa5..ba11e50bf 100644 --- a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp +++ b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp @@ -38,151 +38,153 @@ public: *************************************************************************/ radio_control_impl(make_args_ptr make_args); - virtual void deinit() {} + void deinit() override {} - virtual ~radio_control_impl() {} + ~radio_control_impl() override {} /************************************************************************** * Stream control API calls *************************************************************************/ - void issue_stream_cmd(const uhd::stream_cmd_t& stream_cmd, const size_t port); + void issue_stream_cmd( + const uhd::stream_cmd_t& stream_cmd, const size_t port) override; - void enable_rx_timestamps(const bool enable, const size_t chan); + void enable_rx_timestamps(const bool enable, const size_t chan) override; /************************************************************************** * Rate-Related API Calls *************************************************************************/ - virtual double set_rate(const double rate); - virtual double get_rate() const; - virtual meta_range_t get_rate_range() const; + double set_rate(const double rate) override; + double get_rate() const override; + meta_range_t get_rate_range() const override; /************************************************************************** * RF-specific API calls *************************************************************************/ // Setters - virtual void set_tx_antenna(const std::string& ant, const size_t chan); - virtual void set_rx_antenna(const std::string& ant, const size_t chan); - virtual double set_tx_frequency(const double freq, const size_t chan); - virtual double set_rx_frequency(const double freq, const size_t chan); - virtual void set_tx_tune_args(const uhd::device_addr_t&, const size_t chan); - virtual void set_rx_tune_args(const uhd::device_addr_t&, const size_t chan); - virtual double set_tx_gain(const double gain, const size_t chan); - virtual double set_tx_gain( - const double gain, const std::string& name, const size_t chan); - virtual double set_rx_gain(const double gain, const size_t chan); - virtual double set_rx_gain( - const double gain, const std::string& name, const size_t chan); - virtual void set_rx_agc(const bool enable, const size_t chan); - virtual double set_tx_bandwidth(const double bandwidth, const size_t chan); - virtual double set_rx_bandwidth(const double bandwidth, const size_t chan); - virtual void set_tx_gain_profile(const std::string& profile, const size_t chan); - virtual void set_rx_gain_profile(const std::string& profile, const size_t chan); - virtual void set_rx_power_reference(const double power_dbm, const size_t chan); - virtual void set_tx_power_reference(const double power_dbm, 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_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; + 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; + void set_tx_gain_profile(const std::string& profile, const size_t chan) override; + void set_rx_gain_profile(const std::string& profile, const size_t chan) override; + void set_rx_power_reference(const double power_dbm, const size_t chan) override; + void set_tx_power_reference(const double power_dbm, const size_t chan) override; // Getters - virtual std::string get_tx_antenna(const size_t chan) const; - virtual std::string get_rx_antenna(const size_t chan) const; - virtual std::vector<std::string> get_tx_antennas(const size_t chan) const; - virtual std::vector<std::string> get_rx_antennas(const size_t chan) const; - virtual double get_tx_frequency(const size_t); - virtual double get_rx_frequency(const size_t); - virtual uhd::freq_range_t get_tx_frequency_range(const size_t chan) const; - virtual uhd::freq_range_t get_rx_frequency_range(const size_t chan) const; - virtual std::vector<std::string> get_tx_gain_names(const size_t) const; - virtual std::vector<std::string> get_rx_gain_names(const size_t) const; - virtual double get_tx_gain(const size_t); - virtual double get_tx_gain(const std::string&, size_t); - virtual double get_rx_gain(const size_t); - virtual double get_rx_gain(const std::string&, size_t); - virtual uhd::gain_range_t get_tx_gain_range(const size_t) const; - virtual uhd::gain_range_t get_tx_gain_range(const std::string&, const size_t) const; - virtual uhd::gain_range_t get_rx_gain_range(const size_t) const; - virtual uhd::gain_range_t get_rx_gain_range(const std::string&, const size_t) const; - virtual std::vector<std::string> get_tx_gain_profile_names(const size_t chan) const; - virtual std::vector<std::string> get_rx_gain_profile_names(const size_t chan) const; - virtual std::string get_tx_gain_profile(const size_t chan) const; - virtual std::string get_rx_gain_profile(const size_t chan) const; - virtual double get_tx_bandwidth(const size_t); - virtual double get_rx_bandwidth(const size_t); - virtual meta_range_t get_tx_bandwidth_range(size_t chan) const; - virtual meta_range_t get_rx_bandwidth_range(size_t chan) const; - virtual bool has_rx_power_reference(const size_t chan); - virtual bool has_tx_power_reference(const size_t chan); - virtual double get_rx_power_reference(const size_t chan); - virtual double get_tx_power_reference(const size_t chan); - virtual std::vector<std::string> get_rx_power_ref_keys(const size_t); - virtual std::vector<std::string> get_tx_power_ref_keys(const size_t); - virtual meta_range_t get_rx_power_range(const size_t chan); - virtual meta_range_t get_tx_power_range(const size_t chan); + std::string get_tx_antenna(const size_t chan) const override; + std::string get_rx_antenna(const size_t chan) const override; + 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; + double get_tx_frequency(const size_t) override; + double get_rx_frequency(const size_t) 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 size_t) override; + double get_tx_gain(const std::string&, size_t) override; + double get_rx_gain(const 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; + std::vector<std::string> get_tx_gain_profile_names(const size_t chan) const override; + std::vector<std::string> get_rx_gain_profile_names(const size_t chan) const override; + std::string get_tx_gain_profile(const size_t chan) const override; + std::string get_rx_gain_profile(const size_t chan) const override; + double get_tx_bandwidth(const size_t) override; + double get_rx_bandwidth(const size_t) 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; + bool has_rx_power_reference(const size_t chan) override; + bool has_tx_power_reference(const size_t chan) override; + double get_rx_power_reference(const size_t chan) override; + double get_tx_power_reference(const size_t chan) override; + std::vector<std::string> get_rx_power_ref_keys(const size_t) override; + std::vector<std::string> get_tx_power_ref_keys(const size_t) override; + meta_range_t get_rx_power_range(const size_t chan) override; + meta_range_t get_tx_power_range(const size_t chan) override; /************************************************************************** * LO Controls *************************************************************************/ - virtual std::vector<std::string> get_rx_lo_names(const size_t chan) const; - virtual std::vector<std::string> get_rx_lo_sources( - const std::string& name, const size_t chan) const; - virtual freq_range_t get_rx_lo_freq_range( - const std::string& name, const size_t chan) const; - virtual void set_rx_lo_source( - const std::string& src, const std::string& name, const size_t chan); - virtual const std::string get_rx_lo_source( - const std::string& name, const size_t chan); - virtual void set_rx_lo_export_enabled( - bool enabled, const std::string& name, const size_t chan); - virtual bool get_rx_lo_export_enabled( - const std::string& name, const size_t chan) const; - virtual double set_rx_lo_freq( - double freq, const std::string& name, const size_t chan); - virtual double get_rx_lo_freq(const std::string& name, const size_t chan); - virtual std::vector<std::string> get_tx_lo_names(const size_t chan) const; - virtual std::vector<std::string> get_tx_lo_sources( - const std::string& name, const size_t chan); - virtual freq_range_t get_tx_lo_freq_range(const std::string& name, const size_t chan); - virtual void set_tx_lo_source( - const std::string& src, const std::string& name, const size_t chan); - virtual const std::string get_tx_lo_source( - const std::string& name, const size_t chan); - virtual void set_tx_lo_export_enabled( - const bool enabled, const std::string& name, const size_t chan); - virtual bool get_tx_lo_export_enabled(const std::string& name, const size_t chan); - virtual double set_tx_lo_freq( - const double freq, const std::string& name, const size_t chan); - virtual double get_tx_lo_freq(const std::string& name, const size_t chan); + 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 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) override; + const std::string get_rx_lo_source( + const std::string& name, const size_t chan) override; + void set_rx_lo_export_enabled( + bool enabled, const std::string& name, const size_t chan) override; + bool get_rx_lo_export_enabled( + const std::string& name, const size_t chan) const 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) override; + 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) override; + const std::string get_tx_lo_source( + const std::string& name, const size_t chan) override; + void set_tx_lo_export_enabled( + 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; + 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; /************************************************************************** * Calibration-Related API Calls *************************************************************************/ - virtual void set_tx_dc_offset(const std::complex<double>& offset, size_t chan); - virtual meta_range_t get_tx_dc_offset_range(size_t chan) const; - virtual void set_tx_iq_balance(const std::complex<double>& correction, size_t chan); - virtual void set_rx_dc_offset(const bool enb, size_t chan = ALL_CHANS); - virtual void set_rx_dc_offset(const std::complex<double>& offset, size_t chan); - virtual meta_range_t get_rx_dc_offset_range(size_t chan) const; - virtual void set_rx_iq_balance(const bool enb, size_t chan); - virtual void set_rx_iq_balance(const std::complex<double>& correction, size_t chan); + void set_tx_dc_offset(const std::complex<double>& offset, size_t chan) override; + meta_range_t get_tx_dc_offset_range(size_t chan) const override; + void set_tx_iq_balance(const std::complex<double>& correction, size_t chan) override; + void set_rx_dc_offset(const bool enb, size_t chan = ALL_CHANS) override; + void set_rx_dc_offset(const std::complex<double>& offset, size_t chan) override; + meta_range_t get_rx_dc_offset_range(size_t chan) const override; + void set_rx_iq_balance(const bool enb, size_t chan) override; + void set_rx_iq_balance(const std::complex<double>& correction, size_t chan) override; /************************************************************************** * GPIO Controls *************************************************************************/ - virtual std::vector<std::string> get_gpio_banks() const; - 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); + 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) override; + uint32_t get_gpio_attr(const std::string& bank, const std::string& attr) override; /************************************************************************** * Sensor API *************************************************************************/ - virtual std::vector<std::string> get_rx_sensor_names(size_t chan) const; - virtual uhd::sensor_value_t get_rx_sensor(const std::string& name, size_t chan); - virtual std::vector<std::string> get_tx_sensor_names(size_t chan) const; - virtual 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; /************************************************************************** * Identification API *************************************************************************/ - virtual std::string get_fe_name( - 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 override { return get_dboard_fe_from_chan(chan, direction); } @@ -190,8 +192,8 @@ public: /************************************************************************** * EEPROM API *************************************************************************/ - virtual void set_db_eeprom(const uhd::eeprom_map_t& db_eeprom); - virtual 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; /*********************************************************************** * Reg Map diff --git a/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp b/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp index 5e5d06288..3eacc7590 100644 --- a/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp +++ b/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp @@ -76,32 +76,32 @@ public: // nop } - void poke32(const uhd::wb_iface::wb_addr_type addr, const uint32_t data) + void poke32(const uhd::wb_iface::wb_addr_type addr, const uint32_t data) override { _regs_accessor().poke32(_base_offset + addr, data, _time_accessor()); } - void poke64(const uhd::wb_iface::wb_addr_type addr, const uint64_t data) + void poke64(const uhd::wb_iface::wb_addr_type addr, const uint64_t data) override { _regs_accessor().poke64(_base_offset + addr, data, _time_accessor()); } - uint32_t peek32(const uhd::wb_iface::wb_addr_type addr) + uint32_t peek32(const uhd::wb_iface::wb_addr_type addr) override { return _regs_accessor().peek32(_base_offset + addr, _time_accessor()); } - uint64_t peek64(const uhd::wb_iface::wb_addr_type addr) + uint64_t peek64(const uhd::wb_iface::wb_addr_type addr) override { return _regs_accessor().peek64(_base_offset + addr, _time_accessor()); } - uhd::time_spec_t get_time(void) + uhd::time_spec_t get_time(void) override { return _time_accessor(); } - void set_time(const uhd::time_spec_t& t) + void set_time(const uhd::time_spec_t& t) override { _time_setter(t); } diff --git a/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp b/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp index 4b2479ae5..de06c672f 100644 --- a/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp +++ b/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp @@ -39,19 +39,19 @@ public: } //! Directly getting a streamer no longer supported - uhd::rx_streamer::sptr get_rx_stream(const stream_args_t&) + uhd::rx_streamer::sptr get_rx_stream(const stream_args_t&) override { UHD_THROW_INVALID_CODE_PATH(); } //! Directly getting a streamer no longer supported - uhd::tx_streamer::sptr get_tx_stream(const stream_args_t&) + uhd::tx_streamer::sptr get_tx_stream(const stream_args_t&) override { UHD_THROW_INVALID_CODE_PATH(); } //! Directly getting async messages no longer supported - bool recv_async_msg(uhd::async_metadata_t&, double) + bool recv_async_msg(uhd::async_metadata_t&, double) override { UHD_THROW_INVALID_CODE_PATH(); } diff --git a/host/lib/include/uhdlib/rfnoc/rfnoc_rx_streamer.hpp b/host/lib/include/uhdlib/rfnoc/rfnoc_rx_streamer.hpp index 9cda81785..ca569e338 100644 --- a/host/lib/include/uhdlib/rfnoc/rfnoc_rx_streamer.hpp +++ b/host/lib/include/uhdlib/rfnoc/rfnoc_rx_streamer.hpp @@ -38,7 +38,7 @@ public: /*! Destructor */ - ~rfnoc_rx_streamer(); + ~rfnoc_rx_streamer() override; /*! Returns a unique identifier string for this node. In every RFNoC graph, * no two nodes cannot have the same ID. Returns a string in the form of @@ -46,13 +46,13 @@ public: * * \returns The unique ID as a string */ - std::string get_unique_id() const; + std::string get_unique_id() const override; /*! Returns the number of input ports for this block. * * \return noc_id The number of ports */ - size_t get_num_input_ports() const; + size_t get_num_input_ports() const override; /*! Returns the number of output ports for this block. * @@ -60,13 +60,13 @@ public: * * \return noc_id The number of ports */ - size_t get_num_output_ports() const; + size_t get_num_output_ports() const override; /*! Implementation of rx_streamer API method * * \param stream_cmd the stream command to issue */ - void issue_stream_cmd(const stream_cmd_t& stream_cmd); + void issue_stream_cmd(const stream_cmd_t& stream_cmd) override; /*! Returns stream args provided at creation * @@ -83,7 +83,7 @@ public: * \returns true if the block can deal with this configuration */ 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; /*! Connects a channel to the streamer port * @@ -92,7 +92,7 @@ public: * \param channel The streamer channel to which to connect * \param xport The transport for the specified channel */ - void connect_channel(const size_t channel, chdr_rx_data_xport::uptr xport); + void connect_channel(const size_t channel, chdr_rx_data_xport::uptr xport) override; private: void _register_props(const size_t chan, const std::string& otw_format); diff --git a/host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp b/host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp index 5d741a844..a071d7248 100644 --- a/host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp +++ b/host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp @@ -38,7 +38,7 @@ public: /*! Destructor */ - ~rfnoc_tx_streamer(); + ~rfnoc_tx_streamer() override; /*! Returns a unique identifier string for this node. In every RFNoC graph, * no two nodes cannot have the same ID. Returns a string in the form of @@ -46,7 +46,7 @@ public: * * \returns The unique ID as a string */ - std::string get_unique_id() const; + std::string get_unique_id() const override; /*! Returns the number of input ports for this block. * @@ -54,13 +54,13 @@ public: * * \return noc_id The number of ports */ - size_t get_num_input_ports() const; + size_t get_num_input_ports() const override; /*! Returns the number of output ports for this block. * * \return noc_id The number of ports */ - size_t get_num_output_ports() const; + size_t get_num_output_ports() const override; /*! Returns stream args provided at creation * @@ -77,7 +77,7 @@ public: * \returns true if the block can deal with this configuration */ 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; /*! Connects a channel to the streamer port * @@ -86,7 +86,7 @@ public: * \param channel The streamer channel to which to connect * \param xport The transport for the specified channel */ - void connect_channel(const size_t channel, chdr_tx_data_xport::uptr xport); + void connect_channel(const size_t channel, chdr_tx_data_xport::uptr xport) override; /*! Receive an asynchronous message from this tx stream * @@ -96,7 +96,7 @@ public: * \param timeout the timeout in seconds to wait for a message * \return true when the async_metadata is valid, false for timeout */ - bool recv_async_msg(uhd::async_metadata_t& async_metadata, double timeout); + bool recv_async_msg(uhd::async_metadata_t& async_metadata, double timeout) override; private: void _register_props(const size_t chan, const std::string& otw_format); diff --git a/host/lib/include/uhdlib/transport/dpdk_simple.hpp b/host/lib/include/uhdlib/transport/dpdk_simple.hpp index 072edbf9f..229e6b0be 100644 --- a/host/lib/include/uhdlib/transport/dpdk_simple.hpp +++ b/host/lib/include/uhdlib/transport/dpdk_simple.hpp @@ -13,7 +13,7 @@ namespace uhd { namespace transport { class dpdk_simple : public udp_simple { public: - virtual ~dpdk_simple(void) = 0; + ~dpdk_simple(void) override = 0; static udp_simple::sptr make_connected( const std::string& addr, const std::string& port); @@ -27,7 +27,7 @@ public: * \param buff single asio buffer * \return the number of bytes sent */ - virtual size_t send(const boost::asio::const_buffer& buff) = 0; + size_t send(const boost::asio::const_buffer& buff) override = 0; /*! * Receive into the provided buffer. @@ -36,19 +36,19 @@ public: * \param timeout the timeout in seconds * \return the number of bytes received or zero on timeout */ - virtual size_t recv( - const boost::asio::mutable_buffer& buff, double timeout = 0.1) = 0; + size_t recv( + const boost::asio::mutable_buffer& buff, double timeout = 0.1) override = 0; /*! * Get the last IP address as seen by recv(). * Only use this with the broadcast socket. */ - virtual std::string get_recv_addr(void) = 0; + std::string get_recv_addr(void) override = 0; /*! * Get the IP address for the destination */ - virtual std::string get_send_addr(void) = 0; + std::string get_send_addr(void) override = 0; }; }} // namespace uhd::transport diff --git a/host/lib/include/uhdlib/transport/inline_io_service.hpp b/host/lib/include/uhdlib/transport/inline_io_service.hpp index a9616dd86..b44b0bad5 100644 --- a/host/lib/include/uhdlib/transport/inline_io_service.hpp +++ b/host/lib/include/uhdlib/transport/inline_io_service.hpp @@ -33,18 +33,18 @@ public: ~inline_io_service(); - void attach_recv_link(recv_link_if::sptr link); - void attach_send_link(send_link_if::sptr link); + void attach_recv_link(recv_link_if::sptr link) override; + void attach_send_link(send_link_if::sptr link) override; - void detach_recv_link(recv_link_if::sptr link); - void detach_send_link(send_link_if::sptr link); + void detach_recv_link(recv_link_if::sptr link) override; + void detach_send_link(send_link_if::sptr link) override; recv_io_if::sptr make_recv_client(recv_link_if::sptr data_link, size_t num_recv_frames, recv_callback_t cb, send_link_if::sptr fc_link, size_t num_send_frames, - recv_io_if::fc_callback_t fc_cb); + recv_io_if::fc_callback_t fc_cb) override; send_io_if::sptr make_send_client(send_link_if::sptr send_link, size_t num_send_frames, @@ -52,7 +52,7 @@ public: recv_link_if::sptr recv_link, size_t num_recv_frames, recv_callback_t recv_cb, - send_io_if::fc_callback_t fc_cb); + send_io_if::fc_callback_t fc_cb) override; private: friend class inline_recv_io; diff --git a/host/lib/include/uhdlib/transport/link_base.hpp b/host/lib/include/uhdlib/transport/link_base.hpp index 078b82fc6..e2b0425bd 100644 --- a/host/lib/include/uhdlib/transport/link_base.hpp +++ b/host/lib/include/uhdlib/transport/link_base.hpp @@ -74,17 +74,17 @@ public: { } - virtual size_t get_num_send_frames() const + size_t get_num_send_frames() const override { return _num_send_frames; } - virtual size_t get_send_frame_size() const + size_t get_send_frame_size() const override { return _send_frame_size; } - virtual frame_buff::uptr get_send_buff(int32_t timeout_ms) + frame_buff::uptr get_send_buff(int32_t timeout_ms) override { frame_buff* buff = _free_send_buffs.pop(); @@ -99,7 +99,7 @@ public: return frame_buff::uptr(buff); } - virtual void release_send_buff(frame_buff::uptr buff) + void release_send_buff(frame_buff::uptr buff) override { frame_buff* buff_ptr = buff.release(); assert(buff_ptr); @@ -164,17 +164,17 @@ public: { } - virtual size_t get_num_recv_frames() const + size_t get_num_recv_frames() const override { return _num_recv_frames; } - virtual size_t get_recv_frame_size() const + size_t get_recv_frame_size() const override { return _recv_frame_size; } - virtual frame_buff::uptr get_recv_buff(int32_t timeout_ms) + frame_buff::uptr get_recv_buff(int32_t timeout_ms) override { frame_buff* buff = _free_recv_buffs.pop(); @@ -192,7 +192,7 @@ public: } } - virtual void release_recv_buff(frame_buff::uptr buff) + void release_recv_buff(frame_buff::uptr buff) override { frame_buff* buff_ptr = buff.release(); assert(buff_ptr); diff --git a/host/lib/include/uhdlib/transport/nirio_link.hpp b/host/lib/include/uhdlib/transport/nirio_link.hpp index 84d55113d..33e22cf1a 100644 --- a/host/lib/include/uhdlib/transport/nirio_link.hpp +++ b/host/lib/include/uhdlib/transport/nirio_link.hpp @@ -48,7 +48,7 @@ public: ~nirio_adapter_info() {} - std::string to_string() + std::string to_string() override { return std::string("NIRIO:") + _resource; } @@ -92,7 +92,7 @@ public: /*! * Get the physical adapter ID used for this link */ - adapter_id_t get_send_adapter_id() const + adapter_id_t get_send_adapter_id() const override { return _adapter_id; } @@ -100,7 +100,7 @@ public: /*! * Get the physical adapter ID used for this link */ - adapter_id_t get_recv_adapter_id() const + adapter_id_t get_recv_adapter_id() const override { return _adapter_id; } @@ -109,7 +109,7 @@ public: * Returns whether this link type supports releasing the frame buffers * in an order different from that in which they were acquired. */ - bool supports_send_buff_out_of_order() const + bool supports_send_buff_out_of_order() const override { return false; } @@ -118,7 +118,7 @@ public: * Returns whether this link type supports releasing the frame buffers * in an order different from that in which they were acquired. */ - bool supports_recv_buff_out_of_order() const + bool supports_recv_buff_out_of_order() const override { return false; } diff --git a/host/lib/include/uhdlib/transport/rx_streamer_impl.hpp b/host/lib/include/uhdlib/transport/rx_streamer_impl.hpp index ce66d2ccb..00ce558b8 100644 --- a/host/lib/include/uhdlib/transport/rx_streamer_impl.hpp +++ b/host/lib/include/uhdlib/transport/rx_streamer_impl.hpp @@ -106,13 +106,13 @@ public: } //! Implementation of rx_streamer API method - size_t get_num_channels() const + size_t get_num_channels() const override { return _zero_copy_streamer.get_num_channels(); } //! Implementation of rx_streamer API method - size_t get_max_num_samps() const + size_t get_max_num_samps() const override { return _spp; } @@ -130,7 +130,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 { if (_error_metadata_cache.check(metadata)) { return 0; diff --git a/host/lib/include/uhdlib/transport/tx_streamer_impl.hpp b/host/lib/include/uhdlib/transport/tx_streamer_impl.hpp index ae6a1b867..4cb5c032b 100644 --- a/host/lib/include/uhdlib/transport/tx_streamer_impl.hpp +++ b/host/lib/include/uhdlib/transport/tx_streamer_impl.hpp @@ -127,12 +127,12 @@ public: } } - size_t get_num_channels() const + size_t get_num_channels() const override { return _zero_copy_streamer.get_num_channels(); } - size_t get_max_num_samps() const + size_t get_max_num_samps() const override { return _spp; } @@ -148,7 +148,7 @@ public: size_t send(const uhd::tx_streamer::buffs_type& buffs, const size_t nsamps_per_buff, const uhd::tx_metadata_t& metadata_, - const double timeout) + const double timeout) override { uhd::tx_metadata_t metadata(metadata_); diff --git a/host/lib/include/uhdlib/transport/udp_boost_asio_link.hpp b/host/lib/include/uhdlib/transport/udp_boost_asio_link.hpp index a5ba976c7..34fbf3edd 100644 --- a/host/lib/include/uhdlib/transport/udp_boost_asio_link.hpp +++ b/host/lib/include/uhdlib/transport/udp_boost_asio_link.hpp @@ -38,7 +38,7 @@ public: ~udp_boost_asio_adapter_info() {} - std::string to_string() + std::string to_string() override { return std::string("Ethernet(kernel):") + _src_ip.to_string(); } @@ -90,7 +90,7 @@ public: /*! * Get the physical adapter ID used for this link */ - adapter_id_t get_send_adapter_id() const + adapter_id_t get_send_adapter_id() const override { return _adapter_id; } @@ -98,7 +98,7 @@ public: /*! * Get the physical adapter ID used for this link */ - adapter_id_t get_recv_adapter_id() const + adapter_id_t get_recv_adapter_id() const override { return _adapter_id; } diff --git a/host/lib/include/uhdlib/usrp/common/adf435x.hpp b/host/lib/include/uhdlib/usrp/common/adf435x.hpp index de93bfd69..8c47c94fd 100644 --- a/host/lib/include/uhdlib/usrp/common/adf435x.hpp +++ b/host/lib/include/uhdlib/usrp/common/adf435x.hpp @@ -139,19 +139,19 @@ public: { } - virtual ~adf435x_impl(){}; + ~adf435x_impl() override{}; - void set_reference_freq(double fref) + void set_reference_freq(double fref) override { _reference_freq = fref; } - void set_feedback_select(feedback_sel_t fb_sel) + void set_feedback_select(feedback_sel_t fb_sel) override { _fb_after_divider = (fb_sel == FB_SEL_DIVIDED); } - void set_prescaler(prescaler_t prescaler) + void set_prescaler(prescaler_t prescaler) override { if (prescaler == PRESCALER_8_9) { _regs.prescaler = adf435x_regs_t::PRESCALER_8_9; @@ -162,7 +162,7 @@ public: } } - void set_output_power(output_t output, output_power_t power) + void set_output_power(output_t output, output_power_t power) override { switch (output) { case RF_OUTPUT_A: @@ -206,7 +206,7 @@ public: } } - void set_output_enable(output_t output, bool enable) + void set_output_enable(output_t output, bool enable) override { switch (output) { case RF_OUTPUT_A: @@ -222,7 +222,7 @@ public: } } - void set_muxout_mode(muxout_t mode) + void set_muxout_mode(muxout_t mode) override { switch (mode) { case MUXOUT_3STATE: @@ -251,7 +251,7 @@ public: } } - void set_tuning_mode(tuning_mode_t mode) + void set_tuning_mode(tuning_mode_t mode) override { // New mode applies to subsequent tunes i.e. do not re-tune now _tuning_mode = mode; @@ -262,7 +262,7 @@ public: _regs.phase_12_bit = (_tuning_mode == TUNING_MODE_HIGH_RESOLUTION) ? 0 : 1; } - void set_charge_pump_current(charge_pump_current_t cp_current) + void set_charge_pump_current(charge_pump_current_t cp_current) override { switch (cp_current) { case CHARGE_PUMP_CURRENT_0_31MA: @@ -318,7 +318,7 @@ public: } } - double set_charge_pump_current(const double current, const bool flush) + double set_charge_pump_current(const double current, const bool flush) override { const auto cp_range = get_charge_pump_current_range(); @@ -344,19 +344,19 @@ public: return coerced_current; } - uhd::meta_range_t get_charge_pump_current_range() + uhd::meta_range_t get_charge_pump_current_range() override { return uhd::meta_range_t(.3125e-6, 5e-6, .3125e-6); } - uhd::range_t get_int_range() + uhd::range_t get_int_range() override { if (_N_min < 0) throw uhd::runtime_error("set_prescaler must be called before get_int_range"); return uhd::range_t(_N_min, 4095); } - double set_frequency(double target_freq, bool int_n_mode, bool flush = false) + double set_frequency(double target_freq, bool int_n_mode, bool flush = false) override { static const double REF_DOUBLER_THRESH_FREQ = 12.5e6; static const double PFD_FREQ_MAX = 25.0e6; @@ -531,7 +531,7 @@ public: return actual_freq; } - void commit() + void commit() override { // reset counters _regs.counter_reset = adf435x_regs_t::COUNTER_RESET_ENABLED; diff --git a/host/lib/include/uhdlib/usrp/common/max287x.hpp b/host/lib/include/uhdlib/usrp/common/max287x.hpp index 5e23649ef..8aa7e947e 100644 --- a/host/lib/include/uhdlib/usrp/common/max287x.hpp +++ b/host/lib/include/uhdlib/usrp/common/max287x.hpp @@ -224,24 +224,26 @@ class max287x : public max287x_iface { public: max287x(write_fn func); - virtual ~max287x(); - virtual void power_up(void); - virtual void shutdown(void); - virtual bool is_shutdown(void); - virtual double set_frequency( - double target_freq, double ref_freq, double target_pfd_freq, bool is_int_n); - virtual void set_output_power(output_power_t power); - virtual void set_ld_pin_mode(ld_pin_mode_t mode); - virtual void set_muxout_mode(muxout_mode_t mode); - virtual void set_charge_pump_current(charge_pump_current_t cp_current); - virtual void set_auto_retune(bool enabled); - virtual void set_clock_divider_mode(clock_divider_mode_t mode); - virtual void set_cycle_slip_mode(bool enabled); - virtual void set_low_noise_and_spur(low_noise_and_spur_t mode); - virtual void set_phase(uint16_t phase); - virtual void commit(); - virtual bool can_sync(); - virtual void config_for_sync(bool enable); + ~max287x() override; + void power_up(void) override; + void shutdown(void) override; + bool is_shutdown(void) override; + double set_frequency(double target_freq, + double ref_freq, + double target_pfd_freq, + bool is_int_n) override; + void set_output_power(output_power_t power) override; + void set_ld_pin_mode(ld_pin_mode_t mode) override; + void set_muxout_mode(muxout_mode_t mode) override; + void set_charge_pump_current(charge_pump_current_t cp_current) override; + void set_auto_retune(bool enabled) override; + void set_clock_divider_mode(clock_divider_mode_t mode) override; + void set_cycle_slip_mode(bool enabled) override; + void set_low_noise_and_spur(low_noise_and_spur_t mode) override; + void set_phase(uint16_t phase) override; + void commit() override; + bool can_sync() override; + void config_for_sync(bool enable) override; protected: max287x_regs_t _regs; @@ -261,9 +263,11 @@ class max2870 : public max287x<max2870_regs_t> { public: max2870(write_fn func) : max287x<max2870_regs_t>(func) {} - ~max2870() {} - double set_frequency( - double target_freq, double ref_freq, double target_pfd_freq, bool is_int_n) + ~max2870() override {} + double set_frequency(double target_freq, + double ref_freq, + double target_pfd_freq, + bool is_int_n) override { _regs.cpoc = is_int_n ? max2870_regs_t::CPOC_ENABLED : max2870_regs_t::CPOC_DISABLED; @@ -274,7 +278,7 @@ public: return max287x<max2870_regs_t>::set_frequency( target_freq, ref_freq, target_pfd_freq, is_int_n); } - void commit(void) + void commit(void) override { // For MAX2870, we always need to write all registers. _write_all_regs = true; @@ -354,8 +358,8 @@ class max2871 : public max287x<max2871_regs_t> { public: max2871(write_fn func) : max287x<max2871_regs_t>(func) {} - ~max2871(){}; - void set_muxout_mode(muxout_mode_t mode) + ~max2871() override{}; + void set_muxout_mode(muxout_mode_t mode) override { switch (mode) { case MUXOUT_SYNC: @@ -369,8 +373,10 @@ public: } } - double set_frequency( - double target_freq, double ref_freq, double target_pfd_freq, bool is_int_n) + double set_frequency(double target_freq, + double ref_freq, + double target_pfd_freq, + bool is_int_n) override { _regs.feedback_select = max2871_regs_t::FEEDBACK_SELECT_DIVIDED; double freq = max287x<max2871_regs_t>::set_frequency( @@ -414,7 +420,7 @@ public: return freq; } - void commit() + void commit() override { max287x<max2871_regs_t>::commit(); @@ -883,7 +889,7 @@ void max287x<max287x_regs_t>::commit() try { changed_regs = _regs.template get_changed_addrs<uint32_t>(); // register 0 must be written to apply double buffered fields - if (changed_regs.size() > 0) { + if (!changed_regs.empty()) { changed_regs.insert(0); } diff --git a/host/lib/include/uhdlib/usrp/common/mpmd_mb_controller.hpp b/host/lib/include/uhdlib/usrp/common/mpmd_mb_controller.hpp index acdd361e4..98e7f2ac4 100644 --- a/host/lib/include/uhdlib/usrp/common/mpmd_mb_controller.hpp +++ b/host/lib/include/uhdlib/usrp/common/mpmd_mb_controller.hpp @@ -55,11 +55,11 @@ public: // nop } - 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; /*! Update the tick rate * Note: This is separate from set_tick_rate because the latter is @@ -75,26 +75,28 @@ public: /************************************************************************** * Motherboard Control API (see mb_controller.hpp) *************************************************************************/ - 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 uhd::device_addr_t& sync_source); - uhd::device_addr_t get_sync_source() const; - std::vector<uhd::device_addr_t> get_sync_sources(); - void set_clock_source_out(const bool enb); - void set_time_source_out(const bool enb); - uhd::sensor_value_t get_sensor(const std::string& name); - std::vector<std::string> get_sensor_names(); - uhd::usrp::mboard_eeprom_t get_eeprom(); - std::vector<std::string> get_gpio_banks() const; - std::vector<std::string> get_gpio_srcs(const std::string& bank) const; - std::vector<std::string> get_gpio_src(const std::string& bank); - void set_gpio_src(const std::string& bank, const std::vector<std::string>& src); + 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 uhd::device_addr_t& sync_source) override; + uhd::device_addr_t get_sync_source() const override; + std::vector<uhd::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; + uhd::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; + std::vector<std::string> get_gpio_banks() const override; + std::vector<std::string> get_gpio_srcs(const std::string& bank) const override; + std::vector<std::string> get_gpio_src(const std::string& bank) override; + void set_gpio_src( + const std::string& bank, const std::vector<std::string>& src) override; private: /************************************************************************** diff --git a/host/lib/include/uhdlib/usrp/common/recv_packet_demuxer_3000.hpp b/host/lib/include/uhdlib/usrp/common/recv_packet_demuxer_3000.hpp index 9cbede8e4..0e1041642 100644 --- a/host/lib/include/uhdlib/usrp/common/recv_packet_demuxer_3000.hpp +++ b/host/lib/include/uhdlib/usrp/common/recv_packet_demuxer_3000.hpp @@ -117,32 +117,32 @@ struct recv_packet_demuxer_proxy_3000 : transport::zero_copy_if _demux->realloc_sid(_sid); // causes clear } - ~recv_packet_demuxer_proxy_3000(void) + ~recv_packet_demuxer_proxy_3000(void) override { _demux->realloc_sid(_sid); // causes clear } - size_t get_num_recv_frames(void) const + size_t get_num_recv_frames(void) const override { return _xport->get_num_recv_frames(); } - size_t get_recv_frame_size(void) const + size_t get_recv_frame_size(void) const override { return _xport->get_recv_frame_size(); } - transport::managed_recv_buffer::sptr get_recv_buff(double timeout) + transport::managed_recv_buffer::sptr get_recv_buff(double timeout) override { return _demux->get_recv_buff(_sid, timeout); } - size_t get_num_send_frames(void) const + size_t get_num_send_frames(void) const override { return _xport->get_num_send_frames(); } - size_t get_send_frame_size(void) const + size_t get_send_frame_size(void) const override { return _xport->get_send_frame_size(); } - transport::managed_send_buffer::sptr get_send_buff(double timeout) + transport::managed_send_buffer::sptr get_send_buff(double timeout) override { return _xport->get_send_buff(timeout); } diff --git a/host/lib/include/uhdlib/usrp/constrained_device_args.hpp b/host/lib/include/uhdlib/usrp/constrained_device_args.hpp index 7588462c4..bdd492752 100644 --- a/host/lib/include/uhdlib/usrp/constrained_device_args.hpp +++ b/host/lib/include/uhdlib/usrp/constrained_device_args.hpp @@ -79,7 +79,7 @@ public: // Types { set(str_rep); } - inline virtual std::string to_string() const + inline std::string to_string() const override { return key() + "=" + get(); } @@ -125,7 +125,7 @@ public: // Types % ex.what())); } } - inline virtual std::string to_string() const + inline std::string to_string() const override { return key() + "=" + std::to_string(get()); } @@ -179,7 +179,7 @@ public: // Types set(_str_values.at(str_rep_lowercase)); } - inline virtual std::string to_string() const + inline std::string to_string() const override { std::string repr; for (const auto& value : _str_values) { @@ -232,7 +232,7 @@ public: // Types % key() % ex.what())); } } - inline virtual std::string to_string() const + inline std::string to_string() const override { return key() + "=" + (get() ? "true" : "false"); } diff --git a/host/lib/include/uhdlib/usrp/cores/i2c_core_100_wb32.hpp b/host/lib/include/uhdlib/usrp/cores/i2c_core_100_wb32.hpp index e38f73127..08c77e282 100644 --- a/host/lib/include/uhdlib/usrp/cores/i2c_core_100_wb32.hpp +++ b/host/lib/include/uhdlib/usrp/cores/i2c_core_100_wb32.hpp @@ -18,7 +18,7 @@ class i2c_core_100_wb32 : uhd::noncopyable, public uhd::i2c_iface public: typedef std::shared_ptr<i2c_core_100_wb32> sptr; - virtual ~i2c_core_100_wb32(void) = 0; + ~i2c_core_100_wb32(void) override = 0; //! makes a new i2c core from iface and slave base static sptr make(uhd::wb_iface::sptr iface, const size_t base); diff --git a/host/lib/include/uhdlib/usrp/cores/i2c_core_200.hpp b/host/lib/include/uhdlib/usrp/cores/i2c_core_200.hpp index 4b7353812..980b8997f 100644 --- a/host/lib/include/uhdlib/usrp/cores/i2c_core_200.hpp +++ b/host/lib/include/uhdlib/usrp/cores/i2c_core_200.hpp @@ -19,7 +19,7 @@ class i2c_core_200 : uhd::noncopyable, public uhd::i2c_iface public: typedef std::shared_ptr<i2c_core_200> sptr; - virtual ~i2c_core_200(void) = 0; + ~i2c_core_200(void) override = 0; //! makes a new i2c core from iface and slave base static sptr make(uhd::wb_iface::sptr iface, const size_t base, const size_t readback); diff --git a/host/lib/include/uhdlib/usrp/cores/radio_ctrl_core_3000.hpp b/host/lib/include/uhdlib/usrp/cores/radio_ctrl_core_3000.hpp index 0b5ba6a6f..c24ee4524 100644 --- a/host/lib/include/uhdlib/usrp/cores/radio_ctrl_core_3000.hpp +++ b/host/lib/include/uhdlib/usrp/cores/radio_ctrl_core_3000.hpp @@ -23,7 +23,7 @@ class radio_ctrl_core_3000 : public uhd::timed_wb_iface public: typedef std::shared_ptr<radio_ctrl_core_3000> sptr; - virtual ~radio_ctrl_core_3000(void) = 0; + ~radio_ctrl_core_3000(void) override = 0; //! Make a new control object static sptr make(const bool big_endian, @@ -39,10 +39,10 @@ public: virtual void push_response(const uint32_t* buff) = 0; //! Set the command time that will activate - virtual void set_time(const uhd::time_spec_t& time) = 0; + void set_time(const uhd::time_spec_t& time) override = 0; //! Get the command time that will activate - virtual uhd::time_spec_t get_time(void) = 0; + uhd::time_spec_t get_time(void) override = 0; //! Set the tick rate (converting time into ticks) virtual void set_tick_rate(const double rate) = 0; diff --git a/host/lib/include/uhdlib/usrp/cores/spi_core_3000.hpp b/host/lib/include/uhdlib/usrp/cores/spi_core_3000.hpp index d08147407..a821ae602 100644 --- a/host/lib/include/uhdlib/usrp/cores/spi_core_3000.hpp +++ b/host/lib/include/uhdlib/usrp/cores/spi_core_3000.hpp @@ -21,7 +21,7 @@ public: using poke32_fn_t = std::function<void(uint32_t, uint32_t)>; using peek32_fn_t = std::function<uint32_t(uint32_t)>; - virtual ~spi_core_3000(void) = 0; + ~spi_core_3000(void) override = 0; //! makes a new spi core from iface and slave base static sptr make(uhd::wb_iface::sptr iface, const size_t base, const size_t readback); diff --git a/host/lib/include/uhdlib/usrp/cores/user_settings_core_3000.hpp b/host/lib/include/uhdlib/usrp/cores/user_settings_core_3000.hpp index 3f461ddb7..6e17e0b97 100644 --- a/host/lib/include/uhdlib/usrp/cores/user_settings_core_3000.hpp +++ b/host/lib/include/uhdlib/usrp/cores/user_settings_core_3000.hpp @@ -15,7 +15,7 @@ class user_settings_core_3000 : public uhd::wb_iface { public: - virtual ~user_settings_core_3000() {} + ~user_settings_core_3000() override {} static sptr make(wb_iface::sptr iface, const wb_addr_type sr_base_addr, |