| USRP Hardware Driver and USRP Manual Version: 4.8.0.makepkg-0-g308126a4 UHD and USRP Manual |

Loading...
Searching...
No Matches
paths.hpp
Go to the documentation of this file.
1//
2// Copyright 2011-2012,2015 Ettus Research LLC
3// Copyright 2018 Ettus Research, a National Instruments Company
4//
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
7
8#pragma once
9
10#include <uhd/config.hpp>
11#include <boost/filesystem.hpp>
12#include <string>
13#include <vector>
14
15 namespace fs = boost::filesystem;
16
17 namespace uhd {
18
20//
21// This is a directory where temporary files can be written. The path is
22// chosen as follows:
23// - If the UHD_TMP_PATH environment variable is set, its value is returned.
24// - Otherwise, OS-specific defaults are used to determine the temporary
25// directory.
26 UHD_API std::string get_tmp_path(void);
27
29//
30// This is the path to the directory containing the UHD library (e.g.,
31// libuhd.so or uhd.dll).
32 UHD_API std::string get_lib_path(void);
33
35//
36// This path is typically identical with the installation prefix, but can be
37// overridden with the UHD_PKG_PATH environment variable.
38//
39// This path is "calculated" by identifying the path to the UHD library and
40// returning the parent directory of the library path.
41 UHD_API std::string get_pkg_path(void);
42
43
45//
46// This path is typically identical with get_pkg_path()/share/uhd, but can be
47// overridden with the UHD_PKG_DATA_PATH environment variable.
48//
49// This path is where UHD stores data files that are not part of the library
50// itself, such as images, RFNoC YAML files, and calibration data.
51 UHD_API std::string get_pkg_data_path(void);
52
54 UHD_API std::string get_cal_data_path(void);
55
57//
58// This is a list of paths UHD will use to find additional modules to load at
59// runtime.
60 UHD_API std::vector<fs::path> get_module_paths(void);
61
79 UHD_API std::string get_images_dir(const std::string& search_paths);
80
93 UHD_API std::string find_image_path(
94 const std::string& image_name, const std::string& search_paths = "");
95
102 UHD_API std::string find_utility(const std::string& name);
103
109 UHD_API std::string print_utility_error(
110 const std::string& name, const std::string& args = "");
111} // namespace uhd
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
uhd
Definition build_info.hpp:12
uhd::get_module_paths
UHD_API std::vector< fs::path > get_module_paths(void)
Get UHD library paths.
uhd::get_pkg_data_path
UHD_API std::string get_pkg_data_path(void)
Get a string representing the system's package data directory ("share")
uhd::find_image_path
UHD_API std::string find_image_path(const std::string &image_name, const std::string &search_paths="")
uhd::get_pkg_path
UHD_API std::string get_pkg_path(void)
Get a string representing the system's pkg directory.
uhd::get_lib_path
UHD_API std::string get_lib_path(void)
Get a string representing the system's library directory.
uhd::get_images_dir
UHD_API std::string get_images_dir(const std::string &search_paths)
uhd::get_cal_data_path
UHD_API std::string get_cal_data_path(void)
Get a string representing the location of the calibration database.
uhd::print_utility_error
UHD_API std::string print_utility_error(const std::string &name, const std::string &args="")
uhd::find_utility
UHD_API std::string find_utility(const std::string &name)
uhd::get_tmp_path
UHD_API std::string get_tmp_path(void)
Get a string representing the system's temporary directory.