5 #ifndef LIBREALSENSE_DS_PRIVATE_H 6 #define LIBREALSENSE_DS_PRIVATE_H 17 const uvc::extension_unit lr_xu = {0, 2, 1, {0x18682d34, 0xdd2c, 0x4073, {0xad, 0x23, 0x72, 0x14, 0x73, 0x9a, 0x07, 0x4c}}};
59 case DS_LENS_DSL103:
return out <<
"Sunex DSL103: Internal standard";
65 case DS_LENS_AZW58:
return out <<
"58 degree lenses on the AZureWave boards (DS-526)";
67 case DS_LENS_DS6100:
return out <<
"Newmax 67.8 x 41.4 degs in 1080p";
68 case DS_LENS_DS6177:
return out <<
"Newmax 71.7 x 44.2 degs in 1080p";
69 case DS_LENS_DS6237:
return out <<
"Newmax 58.9 x 45.9 degs in VGA";
71 default:
return out <<
"Other lens type (" << (
int)type <<
"), application needs update";
95 default:
return out <<
"Other lens coating type (" << (
int)type <<
"), application needs update";
113 case DS_EMITTER_LD2:
return out <<
"Laser Driver 2, NO PWM Controls";
117 return out <<
"Other emitter type (" << (
int)type <<
"), application needs update";
132 return out <<
"Unercognized OEM type (" << (
int)type <<
"), application needs update";
147 return out <<
"Non-PRQ type (" << (
int)type <<
")";
156 if (std::isnormal(val) && std::isfinite(val) && (!std::isnan(val)) )
158 auto time = time_t(val);
159 std::vector<char> outstr;
161 strftime(outstr.data(),outstr.size(),
"%Y-%m-%d %H:%M:%S",std::gmtime(&time));
162 date =
to_string()<< outstr.data() <<
" UTC";
171 enum { DS_HEADER_VERSION_NUMBER = 12 };
175 uint8_t model_data[64];
189 uint8_t reserved1[2];
191 uint8_t reserved2[4];
198 double rectification_data_qres[54];
199 double rectification_data_padding[26];
218 double rectification_data_big[54];
219 double rectification_data_special[54];
222 uint8_t body_serial_number[20];
230 double registration_rotation[9];
231 double registration_translation[3];
235 int32_t nominal_baseline_platform[3];
239 uint8_t reserved3[37];
294 #pragma pack(push, 1) 321 enum { MAX_PRESETS = 6 };
331 time_pad(std::chrono::high_resolution_clock::duration duration) : _duration(duration) {}
334 _start_time = std::chrono::high_resolution_clock::now();
339 auto elapsed = std::chrono::high_resolution_clock::now() - _start_time;
340 if (elapsed < _duration)
342 auto left = _duration - elapsed;
343 std::this_thread::sleep_for(
left);
358 bool get_emitter_state(
const uvc::device & device,
bool is_streaming,
bool is_depth_enabled);
375 for (
auto& elem : ae_vec)
380 ret_val.exposure_top_edge = std::min((uint16_t)elem.max, ret_val.exposure_top_edge);
384 ret_val.exposure_bottom_edge = std::min((uint16_t)elem.max, ret_val.exposure_bottom_edge);
388 ret_val.exposure_left_edge = std::min((uint16_t)elem.max, ret_val.exposure_left_edge);
392 ret_val.exposure_right_edge = std::min((uint16_t)elem.max, ret_val.exposure_right_edge);
413 throw std::logic_error(
"set_lr_auto_exposure_params failed.");
423 #pragma pack(push, 1) 448 const uvc::extension_unit fisheye_xu = { 3, 3, 2,{ 0xf6c3c3d1, 0x5cde, 0x4477,{ 0xad, 0xf0, 0x41, 0x33, 0xf5, 0x8d, 0xa6, 0xf4 } } };
463 #endif // DS_PRIVATE_H
uint32_t score_max_thresh
uint32_t texture_count_thresh
uint8_t module_major_version
uint16_t get_fisheye_exposure(const uvc::device &device)
double calibration_x_error
uint32_t texture_diff_thresh
uint32_t robbins_munroe_plus_inc
void set_disparity_mode(uvc::device &device, disp_mode mode)
uint8_t camera_head_data_little_endian
void set_fisheye_external_trigger(uvc::device &device, uint8_t ext_trig)
uint32_t imager_model_number
uint32_t get_depth_units(const uvc::device &device)
bool get_emitter_state(const uvc::device &device, bool is_streaming, bool is_depth_enabled)
GLsizei const GLchar *const * string
uint32_t exposureLeftDarkCount
const int STATUS_BIT_WEB_STREAMING
uint32_t imager_type_platform
void xu_read(const uvc::device &device, uvc::extension_unit xu, control xu_ctrl, void *buffer, uint32_t length)
uint8_t module_minor_version
uint32_t exposureRightDarkCount
uint32_t calibration_type
const int STATUS_BIT_Z_STREAMING
int32_t nominal_baseline_third_imager
void set_register_value(uvc::device &device, uint32_t reg, uint32_t value)
uint8_t get_fisheye_external_trigger(const uvc::device &device)
Laser Driver 2, NO PWM Controls.
disp_mode get_disparity_mode(const uvc::device &device)
void force_firmware_reset(uvc::device &device)
void set_lr_exposure_discovery(uvc::device &device, discovery disc)
uint32_t get_disparity_shift(const uvc::device &device)
rate_value get_lr_gain(const uvc::device &device)
uint32_t camera_fpga_version
58 degree lenses on the AZureWave boards (DS-526)
Lens either unknown or not needing special treatment.
void claim_motion_module_interface(uvc::device &device)
uint8_t get_lr_exposure_mode(const uvc::device &device)
void set_fisheye_exposure(uvc::device &device, uint16_t exposure)
void set_lr_auto_exposure_params(uvc::device &device, ae_params params)
uint16_t exposure_bottom_edge
ae_params get_lr_auto_exposure_params(const uvc::device &device, std::vector< supported_option > ae_vec)
ds_calibration calibration
uint32_t camera_head_contents_version
uint16_t exposure_left_edge
ds_head_content head_content
temperature get_temperature(const uvc::device &device)
const uvc::extension_unit lr_xu
time_pad(std::chrono::high_resolution_clock::duration duration)
void set_emitter_state(uvc::device &device, bool state)
uint32_t camera_head_contents_size_bytes
void set_temperature(uvc::device &device, temperature temp)
uint32_t is_disparity_enabled
double calibration_y_error
uint8_t get_fisheye_strobe(const uvc::device &device)
void get_register_value(uvc::device &device, uint32_t reg, uint32_t &value)
const int STATUS_BIT_LR_STREAMING
uint32_t robbins_munroe_minus_inc
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
uint32_t score_min_thresh
void set_stream_intent(uvc::device &device, uint8_t &intent)
double first_program_date
uint32_t platform_camera_focus
discovery get_lr_gain_discovery(const uvc::device &device)
uint32_t exposureLeftBrightCount
ds_lens_coating_type lens_coating_type
std::chrono::high_resolution_clock::duration _duration
uint32_t second_peak_thresh
uint32_t lens_type_platform
void set_depth_units(uvc::device &device, uint32_t units)
rs_intrinsics modesThird[2][2]
void get_stream_status(const uvc::device &device, int &status)
uint16_t exposure_right_edge
GLsizei const GLfloat * value
Newmax 58.9 x 45.9 degs in VGA.
Visible-light block / IR pass: center 860, width 25nm.
float mean_intensity_set_point
ds_info read_camera_info(uvc::device &device)
uint32_t module_revision_number
rs_intrinsics intrinsicsThird[2]
uint32_t exposureRightBrightCount
uint16_t exposure_top_edge
discovery get_lr_exposure_discovery(const uvc::device &device)
rate_value get_lr_exposure(const uvc::device &device)
uint8_t module_skew_version
IR coating DS4: Innowave 670 cut off.
ds_emitter_type emitter_type
uint32_t nominal_baseline
void set_lr_gain_discovery(uvc::device &device, discovery disc)
void set_lr_gain(uvc::device &device, rate_value gain)
void set_depth_params(uvc::device &device, dc_params params)
void set_disparity_shift(uvc::device &device, uint32_t shift)
Sunex DSL103: Internal standard.
void xu_write(uvc::device &device, uvc::extension_unit xu, control xu_ctrl, void *buffer, uint32_t length)
GLuint GLsizei GLsizei * length
void set_lr_exposure(uvc::device &device, rate_value exposure)
const uvc::extension_unit fisheye_xu
Newmax 67.8 x 41.4 degs in 1080p.
uint8_t platform_camera_support
Visible-light block / IR pass center 859, width 43nm.
std::string read_isp_firmware_version(uvc::device &device)
std::ostream & operator<<(std::ostream &out, ds_lens_type type)
50 HFOV 38 VFOV (60DFOV): CTM2/6 Module L&R
uint8_t get_last_error(const uvc::device &device)
ds_lens_type lens_type_third_imager
void set_fisheye_strobe(uvc::device &device, uint8_t strobe)
std::string read_firmware_version(uvc::device &device)
uint32_t exposureRightSum
double focus_alignment_date
dc_params get_depth_params(const uvc::device &device)
range get_min_max_depth(const uvc::device &device)
std::chrono::high_resolution_clock::time_point _start_time
The struct is aligned with the data layout in device.
void set_min_max_depth(uvc::device &device, range min_max)
std::string time_to_string(double val)
GLuint GLuint GLsizei GLenum type
void set_lr_exposure_mode(uvc::device &device, uint8_t mode)
ds_lens_coating_type lens_coating_type_third_imager
float bright_ratio_set_point
Newmax 71.7 x 44.2 degs in 1080p.