Classes | Typedefs | Enumerations | Functions | Variables
rs_internal.h File Reference

Exposes RealSense internal functionality for C compilers. More...

#include "rs_types.h"
#include "rs_context.h"
#include "rs_sensor.h"
#include "rs_frame.h"
#include "rs_option.h"
Include dependency graph for rs_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rs2_software_pose_frame::pose_frame_info
 
struct  rs2_motion_stream
 All the parameters required to define a motion stream. More...
 
struct  rs2_pose_stream
 All the parameters required to define a pose stream. More...
 
struct  rs2_software_motion_frame
 All the parameters required to define a motion frame. More...
 
struct  rs2_software_notification
 All the parameters required to define a sensor notification. More...
 
struct  rs2_software_pose_frame
 All the parameters required to define a pose frame. More...
 
struct  rs2_software_video_frame
 All the parameters required to define a video frame. More...
 
struct  rs2_video_stream
 All the parameters required to define a video stream. More...
 

Typedefs

typedef struct rs2_motion_stream rs2_motion_stream
 All the parameters required to define a motion stream. More...
 
typedef struct rs2_pose_stream rs2_pose_stream
 All the parameters required to define a pose stream. More...
 
typedef enum rs2_recording_mode rs2_recording_mode
 
typedef struct rs2_software_motion_frame rs2_software_motion_frame
 All the parameters required to define a motion frame. More...
 
typedef struct rs2_software_notification rs2_software_notification
 All the parameters required to define a sensor notification. More...
 
typedef struct rs2_software_pose_frame rs2_software_pose_frame
 All the parameters required to define a pose frame. More...
 
typedef struct rs2_software_video_frame rs2_software_video_frame
 All the parameters required to define a video frame. More...
 
typedef struct rs2_video_stream rs2_video_stream
 All the parameters required to define a video stream. More...
 

Enumerations

enum  rs2_recording_mode { RS2_RECORDING_MODE_BLANK_FRAMES, RS2_RECORDING_MODE_COMPRESSED, RS2_RECORDING_MODE_BEST_QUALITY, RS2_RECORDING_MODE_COUNT }
 

Functions

rs2_firmware_log_messagers2_create_fw_log_message (rs2_device *dev, rs2_error **error)
 Creates RealSense firmware log message. More...
 
rs2_firmware_log_parsed_messagers2_create_fw_log_parsed_message (rs2_device *dev, rs2_error **error)
 Creates RealSense firmware log parsed message. More...
 
rs2_contextrs2_create_mock_context (int api_version, const char *filename, const char *section, rs2_error **error)
 
rs2_contextrs2_create_mock_context_versioned (int api_version, const char *filename, const char *section, const char *min_api_version, rs2_error **error)
 
rs2_contextrs2_create_recording_context (int api_version, const char *filename, const char *section, rs2_recording_mode mode, rs2_error **error)
 
rs2_devicers2_create_software_device (rs2_error **error)
 
rs2_terminal_parserrs2_create_terminal_parser (const char *xml_content, rs2_error **error)
 Creates RealSense terminal parser. More...
 
void rs2_delete_fw_log_message (rs2_firmware_log_message *msg)
 
void rs2_delete_fw_log_parsed_message (rs2_firmware_log_parsed_message *fw_log_parsed_msg)
 Deletes RealSense firmware log parsed message. More...
 
void rs2_delete_terminal_parser (rs2_terminal_parser *terminal_parser)
 Deletes RealSense terminal parser. More...
 
const unsigned char * rs2_fw_log_message_data (rs2_firmware_log_message *msg, rs2_error **error)
 Gets RealSense firmware log message data. More...
 
rs2_log_severity rs2_fw_log_message_severity (const rs2_firmware_log_message *msg, rs2_error **error)
 Gets RealSense firmware log message severity. More...
 
int rs2_fw_log_message_size (rs2_firmware_log_message *msg, rs2_error **error)
 Gets RealSense firmware log message size. More...
 
