messenger-usbhost.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 "usbhost.h"
7 #include "../usb/usb-types.h"
8 #include "../backend.h"
9 #include "../usb/usb-messenger.h"
10 #include "../usb/usb-device.h"
11 #include "../usb/usb-request.h"
12 #include "handle-usbhost.h"
13 
14 #include "endpoint-usbhost.h"
15 #include "../concurrency.h"
16 #include "request-usbhost.h"
17 #include <mutex>
18 #include <map>
19 
20 namespace librealsense
21 {
22  namespace platform
23  {
24  class usb_device_usbhost;
25 
27  {
28  public:
29  usb_messenger_usbhost(const std::shared_ptr<usb_device_usbhost>& device, std::shared_ptr<handle_usbhost> handle);
30  virtual ~usb_messenger_usbhost();
31 
32  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;
33  virtual usb_status bulk_transfer(const std::shared_ptr<usb_endpoint>& endpoint, uint8_t* buffer, uint32_t length, uint32_t& transferred, uint32_t timeout_ms) override;
34  virtual usb_status reset_endpoint(const rs_usb_endpoint& endpoint, uint32_t timeout_ms) override;
35  virtual usb_status submit_request(const rs_usb_request& request) override;
36  virtual usb_status cancel_request(const rs_usb_request& request) override;
37  virtual rs_usb_request create_request(rs_usb_endpoint endpoint) override;
38 
39  private:
40  std::shared_ptr<usb_device_usbhost> _device;
41  std::mutex _mutex;
42  std::shared_ptr<handle_usbhost> _handle;
43  };
44  }
45 }
usb_messenger_usbhost(const std::shared_ptr< usb_device_usbhost > &device, std::shared_ptr< handle_usbhost > handle)
virtual usb_status reset_endpoint(const rs_usb_endpoint &endpoint, uint32_t timeout_ms) override
std::shared_ptr< usb_request > rs_usb_request
Definition: usb-request.h:41
GLuint64 GLenum void * handle
Definition: glext.h:7785
GLfloat value
virtual usb_status cancel_request(const rs_usb_request &request) override
unsigned char uint8_t
Definition: stdint.h:78
enum librealsense::platform::_usb_status usb_status
GLuint index
virtual usb_status submit_request(const rs_usb_request &request) override
std::shared_ptr< handle_usbhost > _handle
unsigned int uint32_t
Definition: stdint.h:80
std::shared_ptr< usb_endpoint > rs_usb_endpoint
Definition: usb-endpoint.h:24
std::shared_ptr< usb_device_usbhost > _device
virtual rs_usb_request create_request(rs_usb_endpoint endpoint) override
virtual usb_status bulk_transfer(const std::shared_ptr< usb_endpoint > &endpoint, uint8_t *buffer, uint32_t length, uint32_t &transferred, uint32_t timeout_ms) override
GLenum GLuint GLenum GLsizei length
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


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