Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
rs2::device_model Class Reference

#include <model-views.h>

Public Types

typedef std::function< void(std::function< void()> load)> json_loading_func
 

Public Member Functions

void begin_update (std::vector< uint8_t > data, viewer_model &viewer, std::string &error_message)
 
void begin_update_unsigned (viewer_model &viewer, std::string &error_message)
 
void check_for_bundled_fw_update (const rs2::context &ctx, std::shared_ptr< notifications_model > not_model)
 
void check_for_device_updates (viewer_model &viewer)
 
 device_model (device &dev, std::string &error_message, viewer_model &viewer, bool new_device_connected=true, bool allow_remove=true)
 
bool draw_advanced_controls (viewer_model &view, ux_window &window, std::string &error_message)
 
void draw_controls (float panel_width, float panel_height, ux_window &window, std::string &error_message, device_model *&device_to_remove, viewer_model &viewer, float windows_width, std::vector< std::function< void()>> &draw_later, bool load_json_if_streaming=false, json_loading_func json_loading=[](std::function< void()> load){load();}, bool draw_device_outline=true)
 
int draw_playback_panel (ux_window &window, ImFont *font, viewer_model &view)
 
std::shared_ptr< atomic_objects_in_frameget_detected_objects () const
 
void handle_hardware_events (const std::string &serialized_data)
 
bool is_cah_model_enabled () const
 
bool is_streaming () const
 
void pause_record ()
 
void refresh_notifications (viewer_model &viewer)
 
void reset ()
 
void resume_record ()
 
void start_recording (const std::string &path, std::string &error_message)
 
void stop_recording (viewer_model &viewer)
 
 ~device_model ()
 

Public Attributes

bool _allow_remove = true
 
bool _playback_repeat = true
 
bool _should_replay = false
 
std::set< std::stringadvanced_mode_settings_file_names
 
device dev
 
std::shared_ptr< rs2::asynchronous_syncerdev_syncer
 
bool get_curr_advanced_controls = true
 
std::string id
 
std::vector< std::pair< std::string, std::string > > infos
 
bool is_recording = false
 
bool metadata_supported = false
 
int playback_speed_index = 2
 
std::vector< std::shared_ptr< notification_model > > related_notifications
 
std::vector< std::stringrestarting_device_info
 
int seek_pos = 0
 
std::string selected_file_preset
 
bool show_depth_only = false
 
bool show_device_info = false
 
bool show_reset_camera_accuracy_health_popup = false
 
bool show_stream_selection = true
 
bool show_trigger_camera_accuracy_health_popup = false
 
std::vector< std::shared_ptr< subdevice_model > > subdevices
 
std::shared_ptr< syncer_modelsyncer
 

Private Member Functions

float draw_device_panel (float panel_width, ux_window &window, std::string &error_message, viewer_model &viewer)
 
void draw_info_icon (ux_window &window, ImFont *font, const ImVec2 &size)
 
int draw_playback_controls (ux_window &window, ImFont *font, viewer_model &view)
 
float draw_preset_panel (float panel_width, ux_window &window, std::string &error_message, viewer_model &viewer, bool update_read_only_options, bool load_json_if_streaming, json_loading_func json_loading)
 
int draw_seek_bar ()
 
bool handle_online_fw_update (const context &ctx, std::shared_ptr< notifications_model > nm, std::shared_ptr< sw_update::dev_updates_profile::update_profile > update_profile)
 
void handle_online_sw_update (std::shared_ptr< notifications_model > nm, std::shared_ptr< sw_update::dev_updates_profile::update_profile > update_profile)
 
void load_viewer_configurations (const std::string &json_str)
 
void play_defaults (viewer_model &view)
 
std::string pretty_time (std::chrono::nanoseconds duration)
 
bool prompt_toggle_advanced_mode (bool enable_advanced_mode, const std::string &message_text, std::vector< std::string > &restarting_device_info, viewer_model &view, ux_window &window, const std::string &error_message)
 
void save_viewer_configurations (std::ofstream &outfile, nlohmann::json &j)
 

Private Attributes

std::unique_ptr< cah_model_accuracy_health_model
 
calibration_model _calib_model
 
std::shared_ptr< atomic_objects_in_frame_detected_objects
 
std::shared_ptr< recorder_recorder
 
utilities::time::periodic_timer _update_readonly_options_timer
 
std::shared_ptr< updates_model_updates
 
std::shared_ptr< sw_update::dev_updates_profile::update_profile_updates_profile
 
advanced_mode_control amc
 
std::vector< std::shared_ptr< subdevice_model > > live_subdevices
 
bool pause_required = false
 

Detailed Description

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

Member Typedef Documentation

typedef std::function<void(std::function<void()> load)> rs2::device_model::json_loading_func

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

Constructor & Destructor Documentation

rs2::device_model::device_model ( device dev,
std::string error_message,
viewer_model viewer,
bool  new_device_connected = true,
bool  allow_remove = true 
)
explicit

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

rs2::device_model::~device_model ( )

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

Member Function Documentation

void rs2::device_model::begin_update ( std::vector< uint8_t data,
viewer_model viewer,
std::string error_message 
)

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

void rs2::device_model::begin_update_unsigned ( viewer_model viewer,
std::string error_message 
)

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

void rs2::device_model::check_for_bundled_fw_update ( const rs2::context ctx,
std::shared_ptr< notifications_model not_model 
)

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

