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

#include <updates-model.h>

Classes

struct  position_params
 
struct  update_profile_model
 

Public Member Functions

void add_profile (const update_profile_model &update)
 
void draw (std::shared_ptr< notifications_model > not_model, ux_window &window, std::string &error_message)
 
bool has_updates () const
 
void remove_profile (const sw_update::dev_updates_profile::update_profile &update)
 
void set_device_status (const sw_update::dev_updates_profile::update_profile &update, bool active)
 
void update_profile (const update_profile_model &update)
 

Private Types

enum  fw_update_fail_reason { fw_update_fail_reason::none = 0, fw_update_fail_reason::downloading_error = 1, fw_update_fail_reason::updating_error = 2 }
 
enum  fw_update_states {
  fw_update_states::ready = 0, fw_update_states::downloading = 1, fw_update_states::started = 2, fw_update_states::completed = 3,
  fw_update_states::failed_downloading = 4, fw_update_states::failed_updating = 5
}
 

Private Member Functions

bool draw_firmware_section (std::shared_ptr< notifications_model > not_model, const char *window_name, update_profile_model &selected_profile, position_params &pos_params, ux_window &window, std::string &error_message)
 
bool draw_software_section (const char *window_name, update_profile_model &selected_profile, position_params &pos_params, ux_window &window, std::string &error_message)
 

Private Attributes

std::atomic< int > _fw_download_progress { 0 }
 
std::vector< uint8_t_fw_image
 
std::shared_ptr< firmware_update_manager_fw_update = nullptr
 
fw_update_states _fw_update_state = fw_update_states::ready
 
std::shared_ptr< texture_buffer_icon = nullptr
 
std::mutex _lock
 
progress_bar _progress
 
bool _retry = false
 
std::shared_ptr< firmware_update_manager_update_manager = nullptr
 
std::vector< update_profile_model_updates
 
bool emphasize_dismiss_text = false
 
bool ignore = false
 
int selected_firmware_update_index = 0
 
int selected_index = 0
 
int selected_software_update_index = 0
 

Detailed Description

Definition at line 19 of file updates-model.h.

Member Enumeration Documentation

Enumerator
none 
downloading_error 
updating_error 

Definition at line 122 of file updates-model.h.

Enumerator
ready 
downloading 
started 
completed 
failed_downloading 
failed_updating 

Definition at line 112 of file updates-model.h.

Member Function Documentation

void rs2::updates_model::add_profile ( const update_profile_model update)
inline

Definition at line 30 of file updates-model.h.

void updates_model::draw ( std::shared_ptr< notifications_model not_model,
ux_window window,
std::string error_message 
)

Definition at line 16 of file updates-model.cpp.

bool updates_model::draw_firmware_section ( std::shared_ptr< notifications_model not_model,
const char *  window_name,
update_profile_model selected_profile,
position_params pos_params,
ux_window window,
std::string error_message 
)
private

Definition at line 496 of file updates-model.cpp.

bool updates_model::draw_software_section ( const char *  window_name,
update_profile_model selected_profile,
position_params pos_params,
ux_window window,
std::string error_message 
)
private

Definition at line 237 of file updates-model.cpp.

bool rs2::updates_model::has_updates ( ) const
inline

Definition at line 78 of file updates-model.h.

void rs2::updates_model::remove_profile ( const sw_update::dev_updates_profile::update_profile update)
inline

Definition at line 55 of file updates-model.h.

void rs2::updates_model::set_device_status ( const sw_update::dev_updates_profile::update_profile update,
bool  active 
)
inline

Definition at line 68 of file updates-model.h.

void rs2::updates_model::update_profile ( const update_profile_model update)
inline

Definition at line 44 of file updates-model.h.

Member Data Documentation

std::atomic<int> rs2::updates_model::_fw_download_progress { 0 }
private

Definition at line 132 of file updates-model.h.

std::vector<uint8_t> rs2::updates_model::_fw_image
private

Definition at line 135 of file updates-model.h.

std::shared_ptr<firmware_update_manager> rs2::updates_model::_fw_update = nullptr
private

Definition at line 110 of file updates-model.h.

fw_update_states rs2::updates_model::_fw_update_state = fw_update_states::ready
private

Definition at line 129 of file updates-model.h.

std::shared_ptr<texture_buffer> rs2::updates_model::_icon = nullptr
private

Definition at line 106 of file updates-model.h.

std::mutex rs2::updates_model::_lock
mutableprivate

Definition at line 107 of file updates-model.h.

progress_bar rs2::updates_model::_progress
private

Definition at line 131 of file updates-model.h.

bool rs2::updates_model::_retry = false
private

Definition at line 133 of file updates-model.h.

std::shared_ptr<firmware_update_manager> rs2::updates_model::_update_manager = nullptr
private

Definition at line 134 of file updates-model.h.

std::vector<update_profile_model> rs2::updates_model::_updates
private

Definition at line 105 of file updates-model.h.

bool rs2::updates_model::emphasize_dismiss_text = false
private

Definition at line 108 of file updates-model.h.

bool rs2::updates_model::ignore = false
private

Definition at line 104 of file updates-model.h.

int rs2::updates_model::selected_firmware_update_index = 0
private

Definition at line 103 of file updates-model.h.

int rs2::updates_model::selected_index = 0
private

Definition at line 101 of file updates-model.h.

int rs2::updates_model::selected_software_update_index = 0
private

Definition at line 102 of file updates-model.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