fw-update-helper.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2017 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 
6 #include "notifications.h"
7 
8 
9 namespace rs2
10 {
11  class viewer_model;
12 
15  std::map<int, std::vector<uint8_t>> create_default_fw_table();
16  std::vector<int> parse_fw_version(const std::string& fw);
17  bool is_upgradeable(const std::string& curr, const std::string& available);
19 
21  {
22  public:
23  firmware_update_manager(std::shared_ptr<notifications_model> not_model, device_model& model, device dev, context ctx, std::vector<uint8_t> fw, bool is_signed)
24  : process_manager("Firmware Update"), _not_model(not_model), _model(model),
25  _fw(fw), _is_signed(is_signed), _dev(dev), _ctx(ctx) {}
26 
27  const device_model& get_device_model() const { return _model; }
28  std::shared_ptr<notifications_model> get_protected_notification_model() { return _not_model.lock(); };
29 
30  private:
31  void process_flow(std::function<void()> cleanup,
32  invoker invoke) override;
33  bool check_for(
34  std::function<bool()> action, std::function<void()> cleanup,
35  std::chrono::system_clock::duration delta);
36 
37  std::weak_ptr<notifications_model> _not_model;
40  std::vector<uint8_t> _fw;
41  bool _is_signed;
43  };
44 
46  {
48  std::shared_ptr<firmware_update_manager> manager, bool expaned);
49 
50  void set_color_scheme(float t) const override;
51  void draw_content(ux_window& win, int x, int y, float t, std::string& error_message) override;
52  void draw_expanded(ux_window& win, std::string& error_message) override;
53  int calc_height() override;
54  };
55 }
GLint y
GLuint const GLchar * name
bool check_for(std::function< bool()> action, std::function< void()> cleanup, std::chrono::system_clock::duration delta)
Definition: cah-model.h:10
GLsizei const GLchar *const * string
GLdouble t
std::vector< int > parse_fw_version(const std::string &fw)
std::function< void(std::function< void()>)> invoker
GLdouble x
void process_flow(std::function< void()> cleanup, invoker invoke) override
std::weak_ptr< notifications_model > _not_model
const device_model & get_device_model() const
action
Definition: enums.py:62
bool is_recommended_fw_available(std::string id)
std::map< int, std::vector< uint8_t > > create_default_fw_table()
int parse_product_line(std::string id)
firmware_update_manager(std::shared_ptr< notifications_model > not_model, device_model &model, device dev, context ctx, std::vector< uint8_t > fw, bool is_signed)
std::shared_ptr< notifications_model > get_protected_notification_model()
std::string get_available_firmware_version(int product_line)
bool is_upgradeable(const std::string &curr, const std::string &available)
std::vector< uint8_t > _fw


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