unsigned int rs2_fw_log_message_timestamp (rs2_firmware_log_message *msg, rs2_error **error)
 Gets RealSense firmware log message timestamp. More...
 
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 shutdown of the device. More...
 
int rs2_get_fw_log (rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_error **error)
 Gets RealSense firmware log. More...
 
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. More...
 
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_log_parsed_file_name). More...
 
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. More...
 
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..15] range. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
int rs2_init_fw_log_parser (rs2_device *dev, const char *xml_content, rs2_error **error)
 Initializes RealSense firmware logs parser in device. More...
 
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. More...
 
rs2_sensorrs2_software_device_add_sensor (rs2_device *dev, const char *sensor_name, rs2_error **error)
 
void rs2_software_device_create_matcher (rs2_device *dev, rs2_matchers matcher, rs2_error **error)
 
void rs2_software_device_register_info (rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error)
 
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_set_destruction_callback_cpp (const rs2_device *dev, rs2_software_device_destruction_callback *callback, rs2_error **error)
 
void rs2_software_device_update_info (rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error)
 
rs2_stream_profilers2_software_sensor_add_motion_stream (rs2_sensor *sensor, rs2_motion_stream motion_stream, rs2_error **error)
 
rs2_stream_profilers2_software_sensor_add_motion_stream_ex (rs2_sensor *sensor, rs2_motion_stream motion_stream, int is_default, 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_stream_profilers2_software_sensor_add_pose_stream (rs2_sensor *sensor, rs2_pose_stream pose_stream, rs2_error **error)
 
rs2_stream_profilers2_software_sensor_add_pose_stream_ex (rs2_sensor *sensor, rs2_pose_stream pose_stream, int is_default, rs2_error **error)
 
void rs2_software_sensor_add_read_only_option (rs2_sensor *sensor, rs2_option option, float val, rs2_error **error)
 
rs2_stream_profilers2_software_sensor_add_video_stream (rs2_sensor *sensor, rs2_video_stream video_stream, rs2_error **error)
 
rs2_stream_profilers2_software_sensor_add_video_stream_ex (rs2_sensor *sensor, rs2_video_stream video_stream, int is_default, rs2_error **error)
 
void rs2_software_sensor_detach (rs2_sensor *sensor, rs2_error **error)
 
void rs2_software_sensor_on_motion_frame (rs2_sensor *sensor, rs2_software_motion_frame frame, rs2_error **error)
 
void rs2_software_sensor_on_notification (rs2_sensor *sensor, rs2_software_notification notif, rs2_error **error)
 
void rs2_software_sensor_on_pose_frame (rs2_sensor *sensor, rs2_software_pose_frame frame, rs2_error **error)
 
void rs2_software_sensor_on_video_frame (rs2_sensor *sensor, rs2_software_video_frame frame, rs2_error **error)
 
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_update_read_only_option (rs2_sensor *sensor, rs2_option option, float val, rs2_error **error)
 
rs2_raw_data_bufferrs2_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. More...
 
rs2_raw_data_bufferrs2_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. More...
 

Variables

const int signed_fw_size = 0x18031C
 
const int unsigned_fw_size = 0x200000
 

Detailed Description

Exposes RealSense internal functionality for C compilers.

Definition in file rs_internal.h.

Typedef Documentation

All the parameters required to define a motion stream.

All the parameters required to define a pose stream.

librealsense Recorder is intended for effective unit-testing Currently supports three modes of operation:

All the parameters required to define a motion frame.

All the parameters required to define a sensor notification.

All the parameters required to define a pose frame.

All the parameters required to define a video frame.

All the parameters required to define a video stream.

Enumeration Type Documentation

librealsense Recorder is intended for effective unit-testing Currently supports three modes of operation:

Enumerator
RS2_RECORDING_MODE_BLANK_FRAMES 
RS2_RECORDING_MODE_COMPRESSED 
RS2_RECORDING_MODE_BEST_QUALITY 
RS2_RECORDING_MODE_COUNT 

Definition at line 32 of file rs_internal.h.

Function Documentation

rs2_firmware_log_message* rs2_create_fw_log_message ( rs2_device dev,
rs2_error **  error 
)

Creates RealSense firmware log message.

Parameters
[in]devDevice from which the FW log will be taken using the created message
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
pointer to created empty firmware log message

Definition at line 3186 of file rs.cpp.

rs2_firmware_log_parsed_message* rs2_create_fw_log_parsed_message ( rs2_device dev,
rs2_error **  error 
)

Creates RealSense firmware log parsed message.

Parameters
[in]devDevice from which the FW log will be taken using the created message
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
pointer to created empty firmware log message

Definition at line 3270 of file rs.cpp.

rs2_context* rs2_create_mock_context ( int  api_version,
const char *  filename,
const char *  section,
rs2_error **  error 
)

Create librealsense context that given a file will respond to calls exactly as the recording did if the user calls a method that was either not called during recording or violates causality of the recording error will be thrown

Parameters
[in]api_versionrealsense API version as provided by RS2_API_VERSION macro
[in]filenamestring representing the name of the file to play back from
[in]sectionstring representing the name of the section within existing recording
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
context object, should be released by rs2_delete_context

Definition at line 1214 of file rs.cpp.

rs2_context* rs2_create_mock_context_versioned ( int  api_version,
const char *  filename,
const char *  section,
const char *  min_api_version,
rs2_error **  error 
)

Create librealsense context that given a file will respond to calls exactly as the recording did if the user calls a method that was either not called during recording or violates causality of the recording error will be thrown

Parameters
[in]api_versionrealsense API version as provided by RS2_API_VERSION macro
[in]filenamestring representing the name of the file to play back from
[in]sectionstring representing the name of the section within existing recording
[in]min_api_versionreject any file that was recorded before this version
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
context object, should be released by rs2_delete_context

Definition at line 1204 of file rs.cpp.

rs2_context* rs2_create_recording_context ( int  api_version,
const char *  filename,
const char *  section,
rs2_recording_mode  mode,
rs2_error **  error 
)

Create librealsense context that will try to record all operations over librealsense into a file

Parameters
[in]api_versionrealsense API version as provided by RS2_API_VERSION macro
[in]filenamestring representing the name of the file to record
[in]sectionstring representing the name of the section within existing recording
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
context object, should be released by rs2_delete_context

Definition at line 1194 of file rs.cpp.

rs2_device* rs2_create_software_device ( rs2_error **  error)

Create software device to enable use librealsense logic without getting data from backend but inject the data from outside

Parameters
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
software device object, should be released by rs2_delete_device

Definition at line 2428 of file rs.cpp.

rs2_terminal_parser* rs2_create_terminal_parser ( const char *  xml_content,
rs2_error **  error 
)

Creates RealSense terminal parser.

Parameters
[in]xml_contentcontent of the xml file needed for parsing
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
pointer to created terminal parser object

Definition at line 3360 of file rs.cpp.

void rs2_delete_fw_log_message ( rs2_firmware_log_message msg)

Delete RealSense firmware log message

Parameters
[in]deviceRealsense firmware log message to delete

Definition at line 3226 of file rs.cpp.

void rs2_delete_fw_log_parsed_message ( rs2_firmware_log_parsed_message fw_log_parsed_msg)

Deletes RealSense firmware log parsed message.

Parameters
[in]msgmessage to be deleted

Definition at line 3304 of file rs.cpp.

void rs2_delete_terminal_parser ( rs2_terminal_parser terminal_parser)

Deletes RealSense terminal parser.

Parameters
[in]terminal_parserterminal parser to be deleted

Definition at line 3367 of file rs.cpp.

const unsigned char* rs2_fw_log_message_data ( rs2_firmware_log_message msg,
rs2_error **  error 
)

Gets RealSense firmware log message data.

Parameters
[in]msgfirmware log message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
pointer to start of the firmware log message data

Definition at line 3233 of file rs.cpp.

rs2_log_severity rs2_fw_log_message_severity ( const rs2_firmware_log_message msg,
rs2_error **  error 
)

Gets RealSense firmware log message severity.

Parameters
[in]msgfirmware log message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
severity of the firmware log message data

Definition at line 3247 of file rs.cpp.

int rs2_fw_log_message_size ( rs2_firmware_log_message msg,
rs2_error **  error 
)

Gets RealSense firmware log message size.

Parameters
[in]msgfirmware log message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
size of the firmware log message data

Definition at line 3240 of file rs.cpp.

unsigned int rs2_fw_log_message_timestamp ( rs2_firmware_log_message msg,
rs2_error **  error 
)

Gets RealSense firmware log message timestamp.

Parameters
[in]msgfirmware log message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
timestamp of the firmware log message

Definition at line 3253 of file rs.cpp.

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 shutdown of the device.

Parameters
[in]devDevice from which the FW log should be taken
[in]fw_log_msgFirmware log message object to be filled
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true for success, false for failure - failure happens if no firmware log was sent by the hardware monitor

Definition at line 3211 of file rs.cpp.

int rs2_get_fw_log ( rs2_device dev,
rs2_firmware_log_message fw_log_msg,
rs2_error **  error 
)

Gets RealSense firmware log.

Parameters
[in]devDevice from which the FW log should be taken
[in]fw_log_msgFirmware log message object to be filled
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true for success, false for failure - failure happens if no firmware log was sent by the hardware monitor

Definition at line 3195 of file rs.cpp.

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.

Parameters
[in]fw_log_parsed_msgfirmware log parsed message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
file name of the firmware log parsed message

Definition at line 3318 of file rs.cpp.

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_log_parsed_file_name).

