Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
|
Go to the documentation of this file.
4 #ifndef LIBREALSENSE_RS2_TYPES_HPP
5 #define LIBREALSENSE_RS2_TYPES_HPP
8 #include "../h/rs_context.h"
9 #include "../h/rs_device.h"
10 #include "../h/rs_frame.h"
11 #include "../h/rs_processing.h"
12 #include "../h/rs_record_playback.h"
13 #include "../h/rs_sensor.h"
14 #include "../h/rs_pipeline.h"
92 class error :
public std::runtime_error
94 std::string
function, args;
105 explicit error(
const std::string& message) : runtime_error(message.c_str())
127 #define RS2_ERROR_CLASS(name, base) \
128 class name : public base\
131 explicit name(rs2_error* e) noexcept : base(e) {}\
142 #undef RS2_ERROR_CLASS
151 throw camera_disconnected_error(e);
153 throw backend_error(e);
155 throw invalid_value_error(e);
157 throw wrong_api_call_sequence_error(e);
159 throw not_implemented_error(e);
161 throw device_in_recovery_mode_error(e);
196 #endif // LIBREALSENSE_RS2_TYPES_HPP
rs2_playback_status
Definition: rs_record_playback.h:20
Definition: rs_device.hpp:19
void(* log_callback_function_ptr)(rs2_log_severity severity, rs2_log_message const *msg)
Definition: rs_types.hpp:46
Definition: rs_types.hpp:77
float step
Definition: rs_types.hpp:181
3D vector in Euclidean coordinate space
Definition: rs_types.h:124
error(const std::string &message)
Definition: rs_types.hpp:105
Definition: rs_types.hpp:63
virtual ~rs2_software_device_destruction_callback()
Definition: rs_types.hpp:52
rs2_exception_type get_type() const
Definition: rs_types.hpp:122
Quaternion used to represent rotation
Definition: rs_types.h:130
Definition: rs_frame.hpp:337
virtual void on_update_progress(const float update_progress)=0
const std::string & get_failed_function() const
Definition: rs_types.hpp:112
const char * rs2_get_error_message(const rs2_error *error)
@ RS2_EXCEPTION_TYPE_NOT_IMPLEMENTED
Definition: rs_types.h:37
struct rs2_log_message rs2_log_message
Definition: rs_types.h:248
int min_x
Definition: rs_types.hpp:186
Definition: rs_types.hpp:70
virtual void on_log(rs2_log_severity severity, rs2_log_message const &msg) noexcept=0
virtual ~rs2_devices_changed_callback()
Definition: rs_types.hpp:73
@ RS2_EXCEPTION_TYPE_CAMERA_DISCONNECTED
Definition: rs_types.h:33
struct rs2_frame rs2_frame
Definition: rs_types.h:250
@ RS2_EXCEPTION_TYPE_BACKEND
Definition: rs_types.h:34
Definition: rs_device.hpp:631
struct rs2_source rs2_source
Definition: rs_types.h:263
virtual ~rs2_log_callback()
Definition: rs_types.hpp:59
const std::string & get_failed_args() const
Definition: rs_types.hpp:117
const char * rs2_get_failed_args(const rs2_error *error)
Definition: rs_types.hpp:40
@ RS2_EXCEPTION_TYPE_UNKNOWN
Definition: rs_types.h:32
virtual ~rs2_calibration_change_callback()
Definition: rs_types.hpp:66
@ RS2_EXCEPTION_TYPE_INVALID_VALUE
Definition: rs_types.h:35
rs2_log_severity
Severity of the librealsense logger.
Definition: rs_types.h:147
Definition: rs_types.hpp:177
float z
Definition: rs_types.h:125
int max_y
Definition: rs_types.hpp:189
virtual ~rs2_update_progress_callback()
Definition: rs_types.hpp:87
virtual ~rs2_playback_status_changed_callback()
Definition: rs_types.hpp:80
virtual void on_notification(rs2_notification *n)=0
struct rs2_notification rs2_notification
Definition: rs_types.h:275
virtual ~rs2_notifications_callback()
Definition: rs_types.hpp:43
virtual ~rs2_frame_processor_callback()
Definition: rs_types.hpp:36
Definition: rs_types.hpp:49
float y
Definition: rs_types.h:131
Definition: rs_types.hpp:33
Definition: rs_types.hpp:56
virtual ~rs2_frame_callback()
Definition: rs_types.hpp:29
float min
Definition: rs_types.hpp:178
Definition: rs_processing.hpp:598
std::ostream & operator<<(std::ostream &o, rs2_vector v)
Definition: rs_types.hpp:193
Definition: rs_context.hpp:12
virtual void on_playback_status_changed(rs2_playback_status status)=0
Definition: rs_types.hpp:185
float y
Definition: rs_types.h:125
virtual void on_calibration_change(rs2_calibration_status) noexcept=0
float x
Definition: rs_types.h:125
virtual void on_devices_changed(rs2_device_list *removed, rs2_device_list *added)=0
virtual void on_frame(rs2_frame *f, rs2_source *source)=0
float max
Definition: rs_types.hpp:179
int min_y
Definition: rs_types.hpp:187
float w
Definition: rs_types.h:131
@ RS2_EXCEPTION_TYPE_WRONG_API_CALL_SEQUENCE
Definition: rs_types.h:36
void rs2_free_error(rs2_error *error)
Definition: rs_context.hpp:97
Definition: rs_types.hpp:93
Definition: rs_types.hpp:84
float z
Definition: rs_types.h:131
static void handle(rs2_error *e)
Definition: rs_types.hpp:144
error(rs2_error *err)
Definition: rs_types.hpp:97
rs2_calibration_status
Definition: rs_device.h:330
virtual void on_frame(rs2_frame *f)=0
@ RS2_EXCEPTION_TYPE_DEVICE_IN_RECOVERY_MODE
Definition: rs_types.h:38
float def
Definition: rs_types.hpp:180
float x
Definition: rs_types.h:131
RS2_ERROR_CLASS(recoverable_error, error)
struct rs2_device_list rs2_device_list
Definition: rs_types.h:255
int max_x
Definition: rs_types.hpp:188
struct rs2_error rs2_error
Definition: rs_types.h:247
Definition: rs_sensor.hpp:422
rs2_exception_type rs2_get_librealsense_exception_type(const rs2_error *error)
virtual void on_destruction()=0
const char * rs2_get_failed_function(const rs2_error *error)
rs2_exception_type
Exception types are the different categories of errors that RealSense API might return.
Definition: rs_types.h:31
Definition: rs_types.hpp:26