r200.cpp
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 #include "image.h"
5 #include "r200.h"
6 
7 using namespace rsimpl;
8 using namespace rsimpl::ds;
9 
10 namespace rsimpl
11 {
12  r200_camera::r200_camera(std::shared_ptr<uvc::device> device, const static_device_info & info)
13  : ds_device(device, info, calibration_validator())
14  {
15  }
16 
17  void r200_camera::start_fw_logger(char /*fw_log_op_code*/, int /*grab_rate_in_ms*/, std::timed_mutex& /*mutex*/)
18  {
19  throw std::logic_error("Not implemented");
20  }
21 
23  {
24  throw std::logic_error("Not implemented");
25  }
26 
27  std::shared_ptr<rs_device> make_r200_device(std::shared_ptr<uvc::device> device)
28  {
29  LOG_INFO("Connecting to Intel RealSense R200");
30 
31  static_device_info info;
32  info.name = "Intel RealSense R200" ;
33  auto cam_info = ds::read_camera_info(*device);
34 
35  ds_device::set_common_ds_config(device, info, cam_info);
36 
37  // R200 provides Full HD raw 10 format, its descriptors is defined as follows
38  info.subdevice_modes.push_back({ 2, {2400, 1081}, pf_rw10, 30, cam_info.calibration.intrinsicsThird[0], { cam_info.calibration.modesThird[0][0]}, {0}});
39 
40  return std::make_shared<r200_camera>(device, info);
41  }
42 
43  std::shared_ptr<rs_device> make_lr200_device(std::shared_ptr<uvc::device> device)
44  {
45  LOG_INFO("Connecting to Intel RealSense LR200");
46 
47  static_device_info info;
48  info.name = "Intel RealSense LR200" ;
49  auto cam_info = ds::read_camera_info(*device);
50 
51  ds_device::set_common_ds_config(device, info, cam_info);
52 
53  // LR200 provides Full HD raw 16 format as well for the color stream
54  info.subdevice_modes.push_back({ 2,{ 1920, 1080 }, pf_rw16, 30, cam_info.calibration.intrinsicsThird[0],{ cam_info.calibration.modesThird[0][0] },{ 0 } });
55 
56  return std::make_shared<r200_camera>(device, info);
57  }
58 }
virtual void stop_fw_logger() override
Definition: r200.cpp:22
const native_pixel_format pf_rw10
Definition: image.cpp:461
const std::shared_ptr< rsimpl::uvc::device > device
Definition: device.h:77
r200_camera(std::shared_ptr< uvc::device > device, const static_device_info &info)
Definition: r200.cpp:12
Definition: archive.h:12
std::vector< subdevice_mode > subdevice_modes
Definition: types.h:273
std::shared_ptr< rs_device > make_r200_device(std::shared_ptr< uvc::device > device)
Definition: r200.cpp:27
virtual void start_fw_logger(char fw_log_op_code, int grab_rate_in_ms, std::timed_mutex &mutex) override
Definition: r200.cpp:17
ds_info read_camera_info(uvc::device &device)
Definition: ds-private.cpp:332
std::shared_ptr< rs_device > make_lr200_device(std::shared_ptr< uvc::device > device)
Definition: r200.cpp:43
#define LOG_INFO(...)
Definition: types.h:78
const native_pixel_format pf_rw16
Definition: image.cpp:460


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