Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
|
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"
Go to the source code of this file.
Classes | |
struct | rs2_video_stream |
All the parameters required to define a video stream. More... | |
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_video_frame |
All the parameters required to define a video frame. More... | |
struct | rs2_software_motion_frame |
All the parameters required to define a motion frame. More... | |
struct | rs2_software_pose_frame |
All the parameters required to define a pose frame. More... | |
struct | rs2_software_pose_frame::pose_frame_info |
struct | rs2_software_notification |
All the parameters required to define a sensor notification. More... | |
Typedefs | |
typedef enum rs2_recording_mode | rs2_recording_mode |
typedef struct rs2_video_stream | rs2_video_stream |
All the parameters required to define a video stream. More... | |
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 struct rs2_software_video_frame | rs2_software_video_frame |
All the parameters required to define a video frame. More... | |
typedef struct rs2_software_motion_frame | rs2_software_motion_frame |
All the parameters required to define a motion frame. 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_notification | rs2_software_notification |
All the parameters required to define a sensor notification. 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_context * | rs2_create_recording_context (int api_version, const char *filename, const char *section, rs2_recording_mode mode, rs2_error **error) |
rs2_context * | rs2_create_mock_context (int api_version, const char *filename, const char *section, 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_device * | rs2_create_software_device (rs2_error **error) |
rs2_sensor * | rs2_software_device_add_sensor (rs2_device *dev, const char *sensor_name, 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_on_motion_frame (rs2_sensor *sensor, rs2_software_motion_frame frame, 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_notification (rs2_sensor *sensor, rs2_software_notification notif, 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_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_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_update_info (rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error) |
rs2_stream_profile * | rs2_software_sensor_add_video_stream (rs2_sensor *sensor, rs2_video_stream video_stream, rs2_error **error) |
rs2_stream_profile * | rs2_software_sensor_add_video_stream_ex (rs2_sensor *sensor, rs2_video_stream video_stream, int is_default, rs2_error **error) |
rs2_stream_profile * | rs2_software_sensor_add_motion_stream (rs2_sensor *sensor, rs2_motion_stream motion_stream, rs2_error **error) |
rs2_stream_profile * | rs2_software_sensor_add_motion_stream_ex (rs2_sensor *sensor, rs2_motion_stream motion_stream, int is_default, rs2_error **error) |
rs2_stream_profile * | rs2_software_sensor_add_pose_stream (rs2_sensor *sensor, rs2_pose_stream pose_stream, 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) |
void | rs2_software_sensor_add_read_only_option (rs2_sensor *sensor, rs2_option option, float val, rs2_error **error) |
void | rs2_software_sensor_update_read_only_option (rs2_sensor *sensor, rs2_option option, float val, 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) |
void | rs2_software_sensor_detach (rs2_sensor *sensor, rs2_error **error) |
void | rs2_start_collecting_fw_logs (rs2_device *dev, rs2_error **error) |
Starts collecting FW log messages in the device. More... | |
void | rs2_stop_collecting_fw_logs (rs2_device *dev, rs2_error **error) |
Stops collecting FW log messages in the device. More... | |
rs2_firmware_log_message * | rs2_create_fw_log_message (rs2_device *dev, rs2_error **error) |
Creates RealSense firmware log message. More... | |
int | rs2_get_fw_log (rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_error **error) |
Gets RealSense firmware log. 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... | |
void | rs2_delete_fw_log_message (rs2_firmware_log_message *msg) |
const unsigned char * | rs2_fw_log_message_data (rs2_firmware_log_message *msg, rs2_error **error) |
Gets RealSense firmware log message data. 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... | |
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_init_fw_log_parser (rs2_device *dev, const char *xml_content, rs2_error **error) |
Initializes RealSense firmware logs parser in device. More... | |
rs2_firmware_log_parsed_message * | rs2_create_fw_log_parsed_message (rs2_device *dev, rs2_error **error) |
Creates RealSense firmware log parsed message. More... | |
void | rs2_delete_fw_log_parsed_message (rs2_firmware_log_parsed_message *fw_log_parsed_msg) |
Deletes RealSense firmware log parsed message. 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... | |
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... | |
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... | |
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... | |
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. More... | |
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. 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... | |
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... | |
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_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_terminal_parser * | rs2_create_terminal_parser (const char *xml_content, rs2_error **error) |
Creates RealSense terminal parser. More... | |
void | rs2_delete_terminal_parser (rs2_terminal_parser *terminal_parser) |
Deletes RealSense terminal parser. More... | |
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. More... | |
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. More... | |
Variables | |
const unsigned int | signed_fw_size = 0x18031C |
const unsigned int | unsigned_fw_size = 0x200000 |
Exposes RealSense internal functionality for C compilers.
typedef struct rs2_motion_stream rs2_motion_stream |
All the parameters required to define a motion stream.
typedef struct rs2_pose_stream rs2_pose_stream |
All the parameters required to define a pose stream.
typedef enum rs2_recording_mode rs2_recording_mode |
librealsense Recorder is intended for effective unit-testing Currently supports three modes of operation:
typedef struct rs2_software_motion_frame rs2_software_motion_frame |
All the parameters required to define a motion frame.
typedef struct rs2_software_notification rs2_software_notification |
All the parameters required to define a sensor notification.
typedef struct rs2_software_pose_frame rs2_software_pose_frame |
All the parameters required to define a pose frame.
typedef struct rs2_software_video_frame rs2_software_video_frame |
All the parameters required to define a video frame.
typedef struct rs2_video_stream rs2_video_stream |
All the parameters required to define a video stream.
enum rs2_recording_mode |
rs2_firmware_log_message* rs2_create_fw_log_message | ( | rs2_device * | dev, |
rs2_error ** | error | ||
) |
Creates RealSense firmware log message.
[in] | dev | Device from which the FW log will be taken using the created message |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
rs2_firmware_log_parsed_message* rs2_create_fw_log_parsed_message | ( | rs2_device * | dev, |
rs2_error ** | error | ||
) |
Creates RealSense firmware log parsed message.
[in] | dev | Device from which the FW log will be taken using the created message |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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
[in] | api_version | realsense API version as provided by RS2_API_VERSION macro |
[in] | filename | string representing the name of the file to play back from |
[in] | section | string representing the name of the section within existing recording |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | api_version | realsense API version as provided by RS2_API_VERSION macro |
[in] | filename | string representing the name of the file to play back from |
[in] | section | string representing the name of the section within existing recording |
[in] | min_api_version | reject any file that was recorded before this version |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | api_version | realsense API version as provided by RS2_API_VERSION macro |
[in] | filename | string representing the name of the file to record |
[in] | section | string representing the name of the section within existing recording |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_terminal_parser* rs2_create_terminal_parser | ( | const char * | xml_content, |
rs2_error ** | error | ||
) |
Creates RealSense terminal parser.
[in] | xml_content | content of the xml file needed for parsing |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
void rs2_delete_fw_log_message | ( | rs2_firmware_log_message * | msg | ) |
Delete RealSense firmware log message
[in] | device | Realsense firmware log message to delete |
void rs2_delete_fw_log_parsed_message | ( | rs2_firmware_log_parsed_message * | fw_log_parsed_msg | ) |
Deletes RealSense firmware log parsed message.
[in] | msg | message to be deleted |
void rs2_delete_terminal_parser | ( | rs2_terminal_parser * | terminal_parser | ) |
Deletes RealSense terminal parser.
[in] | terminal_parser | terminal parser to be deleted |
const unsigned char* rs2_fw_log_message_data | ( | rs2_firmware_log_message * | msg, |
rs2_error ** | error | ||
) |
Gets RealSense firmware log message data.
[in] | msg | firmware log message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
rs2_log_severity rs2_fw_log_message_severity | ( | const rs2_firmware_log_message * | msg, |
rs2_error ** | error | ||
) |
Gets RealSense firmware log message severity.
[in] | msg | firmware log message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
int rs2_fw_log_message_size | ( | rs2_firmware_log_message * | msg, |
rs2_error ** | error | ||
) |
Gets RealSense firmware log message size.
[in] | msg | firmware log message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
unsigned int rs2_fw_log_message_timestamp | ( | rs2_firmware_log_message * | msg, |
rs2_error ** | error | ||
) |
Gets RealSense firmware log message timestamp.
[in] | msg | firmware log message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | dev | Device from which the FW log should be taken |
[in] | fw_log_msg | Firmware log message object to be filled |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
int rs2_get_fw_log | ( | rs2_device * | dev, |
rs2_firmware_log_message * | fw_log_msg, | ||
rs2_error ** | error | ||
) |
Gets RealSense firmware log.
[in] | dev | Device from which the FW log should be taken |
[in] | fw_log_msg | Firmware log message object to be filled |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | fw_log_parsed_msg | firmware log parsed message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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).
[in] | fw_log_parsed_msg | firmware log parsed message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | fw_log_parsed_msg | firmware log parsed message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | fw_log_parsed_msg | firmware log parsed message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | fw_log_parsed_msg | firmware log parsed message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | fw_log_parsed_msg | firmware log parsed message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | fw_log_parsed_msg | firmware log parsed message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | fw_log_parsed_msg | firmware log parsed message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | dev | Device from which the FW log will be taken |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
int rs2_init_fw_log_parser | ( | rs2_device * | dev, |
const char * | xml_content, | ||
rs2_error ** | error | ||
) |
Initializes RealSense firmware logs parser in device.
[in] | dev | Device from which the FW log will be taken |
[in] | xml_content | content of the xml file needed for parsing |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | dev | Device from which the FW log will be taken |
[in] | fw_log_msg | firmware log message to be parsed |
[in] | parsed_msg | firmware log parsed message - place holder for the resulting parsed message |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
rs2_sensor* rs2_software_device_add_sensor | ( | rs2_device * | dev, |
const char * | sensor_name, | ||
rs2_error ** | error | ||
) |
Add sensor to the software device
[in] | dev | the software device |
[in] | sensor_name | the name of the sensor |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | dev | the software device |
[in] | matcher | matcher type |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | dev | the software device |
[in] | info | identifier for the camera info to add. |
[in] | val | string value for this new camera info. |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | dev | software device |
[in] | on_notification | function pointer to register as callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | dev | software device |
[in] | callback | callback object created from c++ application. ownership over the callback object is moved into the relevant device lock |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | dev | the software device |
[in] | info | identifier for the camera info to add. |
[in] | val | string value for this new camera info. |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | the software sensor |
[in] | motion_stream | all the stream components |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | the software sensor |
[in] | motion_stream | all the stream components |
[in] | is_default | whether or not the stream should be a default stream for the device |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | the software sensor |
[in] | option | the wanted option |
[in] | min | the minimum value which will be accepted for this option |
[in] | max | the maximum value which will be accepted for this option |
[in] | step | the granularity of options which accept discrete values, or zero if the option accepts continuous values |
[in] | def | the initial value of the option |
[in] | is_writable | should the option be read-only or not |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | the software sensor |
[in] | pose_stream | all the stream components |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | the software sensor |
[in] | pose_stream | all the stream components |
[in] | is_default | whether or not the stream should be a default stream for the device |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | the software sensor |
[in] | option | the wanted option |
[in] | val | the initial value |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | the software sensor |
[in] | video_stream | all the stream components |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | the software sensor |
[in] | video_stream | all the stream components |
[in] | is_default | whether or not the stream should be a default stream for the device |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | sensor | the software sensor |
[out] | error | if non-null, recieves any error that occurs during this call, otherwise, errors are ignored |
void rs2_software_sensor_on_motion_frame | ( | rs2_sensor * | sensor, |
rs2_software_motion_frame | frame, | ||
rs2_error ** | error | ||
) |
Inject motion frame to software sonsor
[in] | sensor | the software sensor |
[in] | frame | all the frame components |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_software_sensor_on_notification | ( | rs2_sensor * | sensor, |
rs2_software_notification | notif, | ||
rs2_error ** | error | ||
) |
Inject notification to software sonsor
[in] | sensor | the software sensor |
[in] | notif | all the notification components |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_software_sensor_on_pose_frame | ( | rs2_sensor * | sensor, |
rs2_software_pose_frame | frame, | ||
rs2_error ** | error | ||
) |
Inject pose frame to software sonsor
[in] | sensor | the software sensor |
[in] | frame | all the frame components |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_software_sensor_on_video_frame | ( | rs2_sensor * | sensor, |
rs2_software_video_frame | frame, | ||
rs2_error ** | error | ||
) |
Inject video frame to software sonsor
[in] | sensor | the software sensor |
[in] | frame | all the frame components |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | the software sensor |
[in] | value | metadata key to set |
[in] | type | metadata value |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | the software sensor |
[in] | option | the wanted option |
[in] | val | the wanted value |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_start_collecting_fw_logs | ( | rs2_device * | dev, |
rs2_error ** | error | ||
) |
Starts collecting FW log messages in the device.
[in] | dev | Device that will start collecting log messages. |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are |
void rs2_stop_collecting_fw_logs | ( | rs2_device * | dev, |
rs2_error ** | error | ||
) |
Stops collecting FW log messages in the device.
[in] | dev | Device that will stop collecting log messages. |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are |
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.
[in] | terminal_parser | Terminal parser object |
[in] | command | command to be sent to the hw monitor of the device |
[in] | size_of_command | size of command to be sent to the hw monitor of the device |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | terminal_parser | Terminal parser object |
[in] | command | command sent to the hw monitor of the device |
[in] | size_of_command | size of the command to sent to the hw monitor of the device |
[in] | response | response received by the hw monitor of the device |
[in] | size_of_response | size of the response received by the hw monitor of the device |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
const unsigned int signed_fw_size = 0x18031C |
Firmware size constants
const unsigned int unsigned_fw_size = 0x200000 |