backend.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 
10 
11 #include <memory>
12 #include <vector>
13 #include <string>
14 
15 
17 const int DISCONNECT_PERIOD_MS = 6000;
18 const int POLLING_DEVICES_INTERVAL_MS = 2000;
19 
20 const uint8_t MAX_META_DATA_SIZE = 0xff; // UVC Metadata total length
21  // is limited by (UVC Bulk) design to 255 bytes
22 
23 namespace librealsense
24 {
25  namespace platform
26  {
27  class device_watcher;
28  class hid_device;
29  class uvc_device;
30  class command_transfer;
31 
32 
33  class backend
34  {
35  public:
36  virtual std::shared_ptr<uvc_device> create_uvc_device(uvc_device_info info) const = 0;
37  virtual std::vector<uvc_device_info> query_uvc_devices() const = 0;
38 
39  virtual std::shared_ptr<command_transfer> create_usb_device(usb_device_info info) const = 0;
40  virtual std::vector<usb_device_info> query_usb_devices() const = 0;
41 
42  virtual std::shared_ptr<hid_device> create_hid_device(hid_device_info info) const = 0;
43  virtual std::vector<hid_device_info> query_hid_devices() const = 0;
44 
45  virtual std::shared_ptr<device_watcher> create_device_watcher() const = 0;
46 
47  virtual std::string get_device_serial(uint16_t device_vid, uint16_t device_pid, const std::string& device_uid) const
48  {
49  std::string empty_str;
50  return empty_str;
51  }
52 
53  virtual ~backend() = default;
54  };
55 
56  }
57 
58  double monotonic_to_realtime(double monotonic);
59 
60 } // namespace librealsense
librealsense
Definition: algo.h:18
uint8_t
unsigned char uint8_t
Definition: stdint.h:78
librealsense::platform::hid_device_info
Definition: hid-device-info.h:13
uint16_t
unsigned short uint16_t
Definition: stdint.h:79
hid-device-info.h
frame-object.h
librealsense::platform::backend::~backend
virtual ~backend()=default
string
GLsizei const GLchar *const * string
Definition: glad/glad/glad.h:2861
MAX_META_DATA_SIZE
const uint8_t MAX_META_DATA_SIZE
Definition: backend.h:20
librealsense::platform::backend::create_hid_device
virtual std::shared_ptr< hid_device > create_hid_device(hid_device_info info) const =0
librealsense::platform::backend::create_uvc_device
virtual std::shared_ptr< uvc_device > create_uvc_device(uvc_device_info info) const =0
librealsense::platform::backend::create_usb_device
virtual std::shared_ptr< command_transfer > create_usb_device(usb_device_info info) const =0
stream-profile.h
DISCONNECT_PERIOD_MS
const int DISCONNECT_PERIOD_MS
Definition: backend.h:17
uvc-device-info.h
librealsense::platform::backend::query_usb_devices
virtual std::vector< usb_device_info > query_usb_devices() const =0
librealsense::monotonic_to_realtime
double monotonic_to_realtime(double monotonic)
Definition: backend.cpp:54
fps.info
info
Definition: fps.py:50
librealsense::platform::backend
Definition: backend.h:33
librealsense::platform::backend::create_device_watcher
virtual std::shared_ptr< device_watcher > create_device_watcher() const =0
DELAY_FOR_CONNECTION
const uint16_t DELAY_FOR_CONNECTION
Definition: backend.h:16
librealsense::platform::backend::query_uvc_devices
virtual std::vector< uvc_device_info > query_uvc_devices() const =0
librealsense::platform::backend::query_hid_devices
virtual std::vector< hid_device_info > query_hid_devices() const =0
librealsense::platform::backend::get_device_serial
virtual std::string get_device_serial(uint16_t device_vid, uint16_t device_pid, const std::string &device_uid) const
Definition: backend.h:47
librealsense::platform::uvc_device_info
Definition: uvc-device-info.h:15
librealsense::platform::usb_device_info
Definition: usb-types.h:146
POLLING_DEVICES_INTERVAL_MS
const int POLLING_DEVICES_INTERVAL_MS
Definition: backend.h:18


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Fri Aug 2 2024 08:30:01