Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support FW logs extended format #12688

Merged
merged 16 commits into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions include/librealsense2/h/rs_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,13 +483,23 @@ const char* rs2_get_fw_log_parsed_message(rs2_firmware_log_parsed_message* fw_lo
const char* rs2_get_fw_log_parsed_file_name(rs2_firmware_log_parsed_message* fw_log_parsed_msg, rs2_error** error);
Nir-Az marked this conversation as resolved.
Show resolved Hide resolved

/**
* \brief Gets RealSense firmware log parsed message thread name.
* \brief Gets RealSense firmware log parsed message source (SoC) or thread name.
* \param[in] fw_log_parsed_msg firmware log parsed message object
* \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored.
* \return thread name of the firmware log parsed message
* \return source (SoC) or thread name of the firmware log parsed message
*/
const char* rs2_get_fw_log_parsed_thread_name(rs2_firmware_log_parsed_message* fw_log_parsed_msg, rs2_error** error);

/**
* \brief Gets RealSense firmware log parsed message module name.
* \param[in] fw_log_parsed_msg firmware log parsed message object
* \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are
* ignored. \return module name of the firmware log parsed message
*/
const char * rs2_get_fw_log_parsed_module_name( rs2_firmware_log_parsed_message * fw_log_parsed_msg,
rs2_error ** error );


/**
* \brief Gets RealSense firmware log parsed message severity.
* \param[in] fw_log_parsed_msg firmware log parsed message object
Expand Down
11 changes: 9 additions & 2 deletions include/librealsense2/hpp/rs_internal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,16 @@ namespace rs2
std::string thread_name() const
{
rs2_error* e = nullptr;
std::string thread_name(rs2_get_fw_log_parsed_thread_name(_parsed_fw_log.get(), &e));
std::string name(rs2_get_fw_log_parsed_thread_name(_parsed_fw_log.get(), &e));
error::handle(e);
return thread_name;
return name;
}
std::string module_name() const
{
rs2_error * e = nullptr;
std::string name( rs2_get_fw_log_parsed_module_name( _parsed_fw_log.get(), &e ) );
error::handle( e );
return name;
}
std::string severity() const
{
Expand Down
41 changes: 21 additions & 20 deletions src/ds/d400/d400-factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace librealsense
, d400_nonmonochrome( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
}

Expand Down Expand Up @@ -85,9 +85,10 @@ namespace librealsense
backend_device( dev_info, register_device_notifications ),
ds5u_device(dev_info),
ds_advanced_mode_base(d400_device::_hw_monitor, get_depth_sensor()),
firmware_logger_device(dev_info, d400_device::_hw_monitor,
get_firmware_logs_command(),
get_flash_logs_command()) {}
firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } })
{
}

std::shared_ptr<matcher> create_matcher(const frame_holder& frame) const override;

Expand Down Expand Up @@ -139,7 +140,7 @@ namespace librealsense
, d400_active( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
}

Expand Down Expand Up @@ -179,7 +180,7 @@ namespace librealsense
, d400_color( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
}

Expand Down Expand Up @@ -219,7 +220,7 @@ namespace librealsense
, d400_active( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
}

Expand Down Expand Up @@ -274,7 +275,7 @@ namespace librealsense
, d400_color( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
}

Expand Down Expand Up @@ -326,7 +327,7 @@ namespace librealsense
, d400_motion( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
}

Expand Down Expand Up @@ -373,7 +374,7 @@ namespace librealsense
, d400_device( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
}

Expand Down Expand Up @@ -412,7 +413,7 @@ namespace librealsense
, d400_active( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
}

Expand Down Expand Up @@ -452,7 +453,7 @@ namespace librealsense
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, d400_motion( dev_info )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
}

Expand Down Expand Up @@ -496,7 +497,7 @@ namespace librealsense
, d400_motion( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
}

Expand Down Expand Up @@ -547,7 +548,7 @@ namespace librealsense
, d400_color( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
}

Expand Down Expand Up @@ -590,7 +591,7 @@ namespace librealsense
, d400_motion_uvc( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
}

Expand Down Expand Up @@ -624,7 +625,7 @@ namespace librealsense
, d400_motion( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
}

Expand Down Expand Up @@ -667,7 +668,7 @@ namespace librealsense
, d400_motion( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
check_and_restore_rgb_stream_extrinsic();
}
Expand Down Expand Up @@ -881,7 +882,7 @@ namespace librealsense
, d400_motion( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
}

Expand Down Expand Up @@ -912,7 +913,7 @@ namespace librealsense
, d400_nonmonochrome( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
{
}

Expand Down Expand Up @@ -1001,7 +1002,7 @@ namespace librealsense
, d400_motion( dev_info )
, ds_advanced_mode_base( d400_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command(), { { 0, "DS5" } } )
, d400_thermal_tracking( d400_device::_thermal_monitor )
{
}
Expand Down
7 changes: 5 additions & 2 deletions src/ds/d500/d500-factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ class d555e_device
, d500_color( dev_info, RS2_FORMAT_YUYV )
, d500_motion( dev_info )
, ds_advanced_mode_base( d500_device::_hw_monitor, get_depth_sensor() )
, firmware_logger_device(
dev_info, d500_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
, firmware_logger_device( dev_info,
d500_device::_hw_monitor,
get_firmware_logs_command(),
get_flash_logs_command(),
{ { 0, "HKR" } } )
{
}

Expand Down
Loading
Loading