interface-libusb.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2015 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 
6 #include "endpoint-libusb.h"
7 #include "usb/usb-interface.h"
8 #include "usb/usb-device.h"
9 
10 #include <libusb.h>
11 
12 namespace librealsense
13 {
14  namespace platform
15  {
17  {
18  public:
19  usb_interface_libusb(libusb_interface inf);
20 
21  virtual ~usb_interface_libusb() override;
22 
23  virtual uint8_t get_number() const override { return _desc.bInterfaceNumber; }
24  virtual uint8_t get_class() const override { return _desc.bInterfaceClass; }
25  virtual uint8_t get_subclass() const override { return _desc.bInterfaceSubClass; }
26  virtual const std::vector<rs_usb_endpoint> get_endpoints() const override { return _endpoints; }
28  virtual const std::vector<rs_usb_interface> get_associated_interfaces() const { return _associated_interfaces; }
29 
30  void add_associated_interface(const rs_usb_interface& interface);
31 
32  private:
33  libusb_interface_descriptor _desc;
34  std::vector<std::shared_ptr<usb_endpoint>> _endpoints;
35  std::vector<rs_usb_interface> _associated_interfaces;
36  };
37  }
38 }
virtual uint8_t get_class() const override
std::vector< rs_usb_interface > _associated_interfaces
std::shared_ptr< usb_interface > rs_usb_interface
Definition: usb-interface.h:31
virtual const rs_usb_endpoint first_endpoint(const endpoint_direction direction, const endpoint_type type=RS2_USB_ENDPOINT_BULK) const override
std::vector< std::shared_ptr< usb_endpoint > > _endpoints
virtual const std::vector< rs_usb_endpoint > get_endpoints() const override
unsigned char uint8_t
Definition: stdint.h:78
direction
Definition: rs-align.cpp:25
enum librealsense::platform::_endpoint_direction endpoint_direction
void add_associated_interface(const rs_usb_interface &interface)
std::shared_ptr< usb_endpoint > rs_usb_endpoint
Definition: usb-endpoint.h:24
virtual uint8_t get_number() const override
virtual uint8_t get_subclass() const override
GLenum type
enum librealsense::platform::_endpoint_type endpoint_type
virtual const std::vector< rs_usb_interface > get_associated_interfaces() const


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:17