Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | List of all members
rs2::subdevice_model Class Reference

#include <model-views.h>

Public Member Functions

bool can_enable_zero_order ()
 
template<typename T , typename V >
bool check_profile (stream_profile p, T cond, std::map< V, std::map< int, stream_profile >> &profiles_map, std::vector< stream_profile > &results, V key, int num_streams, stream_profile &def_p)
 
bool draw_option (rs2_option opt, bool update_read_only_options, std::string &error_message, notifications_model &model)
 
void draw_options (const std::vector< rs2_option > &drawing_order, bool update_read_only_options, std::string &error_message, notifications_model &model)
 
bool draw_stream_selection (std::string &error_message)
 
template<typename T >
bool get_default_selection_index (const std::vector< T > &values, const T &def, int *index)
 
std::vector< stream_profileget_selected_profiles ()
 
void get_sorted_profiles (std::vector< stream_profile > &profiles)
 
std::vector< stream_profileget_supported_profiles ()
 
bool is_paused () const
 
bool is_selected_combination_supported ()
 
bool is_synchronized_frame (viewer_model &viewer, const frame &f)
 
bool is_there_common_fps ()
 
uint64_t num_supported_non_default_options () const
 
void pause ()
 
void play (const std::vector< stream_profile > &profiles, viewer_model &viewer, std::shared_ptr< rs2::asynchronous_syncer >)
 
void restore_ui_selection ()
 
void resume ()
 
void stop (std::shared_ptr< notifications_model > not_model)
 
void store_ui_selection ()
 
 subdevice_model (device &dev, std::shared_ptr< sensor > s, std::shared_ptr< atomic_objects_in_frame > objects, std::string &error_message, viewer_model &viewer, bool new_device_connected=true)
 
bool supports_on_chip_calib ()
 
void update (std::string &error_message, notifications_model &model)
 
void update_ui (std::vector< stream_profile > profiles_vec)
 
void verify_zero_order_conditions ()
 
 ~subdevice_model ()
 

Static Public Member Functions

static void populate_options (std::map< int, option_model > &opt_container, const std::string &opt_base_label, subdevice_model *model, std::shared_ptr< options > options, bool *options_invalidated, std::string &error_message)
 

Public Attributes

std::atomic< bool > _is_being_recorded { false }
 
bool _options_invalidated = false
 
std::atomic< bool > _pause
 
std::mutex _queue_lock
 
region_of_interest algo_roi
 
bool allow_change_fps_while_streaming = false
 
bool allow_change_resolution_while_streaming = false
 
bool auto_exposure_enabled = false
 
std::vector< std::shared_ptr< processing_block_model > > const_effects
 
std::shared_ptr< rs2::colorizerdepth_colorizer
 
std::shared_ptr< rs2::depth_huffman_decoderdepth_decoder
 
float depth_units = 1.f
 
std::shared_ptr< atomic_objects_in_framedetected_objects
 
device dev
 
bool draw_fps_selector = true
 
bool draw_streams_selector = true
 
std::map< int, std::vector< rs2_format > > format_values
 
std::map< int, std::vector< std::string > > formats
 
std::map< int, std::vector< int > > fps_values_per_stream
 
std::map< int, std::vector< std::string > > fpses_per_stream
 
subdevice_ui_selection last_valid_ui
 
int next_option = 0
 
rect normalized_zoom {0, 0, 1, 1}
 
std::function< void()> on_frame = []{}
 
std::map< int, option_modeloptions_metadata
 
std::vector< std::shared_ptr< processing_block_model > > post_processing
 
bool post_processing_enabled = true
 
std::map< int, bool > prev_stream_enabled
 
std::vector< stream_profileprofiles
 
frame_queues queues
 
std::vector< std::pair< int, int > > res_values
 
std::vector< std::stringresolutions
 
bool roi_checked = false
 
float roi_percentage
 
rect roi_rect
 
std::shared_ptr< sensors
 
std::vector< int > shared_fps_values
 
std::vector< std::stringshared_fpses
 
bool show_algo_roi = false
 
bool show_single_fps_list = false
 
float stereo_baseline = -1.f
 
std::map< int, std::stringstream_display_names
 
std::map< int, bool > stream_enabled
 
bool streaming = false
 
std::vector< rs2_optionsupported_options
 
tm2_model tm2
 
subdevice_ui_selection ui
 
viewer_modelviewer
 
std::shared_ptr< rs2::yuy_decoderyuy2rgb
 
std::shared_ptr< processing_block_modelzero_order_artifact_fix
 

Private Attributes

const float SHORT_RANGE_MAX_DISTANCE = 4.0f
 
const float SHORT_RANGE_MIN_DISTANCE = 0.05f
 

Detailed Description

Definition at line 545 of file model-views.h.

Constructor & Destructor Documentation

rs2::subdevice_model::subdevice_model ( device dev,
std::shared_ptr< sensor s,
std::shared_ptr< atomic_objects_in_frame objects,
std::string error_message,
viewer_model viewer,
bool  new_device_connected = true 
)

