interface-libusb.cpp
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 #include "interface-libusb.h"
5 #include "messenger-libusb.h"
6 #include "types.h"
7 
8 namespace librealsense
9 {
10  namespace platform
11  {
13  _desc(*intf.altsetting)
14  {
15  for (int e = 0; e < _desc.bNumEndpoints; ++e)
16  {
17  auto ep = _desc.endpoint[e];
18  _endpoints.push_back(std::make_shared<usb_endpoint_libusb>(ep, _desc.bInterfaceNumber));
19  }
20  }
21 
23  {
24 
25  }
26 
28  {
29  for (auto&& ep : _endpoints)
30  {
31  if (ep->get_type() != type)
32  continue;
33  if (ep->get_direction() != direction)
34  continue;
35  return ep;
36  }
37  return nullptr;
38  }
39 
41  {
42  if(interface)
43  _associated_interfaces.push_back(interface);
44  }
45  }
46 }
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
e
Definition: rmse.py:177
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
GLenum type
enum librealsense::platform::_endpoint_type endpoint_type


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