USRP Hardware Driver and USRP Manual Version: 20250415.0.git50967d13.fc40
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
15namespace fs = boost::filesystem;
16
17namespace 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.
26UHD_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).
32UHD_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.
41UHD_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.
51UHD_API std::string get_pkg_data_path(void);
52
54UHD_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.
60UHD_API std::vector<fs::path> get_module_paths(void);
61
79UHD_API std::string get_images_dir(const std::string& search_paths);
80
94 const std::string& image_name, const std::string& search_paths = "");
95
102UHD_API std::string find_utility(const std::string& name);
103
110 const std::string& name, const std::string& args = "");
111} // namespace uhd
#define UHD_API
Definition config.h:87
Definition build_info.hpp:12
UHD_API std::vector< fs::path > get_module_paths(void)
Get UHD library paths.
UHD_API std::string get_pkg_data_path(void)
Get a string representing the system's package data directory ("share")
UHD_API std::string find_image_path(const std::string &image_name, const std::string &search_paths="")
UHD_API std::string get_pkg_path(void)
Get a string representing the system's pkg directory.
UHD_API std::string get_lib_path(void)
Get a string representing the system's library directory.
UHD_API std::string get_images_dir(const std::string &search_paths)
UHD_API std::string get_cal_data_path(void)
Get a string representing the location of the calibration database.
UHD_API std::string print_utility_error(const std::string &name, const std::string &args="")
UHD_API std::string find_utility(const std::string &name)
UHD_API std::string get_tmp_path(void)
Get a string representing the system's temporary directory.