USRP Hardware Driver and USRP Manual  Version: 4.4.0.HEAD-0-g5fac246b
UHD and USRP Manual
image_loader.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2014-2017 Ettus Research
3 // Copyright 2018 Ettus Research, a National Instruments Company
4 // Copyright 2019 Ettus Research, a National Instruments Brand
5 //
6 // SPDX-License-Identifier: GPL-3.0-or-later
7 //
8 
9 #pragma once
10 
11 #include <uhd/config.hpp>
14 #include <functional>
15 #include <string>
16 
17 namespace uhd {
18 
20 {
21 public:
23  {
26  bool load_fpga;
27  bool download;
28  std::string firmware_path;
29  std::string fpga_path;
30  std::string out_path;
31  std::string id;
32  std::vector<uint8_t> component;
34  bool delay_reload = false;
35  bool just_reload = false;
36  };
37 
39 
54  typedef std::function<bool(const image_loader_args_t&)> loader_fcn_t;
55 
57 
62  static void register_image_loader(const std::string& device_type,
63  const loader_fcn_t& loader_fcn,
64  const std::string& recovery_instructions);
65 
67 
70  static bool load(const image_loader_args_t& image_loader_args);
71 
73 
79  static std::string get_recovery_instructions(const std::string& device_type);
80 };
81 
82 } // namespace uhd
device_addr.hpp
config.hpp
uhd::image_loader::image_loader_args_t::download
bool download
Definition: image_loader.hpp:27
uhd::image_loader::image_loader_args_t::args
uhd::device_addr_t args
Definition: image_loader.hpp:24
uhd::image_loader::image_loader_args_t::out_path
std::string out_path
Definition: image_loader.hpp:30
UHD_API
#define UHD_API
Definition: config.h:87
noncopyable.hpp
uhd::device_addr_t
Definition: device_addr.hpp:37
uhd::image_loader::loader_fcn_t
std::function< bool(const image_loader_args_t &)> loader_fcn_t
Signature of an image loading function.
Definition: image_loader.hpp:54
uhd::image_loader::image_loader_args_t::metadata
uhd::dict< std::string, std::string > metadata
Definition: image_loader.hpp:33
uhd
Definition: build_info.hpp:12
uhd::image_loader::image_loader_args_t
Definition: image_loader.hpp:22
uhd::dict< std::string, std::string >
uhd::noncopyable
boost::noncopyable noncopyable
Definition: noncopyable.hpp:45
uhd::image_loader
Definition: image_loader.hpp:19
uhd::image_loader::image_loader_args_t::component
std::vector< uint8_t > component
Definition: image_loader.hpp:32
uhd::image_loader::image_loader_args_t::load_firmware
bool load_firmware
Definition: image_loader.hpp:25
uhd::image_loader::image_loader_args_t::firmware_path
std::string firmware_path
Definition: image_loader.hpp:28
uhd::image_loader::image_loader_args_t::fpga_path
std::string fpga_path
Definition: image_loader.hpp:29
uhd::image_loader::image_loader_args_t::id
std::string id
Definition: image_loader.hpp:31
uhd::image_loader::image_loader_args_t::load_fpga
bool load_fpga
Definition: image_loader.hpp:26