Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
include
librealsense2
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
9
#ifndef LIBREALSENSE_RS2_H
10
#define LIBREALSENSE_RS2_H
11
12
#ifdef __cplusplus
13
extern
"C"
{
14
#endif
15
16
#include "
h/rs_types.h
"
17
#include "
h/rs_context.h
"
18
#include "
h/rs_device.h
"
19
#include "
h/rs_frame.h
"
20
#include "
h/rs_option.h
"
21
#include "
h/rs_processing.h
"
22
#include "
h/rs_record_playback.h
"
23
#include "
h/rs_sensor.h
"
24
25
#define RS2_API_MAJOR_VERSION 2
26
#define RS2_API_MINOR_VERSION 11
27
#define RS2_API_PATCH_VERSION 1
28
#define RS2_API_BUILD_VERSION 0
29
30
#define STRINGIFY(arg) #arg
31
#define VAR_ARG_STRING(arg) STRINGIFY(arg)
32
33
/* Versioning rules : For each release at least one of [MJR/MNR/PTCH] triple is promoted */
34
/* : Versions that differ by RS2_API_PATCH_VERSION only are interface-compatible, i.e. no user-code changes required */
35
/* : Versions that differ by MAJOR/MINOR VERSION component can introduce API changes */
36
/* Version in encoded integer format (1,9,x) -> 01090x. note that each component is limited into [0-99] range by design */
37
#define RS2_API_VERSION (((RS2_API_MAJOR_VERSION) * 10000) + ((RS2_API_MINOR_VERSION) * 100) + (RS2_API_PATCH_VERSION))
38
/* Return version in "X.Y.Z" format */
39
#define RS2_API_VERSION_STR (VAR_ARG_STRING(RS2_API_MAJOR_VERSION.RS2_API_MINOR_VERSION.RS2_API_PATCH_VERSION))
40
47
int
rs2_get_raw_data_size
(
const
rs2_raw_data_buffer
* buffer,
rs2_error
** error);
48
53
void
rs2_delete_raw_data
(
const
rs2_raw_data_buffer
* buffer);
54
61
const
unsigned
char
*
rs2_get_raw_data
(
const
rs2_raw_data_buffer
* buffer,
rs2_error
** error);
62
68
int
rs2_get_api_version
(
rs2_error
** error);
69
70
void
rs2_log_to_console
(
rs2_log_severity
min_severity,
rs2_error
** error);
71
72
void
rs2_log_to_file
(
rs2_log_severity
min_severity,
const
char
* file_path,
rs2_error
** error);
73
80
void
rs2_log
(
rs2_log_severity
severity,
const
char
* message,
rs2_error
** error);
81
89
float
rs2_depth_frame_get_distance
(
const
rs2_frame
* frame_ref,
int
x,
int
y,
rs2_error
** error);
90
97
rs2_time_t
rs2_get_time
(
rs2_error
** error);
98
99
#ifdef __cplusplus
100
}
101
#endif
102
#endif
rs2_get_api_version
int rs2_get_api_version(rs2_error **error)
rs2_log_to_file
void rs2_log_to_file(rs2_log_severity min_severity, const char *file_path, rs2_error **error)
rs2_get_raw_data
const unsigned char * rs2_get_raw_data(const rs2_raw_data_buffer *buffer, rs2_error **error)
rs2_error
Definition:
api.h:18
rs2_log
void rs2_log(rs2_log_severity severity, const char *message, rs2_error **error)
rs2_delete_raw_data
void rs2_delete_raw_data(const rs2_raw_data_buffer *buffer)
rs2_get_raw_data_size
int rs2_get_raw_data_size(const rs2_raw_data_buffer *buffer, rs2_error **error)
rs_frame.h
rs2_get_time
rs2_time_t rs2_get_time(rs2_error **error)
rs_types.h
rs_record_playback.h
rs_processing.h
rs2_depth_frame_get_distance
float rs2_depth_frame_get_distance(const rs2_frame *frame_ref, int x, int y, rs2_error **error)
rs_device.h
Exposes RealSense device functionality for C compilers.
rs_sensor.h
rs_option.h
rs2_log_to_console
void rs2_log_to_console(rs2_log_severity min_severity, rs2_error **error)
rs_context.h
Exposes RealSense context functionality for C compilers.
rs2_time_t
double rs2_time_t
Definition:
rs_types.h:180
rs2_log_severity
rs2_log_severity
Severity of the librealsense logger.
Definition:
rs_types.h:82
rs2_raw_data_buffer
Definition:
api.h:13
rs2_frame
struct rs2_frame rs2_frame
Definition:
rs_types.h:151
Generated by
1.8.12