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/transport | |
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/transport')
-rw-r--r-- | host/lib/transport/buffer_pool.cpp | 4 | ||||
-rw-r--r-- | host/lib/transport/inline_io_service.cpp | 10 | ||||
-rw-r--r-- | host/lib/transport/libusb1_base.cpp | 47 | ||||
-rw-r--r-- | host/lib/transport/libusb1_base.hpp | 2 | ||||
-rw-r--r-- | host/lib/transport/libusb1_control.cpp | 4 | ||||
-rw-r--r-- | host/lib/transport/libusb1_zero_copy.cpp | 18 | ||||
-rw-r--r-- | host/lib/transport/muxed_zero_copy_if.cpp | 26 | ||||
-rw-r--r-- | host/lib/transport/nirio_zero_copy.cpp | 18 | ||||
-rw-r--r-- | host/lib/transport/offload_io_service.cpp | 12 | ||||
-rw-r--r-- | host/lib/transport/super_recv_packet_handler.hpp | 8 | ||||
-rw-r--r-- | host/lib/transport/super_send_packet_handler.hpp | 9 | ||||
-rw-r--r-- | host/lib/transport/tcp_zero_copy.cpp | 16 | ||||
-rw-r--r-- | host/lib/transport/udp_simple.cpp | 12 | ||||
-rw-r--r-- | host/lib/transport/udp_zero_copy.cpp | 20 | ||||
-rw-r--r-- | host/lib/transport/zero_copy_flow_ctrl.cpp | 22 |
15 files changed, 115 insertions, 113 deletions
diff --git a/host/lib/transport/buffer_pool.cpp b/host/lib/transport/buffer_pool.cpp index 0dd4a8d7f..ab674a4e8 100644 --- a/host/lib/transport/buffer_pool.cpp +++ b/host/lib/transport/buffer_pool.cpp @@ -35,12 +35,12 @@ public: /* NOP */ } - ptr_type at(const size_t index) const + ptr_type at(const size_t index) const override { return _ptrs.at(index); } - size_t size(void) const + size_t size(void) const override { return _ptrs.size(); } diff --git a/host/lib/transport/inline_io_service.cpp b/host/lib/transport/inline_io_service.cpp index 8206c145f..11835b285 100644 --- a/host/lib/transport/inline_io_service.cpp +++ b/host/lib/transport/inline_io_service.cpp @@ -215,7 +215,7 @@ public: } } - frame_buff::uptr get_recv_buff(int32_t timeout_ms) + frame_buff::uptr get_recv_buff(int32_t timeout_ms) override { auto buff = _io_srv->recv(this, _data_link.get(), timeout_ms); if (buff) { @@ -225,7 +225,7 @@ public: return buff; } - void release_recv_buff(frame_buff::uptr buff) + void release_recv_buff(frame_buff::uptr buff) override { _fc_cb(frame_buff::uptr(std::move(buff)), _data_link.get(), _fc_link.get()); _num_frames_in_use--; @@ -271,7 +271,7 @@ public: } } - bool wait_for_dest_ready(size_t num_bytes, int32_t timeout_ms) + bool wait_for_dest_ready(size_t num_bytes, int32_t timeout_ms) override { if (!_recv_link) { // If there is no flow control link, then the destination must @@ -290,7 +290,7 @@ public: return true; } - frame_buff::uptr get_send_buff(int32_t timeout_ms) + frame_buff::uptr get_send_buff(int32_t timeout_ms) override { frame_buff::uptr buff = _send_link->get_send_buff(timeout_ms); if (buff) { @@ -301,7 +301,7 @@ public: return frame_buff::uptr(); } - void release_send_buff(frame_buff::uptr buff) + void release_send_buff(frame_buff::uptr buff) override { // Send the packet using callback _send_cb(std::move(buff), _send_link.get()); diff --git a/host/lib/transport/libusb1_base.cpp b/host/lib/transport/libusb1_base.cpp index 9230a7e1f..df6ed45eb 100644 --- a/host/lib/transport/libusb1_base.cpp +++ b/host/lib/transport/libusb1_base.cpp @@ -46,9 +46,9 @@ public: std::bind(&libusb_session_impl::libusb_event_handler_task, this, _context)); } - virtual ~libusb_session_impl(void); + ~libusb_session_impl(void) override; - libusb_context* get_context(void) const + libusb_context* get_context(void) const override { return _context; } @@ -141,9 +141,9 @@ public: _dev = dev; } - virtual ~libusb_device_impl(void); + ~libusb_device_impl(void) override; - libusb_device* get(void) const + libusb_device* get(void) const override { return _dev; } @@ -187,14 +187,14 @@ public: libusb_free_device_list(dev_list, false /*dont unref*/); } - virtual ~libusb_device_list_impl(void); + ~libusb_device_list_impl(void) override; - size_t size(void) const + size_t size(void) const override { return _devs.size(); } - libusb::device::sptr at(size_t i) const + libusb::device::sptr at(size_t i) const override { return _devs.at(i); } @@ -230,14 +230,14 @@ public: UHD_ASSERT_THROW(libusb_get_device_descriptor(_dev->get(), &_desc) == 0); } - virtual ~libusb_device_descriptor_impl(void); + ~libusb_device_descriptor_impl(void) override; - const libusb_device_descriptor& get(void) const + const libusb_device_descriptor& get(void) const override { return _desc; } - std::string get_ascii_property(const std::string& what) const + std::string get_ascii_property(const std::string& what) const override { uint8_t off = 0; if (what == "serial") @@ -301,20 +301,21 @@ public: UHD_ASSERT_THROW(libusb_open(_dev->get(), &_handle) == 0); } - virtual ~libusb_device_handle_impl(void); + ~libusb_device_handle_impl(void) override; - libusb_device_handle* get(void) const + libusb_device_handle* get(void) const override { return _handle; } - void claim_interface(int interface) + void claim_interface(int interface) override { UHD_ASSERT_THROW(libusb_claim_interface(this->get(), interface) == 0); _claimed.push_back(interface); } - void clear_endpoints(unsigned char recv_endpoint, unsigned char send_endpoint) + void clear_endpoints( + unsigned char recv_endpoint, unsigned char send_endpoint) override { int ret; ret = libusb_clear_halt(this->get(), recv_endpoint | 0x80); @@ -325,7 +326,7 @@ public: << "usb device handle: send endpoint clear: " << libusb_error_name(ret); } - void reset_device(void) + void reset_device(void) override { int ret = libusb_reset_device(this->get()); UHD_LOGGER_TRACE("USB") @@ -392,42 +393,42 @@ public: _dev = dev; } - virtual ~libusb_special_handle_impl(void); + ~libusb_special_handle_impl(void) override; - libusb::device::sptr get_device(void) const + libusb::device::sptr get_device(void) const override { return _dev; } - std::string get_serial(void) const + std::string get_serial(void) const override { return libusb::device_descriptor::make(this->get_device()) ->get_ascii_property("serial"); } - std::string get_manufacturer() const + std::string get_manufacturer() const override { return libusb::device_descriptor::make(this->get_device()) ->get_ascii_property("manufacturer"); } - std::string get_product() const + std::string get_product() const override { return libusb::device_descriptor::make(this->get_device()) ->get_ascii_property("product"); } - uint16_t get_vendor_id(void) const + uint16_t get_vendor_id(void) const override { return libusb::device_descriptor::make(this->get_device())->get().idVendor; } - uint16_t get_product_id(void) const + uint16_t get_product_id(void) const override { return libusb::device_descriptor::make(this->get_device())->get().idProduct; } - bool firmware_loaded() + bool firmware_loaded() override { return (get_manufacturer() == "Ettus Research LLC") or (get_manufacturer() == "National Instruments Corp.") diff --git a/host/lib/transport/libusb1_base.hpp b/host/lib/transport/libusb1_base.hpp index 7c70ab5d0..4334e6369 100644 --- a/host/lib/transport/libusb1_base.hpp +++ b/host/lib/transport/libusb1_base.hpp @@ -165,7 +165,7 @@ class special_handle : public usb_device_handle public: typedef std::shared_ptr<special_handle> sptr; - virtual ~special_handle(void); + ~special_handle(void) override; //! make a new special handle from device static sptr make(device::sptr); diff --git a/host/lib/transport/libusb1_control.cpp b/host/lib/transport/libusb1_control.cpp index b7aefe1c6..e6339e17f 100644 --- a/host/lib/transport/libusb1_control.cpp +++ b/host/lib/transport/libusb1_control.cpp @@ -28,7 +28,7 @@ public: _handle->claim_interface(interface); } - virtual ~libusb_control_impl(void); + ~libusb_control_impl(void) override; int submit(uint8_t request_type, uint8_t request, @@ -36,7 +36,7 @@ public: uint16_t index, unsigned char* buff, uint16_t length, - uint32_t libusb_timeout = 0) + uint32_t libusb_timeout = 0) override { boost::mutex::scoped_lock lock(_mutex); return libusb_control_transfer(_handle->get(), diff --git a/host/lib/transport/libusb1_zero_copy.cpp b/host/lib/transport/libusb1_zero_copy.cpp index f918912d0..8cf76989b 100644 --- a/host/lib/transport/libusb1_zero_copy.cpp +++ b/host/lib/transport/libusb1_zero_copy.cpp @@ -126,9 +126,9 @@ public: { /* NOP */ } - virtual ~libusb_zero_copy_mb(void); + ~libusb_zero_copy_mb(void) override; - void release(void) + void release(void) override { _release_cb(this); } @@ -409,34 +409,34 @@ struct libusb_zero_copy_impl : usb_zero_copy size_t(hints.cast<double>("send_frame_size", DEFAULT_XFER_SIZE)))); } - virtual ~libusb_zero_copy_impl(void); + ~libusb_zero_copy_impl(void) override; - managed_recv_buffer::sptr get_recv_buff(double timeout) + managed_recv_buffer::sptr get_recv_buff(double timeout) override { boost::mutex::scoped_lock l(_recv_mutex); return _recv_impl->get_buff<managed_recv_buffer>(timeout); } - managed_send_buffer::sptr get_send_buff(double timeout) + managed_send_buffer::sptr get_send_buff(double timeout) override { boost::mutex::scoped_lock l(_send_mutex); return _send_impl->get_buff<managed_send_buffer>(timeout); } - size_t get_num_recv_frames(void) const + size_t get_num_recv_frames(void) const override { return _recv_impl->get_num_frames(); } - size_t get_num_send_frames(void) const + size_t get_num_send_frames(void) const override { return _send_impl->get_num_frames(); } - size_t get_recv_frame_size(void) const + size_t get_recv_frame_size(void) const override { return _recv_impl->get_frame_size(); } - size_t get_send_frame_size(void) const + size_t get_send_frame_size(void) const override { return _send_impl->get_frame_size(); } diff --git a/host/lib/transport/muxed_zero_copy_if.cpp b/host/lib/transport/muxed_zero_copy_if.cpp index 2602d8596..f7cc88c9c 100644 --- a/host/lib/transport/muxed_zero_copy_if.cpp +++ b/host/lib/transport/muxed_zero_copy_if.cpp @@ -39,7 +39,7 @@ public: boost::thread(std::bind(&muxed_zero_copy_if_impl::_update_queues, this)); } - virtual ~muxed_zero_copy_if_impl() + ~muxed_zero_copy_if_impl() override { UHD_SAFE_CALL( // Interrupt buffer updater loop @@ -58,7 +58,7 @@ public: _streams.clear();); } - virtual zero_copy_if::sptr make_stream(const uint32_t stream_num) + zero_copy_if::sptr make_stream(const uint32_t stream_num) override { boost::lock_guard<boost::mutex> lock(_mutex); if (_streams.size() >= _max_num_streams) { @@ -75,12 +75,12 @@ public: return stream; } - virtual size_t get_num_dropped_frames() const + size_t get_num_dropped_frames() const override { return _num_dropped_frames; } - void remove_stream(const uint32_t stream_num) + void remove_stream(const uint32_t stream_num) override { boost::lock_guard<boost::mutex> lock(_mutex); _streams.erase(stream_num); @@ -96,12 +96,12 @@ private: public: stream_mrb(size_t size) : _buff(new char[size]) {} - ~stream_mrb() + ~stream_mrb() override { delete[] _buff; } - void release() {} + void release() override {} UHD_INLINE sptr get_new(char* buff, size_t len) { @@ -138,7 +138,7 @@ private: } } - ~stream_impl(void) + ~stream_impl(void) override { // First remove the stream from muxed transport // so no more frames are pushed in @@ -150,17 +150,17 @@ private: } } - size_t get_num_recv_frames(void) const + size_t get_num_recv_frames(void) const override { return _num_recv_frames; } - size_t get_recv_frame_size(void) const + size_t get_recv_frame_size(void) const override { return _recv_frame_size; } - managed_recv_buffer::sptr get_recv_buff(double timeout) + managed_recv_buffer::sptr get_recv_buff(double timeout) override { managed_recv_buffer::sptr buff; if (_buff_queue.pop_with_timed_wait(buff, timeout)) { @@ -177,17 +177,17 @@ private: _buffer_index %= _buffers.size(); } - size_t get_num_send_frames(void) const + size_t get_num_send_frames(void) const override { return _num_send_frames; } - size_t get_send_frame_size(void) const + size_t get_send_frame_size(void) const override { return _send_frame_size; } - managed_send_buffer::sptr get_send_buff(double timeout) + managed_send_buffer::sptr get_send_buff(double timeout) override { return _muxed_xport->base_xport()->get_send_buff(timeout); } diff --git a/host/lib/transport/nirio_zero_copy.cpp b/host/lib/transport/nirio_zero_copy.cpp index 8600b10d1..cd49b67bf 100644 --- a/host/lib/transport/nirio_zero_copy.cpp +++ b/host/lib/transport/nirio_zero_copy.cpp @@ -53,7 +53,7 @@ public: { } - void release(void) + void release(void) override { _fifo.release(_frame_size / sizeof(fifo_data_t)); } @@ -97,7 +97,7 @@ public: { } - void release(void) + void release(void) override { _fifo.release(_frame_size / sizeof(fifo_data_t)); } @@ -241,7 +241,7 @@ public: nirio_status_to_exception(status, "Could not create nirio_zero_copy transport."); } - virtual ~nirio_zero_copy_impl() + ~nirio_zero_copy_impl() override { _proxy()->get_rio_quirks().remove_tx_fifo(_fifo_instance); @@ -263,18 +263,18 @@ public: * Receive implementation: * Block on the managed buffer's get call and advance the index. ******************************************************************/ - managed_recv_buffer::sptr get_recv_buff(double timeout) + managed_recv_buffer::sptr get_recv_buff(double timeout) override { if (_next_recv_buff_index == _xport_params.num_recv_frames) _next_recv_buff_index = 0; return _mrb_pool[_next_recv_buff_index]->get_new(timeout, _next_recv_buff_index); } - size_t get_num_recv_frames(void) const + size_t get_num_recv_frames(void) const override { return _xport_params.num_recv_frames; } - size_t get_recv_frame_size(void) const + size_t get_recv_frame_size(void) const override { return _xport_params.recv_frame_size; } @@ -283,18 +283,18 @@ public: * Send implementation: * Block on the managed buffer's get call and advance the index. ******************************************************************/ - managed_send_buffer::sptr get_send_buff(double timeout) + managed_send_buffer::sptr get_send_buff(double timeout) override { if (_next_send_buff_index == _xport_params.num_send_frames) _next_send_buff_index = 0; return _msb_pool[_next_send_buff_index]->get_new(timeout, _next_send_buff_index); } - size_t get_num_send_frames(void) const + size_t get_num_send_frames(void) const override { return _xport_params.num_send_frames; } - size_t get_send_frame_size(void) const + size_t get_send_frame_size(void) const override { return _xport_params.send_frame_size; } diff --git a/host/lib/transport/offload_io_service.cpp b/host/lib/transport/offload_io_service.cpp index b92543587..32811cbc0 100644 --- a/host/lib/transport/offload_io_service.cpp +++ b/host/lib/transport/offload_io_service.cpp @@ -259,18 +259,18 @@ public: io_service::sptr io_srv, const offload_io_service::params_t& params); ~offload_io_service_impl(); - 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 recv_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, @@ -278,7 +278,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: offload_io_service_impl(const offload_io_service_impl&) = delete; diff --git a/host/lib/transport/super_recv_packet_handler.hpp b/host/lib/transport/super_recv_packet_handler.hpp index f428f01f1..42753ea92 100644 --- a/host/lib/transport/super_recv_packet_handler.hpp +++ b/host/lib/transport/super_recv_packet_handler.hpp @@ -807,12 +807,12 @@ public: _max_num_samps = max_num_samps; } - 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; } @@ -821,13 +821,13 @@ public: const size_t nsamps_per_buff, uhd::rx_metadata_t& metadata, const double timeout, - const bool one_packet) + const bool one_packet) override { return recv_packet_handler::recv( buffs, nsamps_per_buff, metadata, timeout, one_packet); } - void issue_stream_cmd(const stream_cmd_t& stream_cmd) + void issue_stream_cmd(const stream_cmd_t& stream_cmd) override { return recv_packet_handler::issue_stream_cmd(stream_cmd); } diff --git a/host/lib/transport/super_send_packet_handler.hpp b/host/lib/transport/super_send_packet_handler.hpp index 556530f81..0fb3a07fd 100644 --- a/host/lib/transport/super_send_packet_handler.hpp +++ b/host/lib/transport/super_send_packet_handler.hpp @@ -396,12 +396,12 @@ public: this->set_max_samples_per_packet(_max_num_samps); } - 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; } @@ -409,12 +409,13 @@ 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 { return send_packet_handler::send(buffs, nsamps_per_buff, metadata, timeout); } - bool recv_async_msg(uhd::async_metadata_t& async_metadata, double timeout = 0.1) + bool recv_async_msg( + uhd::async_metadata_t& async_metadata, double timeout = 0.1) override { return send_packet_handler::recv_async_msg(async_metadata, timeout); } diff --git a/host/lib/transport/tcp_zero_copy.cpp b/host/lib/transport/tcp_zero_copy.cpp index 0927a08ee..89e8eb4ff 100644 --- a/host/lib/transport/tcp_zero_copy.cpp +++ b/host/lib/transport/tcp_zero_copy.cpp @@ -35,7 +35,7 @@ public: { /*NOP*/ } - void release(void) + void release(void) override { _claimer.release(); } @@ -84,7 +84,7 @@ public: { /*NOP*/ } - void release(void) + void release(void) override { // Retry logic because send may fail with ENOBUFS. // This is known to occur at least on some OSX systems. @@ -184,18 +184,18 @@ public: * Receive implementation: * Block on the managed buffer's get call and advance the index. ******************************************************************/ - managed_recv_buffer::sptr get_recv_buff(double timeout) + managed_recv_buffer::sptr get_recv_buff(double timeout) override { if (_next_recv_buff_index == _num_recv_frames) _next_recv_buff_index = 0; return _mrb_pool[_next_recv_buff_index]->get_new(timeout, _next_recv_buff_index); } - size_t get_num_recv_frames(void) const + size_t get_num_recv_frames(void) const override { return _num_recv_frames; } - size_t get_recv_frame_size(void) const + size_t get_recv_frame_size(void) const override { return _recv_frame_size; } @@ -204,18 +204,18 @@ public: * Send implementation: * Block on the managed buffer's get call and advance the index. ******************************************************************/ - managed_send_buffer::sptr get_send_buff(double timeout) + managed_send_buffer::sptr get_send_buff(double timeout) override { if (_next_send_buff_index == _num_send_frames) _next_send_buff_index = 0; return _msb_pool[_next_send_buff_index]->get_new(timeout, _next_send_buff_index); } - size_t get_num_send_frames(void) const + size_t get_num_send_frames(void) const override { return _num_send_frames; } - size_t get_send_frame_size(void) const + size_t get_send_frame_size(void) const override { return _send_frame_size; } diff --git a/host/lib/transport/udp_simple.cpp b/host/lib/transport/udp_simple.cpp index e10dff7f8..c83e72d03 100644 --- a/host/lib/transport/udp_simple.cpp +++ b/host/lib/transport/udp_simple.cpp @@ -44,14 +44,14 @@ public: _socket->connect(_send_endpoint); } - size_t send(const asio::const_buffer& buff) + size_t send(const asio::const_buffer& buff) override { if (_connected) return _socket->send(asio::buffer(buff)); return _socket->send_to(asio::buffer(buff), _send_endpoint); } - size_t recv(const asio::mutable_buffer& buff, double timeout) + size_t recv(const asio::mutable_buffer& buff, double timeout) override { const int32_t timeout_ms = static_cast<int32_t>(timeout * 1000); @@ -60,12 +60,12 @@ public: return _socket->receive_from(asio::buffer(buff), _recv_endpoint); } - std::string get_recv_addr(void) + std::string get_recv_addr(void) override { return _recv_endpoint.address().to_string(); } - std::string get_send_addr(void) + std::string get_send_addr(void) override { return _send_endpoint.address().to_string(); } @@ -113,12 +113,12 @@ public: this->write_uart(""); // send an empty packet to init } - void write_uart(const std::string& buf) + void write_uart(const std::string& buf) override { _udp->send(asio::buffer(buf)); } - std::string read_uart(double timeout) + std::string read_uart(double timeout) override { std::string line; const boost::system_time exit_time = diff --git a/host/lib/transport/udp_zero_copy.cpp b/host/lib/transport/udp_zero_copy.cpp index 1a6f55259..be527be5c 100644 --- a/host/lib/transport/udp_zero_copy.cpp +++ b/host/lib/transport/udp_zero_copy.cpp @@ -65,7 +65,7 @@ public: { /*NOP*/ } - void release(void) + void release(void) override { _claimer.release(); } @@ -107,7 +107,7 @@ public: { /*NOP*/ } - void release(void) + void release(void) override { send_udp_packet(_sock_fd, _mem, size()); _claimer.release(); @@ -196,18 +196,18 @@ public: * Receive implementation: * Block on the managed buffer's get call and advance the index. ******************************************************************/ - managed_recv_buffer::sptr get_recv_buff(double timeout) + managed_recv_buffer::sptr get_recv_buff(double timeout) override { if (_next_recv_buff_index == _num_recv_frames) _next_recv_buff_index = 0; return _mrb_pool[_next_recv_buff_index]->get_new(timeout, _next_recv_buff_index); } - size_t get_num_recv_frames(void) const + size_t get_num_recv_frames(void) const override { return _num_recv_frames; } - size_t get_recv_frame_size(void) const + size_t get_recv_frame_size(void) const override { return _recv_frame_size; } @@ -216,28 +216,28 @@ public: * Send implementation: * Block on the managed buffer's get call and advance the index. ******************************************************************/ - managed_send_buffer::sptr get_send_buff(double timeout) + managed_send_buffer::sptr get_send_buff(double timeout) override { if (_next_send_buff_index == _num_send_frames) _next_send_buff_index = 0; return _msb_pool[_next_send_buff_index]->get_new(timeout, _next_send_buff_index); } - size_t get_num_send_frames(void) const + size_t get_num_send_frames(void) const override { return _num_send_frames; } - size_t get_send_frame_size(void) const + size_t get_send_frame_size(void) const override { return _send_frame_size; } - uint16_t get_local_port(void) const + uint16_t get_local_port(void) const override { return _socket->local_endpoint().port(); } - std::string get_local_addr(void) const + std::string get_local_addr(void) const override { return _socket->local_endpoint().address().to_string(); } diff --git a/host/lib/transport/zero_copy_flow_ctrl.cpp b/host/lib/transport/zero_copy_flow_ctrl.cpp index 05907c209..1c4d23a99 100644 --- a/host/lib/transport/zero_copy_flow_ctrl.cpp +++ b/host/lib/transport/zero_copy_flow_ctrl.cpp @@ -30,12 +30,12 @@ public: /* NOP */ } - ~zero_copy_flow_ctrl_msb() + ~zero_copy_flow_ctrl_msb() override { /* NOP */ } - void release() + void release() override { if (_mb) { _mb->commit(size()); @@ -64,12 +64,12 @@ public: /* NOP */ } - ~zero_copy_flow_ctrl_mrb() + ~zero_copy_flow_ctrl_mrb() override { /* NOP */ } - void release() + void release() override { if (_mb) { _mb.reset(); @@ -120,13 +120,13 @@ public: } } - ~zero_copy_flow_ctrl_impl() {} + ~zero_copy_flow_ctrl_impl() override {} /******************************************************************* * Receive implementation: * Pop the receive buffer pointer from the underlying transport ******************************************************************/ - UHD_INLINE managed_recv_buffer::sptr get_recv_buff(double timeout) + UHD_INLINE managed_recv_buffer::sptr get_recv_buff(double timeout) override { managed_recv_buffer::sptr ptr; managed_recv_buffer::sptr buff = _transport->get_recv_buff(timeout); @@ -139,12 +139,12 @@ public: return ptr; } - UHD_INLINE size_t get_num_recv_frames() const + UHD_INLINE size_t get_num_recv_frames() const override { return _transport->get_num_recv_frames(); } - UHD_INLINE size_t get_recv_frame_size() const + UHD_INLINE size_t get_recv_frame_size() const override { return _transport->get_recv_frame_size(); } @@ -153,7 +153,7 @@ public: * Send implementation: * Pass the send buffer pointer from the underlying transport ******************************************************************/ - managed_send_buffer::sptr get_send_buff(double timeout) + managed_send_buffer::sptr get_send_buff(double timeout) override { managed_send_buffer::sptr ptr; managed_send_buffer::sptr buff = _transport->get_send_buff(timeout); @@ -166,12 +166,12 @@ public: return ptr; } - UHD_INLINE size_t get_num_send_frames() const + UHD_INLINE size_t get_num_send_frames() const override { return _transport->get_num_send_frames(); } - UHD_INLINE size_t get_send_frame_size() const + UHD_INLINE size_t get_send_frame_size() const override { return _transport->get_send_frame_size(); } |