rs_internal.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 
10 #ifndef LIBREALSENSE_RS2_INTERNAL_H
11 #define LIBREALSENSE_RS2_INTERNAL_H
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 #include "rs_types.h"
17 #include "rs_context.h"
18 #include "rs_sensor.h"
19 #include "rs_frame.h"
20 #include "rs_option.h"
21 
25  const int signed_fw_size = 0x18031C;
26  const int unsigned_fw_size = 0x200000;
27 
32 typedef enum rs2_recording_mode
33 {
34  RS2_RECORDING_MODE_BLANK_FRAMES, /* frame metadata will be recorded, but pixel data will be replaced with zeros to save space */
35  RS2_RECORDING_MODE_COMPRESSED, /* frames will be encoded using a proprietary lossy encoding, aiming at x5 compression at some CPU expense */
36  RS2_RECORDING_MODE_BEST_QUALITY, /* frames will not be compressed, but rather stored as-is. This gives best quality and low CPU overhead, but you might run out of memory */
39 
41 typedef struct rs2_video_stream
42 {
44  int index;
45  int uid;
46  int width;
47  int height;
48  int fps;
49  int bpp;
53 
55 typedef struct rs2_motion_stream
56 {
58  int index;
59  int uid;
60  int fps;
64 
66 typedef struct rs2_pose_stream
67 {
69  int index;
70  int uid;
71  int fps;
74 
77 {
78  void* pixels;
79  void(*deleter)(void*);
80  int stride;
81  int bpp;
87 
90 {
91  void* data;
92  void(*deleter)(void*);
98 
101 {
103  {
104  float translation[3];
105  float velocity[3];
106  float acceleration[3];
107  float rotation[4];
108  float angular_velocity[3];
109  float angular_acceleration[3];
112  };
113  void* data;
114  void(*deleter)(void*);
120 
123 {
125  int type;
127  const char* description;
128  const char* serialized_data;
130 
132 
141 rs2_context* rs2_create_recording_context(int api_version, const char* filename, const char* section, rs2_recording_mode mode, rs2_error** error);
142 
152 rs2_context* rs2_create_mock_context(int api_version, const char* filename, const char* section, rs2_error** error);
153 
164 rs2_context* rs2_create_mock_context_versioned(int api_version, const char* filename, const char* section, const char* min_api_version, rs2_error** error);
165 
173 
182 
190 
198 
206 
207 
215 
224 
232 
240 
248 
257 
266 
274 
283 
291 
300 
308 
317 
326 
335 
347 void rs2_software_sensor_add_option(rs2_sensor* sensor, rs2_option option, float min, float max, float step, float def, int is_writable, rs2_error** error);
348 
356 
357 
365 
374 
383 
389 
397 
405 
406 
414 
422 
430 int rs2_init_fw_log_parser(rs2_device* dev, const char* xml_content, rs2_error** error);
431 
432 
440 
446 
447 
457 
472 
480 
488 
496 
504 
512 
520 
528 
533 void rs2_delete_terminal_parser(rs2_terminal_parser* terminal_parser);
534 
544  const char* command, unsigned int size_of_command, rs2_error** error);
545 
557  const char* command, unsigned int size_of_command,
558  const void* response, unsigned int size_of_response, rs2_error** error);
559 
560 
561 #ifdef __cplusplus
562 }
563 #endif
564 #endif
void rs2_software_sensor_set_metadata(rs2_sensor *sensor, rs2_frame_metadata_value value, rs2_metadata_type type, rs2_error **error)
Definition: rs.cpp:2506
rs2_format fmt
Definition: rs_internal.h:50
void rs2_software_device_set_destruction_callback_cpp(const rs2_device *dev, rs2_software_device_destruction_callback *callback, rs2_error **error)
Definition: rs.cpp:814
rs2_camera_info
Read-only strings that can be queried from the device. Not all information attributes are available o...
Definition: rs_sensor.h:22
struct rs2_software_video_frame rs2_software_video_frame
All the parameters required to define a video frame.
const int unsigned_fw_size
Definition: rs_internal.h:26
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
struct rs2_video_stream rs2_video_stream
All the parameters required to define a video stream.
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls...
Definition: rs_option.h:22
rs2_stream type
Definition: rs_internal.h:57
rs2_stream_profile * rs2_software_sensor_add_pose_stream(rs2_sensor *sensor, rs2_pose_stream pose_stream, rs2_error **error)
Definition: rs.cpp:2546
rs2_stream type
Definition: rs_internal.h:68
const int signed_fw_size
Definition: rs_internal.h:25
rs2_recording_mode
Definition: rs_internal.h:32
rs2_stream_profile * rs2_software_sensor_add_pose_stream_ex(rs2_sensor *sensor, rs2_pose_stream pose_stream, int is_default, rs2_error **error)
Definition: rs.cpp:2554
void rs2_software_sensor_add_option(rs2_sensor *sensor, rs2_option option, float min, float max, float step, float def, int is_writable, rs2_error **error)
Definition: rs.cpp:2578
struct rs2_software_motion_frame rs2_software_motion_frame
All the parameters required to define a motion frame.
const rs2_stream_profile * profile
Definition: rs_internal.h:96
GLfloat value
const char * rs2_get_fw_log_parsed_thread_name(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message thread name.
Definition: rs.cpp:3325
All the parameters required to define a video stream.
Definition: rs_internal.h:41
All the parameters required to define a pose frame.
Definition: rs_internal.h:100
int rs2_fw_log_message_size(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message size.
Definition: rs.cpp:3240
unsigned int rs2_get_fw_log_parsed_sequence_id(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message sequence id - cyclic number of FW log with [0...
Definition: rs.cpp:3353
rs2_stream type
Definition: rs_internal.h:43
unsigned int rs2_fw_log_message_timestamp(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message timestamp.
Definition: rs.cpp:3253
rs2_timestamp_domain domain
Definition: rs_internal.h:94
const char * serialized_data
Definition: rs_internal.h:128
rs2_timestamp_domain domain
Definition: rs_internal.h:116
void rs2_delete_fw_log_parsed_message(rs2_firmware_log_parsed_message *fw_log_parsed_msg)
Deletes RealSense firmware log parsed message.
Definition: rs.cpp:3304
GLuint GLfloat * val
rs2_context * rs2_create_recording_context(int api_version, const char *filename, const char *section, rs2_recording_mode mode, rs2_error **error)
Definition: rs.cpp:1194
def info(name, value, persistent=False)
Definition: test.py:301
unsigned int rs2_get_fw_log_parsed_line(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message relevant line (in the file that is returned by rs2_get_fw_...
Definition: rs.cpp:3339
GLenum mode
void rs2_software_sensor_detach(rs2_sensor *sensor, rs2_error **error)
Definition: rs.cpp:2589
rs2_stream_profile * rs2_software_sensor_add_motion_stream(rs2_sensor *sensor, rs2_motion_stream motion_stream, rs2_error **error)
Definition: rs.cpp:2530
const rs2_stream_profile * profile
Definition: rs_internal.h:85
rs2_stream_profile * rs2_software_sensor_add_video_stream_ex(rs2_sensor *sensor, rs2_video_stream video_stream, int is_default, rs2_error **error)
Definition: rs.cpp:2522
int rs2_get_flash_log(rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_error **error)
Gets RealSense flash log - this is a fw log that has been written in the device during the previous s...
Definition: rs.cpp:3211
Exposes RealSense frame functionality for C compilers.
Definition: getopt.h:41
rs2_log_severity rs2_fw_log_message_severity(const rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message severity.
Definition: rs.cpp:3247
Exposes RealSense structs.
All the parameters required to define a pose stream.
Definition: rs_internal.h:66
rs2_matchers
Specifies types of different matchers.
Definition: rs_types.h:230
rs2_raw_data_buffer * rs2_terminal_parse_response(rs2_terminal_parser *terminal_parser, const char *command, unsigned int size_of_command, const void *response, unsigned int size_of_response, rs2_error **error)
Parses terminal response via RealSense terminal parser.
Definition: rs.cpp:3389
rs2_log_severity severity
Definition: rs_internal.h:126
void rs2_software_sensor_on_pose_frame(rs2_sensor *sensor, rs2_software_pose_frame frame, rs2_error **error)
Definition: rs.cpp:2490
rs2_device * rs2_create_software_device(rs2_error **error)
Definition: rs.cpp:2428
rs2_notification_category category
Definition: rs_internal.h:124
void rs2_software_sensor_add_read_only_option(rs2_sensor *sensor, rs2_option option, float val, rs2_error **error)
Definition: rs.cpp:2562
Definition: api.h:28
def callback(frame)
Definition: t265_stereo.py:91
const char * rs2_get_fw_log_parsed_message(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message.
Definition: rs.cpp:3311
All the parameters required to define a motion stream.
Definition: rs_internal.h:55
Exposes RealSense sensor functionality for C compilers.
rs2_format
A stream's format identifies how binary data is encoded within a frame.
Definition: rs_sensor.h:59
unsigned int rs2_get_fw_log_parsed_timestamp(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message timestamp.
Definition: rs.cpp:3346
rs2_stream_profile * rs2_software_sensor_add_motion_stream_ex(rs2_sensor *sensor, rs2_motion_stream motion_stream, int is_default, rs2_error **error)
Definition: rs.cpp:2538
rs2_format fmt
Definition: rs_internal.h:72
rs2_format fmt
Definition: rs_internal.h:61
Exposes sensor options functionality for C compilers.
rs2_raw_data_buffer * rs2_terminal_parse_command(rs2_terminal_parser *terminal_parser, const char *command, unsigned int size_of_command, rs2_error **error)
Parses terminal command via RealSense terminal parser.
Definition: rs.cpp:3374
const rs2_stream_profile * profile
Definition: rs_internal.h:118
rs2_context * rs2_create_mock_context(int api_version, const char *filename, const char *section, rs2_error **error)
Definition: rs.cpp:1214
rs2_stream
Streams are different types of data provided by RealSense devices.
Definition: rs_sensor.h:42
rs2_sensor * rs2_software_device_add_sensor(rs2_device *dev, const char *sensor_name, rs2_error **error)
Definition: rs.cpp:2463
void rs2_software_sensor_update_read_only_option(rs2_sensor *sensor, rs2_option option, float val, rs2_error **error)
Definition: rs.cpp:2570
rs2_stream_profile * rs2_software_sensor_add_video_stream(rs2_sensor *sensor, rs2_video_stream video_stream, rs2_error **error)
Definition: rs.cpp:2514
void rs2_software_sensor_on_notification(rs2_sensor *sensor, rs2_software_notification notif, rs2_error **error)
Definition: rs.cpp:2498
struct rs2_software_pose_frame rs2_software_pose_frame
All the parameters required to define a pose frame.
void rs2_software_device_create_matcher(rs2_device *dev, rs2_matchers matcher, rs2_error **error)
Definition: rs.cpp:2435
struct rs2_motion_stream rs2_motion_stream
All the parameters required to define a motion stream.
void(* rs2_software_device_destruction_callback_ptr)(void *)
Definition: rs_types.h:294
void rs2_delete_terminal_parser(rs2_terminal_parser *terminal_parser)
Deletes RealSense terminal parser.
Definition: rs.cpp:3367
struct rs2_pose_stream rs2_pose_stream
All the parameters required to define a pose stream.
int rs2_init_fw_log_parser(rs2_device *dev, const char *xml_content, rs2_error **error)
Initializes RealSense firmware logs parser in device.
Definition: rs.cpp:3260
All the parameters required to define a sensor notification.
Definition: rs_internal.h:122
rs2_notification_category
Category of the librealsense notification.
Definition: rs_types.h:17
long long rs2_metadata_type
Definition: rs_types.h:301
GLenum type
rs2_context * rs2_create_mock_context_versioned(int api_version, const char *filename, const char *section, const char *min_api_version, rs2_error **error)
Definition: rs.cpp:1204
int min(int a, int b)
Definition: lz4s.c:73
void rs2_delete_fw_log_message(rs2_firmware_log_message *msg)
Definition: rs.cpp:3226
All the parameters required to define a motion frame.
Definition: rs_internal.h:89
rs2_timestamp_domain domain
Definition: rs_internal.h:83
void rs2_software_sensor_on_motion_frame(rs2_sensor *sensor, rs2_software_motion_frame frame, rs2_error **error)
Definition: rs.cpp:2482
Video stream intrinsics.
Definition: rs_types.h:58
rs2_motion_device_intrinsic intrinsics
Definition: rs_internal.h:62
struct rs2_software_notification rs2_software_notification
All the parameters required to define a sensor notification.
Motion device intrinsics: scale, bias, and variances.
Definition: rs_types.h:103
void rs2_software_device_set_destruction_callback(const rs2_device *dev, rs2_software_device_destruction_callback_ptr on_notification, void *user, rs2_error **error)
Definition: rs.cpp:775
rs2_log_severity rs2_get_fw_log_parsed_severity(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message severity.
Definition: rs.cpp:3332
rs2_firmware_log_message * rs2_create_fw_log_message(rs2_device *dev, rs2_error **error)
Creates RealSense firmware log message.
Definition: rs.cpp:3186
void rs2_software_sensor_on_video_frame(rs2_sensor *sensor, rs2_software_video_frame frame, rs2_error **error)
Definition: rs.cpp:2474
rs2_intrinsics intrinsics
Definition: rs_internal.h:51
All the parameters required to define a video frame.
Definition: rs_internal.h:76
const char * rs2_get_fw_log_parsed_file_name(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message file name.
Definition: rs.cpp:3318
Exposes RealSense context functionality for C compilers.
int rs2_parse_firmware_log(rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_firmware_log_parsed_message *parsed_msg, rs2_error **error)
Gets RealSense firmware log parser.
Definition: rs.cpp:3280
const unsigned char * rs2_fw_log_message_data(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message data.
Definition: rs.cpp:3233
rs2_firmware_log_parsed_message * rs2_create_fw_log_parsed_message(rs2_device *dev, rs2_error **error)
Creates RealSense firmware log parsed message.
Definition: rs.cpp:3270
double rs2_time_t
Definition: rs_types.h:300
void rs2_software_device_register_info(rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error)
Definition: rs.cpp:2443
rs2_log_severity
Severity of the librealsense logger.
Definition: rs_types.h:153
rs2_terminal_parser * rs2_create_terminal_parser(const char *xml_content, rs2_error **error)
Creates RealSense terminal parser.
Definition: rs.cpp:3360
unsigned int rs2_get_number_of_fw_logs(rs2_device *dev, rs2_error **error)
Returns number of fw logs already polled from device but not by user yet.
Definition: rs.cpp:3295
int rs2_get_fw_log(rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_error **error)
Gets RealSense firmware log.
Definition: rs.cpp:3195
rs2_frame_metadata_value
Per-Frame-Metadata is the set of read-only properties that might be exposed for each individual frame...
Definition: rs_frame.h:29
void rs2_software_device_update_info(rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error)
Definition: rs.cpp:2451
rs2_timestamp_domain
Specifies the clock in relation to which the frame timestamp was measured.
Definition: rs_frame.h:19


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:40