Loading...
Searching...
No Matches
paths.hpp
Go to the documentation of this file.
//
// Copyright 2011-2012,2015 Ettus Research LLC
// Copyright 2018 Ettus Research, a National Instruments Company
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#pragma once
#include <uhd/config.hpp>
#include <boost/filesystem.hpp>
#include <string>
#include <vector>
namespace fs = boost::filesystem;
namespace uhd {
//
// This is a directory where temporary files can be written. The path is
// chosen as follows:
// - If the UHD_TMP_PATH environment variable is set, its value is returned.
// - Otherwise, OS-specific defaults are used to determine the temporary
// directory.
UHD_API std::string get_tmp_path(void);
//
// This is the path to the directory containing the UHD library (e.g.,
// libuhd.so or uhd.dll).
UHD_API std::string get_lib_path(void);
//
// This path is typically identical with the installation prefix, but can be
// overridden with the UHD_PKG_PATH environment variable.
UHD_API std::string get_pkg_path(void);
//
// This path is typically identical with get_pkg_path()/share/uhd, but can be
// overridden with the UHD_PKG_DATA_PATH environment variable.
//
// This path is where UHD stores data files that are not part of the library
// itself, such as images, RFNoC YAML files, and calibration data.
UHD_API std::string get_pkg_data_path(void);
UHD_API std::string get_cal_data_path(void);
//
// This is a list of paths UHD will use to find additional modules to load at
// runtime.
UHD_API std::vector<fs::path> get_module_paths(void);
UHD_API std::string get_images_dir(const std::string& search_paths);
UHD_API std::string find_image_path(
const std::string& image_name, const std::string& search_paths = "");
UHD_API std::string find_utility(const std::string& name);
UHD_API std::string print_utility_error(
const std::string& name, const std::string& args = "");
} // 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_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.