4#ifndef LIBREALSENSE_RS2_TYPES_HPP
5#define LIBREALSENSE_RS2_TYPES_HPP
110 class error :
public std::runtime_error
112 std::string function, args;
123 explicit error(
const std::string& message) : runtime_error(message.c_str())
145 #define RS2_ERROR_CLASS(name, base) \
146 class name : public base\
149 explicit name(rs2_error* e) noexcept : base(e) {}\
160 #undef RS2_ERROR_CLASS
169 throw camera_disconnected_error(e);
171 throw backend_error(e);
173 throw invalid_value_error(e);
175 throw wrong_api_call_sequence_error(e);
177 throw not_implemented_error(e);
179 throw device_in_recovery_mode_error(e);
Definition rs_context.hpp:97
Definition rs_device.hpp:1056
Definition rs_device.hpp:20
Definition rs_types.hpp:111
rs2_exception_type get_type() const
Definition rs_types.hpp:140
error(rs2_error *err)
Definition rs_types.hpp:115
const std::string & get_failed_function() const
Definition rs_types.hpp:130
error(const std::string &message)
Definition rs_types.hpp:123
static void handle(rs2_error *e)
Definition rs_types.hpp:162
const std::string & get_failed_args() const
Definition rs_types.hpp:135
Definition rs_frame.hpp:346
Definition rs_sensor.hpp:422
Definition rs_processing.hpp:642
Definition rs_processing_gl.hpp:13
Exposes librealsense functionality for C compilers.
Exposes RealSense context functionality for C compilers.
Exposes RealSense device functionality for C compilers.
rs2_calibration_status
Definition rs_device.h:415
Exposes RealSense frame functionality for C compilers.
Exposes RealSense processing-block functionality for C compilers.
Exposes RealSense processing-block functionality for C compilers.
Exposes record and playback functionality for C compilers.
rs2_playback_status
Definition rs_record_playback.h:20
Exposes RealSense sensor functionality for C compilers.
rs2_exception_type rs2_get_librealsense_exception_type(const rs2_error *error)
rs2_log_severity
Severity of the librealsense logger.
Definition rs_types.h:123
struct rs2_log_message rs2_log_message
Definition rs_types.h:231
void rs2_free_error(rs2_error *error)
const char * rs2_get_failed_args(const rs2_error *error)
struct rs2_source rs2_source
Definition rs_types.h:246
const char * rs2_get_error_message(const rs2_error *error)
struct rs2_notification rs2_notification
Definition rs_types.h:259
const char * rs2_get_failed_function(const rs2_error *error)
struct rs2_device_list rs2_device_list
Definition rs_types.h:238
struct rs2_error rs2_error
Definition rs_types.h:230
rs2_exception_type
Exception types are the different categories of errors that RealSense API might return.
Definition rs_types.h:33
@ RS2_EXCEPTION_TYPE_NOT_IMPLEMENTED
Definition rs_types.h:39
@ RS2_EXCEPTION_TYPE_CAMERA_DISCONNECTED
Definition rs_types.h:35
@ RS2_EXCEPTION_TYPE_BACKEND
Definition rs_types.h:36
@ RS2_EXCEPTION_TYPE_INVALID_VALUE
Definition rs_types.h:37
@ RS2_EXCEPTION_TYPE_UNKNOWN
Definition rs_types.h:34
@ RS2_EXCEPTION_TYPE_DEVICE_IN_RECOVERY_MODE
Definition rs_types.h:40
@ RS2_EXCEPTION_TYPE_WRONG_API_CALL_SEQUENCE
Definition rs_types.h:38
struct rs2_options_list rs2_options_list
Definition rs_types.h:256
struct rs2_frame rs2_frame
Definition rs_types.h:233
std::shared_ptr< rs2_frame_callback > rs2_frame_callback_sptr
Definition rs_types.hpp:32
std::ostream & operator<<(std::ostream &o, rs2_vector v)
Definition rs_types.hpp:211
#define RS2_ERROR_CLASS(name, base)
Definition rs_types.hpp:145
std::shared_ptr< rs2_devices_changed_callback > rs2_devices_changed_callback_sptr
Definition rs_types.hpp:82
std::shared_ptr< rs2_log_callback > rs2_log_callback_sptr
Definition rs_types.hpp:66
std::shared_ptr< rs2_notifications_callback > rs2_notifications_callback_sptr
Definition rs_types.hpp:48
std::shared_ptr< rs2_frame_processor_callback > rs2_frame_processor_callback_sptr
Definition rs_types.hpp:40
std::shared_ptr< rs2_options_changed_callback > rs2_options_changed_callback_sptr
Definition rs_types.hpp:106
std::shared_ptr< rs2_playback_status_changed_callback > rs2_playback_status_changed_callback_sptr
Definition rs_types.hpp:90
std::shared_ptr< rs2_calibration_change_callback > rs2_calibration_change_callback_sptr
Definition rs_types.hpp:74
void(* log_callback_function_ptr)(rs2_log_severity severity, rs2_log_message const *msg)
Definition rs_types.hpp:50
std::shared_ptr< rs2_update_progress_callback > rs2_update_progress_callback_sptr
Definition rs_types.hpp:98
std::shared_ptr< rs2_software_device_destruction_callback > rs2_software_device_destruction_callback_sptr
Definition rs_types.hpp:58
Definition rs_types.hpp:195
float def
Definition rs_types.hpp:198
float step
Definition rs_types.hpp:199
float max
Definition rs_types.hpp:197
float min
Definition rs_types.hpp:196
Definition rs_types.hpp:203
int min_x
Definition rs_types.hpp:204
int max_y
Definition rs_types.hpp:207
int max_x
Definition rs_types.hpp:206
int min_y
Definition rs_types.hpp:205
Definition rs_types.hpp:69
virtual void on_calibration_change(rs2_calibration_status) noexcept=0
virtual ~rs2_calibration_change_callback()
Definition rs_types.hpp:72
Definition rs_types.hpp:77
virtual void on_devices_changed(rs2_device_list *removed, rs2_device_list *added)=0
virtual ~rs2_devices_changed_callback()
Definition rs_types.hpp:80
Definition rs_types.hpp:27
virtual ~rs2_frame_callback()
Definition rs_types.hpp:30
virtual void on_frame(rs2_frame *f)=0
Definition rs_types.hpp:35
virtual ~rs2_frame_processor_callback()
Definition rs_types.hpp:38
virtual void on_frame(rs2_frame *f, rs2_source *source)=0
Definition rs_types.hpp:61
virtual ~rs2_log_callback()
Definition rs_types.hpp:64
virtual void on_log(rs2_log_severity severity, rs2_log_message const &msg) noexcept=0
Definition rs_types.hpp:43
virtual void on_notification(rs2_notification *n)=0
virtual ~rs2_notifications_callback()
Definition rs_types.hpp:46
Definition rs_types.hpp:101
virtual void on_value_changed(rs2_options_list *list)=0
virtual ~rs2_options_changed_callback()
Definition rs_types.hpp:104
Definition rs_types.hpp:85
virtual void on_playback_status_changed(rs2_playback_status status)=0
virtual ~rs2_playback_status_changed_callback()
Definition rs_types.hpp:88
Quaternion used to represent rotation.
Definition rs_types.h:106
float y
Definition rs_types.h:107
float z
Definition rs_types.h:107
float w
Definition rs_types.h:107
float x
Definition rs_types.h:107
Definition rs_types.hpp:53
virtual ~rs2_software_device_destruction_callback()
Definition rs_types.hpp:56
virtual void on_destruction()=0
Definition rs_types.hpp:93
virtual ~rs2_update_progress_callback()
Definition rs_types.hpp:96
virtual void on_update_progress(const float update_progress)=0
3D vector in Euclidean coordinate space
Definition rs_types.h:100
float x
Definition rs_types.h:101
float y
Definition rs_types.h:101
float z
Definition rs_types.h:101