void rs2::device_model::check_for_device_updates ( viewer_model viewer)

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

bool rs2::device_model::draw_advanced_controls ( viewer_model view,
ux_window window,
std::string error_message 
)

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

void rs2::device_model::draw_controls ( float  panel_width,
float  panel_height,
ux_window window,
std::string error_message,
device_model *&  device_to_remove,
viewer_model viewer,
float  windows_width,
std::vector< std::function< void()>> &  draw_later,
bool  load_json_if_streaming = false,
json_loading_func  json_loading = [](std::function<void()> load) {load(); },
bool  draw_device_outline = true 
)

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

float rs2::device_model::draw_device_panel ( float  panel_width,
ux_window window,
std::string error_message,
viewer_model viewer 
)
private

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

void rs2::device_model::draw_info_icon ( ux_window window,
ImFont font,
const ImVec2 size 
)
private

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

int rs2::device_model::draw_playback_controls ( ux_window window,
ImFont font,
viewer_model view 
)
private

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

int rs2::device_model::draw_playback_panel ( ux_window window,
ImFont font,
viewer_model view 
)

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

float rs2::device_model::draw_preset_panel ( float  panel_width,
ux_window window,
std::string error_message,
viewer_model viewer,
bool  update_read_only_options,
bool  load_json_if_streaming,
json_loading_func  json_loading 
)
private

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

int rs2::device_model::draw_seek_bar ( )
private

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

std::shared_ptr< atomic_objects_in_frame > rs2::device_model::get_detected_objects ( ) const
inline

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

void rs2::device_model::handle_hardware_events ( const std::string serialized_data)

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

bool rs2::device_model::handle_online_fw_update ( const context ctx,
std::shared_ptr< notifications_model nm,
std::shared_ptr< sw_update::dev_updates_profile::update_profile update_profile 
)
private

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

void rs2::device_model::handle_online_sw_update ( std::shared_ptr< notifications_model nm,
std::shared_ptr< sw_update::dev_updates_profile::update_profile update_profile 
)
private

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

bool rs2::device_model::is_cah_model_enabled ( ) const
inline

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

bool rs2::device_model::is_streaming ( ) const

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

void rs2::device_model::load_viewer_configurations ( const std::string json_str)
private

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

void rs2::device_model::pause_record ( )

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

void rs2::device_model::play_defaults ( viewer_model view)
private

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

std::string rs2::device_model::pretty_time ( std::chrono::nanoseconds  duration)
private

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

bool rs2::device_model::prompt_toggle_advanced_mode ( bool  enable_advanced_mode,
const std::string message_text,
std::vector< std::string > &  restarting_device_info,
viewer_model view,
ux_window window,
const std::string error_message 
)
private

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

void rs2::device_model::refresh_notifications ( viewer_model viewer)

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

void rs2::device_model::reset ( )

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

void rs2::device_model::resume_record ( )

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

void rs2::device_model::save_viewer_configurations ( std::ofstream &  outfile,
nlohmann::json j 
)
private

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

void rs2::device_model::start_recording ( const std::string path,
std::string error_message 
)

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

void rs2::device_model::stop_recording ( viewer_model viewer)

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

Member Data Documentation

std::unique_ptr< cah_model > rs2::device_model::_accuracy_health_model
private

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

bool rs2::device_model::_allow_remove = true

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

calibration_model rs2::device_model::_calib_model
private

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

std::shared_ptr< atomic_objects_in_frame > rs2::device_model::_detected_objects
private

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

bool rs2::device_model::_playback_repeat = true

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

std::shared_ptr<recorder> rs2::device_model::_recorder
private

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

bool rs2::device_model::_should_replay = false

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

utilities::time::periodic_timer rs2::device_model::_update_readonly_options_timer
private

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

std::shared_ptr<updates_model> rs2::device_model::_updates
private

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

std::shared_ptr<sw_update::dev_updates_profile::update_profile > rs2::device_model::_updates_profile
private

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

std::set<std::string> rs2::device_model::advanced_mode_settings_file_names

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

advanced_mode_control rs2::device_model::amc
private

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

device rs2::device_model::dev

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

std::shared_ptr<rs2::asynchronous_syncer> rs2::device_model::dev_syncer

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

bool rs2::device_model::get_curr_advanced_controls = true

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

std::string rs2::device_model::id

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

std::vector<std::pair<std::string, std::string> > rs2::device_model::infos

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

bool rs2::device_model::is_recording = false

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

std::vector<std::shared_ptr<subdevice_model> > rs2::device_model::live_subdevices
private

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

bool rs2::device_model::metadata_supported = false

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

bool rs2::device_model::pause_required = false
private

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

int rs2::device_model::playback_speed_index = 2

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

std::vector<std::shared_ptr<notification_model> > rs2::device_model::related_notifications

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

std::vector<std::string> rs2::device_model::restarting_device_info

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

int rs2::device_model::seek_pos = 0

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

std::string rs2::device_model::selected_file_preset

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

bool rs2::device_model::show_depth_only = false

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

bool rs2::device_model::show_device_info = false

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

bool rs2::device_model::show_reset_camera_accuracy_health_popup = false

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

bool rs2::device_model::show_stream_selection = true

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

bool rs2::device_model::show_trigger_camera_accuracy_health_popup = false

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

std::vector<std::shared_ptr<subdevice_model> > rs2::device_model::subdevices

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

std::shared_ptr<syncer_model> rs2::device_model::syncer

Definition at line 795 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:40