RealSense Cross Platform API
RealSense Cross-platform API
Typedefs | Enumerations | Functions
rs_composite_option.h File Reference

Generic entry points shared by every composite (multi-field, atomically-exchanged) XU control. A separate identity space from rs2_option, keyed by rs2_composite_option_id. Each call below is exactly one UVC transaction: all fields of the option's payload travel together, atomically. More...

#include "rs_types.h"

Go to the source code of this file.

Typedefs

typedef enum rs2_composite_option_id rs2_composite_option_id
 

Enumerations

enum  rs2_composite_option_id { RS2_COMPOSITE_OPTION_DECIMATION_FILTER_DPP, RS2_COMPOSITE_OPTION_TEMPORAL_FILTER_DPP, RS2_COMPOSITE_OPTION_HDRD_CONTROL, RS2_COMPOSITE_OPTION_COUNT }
 

Functions

const char * rs2_composite_option_id_to_string (rs2_composite_option_id id)
 
void rs2_set_composite_option (const rs2_options *options, rs2_composite_option_id option, const void *data, unsigned int size, rs2_error **error)
 
const rs2_raw_data_buffer * rs2_get_composite_option (const rs2_options *options, rs2_composite_option_id option, rs2_error **error)
 
const rs2_raw_data_buffer * rs2_get_composite_option_range (const rs2_options *options, rs2_composite_option_id option, rs2_error **error)
 
rs2_composite_options_list * rs2_get_composite_options_list (const rs2_options *options, rs2_error **error)
 
int rs2_get_composite_options_list_size (const rs2_composite_options_list *list, rs2_error **error)
 
rs2_composite_option_id rs2_get_composite_option_from_list (const rs2_composite_options_list *list, int i, rs2_error **error)
 
void rs2_delete_composite_options_list (rs2_composite_options_list *list)
 
int rs2_supports_composite_option (const rs2_options *options, rs2_composite_option_id option, rs2_error **error)
 
int rs2_is_composite_option_read_only (const rs2_options *options, rs2_composite_option_id option, rs2_error **error)
 
const char * rs2_get_composite_option_description (const rs2_options *options, rs2_composite_option_id option, rs2_error **error)
 

Detailed Description

Generic entry points shared by every composite (multi-field, atomically-exchanged) XU control. A separate identity space from rs2_option, keyed by rs2_composite_option_id. Each call below is exactly one UVC transaction: all fields of the option's payload travel together, atomically.

Typedef Documentation

◆ rs2_composite_option_id

Identifies a composite (multi-field, atomically-exchanged) control. Completely independent of rs2_option (see rs_option.h) - its own namespace and enumeration path, never mixed with scalar options.

Enumeration Type Documentation

◆ rs2_composite_option_id

Identifies a composite (multi-field, atomically-exchanged) control. Completely independent of rs2_option (see rs_option.h) - its own namespace and enumeration path, never mixed with scalar options.

Enumerator
RS2_COMPOSITE_OPTION_DECIMATION_FILTER_DPP 

HKR Depth Post-Processing "Decimation Filter" - see rs_decimation_filter_dpp.h.

RS2_COMPOSITE_OPTION_TEMPORAL_FILTER_DPP 

HKR Depth Post-Processing "Temporal Filter" - see rs_temporal_filter_dpp.h.

RS2_COMPOSITE_OPTION_HDRD_CONTROL 

HKR/D5X5 Improved Close Range control - see rs_hdrd_control.h.

RS2_COMPOSITE_OPTION_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Function Documentation

◆ rs2_composite_option_id_to_string()

const char* rs2_composite_option_id_to_string ( rs2_composite_option_id  id)

Returns the composite option id's name, or "UNKNOWN" otherwise - the composite-option analogue of rs2_option_to_string. Unlike rs2_option, there is no from_string() reverse lookup.

Parameters
[in]idthe composite option identifier

◆ rs2_delete_composite_options_list()

void rs2_delete_composite_options_list ( rs2_composite_options_list *  list)

Deletes a composite options list returned by rs2_get_composite_options_list.

Parameters
[in]listthe list to delete

◆ rs2_get_composite_option()

const rs2_raw_data_buffer* rs2_get_composite_option ( const rs2_options *  options,
rs2_composite_option_id  option,
rs2_error **  error 
)

