aboutsummaryrefslogtreecommitdiffstats
path: root/src/ConfigParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ConfigParser.cpp')
-rw-r--r--src/ConfigParser.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp
index 7d166b6..2d500b3 100644
--- a/src/ConfigParser.cpp
+++ b/src/ConfigParser.cpp
@@ -3,7 +3,7 @@
2011, 2012 Her Majesty the Queen in Right of Canada (Communications
Research Center Canada)
- Copyright (C) 2022
+ Copyright (C) 2025
Matthias P. Braendli, matthias.braendli@mpb.li
http://www.opendigitalradio.org
@@ -110,10 +110,10 @@ static void parse_fig2_label(ptree& pt, DabLabel& label) {
}
// Parse the linkage section
-static void parse_linkage(ptree& pt,
- std::shared_ptr<dabEnsemble> ensemble)
+void parse_linkage(
+ const boost::optional<boost::property_tree::ptree&> pt_linking,
+ std::vector<std::shared_ptr<LinkageSet> >& linkageSets)
{
- auto pt_linking = pt.get_child_optional("linking");
if (pt_linking) {
for (const auto& it : *pt_linking) {
const string setuid = it.first;
@@ -132,7 +132,7 @@ static void parse_linkage(ptree& pt,
string service_uid = pt_set.get("keyservice", "");
auto linkageset = make_shared<LinkageSet>(setuid, lsn, active, hard, international);
- linkageset->keyservice = service_uid; // TODO check if it exists
+ linkageset->keyservice = service_uid; // existence check is done in validate_linkage_sets()
auto pt_list = pt_set.get_child_optional("list");
@@ -189,7 +189,7 @@ static void parse_linkage(ptree& pt,
linkageset->id_list.push_back(link);
}
}
- ensemble->linkagesets.push_back(linkageset);
+ linkageSets.push_back(linkageset);
}
}
}
@@ -910,7 +910,8 @@ void parse_ptree(
}
- parse_linkage(pt, ensemble);
+ const auto pt_linking = pt.get_child_optional("linking");
+ parse_linkage(pt_linking, ensemble->linkagesets);
parse_freq_info(pt, ensemble);
parse_other_service_linking(pt, ensemble);
}