Parameters
[in]fw_log_parsed_msgfirmware log parsed message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
line number of the firmware log parsed message

Definition at line 3339 of file rs.cpp.

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.

Parameters
[in]fw_log_parsed_msgfirmware log parsed message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
message of the firmware log parsed message

Definition at line 3311 of file rs.cpp.

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..15] range.

Parameters
[in]fw_log_parsed_msgfirmware log parsed message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
sequence of the firmware log parsed message

Definition at line 3353 of file rs.cpp.

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.

Parameters
[in]fw_log_parsed_msgfirmware log parsed message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
severity of the firmware log parsed message

Definition at line 3332 of file rs.cpp.

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.

Parameters
[in]fw_log_parsed_msgfirmware log parsed message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
thread name of the firmware log parsed message

Definition at line 3325 of file rs.cpp.

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.

Parameters
[in]fw_log_parsed_msgfirmware log parsed message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
timestamp of the firmware log parsed message

Definition at line 3346 of file rs.cpp.

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.

Parameters
[in]devDevice from which the FW log will be taken
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
number of fw logs already polled from device but not by user yet

Definition at line 3295 of file rs.cpp.

int rs2_init_fw_log_parser ( rs2_device dev,
const char *  xml_content,
rs2_error **  error 
)

Initializes RealSense firmware logs parser in device.

