Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
Loading...
Searching...
No Matches
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
8
9
10#ifndef LIBREALSENSE_RS2_INTERNAL_H
11#define LIBREALSENSE_RS2_INTERNAL_H
12
13#ifdef __cplusplus
14extern "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 unsigned int signed_fw_size = 0x18031C;
26 const unsigned int unsigned_fw_size = 0x200000;
27
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
53
64
74
88
99
121
131
133
143rs2_context* rs2_create_recording_context(int api_version, const char* filename, const char* section, rs2_recording_mode mode, rs2_error** error);
144
155rs2_context* rs2_create_mock_context(int api_version, const char* filename, const char* section, rs2_error** error);
156
168rs2_context* rs2_create_mock_context_versioned(int api_version, const char* filename, const char* section, const char* min_api_version, rs2_error** error);
169
177
185rs2_sensor* rs2_software_device_add_sensor(rs2_device* dev, const char* sensor_name, rs2_error** error);
186
194
202
210
211
219
228
236
244
252
261
269void rs2_software_device_update_info(rs2_device* dev, rs2_camera_info info, const char * val, rs2_error** error);
270
278
287
295
304
312
321
330
339
351void 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);
352
360
361
368
375
383
392
401
407
415
423
424
432
440
448int rs2_init_fw_log_parser(rs2_device* dev, const char* xml_content, rs2_error** error);
449
450
458
464
465
475
490
498
506
514 rs2_error ** error );
515
516
524
532
540
548
556
562
572 const char* command, unsigned int size_of_command, rs2_error** error);
573
585 const char* command, unsigned int size_of_command,
586 const void* response, unsigned int size_of_response, rs2_error** error);
587
588
589#ifdef __cplusplus
590}
591#endif
592#endif
Exposes RealSense context functionality for C compilers.
Exposes RealSense frame functionality for C compilers.
rs2_timestamp_domain
Specifies the clock in relation to which the frame timestamp was measured.
Definition rs_frame.h:20
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:30
rs2_firmware_log_message * rs2_create_fw_log_message(rs2_device *dev, rs2_error **error)
Creates RealSense firmware log message.
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.
void rs2_software_device_set_destruction_callback(const rs2_device *dev, rs2_software_device_destruction_callback_ptr on_notification, void *user, rs2_error **error)
void rs2_software_device_update_info(rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error)
rs2_context * rs2_create_mock_context_versioned(int api_version, const char *filename, const char *section, const char *min_api_version, rs2_error **error)
rs2_stream_profile * rs2_software_sensor_add_pose_stream_ex(rs2_sensor *sensor, rs2_pose_stream pose_stream, int is_default, rs2_error **error)
rs2_stream_profile * rs2_software_sensor_add_video_stream(rs2_sensor *sensor, rs2_video_stream video_stream, rs2_error **error)
unsigned int rs2_fw_log_message_timestamp(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message timestamp.
void rs2_delete_fw_log_parsed_message(rs2_firmware_log_parsed_message *fw_log_parsed_msg)
Deletes RealSense firmware log parsed message.
void rs2_software_sensor_set_metadata(rs2_sensor *sensor, rs2_frame_metadata_value value, rs2_metadata_type type, rs2_error **error)
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)
rs2_firmware_log_parsed_message * rs2_create_fw_log_parsed_message(rs2_device *dev, rs2_error **error)
Creates RealSense firmware log parsed message.
const unsigned int signed_fw_size
Definition rs_internal.h:25
void rs2_software_sensor_on_pose_frame(rs2_sensor *sensor, rs2_software_pose_frame frame, rs2_error **error)
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.
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....
void rs2_software_sensor_on_notification(rs2_sensor *sensor, rs2_software_notification notif, rs2_error **error)
const char * rs2_get_fw_log_parsed_module_name(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message module name.
rs2_recording_mode
Definition rs_internal.h:33
@ RS2_RECORDING_MODE_BEST_QUALITY
Definition rs_internal.h:36
@ RS2_RECORDING_MODE_BLANK_FRAMES
Definition rs_internal.h:34
@ RS2_RECORDING_MODE_COUNT
Definition rs_internal.h:37
@ RS2_RECORDING_MODE_COMPRESSED
Definition rs_internal.h:35
void rs2_software_device_create_matcher(rs2_device *dev, rs2_matchers matcher, rs2_error **error)
rs2_stream_profile * rs2_software_sensor_add_motion_stream(rs2_sensor *sensor, rs2_motion_stream motion_stream, rs2_error **error)
void rs2_start_collecting_fw_logs(rs2_device *dev, rs2_error **error)
Starts collecting FW log messages in the device.
void rs2_software_device_set_destruction_callback_cpp(const rs2_device *dev, rs2_software_device_destruction_callback *callback, rs2_error **error)
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.
rs2_device * rs2_create_software_device(rs2_error **error)
rs2_stream_profile * rs2_software_sensor_add_pose_stream(rs2_sensor *sensor, rs2_pose_stream pose_stream, rs2_error **error)
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.
rs2_context * rs2_create_recording_context(int api_version, const char *filename, const char *section, rs2_recording_mode mode, rs2_error **error)
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.
void rs2_software_sensor_detach(rs2_sensor *sensor, rs2_error **error)
void rs2_software_sensor_update_read_only_option(rs2_sensor *sensor, rs2_option option, float val, rs2_error **error)
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_...
int rs2_get_fw_log(rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_error **error)
Gets RealSense firmware log.
rs2_stream_profile * rs2_software_sensor_add_motion_stream_ex(rs2_sensor *sensor, rs2_motion_stream motion_stream, int is_default, rs2_error **error)
void rs2_software_sensor_on_video_frame(rs2_sensor *sensor, rs2_software_video_frame frame, rs2_error **error)
int rs2_init_fw_log_parser(rs2_device *dev, const char *xml_content, rs2_error **error)
Initializes RealSense firmware logs parser in device.
int rs2_fw_log_message_size(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message size.
void rs2_software_sensor_add_read_only_option(rs2_sensor *sensor, rs2_option option, float val, rs2_error **error)
rs2_sensor * rs2_software_device_add_sensor(rs2_device *dev, const char *sensor_name, rs2_error **error)
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...
void rs2_delete_fw_log_message(rs2_firmware_log_message *msg)
const unsigned int unsigned_fw_size
Definition rs_internal.h:26
rs2_stream_profile * rs2_software_sensor_add_video_stream_ex(rs2_sensor *sensor, rs2_video_stream video_stream, int is_default, rs2_error **error)
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 source (SoC) or thread name.
rs2_context * rs2_create_mock_context(int api_version, const char *filename, const char *section, rs2_error **error)
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.
void rs2_stop_collecting_fw_logs(rs2_device *dev, rs2_error **error)
Stops collecting FW log messages in the device.
rs2_terminal_parser * rs2_create_terminal_parser(const char *xml_content, rs2_error **error)
Creates RealSense terminal parser.
void rs2_delete_terminal_parser(rs2_terminal_parser *terminal_parser)
Deletes RealSense terminal parser.
rs2_log_severity rs2_fw_log_message_severity(const rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message severity.
const unsigned char * rs2_fw_log_message_data(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message data.
void rs2_software_device_register_info(rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error)
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.
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.
void rs2_software_sensor_on_motion_frame(rs2_sensor *sensor, rs2_software_motion_frame frame, rs2_error **error)
Exposes sensor options functionality for C compilers.
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls,...
Definition rs_option.h:27
Exposes RealSense sensor functionality for C compilers.
rs2_stream
Streams are different types of data provided by RealSense devices.
Definition rs_sensor.h:44
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
rs2_format
A stream's format identifies how binary data is encoded within a frame.
Definition rs_sensor.h:62
Exposes RealSense structs.
struct rs2_sensor rs2_sensor
Definition rs_types.h:254
rs2_log_severity
Severity of the librealsense logger.
Definition rs_types.h:123
struct rs2_stream_profile rs2_stream_profile
Definition rs_types.h:241
rs2_notification_category
Category of the librealsense notification.
Definition rs_types.h:19
void(* rs2_software_device_destruction_callback_ptr)(void *)
Definition rs_types.h:267
struct rs2_device rs2_device
Definition rs_types.h:229
struct rs2_firmware_log_message rs2_firmware_log_message
Definition rs_types.h:261
double rs2_time_t
Definition rs_types.h:274
struct rs2_firmware_log_parsed_message rs2_firmware_log_parsed_message
Definition rs_types.h:262
struct rs2_error rs2_error
Definition rs_types.h:230
struct rs2_raw_data_buffer rs2_raw_data_buffer
Definition rs_types.h:232
rs2_matchers
Specifies types of different matchers.
Definition rs_types.h:202
struct rs2_terminal_parser rs2_terminal_parser
Definition rs_types.h:264
long long rs2_metadata_type
Definition rs_types.h:275
struct rs2_context rs2_context
Definition rs_types.h:251
Video stream intrinsics.
Definition rs_types.h:61
Motion device intrinsics: scale, bias, and variances.
Definition rs_types.h:74
All the parameters required to define a motion stream.
Definition rs_internal.h:56
int index
Definition rs_internal.h:58
rs2_motion_device_intrinsic intrinsics
Definition rs_internal.h:62
rs2_format fmt
Definition rs_internal.h:61
int fps
Definition rs_internal.h:60
int uid
Definition rs_internal.h:59
rs2_stream type
Definition rs_internal.h:57
All the parameters required to define a pose stream.
Definition rs_internal.h:67
int index
Definition rs_internal.h:69
rs2_stream type
Definition rs_internal.h:68
rs2_format fmt
Definition rs_internal.h:72
int fps
Definition rs_internal.h:71
int uid
Definition rs_internal.h:70
All the parameters required to define a motion frame.
Definition rs_internal.h:91
rs2_timestamp_domain domain
Definition rs_internal.h:95
void(* deleter)(void *)
Definition rs_internal.h:93
rs2_time_t timestamp
Definition rs_internal.h:94
void * data
Definition rs_internal.h:92
int frame_number
Definition rs_internal.h:96
const rs2_stream_profile * profile
Definition rs_internal.h:97
All the parameters required to define a sensor notification.
Definition rs_internal.h:124
rs2_notification_category category
Definition rs_internal.h:125
const char * serialized_data
Definition rs_internal.h:129
rs2_log_severity severity
Definition rs_internal.h:127
int type
Definition rs_internal.h:126
const char * description
Definition rs_internal.h:128
Definition rs_internal.h:104
float rotation[4]
Definition rs_internal.h:108
float angular_velocity[3]
Definition rs_internal.h:109
float translation[3]
Definition rs_internal.h:105
float angular_acceleration[3]
Definition rs_internal.h:110
float acceleration[3]
Definition rs_internal.h:107
int tracker_confidence
Definition rs_internal.h:111
float velocity[3]
Definition rs_internal.h:106
int mapper_confidence
Definition rs_internal.h:112
All the parameters required to define a pose frame.
Definition rs_internal.h:102
int frame_number
Definition rs_internal.h:118
void * data
Definition rs_internal.h:114
rs2_time_t timestamp
Definition rs_internal.h:116
rs2_timestamp_domain domain
Definition rs_internal.h:117
void(* deleter)(void *)
Definition rs_internal.h:115
const rs2_stream_profile * profile
Definition rs_internal.h:119
All the parameters required to define a video frame.
Definition rs_internal.h:77
int stride
Definition rs_internal.h:80
rs2_time_t timestamp
Definition rs_internal.h:82
float depth_units
Definition rs_internal.h:86
int bpp
Definition rs_internal.h:81
const rs2_stream_profile * profile
Definition rs_internal.h:85
void(* deleter)(void *)
Definition rs_internal.h:79
void * pixels
Definition rs_internal.h:78
rs2_timestamp_domain domain
Definition rs_internal.h:83
int frame_number
Definition rs_internal.h:84
All the parameters required to define a video stream.
Definition rs_internal.h:42
int width
Definition rs_internal.h:46
rs2_stream type
Definition rs_internal.h:43
rs2_intrinsics intrinsics
Definition rs_internal.h:51
int uid
Definition rs_internal.h:45
int height
Definition rs_internal.h:47
int fps
Definition rs_internal.h:48
int bpp
Definition rs_internal.h:49
int index
Definition rs_internal.h:44
rs2_format fmt
Definition rs_internal.h:50