aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/blockdef_xml_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/rfnoc/blockdef_xml_impl.cpp')
-rw-r--r--host/lib/rfnoc/blockdef_xml_impl.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/host/lib/rfnoc/blockdef_xml_impl.cpp b/host/lib/rfnoc/blockdef_xml_impl.cpp
index d8f749aa0..50faf6905 100644
--- a/host/lib/rfnoc/blockdef_xml_impl.cpp
+++ b/host/lib/rfnoc/blockdef_xml_impl.cpp
@@ -213,7 +213,9 @@ public:
}
}
} catch (std::exception &e) {
- UHD_LOGGER_WARNING("RFNOC") << "has_noc_id(): caught exception " << e.what() ;
+ UHD_LOGGER_WARNING("RFNOC")
+ << "has_noc_id(): caught exception " << e.what()
+ << " while parsing file: " << filename.string();
return false;
}
return false;
@@ -223,7 +225,11 @@ public:
_type(type),
_noc_id(noc_id)
{
- //UHD_LOGGER_INFO("RFNOC") << "Reading XML file: " << filename.string().c_str() ;
+ UHD_LOGGER_DEBUG("RFNOC") <<
+ boost::format("Reading XML file %s for NOC ID 0x%08X")
+ % filename.string().c_str()
+ % noc_id
+ ;
read_xml(filename.string(), _pt);
try {
// Check key is valid
@@ -352,7 +358,8 @@ public:
arg["type"] = "string";
}
if (not arg.is_valid()) {
- UHD_LOGGER_WARNING("RFNOC") << boost::format("Found invalid argument: %s") % arg.to_string() ;
+ UHD_LOGGER_WARNING("RFNOC")
+ << "Found invalid argument: " << arg.to_string();
is_valid = false;
}
args.push_back(arg);
@@ -408,15 +415,14 @@ blockdef::sptr blockdef::make_from_noc_id(uint64_t noc_id)
std::vector<fs::path> valid;
// Check if any of the paths exist
- for(const fs::path &base_path: paths) {
+ for (const auto& base_path : paths) {
fs::path this_path = base_path / XML_BLOCKS_SUBDIR;
if (fs::exists(this_path) and fs::is_directory(this_path)) {
valid.push_back(this_path);
}
}
- if (valid.empty())
- {
+ if (valid.empty()) {
throw uhd::assertion_error(
"Failed to find a valid XML path for RFNoC blocks.\n"
"Try setting the enviroment variable UHD_RFNOC_DIR "
@@ -425,7 +431,7 @@ blockdef::sptr blockdef::make_from_noc_id(uint64_t noc_id)
}
// Iterate over all paths
- for(const fs::path &path: valid) {
+ for (const auto& path : valid) {
// Iterate over all .xml files
fs::directory_iterator end_itr;
for (fs::directory_iterator i(path); i != end_itr; ++i) {