Parameters
[in]devDevice from which the FW log will be taken
[in]xml_contentcontent of the xml file needed for parsing
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true for success, false for failure - failure happens if opening the xml from the xml_path input fails

Definition at line 3260 of file rs.cpp.

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.

Parameters
[in]devDevice from which the FW log will be taken
[in]fw_log_msgfirmware log message to be parsed
[in]parsed_msgfirmware log parsed message - place holder for the resulting parsed message
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true for success, false for failure - failure happens if message could not be parsed

Definition at line 3280 of file rs.cpp.

rs2_sensor* rs2_software_device_add_sensor ( rs2_device dev,
const char *  sensor_name,
rs2_error **  error 
)

Add sensor to the software device

Parameters
[in]devthe software device
[in]sensor_namethe name of the sensor
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
software sensor object, should be released by rs2_delete_sensor

Definition at line 2463 of file rs.cpp.

void rs2_software_device_create_matcher ( rs2_device dev,
rs2_matchers  matcher,
rs2_error **  error 
)

Set the wanted matcher type that will be used by the syncer

Parameters
[in]devthe software device
[in]matchermatcher type
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2435 of file rs.cpp.

void rs2_software_device_register_info ( rs2_device dev,
rs2_camera_info  info,
const char *  val,
rs2_error **  error 
)

