USRP Hardware Driver and USRP Manual  Version: 3.11.0.HEAD-0-ga1b5c4ae
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 //
5 // SPDX-License-Identifier: GPL-3.0-or-later
6 //
7 
8 #ifndef INCLUDED_UHD_IMAGE_LOADER_HPP
9 #define INCLUDED_UHD_IMAGE_LOADER_HPP
10 
11 #include <string>
12 
13 #include <boost/function.hpp>
14 #include <boost/noncopyable.hpp>
15 
16 #include <uhd/config.hpp>
18 
19 namespace uhd{
20 
21 class UHD_API image_loader : boost::noncopyable{
22 
23 public:
24 
25  typedef struct{
28  bool load_fpga;
29  bool download;
30  std::string firmware_path;
31  std::string fpga_path;
32  std::string out_path;
34 
36 
51  typedef boost::function<bool(const image_loader_args_t &)> loader_fcn_t;
52 
54 
59  static void register_image_loader(
60  const std::string &device_type,
61  const loader_fcn_t &loader_fcn,
62  const std::string &recovery_instructions
63  );
64 
66 
69  static bool load(const image_loader_args_t &image_loader_args);
70 
72 
78  static std::string get_recovery_instructions(const std::string &device_type);
79 };
80 
81 }
82 
83 #endif /* INCLUDED_UHD_IMAGE_LOADER_HPP */
bool download
Definition: image_loader.hpp:29
std::string out_path
Definition: image_loader.hpp:32
boost::function< bool(const image_loader_args_t &)> loader_fcn_t
Signature of an image loading function.
Definition: image_loader.hpp:51
uhd::device_addr_t args
Definition: image_loader.hpp:26
Definition: build_info.hpp:14
Definition: image_loader.hpp:25
bool load_fpga
Definition: image_loader.hpp:28
#define UHD_API
Definition: config.h:63
std::string fpga_path
Definition: image_loader.hpp:31
std::string firmware_path
Definition: image_loader.hpp:30
Definition: image_loader.hpp:21
Definition: device_addr.hpp:37
bool load_firmware
Definition: image_loader.hpp:27