Class options
Defined in File rs_options.hpp
Inheritance Relationships
Derived Types
public rs2::processing_block
(Class processing_block)public rs2::sensor
(Class sensor)
Class Documentation
-
class options
Subclassed by rs2::processing_block, rs2::sensor
Public Functions
-
inline bool supports(rs2_option option) const
check if particular option is supported
- Parameters:
option – [in] option id to be checked
- Returns:
true if option is supported
-
inline const char *get_option_description(rs2_option option) const
get option description
- Parameters:
option – [in] option id to be checked
- Returns:
human-readable option description
-
inline const char *get_option_name(rs2_option option) const
get option name
- Parameters:
option – [in] option id to be checked
- Returns:
human-readable option name
-
inline const char *get_option_value_description(rs2_option option, float val) const
get option value description (in case specific option value hold special meaning)
- Parameters:
option – [in] option id to be checked
val – [in] value of the option
- Returns:
human-readable description of a specific value of an option or null if no special meaning
-
inline float get_option(rs2_option option) const
read option’s float value
- Parameters:
option – [in] option id to be queried
- Returns:
value of the option
-
inline option_value get_option_value(rs2_option option_id) const
read option’s value
- Parameters:
option_id – [in] option id to be queried
- Returns:
option value
-
inline option_range get_option_range(rs2_option option) const
retrieve the available range of values of a supported option
- Returns:
option range containing minimum and maximum values, step and default value
-
inline void set_option(rs2_option option, float value) const
write new value to the option
- Parameters:
option – [in] option id to be queried
value – [in] new value for the option
-
inline void set_option_value(option_value const &value) const
write new value to the option
- Parameters:
option – [in] option id to be queried
value – [in] option (id,type,is_valid,new value)
-
inline bool is_option_read_only(rs2_option option) const
check if particular option is read-only
- Parameters:
option – [in] option id to be checked
- Returns:
true if option is read-only
-
inline void on_options_changed(std::function<void(const options_list&)> callback) const
sets a callback in case an option in this options container value is updated
- Parameters:
callback – [in] the callback function
-
inline std::vector<rs2_option> get_supported_options()
-
inline options_list get_supported_option_values()
-
virtual ~options() = default
Protected Functions
-
inline explicit options(rs2_options *o = nullptr)
-
inline bool supports(rs2_option option) const