rs2_get_composite_option - generic composite-option getter. Reads the current value in ONE atomic UVC transaction. The caller has no generic way to know the wire size in advance, so the SDK heap-allocates and returns it as an rs2_raw_data_buffer - read with rs2_get_raw_data_size/rs2_get_raw_data, free with rs2_delete_raw_data.

Parameters
[in]optionsOptions container (sensor or embedded_filter) that exposes this composite option
[in]optionWhich composite option to read
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
SDK-allocated buffer holding the option's current raw payload bytes; cast into a struct matching the option's documented wire layout. Free with rs2_delete_raw_data.

◆ rs2_get_composite_option_description()

const char* rs2_get_composite_option_description ( const rs2_options *  options,
rs2_composite_option_id  option,
rs2_error **  error 
)

get a composite option's human-readable description - the composite-option analogue of rs2_get_option_description.

Parameters
[in]optionsOptions container (sensor or embedded_filter) that exposes this composite option
[in]optioncomposite option id to describe
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
human-readable composite option description

◆ rs2_get_composite_option_from_list()

rs2_composite_option_id rs2_get_composite_option_from_list ( const rs2_composite_options_list *  list,
int  i,
rs2_error **  error 
)

Retrieve the i-th composite option id in a list returned by rs2_get_composite_options_list.

Parameters
[in]listthe list of composite option ids
[in]ithe index of the composite option id to retrieve
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the composite option id at index i

◆ rs2_get_composite_option_range()

const rs2_raw_data_buffer* rs2_get_composite_option_range ( const rs2_options *  options,
rs2_composite_option_id  option,
rs2_error **  error 
)

rs2_get_composite_option_range - generic composite-option range getter. Reads the option's supported {min, max, step, def} - one instance of the option's struct per bound - packed into a single SDK-allocated rs2_raw_data_buffer, the composite-option analogue of rs2_get_option_range.

Parameters
[in]optionsOptions container (sensor or embedded_filter) that exposes this composite option
[in]optionWhich composite option's range to read
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
SDK-allocated buffer holding the option's range payload bytes; cast into the range struct documented for option. Free with rs2_delete_raw_data.

◆ rs2_get_composite_options_list()

rs2_composite_options_list* rs2_get_composite_options_list ( const rs2_options *  options,
rs2_error **  error 
)

rs2_get_composite_options_list - the composite-option analogue of rs2_get_options_list: the full set of composite ids this options container supports. Never contains a scalar rs2_option - composite and scalar options are enumerated completely separately.

Parameters
[in]optionsOptions container (sensor or embedded_filter)
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
List of supported composite option ids. Free with rs2_delete_composite_options_list.

◆ rs2_get_composite_options_list_size()

int rs2_get_composite_options_list_size ( const rs2_composite_options_list *  list,
rs2_error **  error 
)

Return the number of composite option ids in a list returned by rs2_get_composite_options_list.

Parameters
[in]listthe list of composite option ids
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the number of composite option ids in the list

◆ rs2_is_composite_option_read_only()

int rs2_is_composite_option_read_only ( const rs2_options *  options,
rs2_composite_option_id  option,
rs2_error **  error 
)

check if a composite option is read-only - the composite-option analogue of rs2_is_option_read_only.

Parameters
[in]optionsOptions container (sensor or embedded_filter) that exposes this composite option
[in]optioncomposite option id to check
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
true if the composite option is read-only

◆ rs2_set_composite_option()

void rs2_set_composite_option ( const rs2_options *  options,
rs2_composite_option_id  option,
const void *  data,
unsigned int  size,
rs2_error **  error 
)

rs2_set_composite_option - generic composite-option setter. Writes size bytes from data to the device in ONE atomic UVC control transaction. The caller is responsible for knowing the documented wire layout for option and passing a pointer to a matching struct + sizeof(...) as data/size. No ownership transfer, exactly like rs2_set_option.

Parameters
[in]optionsOptions container (sensor or embedded_filter) that exposes this composite option
[in]optionWhich composite option to write
[in]dataPointer to the caller's struct matching the option's documented wire layout
[in]sizesizeof(...) of the caller's struct
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

◆ rs2_supports_composite_option()

int rs2_supports_composite_option ( const rs2_options *  options,
rs2_composite_option_id  option,
rs2_error **  error 
)

check if a particular composite option is supported (and currently enabled) by this options container - the composite-option analogue of rs2_supports_option.

Parameters
[in]optionsOptions container (sensor or embedded_filter)
[in]optioncomposite option id to check
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
true if the composite option is supported