Register a camera info value for the software device

Parameters
[in]devthe software device
[in]infoidentifier for the camera info to add.
[in]valstring value for this new camera info.
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2443 of file rs.cpp.

void rs2_software_device_set_destruction_callback ( const rs2_device dev,
rs2_software_device_destruction_callback_ptr  on_notification,
void user,
rs2_error **  error 
)

set callback to be notified when a specific software device is destroyed

Parameters
[in]devsoftware device
[in]on_notificationfunction pointer to register as callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 775 of file rs.cpp.

void rs2_software_device_set_destruction_callback_cpp ( const rs2_device dev,
rs2_software_device_destruction_callback callback,
rs2_error **  error 
)

set callback to be notified when a specific software device is destroyed

Parameters
[in]devsoftware device
[in]callbackcallback object created from c++ application. ownership over the callback object is moved into the relevant device lock
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 814 of file rs.cpp.

void rs2_software_device_update_info ( rs2_device dev,
rs2_camera_info  info,
const char *  val,
rs2_error **  error 
)

Update an existing camera info value for the software device

Parameters
[in]devthe software device
[in]infoidentifier for the camera info to add.
[in]valstring value for this new camera info.
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2451 of file rs.cpp.

rs2_stream_profile* rs2_software_sensor_add_motion_stream ( rs2_sensor sensor,
rs2_motion_stream  motion_stream,
rs2_error **  error 
)

Add motion stream to sensor

Parameters
[in]sensorthe software sensor
[in]motion_streamall the stream components
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2530 of file rs.cpp.

rs2_stream_profile* rs2_software_sensor_add_motion_stream_ex ( rs2_sensor sensor,
rs2_motion_stream  motion_stream,
int  is_default,
rs2_error **  error 
)

Add motion stream to sensor

Parameters
[in]sensorthe software sensor
[in]motion_streamall the stream components
[in]is_defaultwhether or not the stream should be a default stream for the device
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2538 of file rs.cpp.

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 
)

Add an option to sensor

Parameters
[in]sensorthe software sensor
[in]optionthe wanted option
[in]minthe minimum value which will be accepted for this option
[in]maxthe maximum value which will be accepted for this option
[in]stepthe granularity of options which accept discrete values, or zero if the option accepts continuous values
[in]defthe initial value of the option
[in]is_writableshould the option be read-only or not
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2578 of file rs.cpp.

rs2_stream_profile* rs2_software_sensor_add_pose_stream ( rs2_sensor sensor,
rs2_pose_stream  pose_stream,
rs2_error **  error 
)

Add pose stream to sensor

Parameters
[in]sensorthe software sensor
[in]pose_streamall the stream components
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2546 of file rs.cpp.

rs2_stream_profile* rs2_software_sensor_add_pose_stream_ex ( rs2_sensor sensor,
rs2_pose_stream  pose_stream,
int  is_default,
rs2_error **  error 
)

Add pose stream to sensor

Parameters
[in]sensorthe software sensor
[in]pose_streamall the stream components
[in]is_defaultwhether or not the stream should be a default stream for the device
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2554 of file rs.cpp.

void rs2_software_sensor_add_read_only_option ( rs2_sensor sensor,
rs2_option  option,
float  val,
rs2_error **  error 
)

Add read only option to sensor

Parameters
[in]sensorthe software sensor
[in]optionthe wanted option
[in]valthe initial value
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2562 of file rs.cpp.

