4 #ifndef LIBREALSENSE_RS2_OPTIONS_HPP 5 #define LIBREALSENSE_RS2_OPTIONS_HPP 8 #include "../h/rs_types.h" 17 std::shared_ptr< const rs2_option_value > _value;
67 : _list( std::move( list ) )
88 size_t size()
const {
return _size; }
106 return other._index != _index || &other._list != &_list;
110 return ! ( *
this != other );
128 std::shared_ptr< rs2_options_list >
get()
const {
return _list; };
131 std::shared_ptr< rs2_options_list > _list;
137 std::function< void( const options_list & ) > _callback;
141 : _callback( callback )
149 _callback( opt_list );
301 std::vector<rs2_option> res;
316 std::shared_ptr< rs2_options_list > sptr(
325 _options = other._options;
351 #endif // LIBREALSENSE_RS2_OIPTIONS_HPP options_list get_supported_option_values()
Definition: rs_options.hpp:313
void rs2_set_option_value(rs2_options const *options, rs2_option_value const *option_value, rs2_error **error)
rs2_option_value const * rs2_get_option_value(const rs2_options *options, rs2_option option_id, rs2_error **error)
Definition: rs_types.hpp:100
float rs2_get_option(const rs2_options *options, rs2_option option, rs2_error **error)
bool supports(rs2_option option) const
Definition: rs_options.hpp:163
Definition: rs_option.h:149
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls...
Definition: rs_option.h:26
option_value operator[](size_t index) const
Definition: rs_options.hpp:80
virtual ~options()=default
const char * get_option_name(rs2_option option) const
Definition: rs_options.hpp:189
Definition: rs_options.hpp:93
void on_options_changed(std::function< void(const options_list &) > callback) const
Definition: rs_options.hpp:292
size_t size() const
Definition: rs_options.hpp:88
float min
Definition: rs_types.hpp:196
options & operator=(const T &dev)
Definition: rs_options.hpp:339
Definition: rs_context.hpp:11
rs2_option_value const * rs2_get_option_value_from_list(const rs2_options_list *options, int i, rs2_error **error)
options_list(std::shared_ptr< rs2_options_list > list)
Definition: rs_options.hpp:66
const char * get_option_description(rs2_option option) const
Definition: rs_options.hpp:176
void rs2_set_options_changed_callback_cpp(rs2_options *options, rs2_options_changed_callback *callback, rs2_error **error)
The value of an option, in a known option type.
Definition: rs_option.h:177
option_value(rs2_option option_id, invalid_t)
Definition: rs_options.hpp:29
bool operator==(const iterator &other) const
Definition: rs_options.hpp:108
options(const options &other)
Definition: rs_options.hpp:329
float max
Definition: rs_types.hpp:197
float step
Definition: rs_types.hpp:199
option_value(rs2_option option_id, float as_float)
Definition: rs_options.hpp:37
void rs2_delete_option_value(rs2_option_value const *handle)
void release() override
Definition: rs_options.hpp:152
float get_option(rs2_option option) const
Definition: rs_options.hpp:216
std::vector< rs2_option > get_supported_options()
Definition: rs_options.hpp:299
option_value(rs2_option option_id, char const *as_string)
Definition: rs_options.hpp:42
int rs2_supports_option(const rs2_options *options, rs2_option option, rs2_error **error)
const char * rs2_get_option_name(const rs2_options *options, rs2_option option, rs2_error **error)
Definition: rs_option.h:150
iterator begin() const
Definition: rs_options.hpp:125
const char * rs2_get_option_value_description(const rs2_options *options, rs2_option option, float value, rs2_error **error)
Definition: rs_options.hpp:15
Definition: rs_types.hpp:194
Definition: rs_options.hpp:60
invalid_t
Definition: rs_options.hpp:28
options_list()
Definition: rs_options.hpp:74
Definition: rs_options.hpp:155
const char * get_option_value_description(rs2_option option, float val) const
Definition: rs_options.hpp:203
void rs2_get_option_range(const rs2_options *sensor, rs2_option option, float *min, float *max, float *step, float *def, rs2_error **error)
void on_value_changed(rs2_options_list *list) override
Definition: rs_options.hpp:145
rs2_options_list * rs2_get_options_list(const rs2_options *options, rs2_error **error)
struct rs2_options rs2_options
Definition: rs_types.h:254
Definition: rs_option.h:152
Definition: rs_option.h:155
option_value operator*() const
Definition: rs_options.hpp:102
static void handle(rs2_error *e)
Definition: rs_types.hpp:162
options(rs2_options *o=nullptr)
Definition: rs_options.hpp:334
Definition: rs_options.hpp:135
iterator & operator++()
Definition: rs_options.hpp:113
Definition: rs_options.hpp:28
rs2_option_value const * operator->() const
Definition: rs_options.hpp:56
bool is_option_read_only(rs2_option option) const
Definition: rs_options.hpp:280
Definition: rs_option.h:151
bool operator!=(const iterator &other) const
Definition: rs_options.hpp:104
option_range get_option_range(rs2_option option) const
Definition: rs_options.hpp:241
void set_option(rs2_option option, float value) const
Definition: rs_options.hpp:256
float def
Definition: rs_types.hpp:198
option_value(rs2_option option_id, int64_t as_integer)
Definition: rs_options.hpp:32
const char * rs2_get_option_description(const rs2_options *options, rs2_option option, rs2_error **error)
options & operator=(const options &other)
Definition: rs_options.hpp:323
std::shared_ptr< rs2_options_list > get() const
Definition: rs_options.hpp:128
int rs2_is_option_read_only(const rs2_options *options, rs2_option option, rs2_error **error)
option_value get_option_value(rs2_option option_id) const
Definition: rs_options.hpp:229
void rs2_set_option(const rs2_options *options, rs2_option option, float value, rs2_error **error)
struct rs2_error rs2_error
Definition: rs_types.h:229
option_value front() const
Definition: rs_options.hpp:90
void rs2_delete_options_list(rs2_options_list *list)
struct rs2_options_list rs2_options_list
Definition: rs_types.h:255
option_value(rs2_option option_id, bool as_boolean)
Definition: rs_options.hpp:47
option_value(rs2_option_value const *handle)
Definition: rs_options.hpp:20
rs2_option rs2_get_option_from_list(const rs2_options_list *options, int i, rs2_error **error)
void set_option_value(option_value const &value) const
Definition: rs_options.hpp:268
int rs2_get_options_list_size(const rs2_options_list *options, rs2_error **error)
iterator end() const
Definition: rs_options.hpp:126
option_value & operator=(option_value const &)=default
options_changed_callback(const std::function< void(const options_list &) > &callback)
Definition: rs_options.hpp:140
option_value back() const
Definition: rs_options.hpp:91