Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
libusb
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
{
12
usb_interface_libusb::usb_interface_libusb
(libusb_interface intf) :
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
22
usb_interface_libusb::~usb_interface_libusb
()
23
{
24
25
}
26
27
const
rs_usb_endpoint
usb_interface_libusb::first_endpoint
(
endpoint_direction
direction
,
endpoint_type
type
)
const
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
40
void
usb_interface_libusb::add_associated_interface
(
const
rs_usb_interface
& interface)
41
{
42
if
(interface)
43
_associated_interfaces
.push_back(interface);
44
}
45
}
46
}
librealsense::platform::usb_interface_libusb::_associated_interfaces
std::vector< rs_usb_interface > _associated_interfaces
Definition:
interface-libusb.h:35
librealsense::platform::rs_usb_interface
std::shared_ptr< usb_interface > rs_usb_interface
Definition:
usb-interface.h:31
librealsense::platform::usb_interface_libusb::first_endpoint
virtual const rs_usb_endpoint first_endpoint(const endpoint_direction direction, const endpoint_type type=RS2_USB_ENDPOINT_BULK) const override
Definition:
interface-libusb.cpp:27
interface-libusb.h
librealsense::platform::usb_interface_libusb::_endpoints
std::vector< std::shared_ptr< usb_endpoint > > _endpoints
Definition:
interface-libusb.h:34
rmse.e
e
Definition:
rmse.py:177
direction
direction
Definition:
rs-align.cpp:25
librealsense::platform::endpoint_direction
enum librealsense::platform::_endpoint_direction endpoint_direction
librealsense::platform::usb_interface_libusb::add_associated_interface
void add_associated_interface(const rs_usb_interface &interface)
Definition:
interface-libusb.cpp:40
librealsense
Definition:
calibration-model.h:6
librealsense::platform::rs_usb_endpoint
std::shared_ptr< usb_endpoint > rs_usb_endpoint
Definition:
usb-endpoint.h:24
messenger-libusb.h
librealsense::platform::usb_interface_libusb::usb_interface_libusb
usb_interface_libusb(libusb_interface inf)
Definition:
interface-libusb.cpp:12
type
GLenum type
Definition:
glad/glad/glad.h:136
librealsense::platform::endpoint_type
enum librealsense::platform::_endpoint_type endpoint_type
librealsense::platform::usb_interface_libusb::~usb_interface_libusb
virtual ~usb_interface_libusb() override
Definition:
interface-libusb.cpp:22
librealsense::platform::usb_interface_libusb::_desc
libusb_interface_descriptor _desc
Definition:
interface-libusb.h:33
librealsense2
Author(s): Sergey Dorodnicov
, Doron Hirshberg
, Mark Horn
, Reagan Lopez
, Itay Carpis
autogenerated on Mon May 3 2021 02:47:17