Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
Loading...
Searching...
No Matches
rs.h
Go to the documentation of this file.
1/* License: Apache 2.0. See LICENSE file in root directory.
2 Copyright(c) 2017 Intel Corporation. All Rights Reserved. */
3
8
9#ifndef LIBREALSENSE_RS2_H
10#define LIBREALSENSE_RS2_H
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#include "rsutil.h"
17#include "h/rs_types.h"
18#include "h/rs_context.h"
19#include "h/rs_device.h"
20#include "h/rs_frame.h"
21#include "h/rs_option.h"
22#include "h/rs_processing.h"
24#include "h/rs_sensor.h"
25
26#define RS2_API_MAJOR_VERSION 2
27#define RS2_API_MINOR_VERSION 56
28#define RS2_API_PATCH_VERSION 3
29#define RS2_API_BUILD_VERSION 0
30
31#ifndef STRINGIFY
32#define STRINGIFY(arg) #arg
33#endif
34#ifndef VAR_ARG_STRING
35#define VAR_ARG_STRING(arg) STRINGIFY(arg)
36#endif
37
38/* Versioning rules : For each release at least one of [MJR/MNR/PTCH] triple is promoted */
39/* : Versions that differ by RS2_API_PATCH_VERSION only are interface-compatible, i.e. no user-code changes required */
40/* : Versions that differ by MAJOR/MINOR VERSION component can introduce API changes */
41/* Version in encoded integer format (1,9,x) -> 01090x. note that each component is limited into [0-99] range by design */
42#define RS2_API_VERSION (((RS2_API_MAJOR_VERSION) * 10000) + ((RS2_API_MINOR_VERSION) * 100) + (RS2_API_PATCH_VERSION))
43/* Return version in "X.Y.Z" format */
44#define RS2_API_VERSION_STR (VAR_ARG_STRING(RS2_API_MAJOR_VERSION.RS2_API_MINOR_VERSION.RS2_API_PATCH_VERSION))
45#define RS2_API_FULL_VERSION_STR (VAR_ARG_STRING(RS2_API_MAJOR_VERSION.RS2_API_MINOR_VERSION.RS2_API_PATCH_VERSION.RS2_API_BUILD_VERSION))
46
59#define RS2_CONFIG_FILENAME "realsense-config.json"
60
68
74
81const unsigned char* rs2_get_raw_data(const rs2_raw_data_buffer* buffer, rs2_error** error);
82
89
90void rs2_log_to_console(rs2_log_severity min_severity, rs2_error ** error);
91
92void rs2_log_to_file(rs2_log_severity min_severity, const char * file_path, rs2_error ** error);
93
94void rs2_log_to_callback_cpp( rs2_log_severity min_severity, rs2_log_callback * callback, rs2_error ** error );
95
96void rs2_log_to_callback( rs2_log_severity min_severity, rs2_log_callback_ptr callback, void * arg, rs2_error** error );
97
99
108void rs2_enable_rolling_log_file( unsigned max_size, rs2_error ** error );
109
110
112const char * rs2_get_log_message_filename( rs2_log_message const * msg, rs2_error** error );
113const char * rs2_get_raw_log_message( rs2_log_message const * msg, rs2_error** error );
114const char * rs2_get_full_log_message( rs2_log_message const * msg, rs2_error** error );
115
122void rs2_log(rs2_log_severity severity, const char * message, rs2_error ** error);
123
130float rs2_depth_frame_get_distance(const rs2_frame* frame_ref, int x, int y, rs2_error** error);
131
138
139void rs2_hw_monitor_get_opcode_string(int opcode, char* buffer, size_t buffer_size,rs2_device* device, rs2_error** error);
140
141#ifdef __cplusplus
142}
143#endif
144#endif
const unsigned char * rs2_get_raw_data(const rs2_raw_data_buffer *buffer, rs2_error **error)
void rs2_log_to_console(rs2_log_severity min_severity, rs2_error **error)
unsigned rs2_get_log_message_line_number(rs2_log_message const *msg, rs2_error **error)
void rs2_log_to_file(rs2_log_severity min_severity, const char *file_path, rs2_error **error)
const char * rs2_get_log_message_filename(rs2_log_message const *msg, rs2_error **error)
void rs2_enable_rolling_log_file(unsigned max_size, rs2_error **error)
const char * rs2_get_full_log_message(rs2_log_message const *msg, rs2_error **error)
void rs2_log_to_callback_cpp(rs2_log_severity min_severity, rs2_log_callback *callback, rs2_error **error)
void rs2_log_to_callback(rs2_log_severity min_severity, rs2_log_callback_ptr callback, void *arg, rs2_error **error)
float rs2_depth_frame_get_distance(const rs2_frame *frame_ref, int x, int y, rs2_error **error)
rs2_time_t rs2_get_time(rs2_error **error)
int rs2_get_raw_data_size(const rs2_raw_data_buffer *buffer, rs2_error **error)
int rs2_get_api_version(rs2_error **error)
void rs2_reset_logger(rs2_error **error)
void rs2_delete_raw_data(const rs2_raw_data_buffer *buffer)
void rs2_log(rs2_log_severity severity, const char *message, rs2_error **error)
void rs2_hw_monitor_get_opcode_string(int opcode, char *buffer, size_t buffer_size, rs2_device *device, rs2_error **error)
const char * rs2_get_raw_log_message(rs2_log_message const *msg, rs2_error **error)
Exposes RealSense context functionality for C compilers.
Exposes RealSense device functionality for C compilers.
Exposes RealSense frame functionality for C compilers.
Exposes sensor options functionality for C compilers.
Exposes RealSense processing-block functionality for C compilers.
Exposes record and playback functionality for C compilers.
Exposes RealSense sensor functionality for C compilers.
Exposes RealSense structs.
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
struct rs2_device rs2_device
Definition rs_types.h:229
double rs2_time_t
Definition rs_types.h:274
struct rs2_error rs2_error
Definition rs_types.h:230
struct rs2_raw_data_buffer rs2_raw_data_buffer
Definition rs_types.h:232
struct rs2_frame rs2_frame
Definition rs_types.h:233
void(* rs2_log_callback_ptr)(rs2_log_severity, rs2_log_message const *, void *arg)
Definition rs_types.h:265
Definition rs_types.hpp:61