ds5-device.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 "ds5-private.h"
7 
8 #include "algo.h"
9 #include "error-handling.h"
10 #include "core/debug.h"
11 #include "core/advanced_mode.h"
12 #include "device.h"
15 #include "ds5-auto-calibration.h"
16 
17 namespace librealsense
18 {
20  {
21  public:
22  explicit ds5_auto_exposure_roi_method(const hw_monitor& hwm,
24 
25  void set(const region_of_interest& roi) override;
26  region_of_interest get() const override;
27  private:
30  };
31 
32  class hdr_config;
33  class ds5_thermal_monitor;
34 
35  class ds5_device : public virtual device, public debug_interface, public global_time_interface, public updatable, public auto_calibrated
36  {
37  public:
38  std::shared_ptr<synthetic_sensor> create_depth_device(std::shared_ptr<context> ctx,
39  const std::vector<platform::uvc_device_info>& all_device_infos);
40 
42  {
43  return dynamic_cast<synthetic_sensor&>(get_sensor(_depth_device_idx));
44  }
45 
47  {
48  synthetic_sensor& depth_sensor = get_depth_sensor();
49  return dynamic_cast<uvc_sensor&>(*depth_sensor.get_raw_sensor());
50  }
51 
52  ds5_device(std::shared_ptr<context> ctx,
54 
55  std::vector<uint8_t> send_receive_raw_data(const std::vector<uint8_t>& input) override;
56 
57  void hardware_reset() override;
58 
59  void create_snapshot(std::shared_ptr<debug_interface>& snapshot) const override;
60  void enable_recording(std::function<void(const debug_interface&)> record_action) override;
61  platform::usb_spec get_usb_spec() const;
62  virtual double get_device_time_ms() override;
63 
64  void enter_update_state() const override;
65  std::vector<uint8_t> backup_flash(update_progress_callback_ptr callback) override;
66  void update_flash(const std::vector<uint8_t>& image, update_progress_callback_ptr callback, int update_mode) override;
67  protected:
68 
69  std::vector<uint8_t> get_raw_calibration_table(ds::calibration_table_id table_id) const;
70  std::vector<uint8_t> get_new_calibration_table() const;
71 
72  bool is_camera_in_advanced_mode() const;
73 
74  float get_stereo_baseline_mm() const;
75 
76  ds::d400_caps parse_device_capabilities() const;
77 
78  //TODO - add these to device class as pure virtual methods
79  command get_firmware_logs_command() const;
80  command get_flash_logs_command() const;
81 
82  void init(std::shared_ptr<context> ctx,
83  const platform::backend_device_group& group);
84 
85  friend class ds5_depth_sensor;
86 
87  std::shared_ptr<hw_monitor> _hw_monitor;
91 
92  std::shared_ptr<stream_interface> _depth_stream;
93  std::shared_ptr<stream_interface> _left_ir_stream;
94  std::shared_ptr<stream_interface> _right_ir_stream;
95  std::shared_ptr<stream_interface> _color_stream;
96 
99 
102 
103  std::shared_ptr<polling_error_handler> _polling_error_handler;
104  std::shared_ptr<ds5_thermal_monitor> _thermal_monitor;
105  std::shared_ptr<lazy<rs2_extrinsics>> _left_right_extrinsics;
107  std::shared_ptr<lazy<rs2_extrinsics>> _color_extrinsic;
108  bool _is_locked = true;
109  };
110 
111  class ds5u_device : public ds5_device
112  {
113  public:
114  ds5u_device(std::shared_ptr<context> ctx,
116 
117  std::shared_ptr<synthetic_sensor> create_ds5u_depth_device(std::shared_ptr<context> ctx,
118  const std::vector<platform::uvc_device_info>& all_device_infos);
119 
120  protected:
121  friend class ds5u_depth_sensor;
122  };
123 
125  {
126  public:
127  notification decode(int value) override;
128  };
129 
131 }
firmware_version _fw_version
Definition: ds5-device.h:88
std::shared_ptr< hw_monitor > _hw_monitor
Definition: ds5-device.h:87
processing_blocks get_ds5_depth_recommended_proccesing_blocks()
std::shared_ptr< sensor_base > get_raw_sensor() const
Definition: sensor.h:218
std::shared_ptr< stream_interface > _color_stream
Definition: ds5-device.h:95
lazy< std::vector< uint8_t > > _coefficients_table_raw
Definition: ds5-device.h:100
GLfloat value
synthetic_sensor & get_depth_sensor()
Definition: ds5-device.h:41
unsigned short uint16_t
Definition: stdint.h:79
unsigned char uint8_t
Definition: stdint.h:78
std::shared_ptr< lazy< rs2_extrinsics > > _color_extrinsic
Definition: ds5-device.h:107
GLenum GLenum GLsizei void * image
std::shared_ptr< rs2_update_progress_callback > update_progress_callback_ptr
Definition: src/types.h:1077
std::shared_ptr< lazy< rs2_extrinsics > > _left_right_extrinsics
Definition: ds5-device.h:105
std::shared_ptr< ds5_thermal_monitor > _thermal_monitor
Definition: ds5-device.h:104
GLboolean GLuint group
Definition: glext.h:5688
std::shared_ptr< stream_interface > _depth_stream
Definition: ds5-device.h:92
def callback(frame)
Definition: t265_stereo.py:91
void init(void)
Definition: boing.c:180
std::shared_ptr< polling_error_handler > _polling_error_handler
Definition: ds5-device.h:103
lazy< std::vector< uint8_t > > _color_calib_table_raw
Definition: ds5-device.h:106
std::shared_ptr< stream_interface > _left_ir_stream
Definition: ds5-device.h:93
ds::d400_caps _device_capabilities
Definition: ds5-device.h:90
ds5_auto_exposure_roi_method(const hw_monitor &hwm, ds::fw_cmd cmd=ds::fw_cmd::SETAEROI)
Definition: ds5-device.cpp:86
firmware_version _recommended_fw_version
Definition: ds5-device.h:89
uvc_sensor & get_raw_depth_sensor()
Definition: ds5-device.h:46
GLenum GLenum GLenum input
Definition: glext.h:10805
lazy< std::vector< uint8_t > > _new_calib_table_raw
Definition: ds5-device.h:101
std::shared_ptr< stream_interface > _right_ir_stream
Definition: ds5-device.h:94


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