Definition at line 992 of file model-views.cpp.

rs2::subdevice_model::~subdevice_model ( )

Definition at line 1305 of file model-views.cpp.

Member Function Documentation

bool rs2::subdevice_model::can_enable_zero_order ( )

Definition at line 1983 of file model-views.cpp.

template<typename T , typename V >
bool rs2::subdevice_model::check_profile ( stream_profile  p,
cond,
std::map< V, std::map< int, stream_profile >> &  profiles_map,
std::vector< stream_profile > &  results,
key,
int  num_streams,
stream_profile def_p 
)

Definition at line 1677 of file model-views.cpp.

bool rs2::subdevice_model::draw_option ( rs2_option  opt,
bool  update_read_only_options,
std::string error_message,
notifications_model model 
)
inline

Definition at line 572 of file model-views.h.

void rs2::subdevice_model::draw_options ( const std::vector< rs2_option > &  drawing_order,
bool  update_read_only_options,
std::string error_message,
notifications_model model 
)

Definition at line 2127 of file model-views.cpp.

bool rs2::subdevice_model::draw_stream_selection ( std::string error_message)

Definition at line 1348 of file model-views.cpp.

template<typename T >
bool rs2::subdevice_model::get_default_selection_index ( const std::vector< T > &  values,
const T &  def,
int *  index 
)
inline

Definition at line 598 of file model-views.h.

std::vector< stream_profile > rs2::subdevice_model::get_selected_profiles ( )

Definition at line 1869 of file model-views.cpp.

void rs2::subdevice_model::get_sorted_profiles ( std::vector< stream_profile > &  profiles)

Definition at line 1710 of file model-views.cpp.

std::vector< stream_profile > rs2::subdevice_model::get_supported_profiles ( )

Definition at line 1739 of file model-views.cpp.

bool rs2::subdevice_model::is_paused ( ) const

Definition at line 1968 of file model-views.cpp.

bool rs2::subdevice_model::is_selected_combination_supported ( )

Definition at line 1583 of file model-views.cpp.

bool rs2::subdevice_model::is_synchronized_frame ( viewer_model viewer,
const frame f 
)

Definition at line 1998 of file model-views.cpp.

bool rs2::subdevice_model::is_there_common_fps ( )

Definition at line 1311 of file model-views.cpp.

uint64_t rs2::subdevice_model::num_supported_non_default_options ( ) const

Definition at line 2147 of file model-views.cpp.

void rs2::subdevice_model::pause ( )

Definition at line 1973 of file model-views.cpp.

void rs2::subdevice_model::play ( const std::vector< stream_profile > &  profiles,
viewer_model viewer,
std::shared_ptr< rs2::asynchronous_syncer syncer 
)

Definition at line 2009 of file model-views.cpp.

void rs2::subdevice_model::populate_options ( std::map< int, option_model > &  opt_container,
const std::string opt_base_label,
subdevice_model model,
std::shared_ptr< options options,
bool *  options_invalidated,
std::string error_message 
)
static

Definition at line 918 of file model-views.cpp.

void rs2::subdevice_model::restore_ui_selection ( )
inline

Definition at line 594 of file model-views.h.

void rs2::subdevice_model::resume ( )

Definition at line 1978 of file model-views.cpp.

void rs2::subdevice_model::stop ( std::shared_ptr< notifications_model not_model)

Definition at line 1931 of file model-views.cpp.

void rs2::subdevice_model::store_ui_selection ( )
inline

Definition at line 595 of file model-views.h.

bool rs2::subdevice_model::supports_on_chip_calib ( )

Definition at line 4996 of file model-views.cpp.

void rs2::subdevice_model::update ( std::string error_message,
notifications_model model 
)

Definition at line 2068 of file model-views.cpp.

void rs2::subdevice_model::update_ui ( std::vector< stream_profile profiles_vec)

Definition at line 1635 of file model-views.cpp.

void rs2::subdevice_model::verify_zero_order_conditions ( )

Definition at line 1991 of file model-views.cpp.

Member Data Documentation

std::atomic<bool> rs2::subdevice_model::_is_being_recorded { false }

Definition at line 662 of file model-views.h.

bool rs2::subdevice_model::_options_invalidated = false

Definition at line 647 of file model-views.h.

std::atomic<bool> rs2::subdevice_model::_pause

Definition at line 661 of file model-views.h.

std::mutex rs2::subdevice_model::_queue_lock

Definition at line 646 of file model-views.h.

region_of_interest rs2::subdevice_model::algo_roi

Definition at line 667 of file model-views.h.

bool rs2::subdevice_model::allow_change_fps_while_streaming = false

Definition at line 652 of file model-views.h.

bool rs2::subdevice_model::allow_change_resolution_while_streaming = false

Definition at line 651 of file model-views.h.

bool rs2::subdevice_model::auto_exposure_enabled = false

Definition at line 655 of file model-views.h.

std::vector<std::shared_ptr<processing_block_model> > rs2::subdevice_model::const_effects

