aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/libusb1_base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/transport/libusb1_base.cpp')
-rw-r--r--host/lib/transport/libusb1_base.cpp47
1 files changed, 24 insertions, 23 deletions
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.")