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


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