Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
types.h File Reference
#include "../include/librealsense2/hpp/rs_types.hpp"
#include <stdint.h>
#include <cassert>
#include <cstring>
#include <vector>
#include <sstream>
#include <mutex>
#include <memory>
#include <map>
#include <limits>
#include <algorithm>
#include <condition_variable>
#include <functional>
#include <utility>
#include "backend.h"
#include "concurrency.h"

Go to the source code of this file.

Classes

struct  librealsense::to_string
 
class  librealsense::librealsense_exception
 
class  librealsense::recoverable_exception
 
class  librealsense::unrecoverable_exception
 
class  librealsense::io_exception
 
class  librealsense::camera_disconnected_exception
 
class  librealsense::backend_exception
 
class  librealsense::linux_backend_exception
 
class  librealsense::windows_backend_exception
 
class  librealsense::invalid_value_exception
 
class  librealsense::wrong_api_call_sequence_exception
 
class  librealsense::not_implemented_exception
 
class  librealsense::big_endian< T >
 
class  librealsense::lazy< T >
 
class  librealsense::unique_id
 
struct  librealsense::int2
 
struct  librealsense::float2
 
struct  librealsense::float3
 
struct  librealsense::float4
 
struct  librealsense::float3x3
 
struct  librealsense::pose
 
struct  librealsense::stream_profile
 
struct  librealsense::stream_descriptor
 
struct  librealsense::pixel_format_unpacker
 
struct  librealsense::native_pixel_format
 
struct  librealsense::request_mapping
 
struct  librealsense::frame_holder
 
class  librealsense::firmware_version
 
struct  librealsense::struct_interface< T, R, W >
 
class  librealsense::arithmetic_wraparound< T, S >
 
class  librealsense::frame_callback
 
class  librealsense::internal_frame_callback< T >
 
class  librealsense::notifications_callback
 
class  librealsense::devices_changed_callback
 
class  librealsense::devices_changed_callback_internal
 
struct  librealsense::notification
 
class  librealsense::notification_decoder
 
class  librealsense::notifications_processor
 
class  librealsense::small_heap< T, C >
 
struct  librealsense::uvc_device_info
 
struct  librealsense::usb_device_info
 
struct  librealsense::hid_device_info
 
struct  librealsense::devices_data
 
struct  librealsense::callback_invocation
 
struct  librealsense::callback_invocation_holder
 
class  librealsense::frame_continuation
 
class  librealsense::calibration_validator
 
class  librealsense::polling_device_watcher
 
class  librealsense::signal< HostingClass, Args >
 
class  librealsense::optional_value< T >
 
struct  std::hash< librealsense::stream_profile >
 
struct  std::hash< librealsense::platform::stream_profile >
 
struct  std::hash< librealsense::request_mapping >
 

Namespaces

 librealsense
 
 std
 

Macros

#define LIBREALSENSE_TYPES_H
 
#define UNKNOWN_VALUE   "UNKNOWN"
 
#define LOG_DEBUG(...)   do { ; } while(false)
 
#define LOG_INFO(...)   do { ; } while(false)
 
#define LOG_WARNING(...)   do { ; } while(false)
 
#define LOG_ERROR(...)   do { ; } while(false)
 
#define LOG_FATAL(...)   do { ; } while(false)
 
#define RS2_ENUM_HELPERS(TYPE, PREFIX)
 

Typedefs

typedef unsigned char byte
 
typedef float librealsense::float_4[4]
 
typedef std::tuple< uint32_t, int, size_t > librealsense::native_pixel_format_tuple
 
typedef std::tuple< rs2_stream, int, rs2_formatlibrealsense::output_tuple
 
typedef std::tuple< platform::stream_profile_tuple, native_pixel_format_tuple, std::vector< output_tuple > > librealsense::request_mapping_tuple
 
typedef void(* librealsense::frame_callback_function_ptr) (rs2_frame *frame, void *user)
 
typedef void(* librealsense::notifications_callback_function_ptr) (rs2_notification *notification, void *user)
 
typedef void(* librealsense::devices_changed_function_ptr) (rs2_device_list *removed, rs2_device_list *added, void *user)
 
typedef std::unique_ptr< rs2_log_callback, void(*)(rs2_log_callback *)> librealsense::log_callback_ptr
 
typedef std::shared_ptr< rs2_frame_callbacklibrealsense::frame_callback_ptr
 
typedef std::shared_ptr< rs2_frame_processor_callbacklibrealsense::frame_processor_callback_ptr
 
typedef std::shared_ptr< rs2_notifications_callbacklibrealsense::notifications_callback_ptr
 
typedef std::shared_ptr< rs2_devices_changed_callbacklibrealsense::devices_changed_callback_ptr
 
using librealsense::internal_callback = std::function< void(rs2_device_list *removed, rs2_device_list *added)>
 
typedef std::function< void(devices_data old, devices_data curr)> librealsense::device_changed_callback
 
typedef librealsense::small_heap< callback_invocation, 1 > librealsense::callbacks_heap
 

Enumerations

enum  res_type { low_resolution, medium_resolution, high_resolution }
 

Functions

template<typename T , size_t size>
size_t librealsense::copy_array (T(&dst)[size], const T(&src)[size])
 
template<typename T , size_t sizem, size_t sizen>
size_t librealsense::copy_2darray (T(&dst)[sizem][sizen], const T(&src)[sizem][sizen])
 
void librealsense::copy (void *dst, void const *src, size_t size)
 
std::string librealsense::make_less_screamy (const char *str)
 
void librealsense::log_to_console (rs2_log_severity min_severity)
 
void librealsense::log_to_file (rs2_log_severity min_severity, const char *file_path)
 
template<typename T >
librealsense::clamp_val (T val, const T &min, const T &max)
 
