rs_device.h
Go to the documentation of this file.
1 /* License: Apache 2.0. See LICENSE file in root directory.
2  Copyright(c) 2017 Intel Corporation. All Rights Reserved. */
3 
9 #ifndef LIBREALSENSE_RS2_DEVICE_H
10 #define LIBREALSENSE_RS2_DEVICE_H
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #include "rs_types.h"
17 #include "rs_sensor.h"
18 
25 int rs2_get_device_count(const rs2_device_list* info_list, rs2_error** error);
26 
32 
41 
50 
56 
65 
74 
82 
91 const rs2_raw_data_buffer* rs2_send_and_receive_raw_data(rs2_device* device, void* raw_data_to_send, unsigned size_of_raw_data_to_send, rs2_error** error);
92 
101 
109 
116 void rs2_loopback_enable(const rs2_device* device, const char* from_file, rs2_error** error);
117 
124 
132 
139 void rs2_connect_tm2_controller(const rs2_device* device, const unsigned char* mac_addr, rs2_error** error);
140 
148 
149 
156 
163 
173 void rs2_update_firmware_cpp(const rs2_device* device, const void* fw_image, int fw_image_size, rs2_update_progress_callback* callback, rs2_error** error);
174 
185 void rs2_update_firmware(const rs2_device* device, const void* fw_image, int fw_image_size, rs2_update_progress_callback_ptr callback, void* client_data, rs2_error** error);
186 
195 
205 
206 #define RS2_UNSIGNED_UPDATE_MODE_UPDATE 0
207 #define RS2_UNSIGNED_UPDATE_MODE_READ_ONLY 1
208 #define RS2_UNSIGNED_UPDATE_MODE_FULL 2
209 
221 void rs2_update_firmware_unsigned_cpp(const rs2_device* device, const void* fw_image, int fw_image_size, rs2_update_progress_callback* callback, int update_mode, rs2_error** error);
222 
235 void rs2_update_firmware_unsigned(const rs2_device* device, const void* fw_image, int fw_image_size, rs2_update_progress_callback_ptr callback, void* client_data, int update_mode, rs2_error** error);
236 
243 
277 const rs2_raw_data_buffer* rs2_run_on_chip_calibration_cpp(rs2_device* device, const void* json_content, int content_size, float* health, rs2_update_progress_callback* progress_callback, int timeout_ms, rs2_error** error);
278 
313 const rs2_raw_data_buffer* rs2_run_on_chip_calibration(rs2_device* device, const void* json_content, int content_size, float* health, rs2_update_progress_callback_ptr callback, void* client_data, int timeout_ms, rs2_error** error);
314 
337 const rs2_raw_data_buffer* rs2_run_tare_calibration_cpp(rs2_device* dev, float ground_truth_mm, const void* json_content, int content_size, rs2_update_progress_callback* progress_callback, int timeout_ms, rs2_error** error);
338 
339 
345 {
351 const char* rs2_calibration_type_to_string( rs2_calibration_type );
352 
357 {
358  // Anything >= 0 is not an issue
359  RS2_CALIBRATION_TRIGGERED = 0, // AC triggered and is active; conditions are valid
360  RS2_CALIBRATION_SPECIAL_FRAME = 1, // Special frame received; expect a frame-drop!
361  RS2_CALIBRATION_STARTED = 2, // Have all frames in hand; starting processing
362  RS2_CALIBRATION_NOT_NEEDED = 3, // Finished; existing calibration within tolerances; nothing done!
363  RS2_CALIBRATION_SUCCESSFUL = 4, // Finished; have new calibration in-hand
364 
365  RS2_CALIBRATION_RETRY = -1, // Initiating retry (asked for a new special frame)
366  RS2_CALIBRATION_FAILED = -2, // Unexpected: exception, device removed, stream stopped, etc.
367  RS2_CALIBRATION_SCENE_INVALID = -3, // Scene was not good enough for calibration; will retry
368  RS2_CALIBRATION_BAD_RESULT = -4, // Calibration finished, but results aren't good; will retry
369  RS2_CALIBRATION_BAD_CONDITIONS = -5, // Trigger was attempted but conditions (temp/APD) were invalid (still inactive)
370 
375 const char* rs2_calibration_status_to_string( rs2_calibration_status );
376 
379 
388 
396 
403 void rs2_trigger_device_calibration( rs2_device* dev, rs2_calibration_type type, rs2_error** error );
404 
428 const rs2_raw_data_buffer* rs2_run_tare_calibration(rs2_device* dev, float ground_truth_mm, const void* json_content, int content_size, rs2_update_progress_callback_ptr callback, void* client_data, int timeout_ms, rs2_error** error);
429 
435 
440 void rs2_set_calibration_table(const rs2_device* device, const void* calibration, int calibration_size, rs2_error** error);
441 
442 /* Serialize JSON content, returns ASCII-serialized JSON string on success. otherwise nullptr */
444 
445 /* Load JSON and apply advanced-mode controls */
446 void rs2_load_json(rs2_device* dev, const void* json_content, unsigned content_size, rs2_error** error);
447 
448 #ifdef __cplusplus
449 }
450 #endif
451 #endif
void rs2_set_calibration_table(const rs2_device *device, const void *calibration, int calibration_size, rs2_error **error)
Definition: rs.cpp:3157
rs2_camera_info
Read-only strings that can be queried from the device. Not all information attributes are available o...
Definition: rs_sensor.h:22
int rs2_device_list_contains(const rs2_device_list *info_list, const rs2_device *device, rs2_error **error)
Definition: rs.cpp:890
int rs2_loopback_is_enabled(const rs2_device *device, rs2_error **error)
Definition: rs.cpp:2649
void rs2_update_firmware_unsigned(const rs2_device *device, const void *fw_image, int fw_image_size, rs2_update_progress_callback_ptr callback, void *client_data, int update_mode, rs2_error **error)
Definition: rs.cpp:3015
void rs2_update_firmware(const rs2_device *device, const void *fw_image, int fw_image_size, rs2_update_progress_callback_ptr callback, void *client_data, rs2_error **error)
Definition: rs.cpp:2932
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
rs2_calibration_type
Definition: rs_device.h:344
void rs2_register_calibration_change_callback_cpp(rs2_device *dev, rs2_calibration_change_callback *callback, rs2_error **error)
Definition: rs.cpp:431
void rs2_trigger_device_calibration(rs2_device *dev, rs2_calibration_type type, rs2_error **error)
Definition: rs.cpp:445
const rs2_raw_data_buffer * rs2_run_on_chip_calibration(rs2_device *device, const void *json_content, int content_size, float *health, rs2_update_progress_callback_ptr callback, void *client_data, int timeout_ms, rs2_error **error)
Definition: rs.cpp:3074
const rs2_raw_data_buffer * rs2_get_calibration_table(const rs2_device *dev, rs2_error **error)
Definition: rs.cpp:3147
void rs2_delete_device(rs2_device *device)
Definition: rs.cpp:301
void rs2_write_calibration(const rs2_device *device, rs2_error **e)
Definition: rs.cpp:2749
rs2_device * rs2_create_device(const rs2_device_list *info_list, int index, rs2_error **error)
Definition: rs.cpp:289
void rs2_load_json(rs2_device *dev, const void *json_content, unsigned content_size, rs2_error **error)
Definition: rs.cpp:3177
Definition: arg_fwd.hpp:23
e
Definition: rmse.py:177
GLuint index
void(* rs2_update_progress_callback_ptr)(const float, void *)
Definition: rs_types.h:298
const rs2_raw_data_buffer * rs2_run_tare_calibration(rs2_device *dev, float ground_truth_mm, const void *json_content, int content_size, rs2_update_progress_callback_ptr callback, void *client_data, int timeout_ms, rs2_error **error)
Definition: rs.cpp:3122
void rs2_connect_tm2_controller(const rs2_device *device, const unsigned char *mac_addr, rs2_error **error)
Definition: rs.cpp:2658
def info(name, value, persistent=False)
Definition: test.py:301
void rs2_loopback_enable(const rs2_device *device, const char *from_file, rs2_error **error)
Definition: rs.cpp:2629
rs2_raw_data_buffer * rs2_serialize_json(rs2_device *dev, rs2_error **error)
Definition: rs.cpp:3169
void rs2_disconnect_tm2_controller(const rs2_device *device, int id, rs2_error **error)
Definition: rs.cpp:2668
Exposes RealSense structs.
int rs2_supports_device_info(const rs2_device *device, rs2_camera_info info, rs2_error **error)
Definition: rs.cpp:715
void rs2_register_calibration_change_callback(rs2_device *dev, rs2_calibration_change_callback_ptr callback, void *user, rs2_error **error)
Definition: rs.cpp:417
rs2_calibration_status
Definition: rs_device.h:356
const char * rs2_calibration_status_to_string(rs2_calibration_status)
Definition: rs.cpp:1284
int rs2_is_device_extendable_to(const rs2_device *device, rs2_extension extension, rs2_error **error)
Definition: rs.cpp:1425
Definition: api.h:28
def callback(frame)
Definition: t265_stereo.py:91
void rs2_hardware_reset(const rs2_device *device, rs2_error **error)
Definition: rs.cpp:1176
Exposes RealSense sensor functionality for C compilers.
rs2_sensor_list * rs2_query_sensors(const rs2_device *device, rs2_error **error)
Definition: rs.cpp:236
void rs2_update_firmware_cpp(const rs2_device *device, const void *fw_image, int fw_image_size, rs2_update_progress_callback *callback, rs2_error **error)
Definition: rs.cpp:2917
void rs2_reset_to_factory_calibration(const rs2_device *device, rs2_error **e)
Definition: rs.cpp:2733
const rs2_raw_data_buffer * rs2_create_flash_backup_cpp(const rs2_device *device, rs2_update_progress_callback *callback, rs2_error **error)
Definition: rs.cpp:2954
const rs2_raw_data_buffer * rs2_send_and_receive_raw_data(rs2_device *device, void *raw_data_to_send, unsigned size_of_raw_data_to_send, rs2_error **error)
Definition: rs.cpp:554
const rs2_raw_data_buffer * rs2_create_flash_backup(const rs2_device *device, rs2_update_progress_callback_ptr callback, void *client_data, rs2_error **error)
Definition: rs.cpp:2973
rs2_extension
Specifies advanced interfaces (capabilities) objects may implement.
Definition: rs_types.h:166
GLenum type
void rs2_enter_update_state(const rs2_device *device, rs2_error **error)
Definition: rs.cpp:3041
void(* rs2_calibration_change_callback_ptr)(rs2_calibration_status, void *arg)
Definition: rs_device.h:378
void rs2_update_firmware_unsigned_cpp(const rs2_device *device, const void *fw_image, int fw_image_size, rs2_update_progress_callback *callback, int update_mode, rs2_error **error)
Definition: rs.cpp:2996
const char * rs2_calibration_type_to_string(rs2_calibration_type)
Definition: rs.cpp:1283
void rs2_loopback_disable(const rs2_device *device, rs2_error **error)
Definition: rs.cpp:2640
void rs2_delete_device_list(rs2_device_list *info_list)
Definition: rs.cpp:275
int rs2_get_device_count(const rs2_device_list *info_list, rs2_error **error)
Definition: rs.cpp:259
auto device
Definition: pyrs_net.cpp:17
const rs2_raw_data_buffer * rs2_run_on_chip_calibration_cpp(rs2_device *device, const void *json_content, int content_size, float *health, rs2_update_progress_callback *progress_callback, int timeout_ms, rs2_error **error)
Definition: rs.cpp:3052
const rs2_raw_data_buffer * rs2_run_tare_calibration_cpp(rs2_device *dev, float ground_truth_mm, const void *json_content, int content_size, rs2_update_progress_callback *progress_callback, int timeout_ms, rs2_error **error)
Definition: rs.cpp:3102
const char * rs2_get_device_info(const rs2_device *device, rs2_camera_info info, rs2_error **error)
Definition: rs.cpp:703


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