Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
winusb
messenger-winusb.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 "
usb/usb-types.h
"
7
#include "
usb/usb-messenger.h
"
8
#include "
backend.h
"
9
#include "
win/win-helpers.h
"
10
#include "
handle-winusb.h
"
11
#include "
interface-winusb.h
"
12
#include "
request-winusb.h
"
13
14
#include <winusb.h>
15
#include <SetupAPI.h>
16
17
namespace
librealsense
18
{
19
namespace
platform
20
{
21
class
usb_device_winusb;
22
23
class
usb_messenger_winusb
:
public
usb_messenger
24
{
25
public
:
26
usb_messenger_winusb
(
const
std::shared_ptr<usb_device_winusb>
device
, std::shared_ptr<handle_winusb>
handle
);
27
virtual
~usb_messenger_winusb
();
28
29
virtual
usb_status
control_transfer
(
int
request_type,
int
request,
int
value
,
int
index
,
uint8_t
*
buffer
,
uint32_t
length
,
uint32_t
& transferred,
uint32_t
timeout_ms)
override
;
30
virtual
usb_status
bulk_transfer
(
const
rs_usb_endpoint
& endpoint,
uint8_t
* buffer,
uint32_t
length,
uint32_t
& transferred,
uint32_t
timeout_ms)
override
;
31
virtual
usb_status
reset_endpoint
(
const
rs_usb_endpoint
& endpoint,
uint32_t
timeout_ms)
override
;
32
virtual
usb_status
submit_request
(
const
rs_usb_request
& request)
override
;
33
virtual
usb_status
cancel_request
(
const
rs_usb_request
& request)
override
;
34
virtual
rs_usb_request
create_request
(
rs_usb_endpoint
endpoint)
override
;
35
36
private
:
37
std::shared_ptr<dispatcher>
get_dispatcher
(
uint8_t
endpoint);
38
usb_status
set_timeout_policy
(WINUSB_INTERFACE_HANDLE handle,
uint8_t
endpoint,
uint32_t
timeout_ms);
39
40
unsigned
long
_in_out_pipe_timeout_ms
= 7000;
41
42
std::mutex
_mutex
;
43
std::shared_ptr<handle_winusb>
_handle
;
44
std::shared_ptr<usb_device_winusb>
_device
;
45
std::map<uint8_t,std::shared_ptr<dispatcher>>
_dispatchers
;
46
};
47
}
48
}
librealsense::platform::usb_messenger_winusb::_mutex
std::mutex _mutex
Definition:
messenger-winusb.h:42
librealsense::platform::usb_messenger_winusb::reset_endpoint
virtual usb_status reset_endpoint(const rs_usb_endpoint &endpoint, uint32_t timeout_ms) override
Definition:
messenger-winusb.cpp:71
handle-winusb.h
usb-messenger.h
librealsense::platform::rs_usb_request
std::shared_ptr< usb_request > rs_usb_request
Definition:
usb-request.h:41
handle
GLuint64 GLenum void * handle
Definition:
glext.h:7785
value
GLfloat value
Definition:
glad/glad/glad.h:2100
usb-types.h
uint8_t
unsigned char uint8_t
Definition:
stdint.h:78
librealsense::platform::usb_status
enum librealsense::platform::_usb_status usb_status
index
GLuint index
Definition:
glad/glad/glad.h:2778
librealsense::platform::buffer
Definition:
backend-v4l2.h:120
librealsense::platform::usb_messenger_winusb::get_dispatcher
std::shared_ptr< dispatcher > get_dispatcher(uint8_t endpoint)
Definition:
messenger-winusb.cpp:174
librealsense
Definition:
calibration-model.h:6
librealsense::platform::usb_messenger_winusb
Definition:
messenger-winusb.h:23
librealsense::platform::usb_messenger_winusb::create_request
virtual rs_usb_request create_request(rs_usb_endpoint endpoint) override
Definition:
messenger-winusb.cpp:123
librealsense::platform::usb_messenger_winusb::~usb_messenger_winusb
virtual ~usb_messenger_winusb()
Definition:
messenger-winusb.cpp:34
uint32_t
unsigned int uint32_t
Definition:
stdint.h:80
interface-winusb.h
librealsense::platform::usb_messenger_winusb::usb_messenger_winusb
usb_messenger_winusb(const std::shared_ptr< usb_device_winusb > device, std::shared_ptr< handle_winusb > handle)
Definition:
messenger-winusb.cpp:27
librealsense::platform::rs_usb_endpoint
std::shared_ptr< usb_endpoint > rs_usb_endpoint
Definition:
usb-endpoint.h:24
librealsense::platform::usb_messenger
Definition:
usb-messenger.h:13
librealsense::platform::usb_messenger_winusb::control_transfer
virtual usb_status control_transfer(int request_type, int request, int value, int index, uint8_t *buffer, uint32_t length, uint32_t &transferred, uint32_t timeout_ms) override
Definition:
messenger-winusb.cpp:43
librealsense::platform::usb_messenger_winusb::set_timeout_policy
usb_status set_timeout_policy(WINUSB_INTERFACE_HANDLE handle, uint8_t endpoint, uint32_t timeout_ms)
Definition:
messenger-winusb.cpp:109
librealsense::platform::usb_messenger_winusb::_device
std::shared_ptr< usb_device_winusb > _device
Definition:
messenger-winusb.h:44
librealsense::platform::usb_messenger_winusb::bulk_transfer
virtual usb_status bulk_transfer(const rs_usb_endpoint &endpoint, uint8_t *buffer, uint32_t length, uint32_t &transferred, uint32_t timeout_ms) override
Definition:
messenger-winusb.cpp:84
request-winusb.h
librealsense::platform::usb_messenger_winusb::cancel_request
virtual usb_status cancel_request(const rs_usb_request &request) override
Definition:
messenger-winusb.cpp:162
librealsense::platform::usb_messenger_winusb::submit_request
virtual usb_status submit_request(const rs_usb_request &request) override
Definition:
messenger-winusb.cpp:129
librealsense::platform::usb_messenger_winusb::_handle
std::shared_ptr< handle_winusb > _handle
Definition:
messenger-winusb.h:43
length
GLenum GLuint GLenum GLsizei length
Definition:
glad/glad/glad.h:136
win-helpers.h
librealsense::platform::usb_messenger_winusb::_in_out_pipe_timeout_ms
unsigned long _in_out_pipe_timeout_ms
Definition:
messenger-winusb.h:40
backend.h
librealsense::device
Definition:
device.h:43
librealsense::platform::usb_messenger_winusb::_dispatchers
std::map< uint8_t, std::shared_ptr< dispatcher > > _dispatchers
Definition:
messenger-winusb.h:45
librealsense2
Author(s): Sergey Dorodnicov
, Doron Hirshberg
, Mark Horn
, Reagan Lopez
, Itay Carpis
autogenerated on Mon May 3 2021 02:47:21