Go to the documentation of this file.
15 : _hw_monitor(hwm), _option(opt)
23 float temperature = -1;
27 temperature =
static_cast<float>(res[0]);
43 : _hw_monitor(hwm), _option(opt)
55 temperature =
static_cast<float>(res[0]);
71 const std::weak_ptr< sensor_base > & depth_ep,
73 std::shared_ptr< limits_option > exposure_limit_enable,
78 , _exposure_limit_toggle( exposure_limit_enable )
79 , _new_opcode( new_opcode )
97 if (
toggle->query() == 0.f)
117 return toggle->get_cached_limit();
129 if(
auto strong =
_sensor.lock() )
130 return strong->is_opened();
138 std::vector< uint8_t > ret =
_hwm.
send( cmd_get );
142 static const int max_gain_offset = 12;
146 cmd.param2 =
static_cast< int >(
value );
148 cmd.param4 = *(
reinterpret_cast< uint32_t *
>( ret.data() + max_gain_offset ) );
156 std::vector< uint8_t > ret =
_hwm.
send( cmd_get );
160 static const int max_gain_offset = 4;
163 cmd.param2 =
static_cast< int >(
value );
164 cmd.param3 = *(
reinterpret_cast< uint32_t *
>( ret.data() + max_gain_offset ) );
177 static const int max_ae_offset = 8;
178 return static_cast< float >( *(
reinterpret_cast< uint32_t *
>( res.data() + max_ae_offset ) ) );
190 return static_cast< float >( *(
reinterpret_cast< uint32_t *
>( res.data() ) ) );
194 const std::weak_ptr< sensor_base > & depth_ep,
196 std::shared_ptr< limits_option > gain_limit_enable,
200 , _sensor( depth_ep )
201 , _gain_limit_toggle( gain_limit_enable )
202 , _new_opcode( new_opcode )
221 if (
toggle->query() == 0.f)
241 return toggle->get_cached_limit();
253 if(
auto strong =
_sensor.lock() )
254 return strong->is_opened();
262 std::vector< uint8_t > ret =
_hwm.
send( cmd_get );
266 static const int max_ae_offset = 8;
270 cmd.param2 = *(
reinterpret_cast< uint32_t *
>( ret.data() + max_ae_offset ) );
272 cmd.param4 =
static_cast< int >(
value );
280 std::vector< uint8_t > ret =
_hwm.
send( cmd_get );
286 cmd.param2 = *(
reinterpret_cast< uint32_t *
>( ret.data() ) );
287 cmd.param3 =
static_cast< int >(
value );
300 static const int max_gain_offset = 12;
301 return static_cast< float >( *(
reinterpret_cast< uint32_t *
>( res.data() + max_gain_offset ) ) );
313 static const int max_gain_offset = 4;
314 return static_cast< float >( *(
reinterpret_cast< uint32_t *
>( res.data() + max_gain_offset ) ) );
320 , _toggle_range(
range )
321 , _description( description )
323 , _new_opcode( new_opcode ){}
340 std::vector< uint8_t > res;
357 float limit_val =
static_cast< float >( *(
reinterpret_cast< uint32_t *
>( res.data() +
offset ) ) );
368 std::vector< uint8_t > ret =
_hwm.
send( cmd_get );
378 cmd.param4 =
static_cast< int >( set_limit );
382 cmd.param2 =
static_cast< int >( set_limit );
392 std::vector< uint8_t > ret =
_hwm.
send( cmd_get );
400 cmd.param3 =
static_cast< int >( set_limit );
404 cmd.param2 =
static_cast< int >( set_limit );
425 std::shared_ptr<d400_thermal_monitor> monitor,
426 std::shared_ptr<option>
toggle) :
427 _thermal_monitor(monitor),
434 auto val = _thermal_toggle->query();
443 _thermal_toggle->set(
value);
444 _recording_function(*
this);
449 return "Toggle thermal compensation adjustments mechanism";
467 snapshot = std::make_shared<const_value_option>(get_description(), 0.
f);
472 auto strong = _sensor.lock();
476 if( strong->is_streaming() )
495 switch(
static_cast< int >(
val ) )
498 return "61.0 mDeg/Sec";
501 return "30.5 mDeg/Sec";
504 return "15.3 mDeg/Sec";
507 return "7.6 mDeg/Sec";
510 return "3.8 mDeg/Sec";
519 return "gyro sensitivity resolutions, lowers the dynamic range for a more accurate readings";
524 if(
auto strong = _sensor.lock() )
525 return strong->is_opened();
rsutils::lazy< option_range > _range
virtual option_range get_range() const override
option_range get_range() const override
@ RS2_GYRO_SENSITIVITY_30_5_MILLI_DEG_SEC
float query() const override
std::string to_string(T value)
std::weak_ptr< limits_option > _gain_limit_toggle
@ RS2_OPTION_AUTO_GAIN_LIMIT_TOGGLE
@ RS2_GYRO_SENSITIVITY_3_8_MILLI_DEG_SEC
void set_using_old_opcode(float value)
virtual bool is_read_only() const override
option_range get_range() const override
void set_using_new_opcode(float value)
asic_temperature_option_mipi(std::shared_ptr< hw_monitor > hwm, rs2_option opt)
std::vector< uint8_t > query_using_new_opcode() const
std::vector< uint8_t > query_using_old_opcode() const
virtual float query() const override
void set_using_old_opcode(float value, float set_limit)
std::shared_ptr< hw_monitor > _hw_monitor
virtual float query() const override
virtual std::vector< uint8_t > send(std::vector< uint8_t > const &data) const
std::weak_ptr< limits_option > _exposure_limit_toggle
void set_using_new_opcode(float value)
void set_using_new_opcode(float value, float set_limit)
rsutils::lazy< option_range > _range
@ RS2_OPTION_AUTO_EXPOSURE_LIMIT_TOGGLE
float query() const override
bool is_valid(rs2_option value)
projector_temperature_option_mipi(std::shared_ptr< hw_monitor > hwm, rs2_option opt)
virtual void set(float value) override
bool is_valid(float value) const
const char * get_value_description(float value) const override
virtual const char * get_description() const override
limits_option(rs2_option option, option_range range, const char *description, hw_monitor &hwm, bool new_opcode=false)
float query_using_new_opcode() const
void create_snapshot(std::shared_ptr< option > &snapshot) const override
virtual void set(float value) override
float query_using_new_opcode() const
std::weak_ptr< sensor_base > _sensor
auto_exposure_limit_option(hw_monitor &hwm, const std::weak_ptr< sensor_base > &depth_ep, option_range range, std::shared_ptr< limits_option > exposure_limit_enable, bool ae_gain_limits_new_opcode=false)
auto_gain_limit_option(hw_monitor &hwm, const std::weak_ptr< sensor_base > &depth_ep, option_range range, std::shared_ptr< limits_option > gain_limit_enable, bool new_opcode=false)
virtual void set(float value) override
virtual option_range get_range() const override
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls,...
void set_using_old_opcode(float value)
virtual bool is_read_only() const override
virtual float query() const override
thermal_compensation(std::shared_ptr< d400_thermal_monitor > monitor, std::shared_ptr< option > toggle)
virtual float query() const override
virtual void set(float value) override
float query_using_old_opcode() const
const char * get_value_description(float value) const override
void set(float value) override
virtual bool is_read_only() const override
float query() const override
@ RS2_GYRO_SENSITIVITY_15_3_MILLI_DEG_SEC
bool is_enabled() const override
std::weak_ptr< sensor_base > _sensor
@ RS2_GYRO_SENSITIVITY_61_0_MILLI_DEG_SEC
float query_using_old_opcode() const
bool is_enabled() const override
@ RS2_GYRO_SENSITIVITY_7_6_MILLI_DEG_SEC
std::function< void(const option &)> _record_action
std::function< void(const option &)> _record_action
std::shared_ptr< hw_monitor > _hw_monitor
const char * get_description() const override
librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Fri Aug 2 2024 08:30:02