44 { 0xC9606CCB, 0x594C, 0x4D25,{ 0xaf, 0x47, 0xcc, 0xc4, 0x96, 0x43, 0x59, 0x95 } } };
94 static std::vector< byte >
97 std::vector< byte >
res;
99 auto data = hwm.
send( cmd, &response );
108 template<
typename T >
112 std::function<
void() >
init =
nullptr )
120 if( data.size() != expected_size )
122 <<
"READ_TABLE (0x" << std::hex << table_id
123 << std::dec <<
") data size received= " << data.size()
124 <<
" (expected " << expected_size <<
")" );
141 LOG_DEBUG(
"Failed to read FW table 0x" << std::hex << table_id );
148 template<
typename T >
155 h->
major = version >> 8;
156 h->
minor = version & 0xFF;
162 memcpy( cmd.
data.data() +
sizeof(
table_header ), &table,
sizeof( table ) );
165 hwm.
send( cmd, &response );
172 LOG_DEBUG(
"Failed to write FW table 0x" << std::hex << table_id <<
" " <<
sizeof( table ) <<
" bytes: " );
177 template<
typename T >
182 if(
res.size() !=
sizeof(
T ) )
184 <<
"MRD data size received= " <<
res.size()
185 <<
" (expected " <<
sizeof(
T ) <<
")" );
187 *preg = *(
T *)
res.data();
190 #pragma pack(push, 1) 193 static const int table_id = 0x240;
229 void update_write_fields();
254 {
L500_PID,
"Intel RealSense L500"},
256 {
L515_PID,
"Intel RealSense L515"},
257 {
L535_PID,
"Intel RealSense L535"},
299 {
temp_warning,
"Warning, temperature close to critical" },
306 {
ld_alarm,
"Fatal error occurred (14)" },
319 #pragma pack(push, 1) 408 : LDD_temperature(0.)
411 , APD_temperature(0.)
412 , HUM_temperature(0.)
413 , AlgoTermalLddAvg_temperature(0.) { }
433 float query()
const override;
455 float query()
const override;
464 : _l500_depth_dev(l500_depth_dev)
465 , _description(description) {};
474 static const int pins = 3;
476 std::shared_ptr<platform::time_service>
_ts;
477 mutable std::recursive_mutex
_mtx;
480 : counter(pins), _ts(ts)
487 std::lock_guard<std::recursive_mutex>
lock(_mtx);
488 for (
size_t i = 0;
i < pins; ++
i)
496 std::lock_guard<std::recursive_mutex>
lock(_mtx);
497 return _ts->get_time();
502 std::lock_guard<std::recursive_mutex>
lock(_mtx);
503 size_t pin_index = 0;
509 return ++counter[pin_index];
522 mutable std::recursive_mutex
_mtx;
531 const bool has_md_ts = [&] { std::lock_guard<std::recursive_mutex>
lock(_mtx);
542 const bool has_md_frame_counter = [&] { std::lock_guard<std::recursive_mutex>
lock(_mtx);
546 return has_md_frame_counter;
556 rs2_time_t get_frame_timestamp(
const std::shared_ptr<frame_interface>&
frame)
override;
558 unsigned long long get_frame_counter(
const std::shared_ptr<frame_interface>& frame)
const override;
560 void reset()
override;
562 rs2_timestamp_domain get_frame_timestamp_domain(
const std::shared_ptr<frame_interface>& frame)
const override;
572 virtual void enable(
bool =
true );
574 virtual void set(
float value )
override;
577 return "When enabled (default), the sensor will turn off if a free-fall is detected";
579 virtual void enable_recording( std::function<
void(
const option& )> record_action )
override { _record_action = record_action; }
582 std::function<void( const option& )> _record_action = [](
const option& ) {};
596 virtual void set(
float value )
override;
599 return "Enable multi-camera hardware synchronization mode (disabled on startup); not compatible with free-fall detection";
601 virtual void enable_recording( std::function<
void(
const option& )> record_action )
override { _record_action = record_action; }
604 std::function<void( const option& )> _record_action = [](
const option& ) {};
618 auto &us =
dynamic_cast<uvc_sensor&
>(*
s.get_raw_sensor());
virtual void enable_recording(std::function< void(const option &)> record_action) override
rs2_sensor_mode get_resolution_from_width_height(int width, int height)
static const textual_icon lock
const uint8_t L500_ERROR_REPORTING
rs2_time_t get_frame_timestamp(const std::shared_ptr< frame_interface > &) override
static const std::map< std::uint16_t, std::string > rs500_sku_names
nest_option(l500_device *l500_depth_dev, const std::string &description)
const uint32_t FLASH_RW_TABLE_OF_CONTENT_OFFSET
#define RS2_API_MAJOR_VERSION
auto invoke_powered(T action) -> decltype(action(*static_cast< platform::uvc_device * >(nullptr)))
std::shared_ptr< freefall_option > _freefall_opt
bool is_enabled() const override
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls...
uint8_t num_of_resolutions
unsigned long long get_frame_counter(const std::shared_ptr< frame_interface > &frame) const override
Video DSM (Digital Sync Module) parameters for calibration (same layout as in FW ac_depth_params) Thi...
const uint8_t L500_DIGITAL_GAIN
bool try_fetch_usb_device(std::vector< platform::usb_device_info > &devices, const platform::uvc_device_info &info, platform::usb_device_info &result)
const uint32_t FLASH_SIZE
GLsizei const GLchar *const * string
GLfloat GLfloat GLfloat GLfloat h
std::vector< size_t > counter
#define RS2_API_MINOR_VERSION
virtual const char * get_description() const override
#define RS2_API_PATCH_VERSION
const uint32_t FLASH_RO_TABLE_OF_CONTENT_OFFSET
def info(name, value, persistent=False)
double AlgoTermalLddAvg_temperature
l500_device * _l500_depth_dev
virtual const char * get_description() const override
resolutions_depth resolution
bool is_enabled() const override
const uint32_t FLASH_SECTOR_SIZE
std::vector< uint8_t > send(std::vector< uint8_t > const &data) const
uint8_t num_of_resolutions
const std::map< uint8_t, std::string > l500_fw_error_report
rs2_timestamp_domain get_frame_timestamp_domain(const std::shared_ptr< frame_interface > &) const override
GLint GLsizei GLsizei height
const uint16_t L535_RECOVERY_PID
std::vector< uint8_t > data
static std::vector< byte > read_fw_table_raw(const hw_monitor &hwm, int table_id, hwmon_response &response)
GLenum GLenum GLsizei const GLuint GLboolean enabled
flash_info get_flash_info(const std::vector< uint8_t > &flash_buffer)
void write_fw_table(hw_monitor &hwm, uint16_t const table_id, T const &table, uint16_t const version=0x0100)
l500_timestamp_reader(std::shared_ptr< platform::time_service > ts)
const uint8_t L500_HWMONITOR
std::string hwmon_error_string(command const &cmd, hwmon_response e)
const char * get_description() const override
const uint16_t L515_IMU_TABLE
option_range get_range() const override
resolutions_rgb resolution
rs2_sensor_mode
For setting the camera_mode option.
GLenum GLenum GLsizei void * table
Cross-stream extrinsics: encodes the topology describing how the different devices are oriented...
bool is_enabled() const override
const uint16_t L500_USB2_RECOVERY_PID_OLD
const uint32_t FLASH_INFO_HEADER_OFFSET
std::recursive_mutex _mtx
ac_depth_results(rs2_dsm_params const &dsm_params)
virtual void enable_recording(std::function< void(const option &)> record_action) override
static const int MAX_NUM_OF_RGB_RESOLUTIONS
const char * get_description() const override
std::shared_ptr< platform::time_service > _ts
void read_fw_table(hw_monitor &hwm, int table_id, T *ptable, table_header *pheader=nullptr, std::function< void() > init=nullptr)
auto group_multiple_fw_calls(synthetic_sensor &s, T action) -> decltype(action())
const int REGISTER_CLOCK_0
option_range get_range() const override
l500_device * _l500_depth_dev
const platform::extension_unit depth_xu
static const int MAX_NUM_OF_DEPTH_RESOLUTIONS
rs2_extrinsics get_color_stream_extrinsic(const std::vector< uint8_t > &raw_data)
const uint16_t L500_RECOVERY_PID
void read_fw_register(hw_monitor &hwm, T *preg, int const baseline_address)
const uint16_t L515_PID_PRE_PRQ
pinhole_camera_model pinhole_cam_model
rs2_extrinsics const & get_extrinsics() const
uint32_t calc_crc32(const uint8_t *buf, size_t bufsize)
Calculate CRC code for arbitrary characters buffer.
std::string to_string(T value)
rs2_timestamp_domain
Specifies the clock in relation to which the frame timestamp was measured.