4 #ifndef LIBREALSENSE_RS2_INTERNAL_HPP 5 #define LIBREALSENSE_RS2_INTERNAL_HPP 10 #include "../h/rs_internal.h" 26 _context = std::shared_ptr<rs2_context>(
48 _context = std::shared_ptr<rs2_context>(
82 on_destruction_function();
222 range.
max, range.
step, range.
def, is_writable, &
e);
265 std::shared_ptr<rs2_device>
dev(
274 :
device(create_device_ptr(deleter))
276 this->set_destruction_callback([]{});
293 std::shared_ptr<rs2_sensor>
sensor(
370 _fw_log_message(msg) {}
398 std::vector<uint8_t>
data()
const 403 std::vector<uint8_t>
result;
413 const std::shared_ptr<rs2_firmware_log_message>
get_message()
const {
return _fw_log_message; }
423 _parsed_fw_log(msg) {}
476 const std::shared_ptr<rs2_firmware_log_parsed_message>
get_message()
const {
return _parsed_fw_log; }
499 std::shared_ptr<rs2_firmware_log_message> msg(
510 std::shared_ptr<rs2_firmware_log_parsed_message> msg(
522 bool fw_log_pulling_status =
527 return fw_log_pulling_status;
534 bool flash_log_pulling_status =
539 return flash_log_pulling_status;
549 return parser_initialized;
559 return parsingResult;
568 return num_of_fw_logs;
579 _terminal_parser = std::shared_ptr<rs2_terminal_parser>(
589 std::shared_ptr<const rs2_raw_data_buffer> list(
599 std::vector<uint8_t> results;
609 std::shared_ptr<const rs2_raw_data_buffer> list(
611 (
void*)response.data(), (
unsigned int)response.size(), &
e),
631 #endif // LIBREALSENSE_RS2_INTERNAL_HPP unsigned int get_number_of_fw_logs() const
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_cpp(const rs2_device *dev, rs2_software_device_destruction_callback *callback, rs2_error **error)
firmware_logger(device d)
rs2_camera_info
Read-only strings that can be queried from the device. Not all information attributes are available o...
rs2::firmware_log_message create_message()
recording_context(const std::string &filename, const std::string §ion="", rs2_recording_mode mode=RS2_RECORDING_MODE_BLANK_FRAMES)
stream_profile add_pose_stream(rs2_pose_stream pose_stream, bool is_default=false)
rs2_log_severity get_severity() const
GLenum GLuint GLenum severity
GLuint const GLchar * name
const std::shared_ptr< rs2_firmware_log_message > get_message() const
T on_destruction_function
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls...
terminal_parser(const std::string &xml_content)
std::shared_ptr< rs2_firmware_log_parsed_message > _parsed_fw_log
std::vector< uint8_t > parse_command(const std::string &command)
void register_info(rs2_camera_info info, const std::string &val)
bool get_firmware_log(rs2::firmware_log_message &msg) const
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_option(rs2_sensor *sensor, rs2_option option, float min, float max, float step, float def, int is_writable, rs2_error **error)
void rs2_delete_device(rs2_device *device)
void rs2_delete_context(rs2_context *context)
Frees the relevant context object.
void on_video_frame(rs2_software_video_frame frame)
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.
All the parameters required to define a video stream.
void set_metadata(rs2_frame_metadata_value value, rs2_metadata_type type)
All the parameters required to define a pose frame.
const unsigned char * rs2_get_raw_data(const rs2_raw_data_buffer *buffer, rs2_error **error)
int rs2_fw_log_message_size(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message size.
software_device_destruction_callback(T on_destruction)
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...
std::string parse_response(const std::string &command, const std::vector< uint8_t > &response)
unsigned int rs2_fw_log_message_timestamp(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message timestamp.
GLsizei const GLchar *const * string
void on_motion_frame(rs2_software_motion_frame frame)
void rs2_delete_raw_data(const rs2_raw_data_buffer *buffer)
software_sensor add_sensor(std::string name)
software_device(std::function< void(rs2_device *)> deleter=&rs2_delete_device)
uint32_t timestamp() const
uint32_t get_timestamp() const
stream_profile add_motion_stream(rs2_motion_stream motion_stream, bool is_default=false)
void set_read_only_option(rs2_option option, float val)
int rs2_get_raw_data_size(const rs2_raw_data_buffer *buffer, rs2_error **error)
std::string severity() const
bool parse_log(const rs2::firmware_log_message &msg, const rs2::firmware_log_parsed_message &parsed_msg)
void rs2_delete_fw_log_parsed_message(rs2_firmware_log_parsed_message *fw_log_parsed_msg)
Deletes RealSense firmware log parsed message.
rs2_context * rs2_create_recording_context(int api_version, const char *filename, const char *section, rs2_recording_mode mode, rs2_error **error)
def info(name, value, persistent=False)
rs2::firmware_log_parsed_message create_parsed_message()
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_...
firmware_log_parsed_message(std::shared_ptr< rs2_firmware_log_parsed_message > msg)
void rs2_software_sensor_detach(rs2_sensor *sensor, 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)
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...
uint32_t sequence_id() const
firmware_log_message(std::shared_ptr< rs2_firmware_log_message > msg)
rs2_time_t rs2_get_time(rs2_error **error)
rs2_log_severity rs2_fw_log_message_severity(const rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message severity.
std::string thread_name() const
std::shared_ptr< rs2_context > _context
All the parameters required to define a pose stream.
void rs2_delete_sensor(rs2_sensor *sensor)
rs2_matchers
Specifies types of different matchers.
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.
int rs2_is_device_extendable_to(const rs2_device *device, rs2_extension extension, rs2_error **error)
std::shared_ptr< rs2_device > create_device_ptr(std::function< void(rs2_device *)> deleter)
void rs2_software_sensor_on_pose_frame(rs2_sensor *sensor, rs2_software_pose_frame frame, rs2_error **error)
rs2_device * rs2_create_software_device(rs2_error **error)
void rs2_software_sensor_add_read_only_option(rs2_sensor *sensor, rs2_option option, float val, rs2_error **error)
std::shared_ptr< rs2_terminal_parser > _terminal_parser
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 create_matcher(rs2_matchers matcher)
All the parameters required to define a motion stream.
BOOST_DEDUCED_TYPENAME optional< T >::reference_const_type get(optional< T > const &opt)
std::string message() const
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.
std::shared_ptr< rs2_firmware_log_message > _fw_log_message
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 update_info(rs2_camera_info info, const std::string &val)
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.
std::string get_severity_str() const
static void handle(rs2_error *e)
rs2_sensor * rs2_software_device_add_sensor(rs2_device *dev, const char *sensor_name, 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_on_notification(rs2_sensor *sensor, rs2_software_notification notif, rs2_error **error)
bool get_flash_log(rs2::firmware_log_message &msg) const
void set_destruction_callback(T callback) const
void on_notification(rs2_software_notification notif)
void add_to(context &ctx)
void rs2_software_device_create_matcher(rs2_device *dev, rs2_matchers matcher, rs2_error **error)
software_sensor(std::shared_ptr< rs2_sensor > s)
int rs2_is_sensor_extendable_to(const rs2_sensor *sensor, rs2_extension extension, rs2_error **error)
void rs2_delete_terminal_parser(rs2_terminal_parser *terminal_parser)
Deletes RealSense terminal parser.
int rs2_init_fw_log_parser(rs2_device *dev, const char *xml_content, rs2_error **error)
Initializes RealSense firmware logs parser in device.
All the parameters required to define a sensor notification.
long long rs2_metadata_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)
const std::shared_ptr< rs2_firmware_log_parsed_message > get_message() const
void on_pose_frame(rs2_software_pose_frame frame)
void rs2_delete_fw_log_message(rs2_firmware_log_message *msg)
void rs2_context_add_software_device(rs2_context *ctx, rs2_device *dev, rs2_error **error)
All the parameters required to define a motion frame.
void rs2_software_sensor_on_motion_frame(rs2_sensor *sensor, rs2_software_motion_frame frame, rs2_error **error)
typename::boost::move_detail::remove_reference< T >::type && move(T &&t) BOOST_NOEXCEPT
software_device(std::string name)
void add_option(rs2_option option, const option_range &range, bool is_writable=true)
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.
bool init_parser(const std::string &xml_content)
rs2_firmware_log_message * rs2_create_fw_log_message(rs2_device *dev, rs2_error **error)
Creates RealSense firmware log message.
void add_read_only_option(rs2_option option, float val)
std::string file_name() const
void rs2_software_sensor_on_video_frame(rs2_sensor *sensor, rs2_software_video_frame frame, rs2_error **error)
All the parameters required to define a video frame.
const char * rs2_log_severity_to_string(rs2_log_severity info)
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.
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.
const unsigned char * rs2_fw_log_message_data(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message data.
rs2_firmware_log_parsed_message * rs2_create_fw_log_parsed_message(rs2_device *dev, rs2_error **error)
Creates RealSense firmware log parsed message.
void rs2_software_device_register_info(rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error)
rs2_log_severity
Severity of the librealsense logger.
rs2_terminal_parser * rs2_create_terminal_parser(const char *xml_content, rs2_error **error)
Creates RealSense terminal parser.
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.
int rs2_get_fw_log(rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_error **error)
Gets RealSense firmware log.
stream_profile add_video_stream(rs2_video_stream video_stream, bool is_default=false)
std::vector< uint8_t > data() const
rs2_frame_metadata_value
Per-Frame-Metadata is the set of read-only properties that might be exposed for each individual frame...
mock_context(const std::string &filename, const std::string §ion="", const std::string &min_api_version="0.0.0")
void rs2_software_device_update_info(rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error)
recording_context()=delete
void on_destruction() override