template<typename T , int sz>
int librealsense::arr_size (T(&)[sz])
 
template<typename T >
std::string librealsense::array2str (T &data)
 
bool librealsense::operator== (const float3 &a, const float3 &b)
 
float3 librealsense::operator+ (const float3 &a, const float3 &b)
 
float3 librealsense::operator* (const float3 &a, float b)
 
bool librealsense::operator== (const float4 &a, const float4 &b)
 
float4 librealsense::operator+ (const float4 &a, const float4 &b)
 
bool librealsense::operator== (const float3x3 &a, const float3x3 &b)
 
float3 librealsense::operator* (const float3x3 &a, const float3 &b)
 
float3x3 librealsense::operator* (const float3x3 &a, const float3x3 &b)
 
float3x3 librealsense::transpose (const float3x3 &a)
 
bool librealsense::operator== (const pose &a, const pose &b)
 
float3 librealsense::operator* (const pose &a, const float3 &b)
 
pose librealsense::operator* (const pose &a, const pose &b)
 
pose librealsense::inverse (const pose &a)
 
pose librealsense::to_pose (const rs2_extrinsics &a)
 
rs2_extrinsics librealsense::from_pose (pose a)
 
rs2_extrinsics librealsense::identity_matrix ()
 
rs2_extrinsics librealsense::inverse (const rs2_extrinsics &a)
 
bool librealsense::operator== (const stream_profile &a, const stream_profile &b)
 
bool librealsense::operator< (const request_mapping &first, const request_mapping &second)
 
bool librealsense::operator== (const request_mapping &a, const request_mapping &b)
 
template<class T , class R , class W >
std::shared_ptr< struct_interface< T, R, W > > librealsense::make_struct_interface (R r, W w)
 
rs2_intrinsics librealsense::pad_crop_intrinsics (const rs2_intrinsics &i, int pad_crop)
 
rs2_intrinsics librealsense::scale_intrinsics (const rs2_intrinsics &i, int width, int height)
 
bool librealsense::operator== (const rs2_intrinsics &a, const rs2_intrinsics &b)
 
uint32_t librealsense::pack (uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3)
 
bool librealsense::operator== (const uvc_device_info &a, const uvc_device_info &b)
 
bool librealsense::operator== (const usb_device_info &a, const usb_device_info &b)
 
bool librealsense::operator== (const hid_device_info &a, const hid_device_info &b)
 
bool librealsense::check_not_all_zeros (std::vector< byte > data)
 
std::string librealsense::datetime_string ()
 
bool librealsense::file_exists (const char *filename)
 
float3x3 librealsense::calc_rotation_from_rodrigues_angles (const std::vector< double > rot)
 
uint32_t librealsense::calc_crc32 (const uint8_t *buf, size_t bufsize)
 
template<class T >
bool contains (const T &first, const T &second)
 
template<class T >
std::vector< std::shared_ptr< T > > subtract_sets (const std::vector< std::shared_ptr< T >> &first, const std::vector< std::shared_ptr< T >> &second)
 
res_type get_res_type (uint32_t width, uint32_t height)
 

Variables

const int RS2_USER_QUEUE_SIZE = 128
 
const double DBL_EPSILON = 2.2204460492503131e-016
 

Macro Definition Documentation

◆ LIBREALSENSE_TYPES_H

#define LIBREALSENSE_TYPES_H

◆ LOG_DEBUG

#define LOG_DEBUG (   ...)    do { ; } while(false)

◆ LOG_ERROR

#define LOG_ERROR (   ...)    do { ; } while(false)

◆ LOG_FATAL

#define LOG_FATAL (   ...)    do { ; } while(false)

◆ LOG_INFO

#define LOG_INFO (   ...)    do { ; } while(false)

◆ LOG_WARNING

#define LOG_WARNING (   ...)    do { ; } while(false)

◆ RS2_ENUM_HELPERS

#define RS2_ENUM_HELPERS (   TYPE,
  PREFIX 
)
Value:
const char* get_string(TYPE value); \
inline bool is_valid(TYPE value) { return value >= 0 && value < RS2_##PREFIX##_COUNT; } \
inline std::ostream & operator << (std::ostream & out, TYPE value) { if(is_valid(value)) return out << get_string(value); else return out << (int)value; } \
inline bool try_parse(const std::string& str, TYPE& res) \
{ \
for (int i = 0; i < static_cast<int>(RS2_ ## PREFIX ## _COUNT); i++) { \
auto v = static_cast<TYPE>(i); \
if(str == get_string(v)) { res = v; return true; } \
} \
return false; \
}
Definition: backend.h:351
std::string get_string(perc::Status value)
Definition: controller_event_serializer.h:26
std::ostream & operator<<(std::ostream &o, rs2_stream stream)
Definition: rs.hpp:41

◆ UNKNOWN_VALUE

#define UNKNOWN_VALUE   "UNKNOWN"

Typedef Documentation

◆ byte

typedef unsigned char byte

Enumeration Type Documentation

◆ res_type

enum res_type
Enumerator
low_resolution 
medium_resolution 
high_resolution 

Function Documentation

◆ contains()

template<class T >
bool contains ( const T &  first,
const T &  second 
)

◆ get_res_type()

res_type get_res_type ( uint32_t  width,
uint32_t  height 
)
inline

◆ subtract_sets()

template<class T >
std::vector<std::shared_ptr<T> > subtract_sets ( const std::vector< std::shared_ptr< T >> &  first,
const std::vector< std::shared_ptr< T >> &  second 
)

Variable Documentation

◆ DBL_EPSILON

const double DBL_EPSILON = 2.2204460492503131e-016

◆ RS2_USER_QUEUE_SIZE

const int RS2_USER_QUEUE_SIZE = 128