ds-device.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2016 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 #ifndef LIBREALSENSE_ds_device_H
6 #define LIBREALSENSE_ds_device_H
7 
8 #include "device.h"
9 #include "ds-private.h"
10 
11 #define R200_PRODUCT_ID 0x0a80
12 #define LR200_PRODUCT_ID 0x0abf
13 #define ZR300_PRODUCT_ID 0x0acb
14 #define FISHEYE_PRODUCT_ID 0x0ad0
15 
16 namespace rsimpl
17 {
18  namespace ds
19  {
21  {
26  };
27  /*
28  ds_device class is interface that provides partial implementation for ds cameras line functionalities and properties
29  */
30  class ds_device : public rs_device_base
31  {
32  protected:
33  // This single function interface enforces implementation by subclasses
34  //virtual std::shared_ptr<rs_device> make_device(std::shared_ptr<uvc::device> device, static_device_info& info, ds::ds_calibration& c) abstract;
35  bool is_disparity_mode_enabled() const;
36  void on_update_depth_units(uint32_t units);
37  void on_update_disparity_multiplier(double multiplier);
38  uint32_t get_lr_framerate() const;
39  std::vector<supported_option> get_ae_range_vec();
40  time_pad start_stop_pad; // R200 line-up needs minimum 500ms delay between consecutive start-stop commands
41 
42  public:
43  ds_device(std::shared_ptr<uvc::device> device, const static_device_info & info, calibration_validator validator);
44  ~ds_device();
45 
46  bool supports_option(rs_option option) const override;
47  void get_option_range(rs_option option, double & min, double & max, double & step, double & def) override;
48  void set_options(const rs_option options[], size_t count, const double values[]) override;
49  void get_options(const rs_option options[], size_t count, double values[]) override;
50 
51  void on_before_start(const std::vector<subdevice_mode_selection> & selected_modes) override;
52  rs_stream select_key_stream(const std::vector<rsimpl::subdevice_mode_selection> & selected_modes) override;
53  std::shared_ptr<frame_timestamp_reader> create_frame_timestamp_reader(int subdevice) const;
54  std::vector<std::shared_ptr<frame_timestamp_reader>> create_frame_timestamp_readers() const override;
55 
56  static void set_common_ds_config(std::shared_ptr<uvc::device> device, static_device_info& info, const ds::ds_info& cam_info);
57 
58  virtual void stop(rs_source source) override;
59  virtual void start(rs_source source) override;
60 
61  virtual void start_fw_logger(char fw_log_op_code, int grab_rate_in_ms, std::timed_mutex& mutex) override;
62  virtual void stop_fw_logger() override;
63  };
64  }
65 }
66 
67 #endif // ds_device_H
const std::shared_ptr< rsimpl::uvc::device > device
Definition: device.h:77
time_pad start_stop_pad
Definition: ds-device.h:40
GLfixed units
Definition: glext.h:4893
uint32_t get_lr_framerate() const
Definition: ds-device.cpp:380
virtual void stop(rs_source source) override
Definition: ds-device.cpp:292
virtual void stop_fw_logger() override
Definition: ds-device.cpp:309
Definition: archive.h:12
rs_option
Defines general configuration controls.
Definition: rs.h:128
static void set_common_ds_config(std::shared_ptr< uvc::device > device, static_device_info &info, const ds::ds_info &cam_info)
Definition: ds-device.cpp:390
virtual void start(rs_source source) override
Definition: ds-device.cpp:298
GLuint GLuint GLsizei count
Definition: glext.h:111
void on_update_disparity_multiplier(double multiplier)
Definition: ds-device.cpp:49
void set_options(const rs_option options[], size_t count, const double values[]) override
Definition: ds-device.cpp:110
bool supports_option(rs_option option) const override
Definition: ds-device.cpp:555
void get_options(const rs_option options[], size_t count, double values[]) override
Definition: ds-device.cpp:200
std::shared_ptr< frame_timestamp_reader > create_frame_timestamp_reader(int subdevice) const
Definition: ds-device.cpp:889
rs_source
Source: allows you to choose between available hardware subdevices.
Definition: rs.h:90
ds_device(std::shared_ptr< uvc::device > device, const static_device_info &info, calibration_validator validator)
Definition: ds-device.cpp:23
std::vector< std::shared_ptr< frame_timestamp_reader > > create_frame_timestamp_readers() const override
Definition: ds-device.cpp:943
GLenum GLsizei GLsizei GLint * values
Definition: glext.h:1484
rs_stream select_key_stream(const std::vector< rsimpl::subdevice_mode_selection > &selected_modes) override
Definition: ds-device.cpp:357
rs_stream
Streams are different types of data provided by RealSense devices.
Definition: rs.h:33
GLsizei GLsizei GLchar * source
Definition: glext.h:672
std::vector< supported_option > get_ae_range_vec()
Definition: ds-device.cpp:57
void get_option_range(rs_option option, double &min, double &max, double &step, double &def) override
Definition: ds-device.cpp:591
void on_update_depth_units(uint32_t units)
Definition: ds-device.cpp:43
bool is_disparity_mode_enabled() const
Definition: ds-device.cpp:37
void on_before_start(const std::vector< subdevice_mode_selection > &selected_modes) override
Definition: ds-device.cpp:314
virtual void start_fw_logger(char fw_log_op_code, int grab_rate_in_ms, std::timed_mutex &mutex) override
Definition: ds-device.cpp:304


librealsense
Author(s): Sergey Dorodnicov , Mark Horn , Reagan Lopez
autogenerated on Fri Mar 13 2020 03:16:17