USRP Hardware Driver and USRP Manual Version: 3.15.0.0-MacPorts-Release
UHD and USRP Manual
 
Loading...
Searching...
No Matches
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#ifndef INCLUDED_UHD_IMAGE_LOADER_HPP
10#define INCLUDED_UHD_IMAGE_LOADER_HPP
11
12#include <uhd/config.hpp>
15#include <boost/function.hpp>
16#include <string>
17
18namespace uhd {
19
21{
22public:
23 typedef struct
24 {
29 std::string firmware_path;
30 std::string fpga_path;
31 std::string out_path;
32 std::string id;
33 std::vector<uint8_t> component;
36
38
53 typedef boost::function<bool(const image_loader_args_t&)> loader_fcn_t;
54
56
61 static void register_image_loader(const std::string& device_type,
62 const loader_fcn_t& loader_fcn,
63 const std::string& recovery_instructions);
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} // namespace uhd
82
83#endif /* INCLUDED_UHD_IMAGE_LOADER_HPP */
Definition device_addr.hpp:39
Definition dict.hpp:22
Definition image_loader.hpp:21
static std::string get_recovery_instructions(const std::string &device_type)
Get the instructions on how to recovery a particular device.
static bool load(const image_loader_args_t &image_loader_args)
Load firmware and/or FPGA onto a device.
boost::function< bool(const image_loader_args_t &)> loader_fcn_t
Signature of an image loading function.
Definition image_loader.hpp:53
static void register_image_loader(const std::string &device_type, const loader_fcn_t &loader_fcn, const std::string &recovery_instructions)
Register an image loader.
#define UHD_API
Definition config.h:68
Definition build_info.hpp:13
boost::noncopyable noncopyable
Definition noncopyable.hpp:46
Definition image_loader.hpp:24
uhd::device_addr_t args
Definition image_loader.hpp:25
bool load_fpga
Definition image_loader.hpp:27
bool load_firmware
Definition image_loader.hpp:26
std::vector< uint8_t > component
Definition image_loader.hpp:33
bool download
Definition image_loader.hpp:28
std::string fpga_path
Definition image_loader.hpp:30
std::string id
Definition image_loader.hpp:32
std::string firmware_path
Definition image_loader.hpp:29
uhd::dict< std::string, std::string > metadata
Definition image_loader.hpp:34
std::string out_path
Definition image_loader.hpp:31