Definition at line 678 of file model-views.h.

std::shared_ptr<rs2::colorizer> rs2::subdevice_model::depth_colorizer

Definition at line 671 of file model-views.h.

std::shared_ptr<rs2::depth_huffman_decoder> rs2::subdevice_model::depth_decoder

Definition at line 674 of file model-views.h.

float rs2::subdevice_model::depth_units = 1.f

Definition at line 656 of file model-views.h.

std::shared_ptr< atomic_objects_in_frame > rs2::subdevice_model::detected_objects

Definition at line 623 of file model-views.h.

device rs2::subdevice_model::dev

Definition at line 621 of file model-views.h.

bool rs2::subdevice_model::draw_fps_selector = true

Definition at line 665 of file model-views.h.

bool rs2::subdevice_model::draw_streams_selector = true

Definition at line 664 of file model-views.h.

std::map<int, std::vector<rs2_format> > rs2::subdevice_model::format_values

Definition at line 641 of file model-views.h.

std::map<int, std::vector<std::string> > rs2::subdevice_model::formats

Definition at line 629 of file model-views.h.

std::map<int, std::vector<int> > rs2::subdevice_model::fps_values_per_stream

Definition at line 638 of file model-views.h.

std::map<int, std::vector<std::string> > rs2::subdevice_model::fpses_per_stream

Definition at line 627 of file model-views.h.

subdevice_ui_selection rs2::subdevice_model::last_valid_ui

Definition at line 635 of file model-views.h.

int rs2::subdevice_model::next_option = 0

Definition at line 648 of file model-views.h.

rect rs2::subdevice_model::normalized_zoom {0, 0, 1, 1}

Definition at line 653 of file model-views.h.

std::function<void()> rs2::subdevice_model::on_frame = []{}

Definition at line 619 of file model-views.h.

std::map<int, option_model> rs2::subdevice_model::options_metadata

Definition at line 625 of file model-views.h.

std::vector<std::shared_ptr<processing_block_model> > rs2::subdevice_model::post_processing

Definition at line 676 of file model-views.h.

bool rs2::subdevice_model::post_processing_enabled = true

Definition at line 677 of file model-views.h.

std::map<int, bool> rs2::subdevice_model::prev_stream_enabled

Definition at line 631 of file model-views.h.

std::vector<stream_profile> rs2::subdevice_model::profiles

Definition at line 643 of file model-views.h.

frame_queues rs2::subdevice_model::queues

Definition at line 645 of file model-views.h.

std::vector<std::pair<int, int> > rs2::subdevice_model::res_values

Definition at line 637 of file model-views.h.

std::vector<std::string> rs2::subdevice_model::resolutions

Definition at line 626 of file model-views.h.

bool rs2::subdevice_model::roi_checked = false

Definition at line 659 of file model-views.h.

float rs2::subdevice_model::roi_percentage

Definition at line 669 of file model-views.h.

rect rs2::subdevice_model::roi_rect

Definition at line 654 of file model-views.h.

std::shared_ptr<sensor> rs2::subdevice_model::s

Definition at line 620 of file model-views.h.

std::vector<int> rs2::subdevice_model::shared_fps_values

Definition at line 639 of file model-views.h.

std::vector<std::string> rs2::subdevice_model::shared_fpses

Definition at line 628 of file model-views.h.

const float rs2::subdevice_model::SHORT_RANGE_MAX_DISTANCE = 4.0f
private

Definition at line 682 of file model-views.h.

const float rs2::subdevice_model::SHORT_RANGE_MIN_DISTANCE = 0.05f
private

Definition at line 681 of file model-views.h.

bool rs2::subdevice_model::show_algo_roi = false

Definition at line 668 of file model-views.h.

bool rs2::subdevice_model::show_single_fps_list = false

Definition at line 640 of file model-views.h.

float rs2::subdevice_model::stereo_baseline = -1.f

Definition at line 657 of file model-views.h.

std::map<int, std::string> rs2::subdevice_model::stream_display_names

Definition at line 632 of file model-views.h.

std::map<int, bool> rs2::subdevice_model::stream_enabled

Definition at line 630 of file model-views.h.

bool rs2::subdevice_model::streaming = false

Definition at line 650 of file model-views.h.

std::vector<rs2_option> rs2::subdevice_model::supported_options

Definition at line 649 of file model-views.h.

tm2_model rs2::subdevice_model::tm2

Definition at line 622 of file model-views.h.

subdevice_ui_selection rs2::subdevice_model::ui

Definition at line 634 of file model-views.h.

viewer_model& rs2::subdevice_model::viewer

Definition at line 618 of file model-views.h.

std::shared_ptr<rs2::yuy_decoder> rs2::subdevice_model::yuy2rgb

Definition at line 672 of file model-views.h.

std::shared_ptr<processing_block_model> rs2::subdevice_model::zero_order_artifact_fix

Definition at line 673 of file model-views.h.


The documentation for this class was generated from the following files:


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:41