| USRP Hardware Driver and Device Manual Version: 4.10.0.0 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 <filesystem>
12#include <string>
13#include <vector>
14
15 namespace uhd {
16
18//
19// This is a directory where temporary files can be written. The path is
20// chosen as follows:
21// - If the UHD_TMP_PATH environment variable is set, its value is returned.
22// - Otherwise, OS-specific defaults are used to determine the temporary
23// directory.
24 UHD_API std::string get_tmp_path(void);
25
27//
28// This is the path to the directory containing the UHD library (e.g.,
29// libuhd.so or uhd.dll).
30 UHD_API std::string get_lib_path(void);
31
33//
34// This path is typically identical with the installation prefix, but can be
35// overridden with the UHD_PKG_PATH environment variable.
36//
37// This path is "calculated" by identifying the path to the UHD library and
38// returning the parent directory of the library path.
39 UHD_API std::string get_pkg_path(void);
40
41
43//
44// This path is typically identical with get_pkg_path()/share/uhd, but can be
45// overridden with the UHD_PKG_DATA_PATH environment variable.
46//
47// This path is where UHD stores data files that are not part of the library
48// itself, such as images, RFNoC YAML files, and calibration data.
49 UHD_API std::string get_pkg_data_path(void);
50
52 UHD_API std::string get_cal_data_path(void);
53
55//
56// This is a list of paths UHD will use to find additional modules to load at
57// runtime.
58 UHD_API std::vector<std::filesystem::path> get_module_paths(void);
59
77 UHD_API std::string get_images_dir(const std::string& search_paths);
78
91 UHD_API std::string find_image_path(
92 const std::string& image_name, const std::string& search_paths = "");
93
100 UHD_API std::string find_utility(const std::string& name);
101
107 UHD_API std::string print_utility_error(
108 const std::string& name, const std::string& args = "");
109} // 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< std::filesystem::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_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.