RealSense Cross Platform API
RealSense Cross-platform API
Loading...
Searching...
No Matches
rs_option.h
Go to the documentation of this file.
1/* License: Apache 2.0. See LICENSE file in root directory.
2Copyright(c) 2017 RealSense, Inc. All Rights Reserved. */
3
8
9
10#ifndef LIBREALSENSE_RS2_OPTION_H
11#define LIBREALSENSE_RS2_OPTION_H
12
13
14#include <stdint.h>
15
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#include "rs_types.h"
22
26 typedef enum rs2_option
27 {
129
130 // Safety camera options
136
140
146 const char* rs2_option_to_string(rs2_option option);
147
153 rs2_option rs2_option_from_string( const char * option_name );
154
168
174
179 typedef struct rs2_option_rect
180 {
181 int16_t x1, y1;
182 int16_t x2, y2;
184
187 typedef struct rs2_option_value
188 {
192#pragma pack(push,1)
193 union
194 {
195 char const * as_string;
196 float as_float;
197 int64_t as_integer;
199 };
200#pragma pack(pop)
202
220
234
248
258
266
275
285
294
303
313
323
335
343 int rs2_is_option_read_only(const rs2_options* options, rs2_option option, rs2_error** error);
344
352 float rs2_get_option(const rs2_options* options, rs2_option option, rs2_error** error);
353
361 rs2_option_value const * rs2_get_option_value( const rs2_options * options, rs2_option option_id, rs2_error ** error );
362
370 void rs2_set_option(const rs2_options* options, rs2_option option, float value, rs2_error** error);
371
378 void rs2_set_option_value( rs2_options const * options, rs2_option_value const * option_value, rs2_error ** error );
379
386
393
401 const char* rs2_get_option_name(const rs2_options* options, rs2_option option, rs2_error** error);
402
410
418
424
430
438 int rs2_supports_option(const rs2_options* options, rs2_option option, rs2_error** error);
439
450 void rs2_get_option_range(const rs2_options* sensor, rs2_option option, float* min, float* max, float* step, float* def, rs2_error** error);
451
459 const char* rs2_get_option_description(const rs2_options* options, rs2_option option, rs2_error ** error);
460
469 const char* rs2_get_option_value_description(const rs2_options* options, rs2_option option, float value, rs2_error ** error);
470
481 rs2_error ** error );
482
491 rs2_error ** error );
492
493#ifdef __cplusplus
494}
495#endif
496#endif
void rs2_set_option_value(rs2_options const *options, rs2_option_value const *option_value, rs2_error **error)
const char * rs2_l500_visual_preset_to_string(rs2_l500_visual_preset preset)
rs2_sr300_visual_preset
For SR300 devices: provides optimized settings (presets) for specific types of usage.
Definition rs_option.h:205
@ RS2_SR300_VISUAL_PRESET_FACE_ANALYTICS
Definition rs_option.h:211
@ RS2_SR300_VISUAL_PRESET_LONG_RANGE
Definition rs_option.h:207
@ RS2_SR300_VISUAL_PRESET_BACKGROUND_SEGMENTATION
Definition rs_option.h:208
@ RS2_SR300_VISUAL_PRESET_GR_CURSOR
Definition rs_option.h:213
@ RS2_SR300_VISUAL_PRESET_OBJECT_SCANNING
Definition rs_option.h:210
@ RS2_SR300_VISUAL_PRESET_COUNT
Definition rs_option.h:217
@ RS2_SR300_VISUAL_PRESET_DEFAULT
Definition rs_option.h:214
@ RS2_SR300_VISUAL_PRESET_FACE_LOGIN
Definition rs_option.h:212
@ RS2_SR300_VISUAL_PRESET_SHORT_RANGE
Definition rs_option.h:206
@ RS2_SR300_VISUAL_PRESET_IR_ONLY
Definition rs_option.h:216
@ RS2_SR300_VISUAL_PRESET_GESTURE_RECOGNITION
Definition rs_option.h:209
@ RS2_SR300_VISUAL_PRESET_MID_RANGE
Definition rs_option.h:215
void rs2_delete_option_value(rs2_option_value const *handle)
rs2_l500_visual_preset
For L500 devices: provides optimized settings (presets) for specific types of usage.
Definition rs_option.h:237
@ RS2_L500_VISUAL_PRESET_DEFAULT
Definition rs_option.h:239
@ RS2_L500_VISUAL_PRESET_NO_AMBIENT
Definition rs_option.h:240
@ RS2_L500_VISUAL_PRESET_CUSTOM
Definition rs_option.h:238
@ RS2_L500_VISUAL_PRESET_MAX_RANGE
Definition rs_option.h:242
@ RS2_L500_VISUAL_PRESET_COUNT
Definition rs_option.h:245
@ RS2_L500_VISUAL_PRESET_AUTOMATIC
Definition rs_option.h:244
@ RS2_L500_VISUAL_PRESET_SHORT_RANGE
Definition rs_option.h:243
@ RS2_L500_VISUAL_PRESET_LOW_AMBIENT
Definition rs_option.h:241
const char * rs2_get_option_name(const rs2_options *options, rs2_option option, rs2_error **error)
const char * rs2_gyro_sensitivity_to_string(rs2_gyro_sensitivity mode)
const char * rs2_d500_intercam_sync_mode_to_string(rs2_d500_intercam_sync_mode mode)
const char * rs2_ambient_light_to_string(rs2_ambient_light preset)
const char * rs2_digital_gain_to_string(rs2_digital_gain preset)
rs2_option_value const * rs2_get_option_value(const rs2_options *options, rs2_option option_id, rs2_error **error)
const char * rs2_option_to_string(rs2_option option)
rs2_d500_intercam_sync_mode
values for RS2_OPTION_INTER_CAM_SYNC_MODE option.
Definition rs_option.h:315
@ RS2_D500_INTERCAM_SYNC_EXTERNAL_MASTER
Definition rs_option.h:319
@ RS2_D500_INTERCAM_SYNC_PWM_MASTER
Definition rs_option.h:318
@ RS2_D500_INTERCAM_SYNC_NONE
Definition rs_option.h:316
@ RS2_D500_INTERCAM_SYNC_RGB_MASTER
Definition rs_option.h:317
@ RS2_D500_INTERCAM_SYNC_COUNT
Definition rs_option.h:320
const char * rs2_emitter_frequency_mode_to_string(rs2_emitter_frequency_mode mode)
const char * rs2_safety_mode_to_string(rs2_safety_mode mode)
const char * rs2_sensor_mode_to_string(rs2_sensor_mode preset)
const char * rs2_host_perf_mode_to_string(rs2_host_perf_mode perf)
void rs2_set_option(const rs2_options *options, rs2_option option, float value, rs2_error **error)
rs2_option_type
Defines known option value types.
Definition rs_option.h:158
@ RS2_OPTION_TYPE_STRING
Definition rs_option.h:161
@ RS2_OPTION_TYPE_COUNT
Definition rs_option.h:165
@ RS2_OPTION_TYPE_FLOAT
Definition rs_option.h:160
@ RS2_OPTION_TYPE_BOOLEAN
Definition rs_option.h:162
@ RS2_OPTION_TYPE_INTEGER
Definition rs_option.h:159
@ RS2_OPTION_TYPE_RECT
Definition rs_option.h:163
rs2_sensor_mode
DEPRECATED! - For setting the camera_mode option.
Definition rs_option.h:251
@ RS2_SENSOR_MODE_XGA
Definition rs_option.h:253
@ RS2_SENSOR_MODE_COUNT
Definition rs_option.h:255
@ RS2_SENSOR_MODE_QVGA
Definition rs_option.h:254
@ RS2_SENSOR_MODE_VGA
Definition rs_option.h:252
rs2_ambient_light
DEPRECATED! - Use RS2_OPTION_DIGITAL_GAIN instead.
Definition rs_option.h:261
@ RS2_AMBIENT_LIGHT_LOW_AMBIENT
Definition rs_option.h:263
@ RS2_AMBIENT_LIGHT_NO_AMBIENT
Definition rs_option.h:262
rs2_option_value const * rs2_get_option_value_from_list(const rs2_options_list *options, int i, rs2_error **error)
rs2_host_perf_mode
values for RS2_OPTION_HOST_PERFORMANCE option.
Definition rs_option.h:278
@ RS2_HOST_PERF_LOW
Definition rs_option.h:280
@ RS2_HOST_PERF_DEFAULT
Definition rs_option.h:279
@ RS2_HOST_PERF_COUNT
Definition rs_option.h:282
@ RS2_HOST_PERF_HIGH
Definition rs_option.h:281
int rs2_get_options_list_size(const rs2_options_list *options, rs2_error **error)
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls,...
Definition rs_option.h:27
@ RS2_OPTION_FILTER_OPTION
Definition rs_option.h:44
@ RS2_OPTION_FILTER_SMOOTH_ALPHA
Definition rs_option.h:65
@ RS2_OPTION_EMITTER_FREQUENCY
Definition rs_option.h:122
@ RS2_OPTION_SEQUENCE_NAME
Definition rs_option.h:106
@ RS2_OPTION_THERMAL_COMPENSATION
Definition rs_option.h:101
@ RS2_OPTION_ENABLE_DYNAMIC_CALIBRATION
Definition rs_option.h:86
@ RS2_OPTION_STREAM_FILTER
Definition rs_option.h:71
@ RS2_OPTION_SATURATION
Definition rs_option.h:35
@ RS2_OPTION_ROTATION
Definition rs_option.h:128
@ RS2_OPTION_GLOBAL_TIME_ENABLED
Definition rs_option.h:81
@ RS2_OPTION_BACKLIGHT_COMPENSATION
Definition rs_option.h:28
@ RS2_OPTION_LLD_TEMPERATURE
Definition rs_option.h:77
@ RS2_OPTION_RECEIVER_SENSITIVITY
Definition rs_option.h:119
@ RS2_OPTION_ZERO_ORDER_POINT_X
Definition rs_option.h:75
@ RS2_OPTION_HOST_PERFORMANCE
Definition rs_option.h:104
@ RS2_OPTION_MOTION_RANGE
Definition rs_option.h:43
@ RS2_OPTION_HDR_ENABLED
Definition rs_option.h:105
@ RS2_OPTION_AMBIENT_LIGHT
Definition rs_option.h:97
@ RS2_OPTION_AUTO_EXPOSURE_MODE
Definition rs_option.h:49
@ RS2_OPTION_FRAMES_QUEUE_SIZE
Definition rs_option.h:47
@ RS2_OPTION_INVALIDATION_BYPASS
Definition rs_option.h:96
@ RS2_OPTION_ENABLE_POSE_JUMPING
Definition rs_option.h:85
@ RS2_OPTION_TOTAL_FRAME_DROPS
Definition rs_option.h:48
@ RS2_OPTION_COUNT
Definition rs_option.h:138
@ RS2_OPTION_CONTRAST
Definition rs_option.h:30
@ RS2_OPTION_HOLES_FILL
Definition rs_option.h:67
@ RS2_OPTION_LASER_POWER
Definition rs_option.h:41
@ RS2_OPTION_SAFETY_MODE
Definition rs_option.h:132
@ RS2_OPTION_PROJECTOR_TEMPERATURE
Definition rs_option.h:53
@ RS2_OPTION_HUMIDITY_TEMPERATURE
Definition rs_option.h:109
@ RS2_OPTION_SENSOR_MODE
Definition rs_option.h:99
@ RS2_OPTION_NOISE_FILTERING
Definition rs_option.h:95
@ RS2_OPTION_MA_TEMPERATURE
Definition rs_option.h:79
@ RS2_OPTION_ENABLE_AUTO_EXPOSURE
Definition rs_option.h:38
@ RS2_OPTION_AUTO_EXPOSURE_PRIORITY
Definition rs_option.h:58
@ RS2_OPTION_AUTO_RX_SENSITIVITY
Definition rs_option.h:116
@ RS2_OPTION_EMITTER_ON_OFF
Definition rs_option.h:74
@ RS2_OPTION_ZERO_ORDER_ENABLED
Definition rs_option.h:89
@ RS2_OPTION_SHARPNESS
Definition rs_option.h:36
@ RS2_OPTION_OHM_TEMPERATURE
Definition rs_option.h:124
@ RS2_OPTION_DEPTH_AUTO_EXPOSURE_MODE
Definition rs_option.h:123
@ RS2_OPTION_CONFIDENCE_THRESHOLD
Definition rs_option.h:45
@ RS2_OPTION_ENABLE_AUTO_WHITE_BALANCE
Definition rs_option.h:39
@ RS2_OPTION_HUE
Definition rs_option.h:34
@ RS2_OPTION_DEPTH_OFFSET
Definition rs_option.h:87
@ RS2_OPTION_LEFT_IR_TEMPERATURE
Definition rs_option.h:135
@ RS2_OPTION_GAIN
Definition rs_option.h:32
@ RS2_OPTION_AUTO_EXPOSURE_LIMIT_TOGGLE
Definition rs_option.h:120
@ RS2_OPTION_WHITE_BALANCE
Definition rs_option.h:37
@ RS2_OPTION_SEQUENCE_ID
Definition rs_option.h:108
@ RS2_OPTION_AUTO_EXPOSURE_CONVERGE_STEP
Definition rs_option.h:69
@ RS2_OPTION_MAX_DISTANCE
Definition rs_option.h:62
@ RS2_OPTION_EMITTER_ALWAYS_ON
Definition rs_option.h:100
@ RS2_OPTION_TRANSMITTER_FREQUENCY
Definition rs_option.h:117
@ RS2_OPTION_COLOR_SCHEME
Definition rs_option.h:59
@ RS2_OPTION_STREAM_INDEX_FILTER
Definition rs_option.h:73
@ RS2_OPTION_FREEFALL_DETECTION_ENABLED
Definition rs_option.h:91
@ RS2_OPTION_AVALANCHE_PHOTO_DIODE
Definition rs_option.h:92
@ RS2_OPTION_SAFETY_PRESET_ACTIVE_INDEX
Definition rs_option.h:131
@ RS2_OPTION_ENABLE_MOTION_CORRECTION
Definition rs_option.h:57
@ RS2_OPTION_ALTERNATE_IR
Definition rs_option.h:111
@ RS2_OPTION_EMITTER_ENABLED
Definition rs_option.h:46
@ RS2_OPTION_MOTION_MODULE_TEMPERATURE
Definition rs_option.h:55
@ RS2_OPTION_VERTICAL_BINNING
Definition rs_option.h:118
@ RS2_OPTION_ENABLE_MAX_USABLE_RANGE
Definition rs_option.h:110
@ RS2_OPTION_RGB_TNR_ENABLED
Definition rs_option.h:133
@ RS2_OPTION_HISTOGRAM_EQUALIZATION_ENABLED
Definition rs_option.h:60
@ RS2_OPTION_EXPOSURE
Definition rs_option.h:31
@ RS2_OPTION_AUTO_GAIN_LIMIT_TOGGLE
Definition rs_option.h:121
@ RS2_OPTION_ENABLE_RELOCALIZATION
Definition rs_option.h:84
@ RS2_OPTION_GYRO_SENSITIVITY
Definition rs_option.h:126
@ RS2_OPTION_EMBEDDED_FILTER_ENABLED
Definition rs_option.h:137
@ RS2_OPTION_POWER_LINE_FREQUENCY
Definition rs_option.h:50
@ RS2_OPTION_MIN_DISTANCE
Definition rs_option.h:61
@ RS2_OPTION_FILTER_SMOOTH_DELTA
Definition rs_option.h:66
@ RS2_OPTION_INTER_CAM_SYNC_MODE
Definition rs_option.h:70
@ RS2_OPTION_TEXTURE_SOURCE
Definition rs_option.h:63
@ RS2_OPTION_ASIC_TEMPERATURE
Definition rs_option.h:51
@ RS2_OPTION_ACCURACY
Definition rs_option.h:42
@ RS2_OPTION_ENABLE_IR_REFLECTIVITY
Definition rs_option.h:113
@ RS2_OPTION_ZERO_ORDER_POINT_Y
Definition rs_option.h:76
@ RS2_OPTION_SAFETY_MCU_TEMPERATURE
Definition rs_option.h:134
@ RS2_OPTION_AUTO_EXPOSURE_LIMIT
Definition rs_option.h:114
@ RS2_OPTION_SEQUENCE_SIZE
Definition rs_option.h:107
@ RS2_OPTION_PRE_PROCESSING_SHARPENING
Definition rs_option.h:94
@ RS2_OPTION_ENABLE_MAP_PRESERVATION
Definition rs_option.h:90
@ RS2_OPTION_STEREO_BASELINE
Definition rs_option.h:68
@ RS2_OPTION_RESET_CAMERA_ACCURACY_HEALTH
Definition rs_option.h:103
@ RS2_OPTION_POST_PROCESSING_SHARPENING
Definition rs_option.h:93
@ RS2_OPTION_HARDWARE_PRESET
Definition rs_option.h:80
@ RS2_OPTION_GAMMA
Definition rs_option.h:33
@ RS2_OPTION_OUTPUT_TRIGGER_ENABLED
Definition rs_option.h:54
@ RS2_OPTION_FILTER_MAGNITUDE
Definition rs_option.h:64
@ RS2_OPTION_APD_TEMPERATURE
Definition rs_option.h:82
@ RS2_OPTION_TRIGGER_CAMERA_ACCURACY_HEALTH
Definition rs_option.h:102
@ RS2_OPTION_STREAM_FORMAT_FILTER
Definition rs_option.h:72
@ RS2_OPTION_VISUAL_PRESET
Definition rs_option.h:40
@ RS2_OPTION_MC_TEMPERATURE
Definition rs_option.h:78
@ RS2_OPTION_NOISE_ESTIMATION
Definition rs_option.h:112
@ RS2_OPTION_REGION_OF_INTEREST
Definition rs_option.h:127
@ RS2_OPTION_AUTO_GAIN_LIMIT
Definition rs_option.h:115
@ RS2_OPTION_ERROR_POLLING_ENABLED
Definition rs_option.h:52
@ RS2_OPTION_ENABLE_MAPPING
Definition rs_option.h:83
@ RS2_OPTION_DEPTH_UNITS
Definition rs_option.h:56
@ RS2_OPTION_BRIGHTNESS
Definition rs_option.h:29
@ RS2_OPTION_DIGITAL_GAIN
Definition rs_option.h:98
@ RS2_OPTION_SOC_PVT_TEMPERATURE
Definition rs_option.h:125
@ RS2_OPTION_LED_POWER
Definition rs_option.h:88
rs2_options_list * rs2_get_options_list(const rs2_options *options, rs2_error **error)
void rs2_set_options_changed_callback(rs2_options *options, rs2_options_changed_callback_ptr callback, rs2_error **error)
rs2_option rs2_get_option_from_list(const rs2_options_list *options, int i, rs2_error **error)
const char * rs2_rs400_visual_preset_to_string(rs2_rs400_visual_preset preset)
rs2_gyro_sensitivity
values for RS2_OPTION_GYRO_SENSITIVITY option.
Definition rs_option.h:326
@ RS2_GYRO_SENSITIVITY_COUNT
Definition rs_option.h:332
@ RS2_GYRO_SENSITIVITY_61_0_MILLI_DEG_SEC
Definition rs_option.h:327
@ RS2_GYRO_SENSITIVITY_3_8_MILLI_DEG_SEC
Definition rs_option.h:331
@ RS2_GYRO_SENSITIVITY_30_5_MILLI_DEG_SEC
Definition rs_option.h:328
@ RS2_GYRO_SENSITIVITY_7_6_MILLI_DEG_SEC
Definition rs_option.h:330
@ RS2_GYRO_SENSITIVITY_15_3_MILLI_DEG_SEC
Definition rs_option.h:329
const char * rs2_depth_auto_exposure_mode_to_string(rs2_depth_auto_exposure_mode mode)
void rs2_delete_options_list(rs2_options_list *list)
rs2_option rs2_option_from_string(const char *option_name)
int rs2_is_option_read_only(const rs2_options *options, rs2_option option, rs2_error **error)
rs2_depth_auto_exposure_mode
values for RS2_OPTION_DEPTH_AUTO_EXPOSURE_MODE option.
Definition rs_option.h:297
@ RS2_DEPTH_AUTO_EXPOSURE_ACCELERATED
Definition rs_option.h:299
@ RS2_DEPTH_AUTO_EXPOSURE_COUNT
Definition rs_option.h:300
@ RS2_DEPTH_AUTO_EXPOSURE_REGULAR
Definition rs_option.h:298
const char * rs2_option_type_to_string(rs2_option_type type)
rs2_digital_gain
digital gain for RS2_OPTION_DIGITAL_GAIN option.
Definition rs_option.h:269
@ RS2_DIGITAL_GAIN_AUTO
Definition rs_option.h:270
@ RS2_DIGITAL_GAIN_LOW
Definition rs_option.h:272
@ RS2_DIGITAL_GAIN_HIGH
Definition rs_option.h:271
rs2_rs400_visual_preset
For RS400 devices: provides optimized settings (presets) for specific types of usage.
Definition rs_option.h:223
@ RS2_RS400_VISUAL_PRESET_DEFAULT
Definition rs_option.h:225
@ RS2_RS400_VISUAL_PRESET_MEDIUM_DENSITY
Definition rs_option.h:229
@ RS2_RS400_VISUAL_PRESET_REMOVE_IR_PATTERN
Definition rs_option.h:230
@ RS2_RS400_VISUAL_PRESET_COUNT
Definition rs_option.h:231
@ RS2_RS400_VISUAL_PRESET_HIGH_DENSITY
Definition rs_option.h:228
@ RS2_RS400_VISUAL_PRESET_HAND
Definition rs_option.h:226
@ RS2_RS400_VISUAL_PRESET_HIGH_ACCURACY
Definition rs_option.h:227
@ RS2_RS400_VISUAL_PRESET_CUSTOM
Definition rs_option.h:224
const char * rs2_sr300_visual_preset_to_string(rs2_sr300_visual_preset preset)
void rs2_get_option_range(const rs2_options *sensor, rs2_option option, float *min, float *max, float *step, float *def, rs2_error **error)
const char * rs2_get_option_value_description(const rs2_options *options, rs2_option option, float value, rs2_error **error)
const char * rs2_get_option_description(const rs2_options *options, rs2_option option, rs2_error **error)
rs2_safety_mode
values for RS2_OPTION_SAFETY_MODE option.
Definition rs_option.h:306
@ RS2_SAFETY_MODE_RUN
Definition rs_option.h:307
@ RS2_SAFETY_MODE_SERVICE
Definition rs_option.h:309
@ RS2_SAFETY_MODE_COUNT
Definition rs_option.h:310
@ RS2_SAFETY_MODE_STANDBY
Definition rs_option.h:308
void rs2_set_options_changed_callback_cpp(rs2_options *options, rs2_options_changed_callback *callback, rs2_error **error)
rs2_emitter_frequency_mode
values for RS2_EMITTER_FREQUENCY option.
Definition rs_option.h:288
@ RS2_EMITTER_FREQUENCY_91_KHZ
Definition rs_option.h:290
@ RS2_EMITTER_FREQUENCY_57_KHZ
Definition rs_option.h:289
@ RS2_EMITTER_FREQUENCY_COUNT
Definition rs_option.h:291
float rs2_get_option(const rs2_options *options, rs2_option option, rs2_error **error)
int rs2_supports_option(const rs2_options *options, rs2_option option, rs2_error **error)
Exposes RealSense structs.
void(* rs2_options_changed_callback_ptr)(const rs2_options_list *)
Definition rs_types.h:321
struct rs2_error rs2_error
Definition rs_types.h:276
struct rs2_options_list rs2_options_list
Definition rs_types.h:304
struct rs2_options rs2_options
Definition rs_types.h:303
Definition rs_option.h:180
int16_t y1
Definition rs_option.h:181
int16_t y2
Definition rs_option.h:182
int16_t x1
Definition rs_option.h:181
int16_t x2
Definition rs_option.h:182
The value of an option, in a known option type.
Definition rs_option.h:188
rs2_option_type type
Definition rs_option.h:191
int is_valid
Definition rs_option.h:190
float as_float
Definition rs_option.h:196
char const * as_string
Definition rs_option.h:195
rs2_option id
Definition rs_option.h:189
int64_t as_integer
Definition rs_option.h:197
rs2_option_rect as_rect
Definition rs_option.h:198
Definition rs_types.hpp:106