rs2_stream_profile* rs2_software_sensor_add_video_stream ( rs2_sensor sensor,
rs2_video_stream  video_stream,
rs2_error **  error 
)

Add video stream to sensor

Parameters
[in]sensorthe software sensor
[in]video_streamall the stream components
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2514 of file rs.cpp.

rs2_stream_profile* rs2_software_sensor_add_video_stream_ex ( rs2_sensor sensor,
rs2_video_stream  video_stream,
int  is_default,
rs2_error **  error 
)

Add video stream to sensor

Parameters
[in]sensorthe software sensor
[in]video_streamall the stream components
[in]is_defaultwhether or not the stream should be a default stream for the device
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2522 of file rs.cpp.

void rs2_software_sensor_detach ( rs2_sensor sensor,
rs2_error **  error 
)

Sensors hold the parent device in scope via a shared_ptr. This function detaches that so that the software sensor doesn't keep the software device alive. Note that this is dangerous as it opens the door to accessing freed memory if care isn't taken.

Parameters
[in]sensorthe software sensor
[out]errorif non-null, recieves any error that occurs during this call, otherwise, errors are ignored

Definition at line 2589 of file rs.cpp.

void rs2_software_sensor_on_motion_frame ( rs2_sensor sensor,
rs2_software_motion_frame  frame,
rs2_error **  error 
)

Inject motion frame to software sonsor

Parameters
[in]sensorthe software sensor
[in]frameall the frame components
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2482 of file rs.cpp.

void rs2_software_sensor_on_notification ( rs2_sensor sensor,
rs2_software_notification  notif,
rs2_error **  error 
)

Inject notification to software sonsor

Parameters
[in]sensorthe software sensor
[in]notifall the notification components
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2498 of file rs.cpp.

void rs2_software_sensor_on_pose_frame ( rs2_sensor sensor,
rs2_software_pose_frame  frame,
rs2_error **  error 
)

Inject pose frame to software sonsor

Parameters
[in]sensorthe software sensor
[in]frameall the frame components
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2490 of file rs.cpp.

void rs2_software_sensor_on_video_frame ( rs2_sensor sensor,
rs2_software_video_frame  frame,
rs2_error **  error 
)

Inject video frame to software sonsor

Parameters
[in]sensorthe software sensor
[in]frameall the frame components
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2474 of file rs.cpp.

void rs2_software_sensor_set_metadata ( rs2_sensor sensor,
rs2_frame_metadata_value  value,
rs2_metadata_type  type,
rs2_error **  error 
)

Set frame metadata for the upcoming frames

Parameters
[in]sensorthe software sensor
[in]valuemetadata key to set
[in]typemetadata value
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2506 of file rs.cpp.

void rs2_software_sensor_update_read_only_option ( rs2_sensor sensor,
rs2_option  option,
float  val,
rs2_error **  error 
)

Update the read only option added to sensor

Parameters
[in]sensorthe software sensor
[in]optionthe wanted option
[in]valthe wanted value
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2570 of file rs.cpp.

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.

Parameters
[in]terminal_parserTerminal parser object
[in]commandcommand to be sent to the hw monitor of the device
[in]size_of_commandsize of command to be sent to the hw monitor of the device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
command to hw monitor, in hex

Definition at line 3374 of file rs.cpp.

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.

Parameters
[in]terminal_parserTerminal parser object
[in]commandcommand sent to the hw monitor of the device
[in]size_of_commandsize of the command to sent to the hw monitor of the device
[in]responseresponse received by the hw monitor of the device
[in]size_of_responsesize of the response received by the hw monitor of the device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
answer parsed

Definition at line 3389 of file rs.cpp.

Variable Documentation

const int signed_fw_size = 0x18031C

Firmware size constants

Definition at line 25 of file rs_internal.h.

const int unsigned_fw_size = 0x200000

Definition at line 26 of file rs_internal.h.



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