summaryrefslogtreecommitdiffstats
path: root/src/ConfigParser.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-15 23:41:49 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-15 23:41:56 +0200
commit2edd4076bc0e55177cedc57945b780dc35c9938f (patch)
tree1e1a92abc9dfada0d716aa91529f4be1ec540ab4 /src/ConfigParser.cpp
parenta9814a2a8e02928d69b28247b3e7c2a468d8987b (diff)
downloaddabmux-2edd4076bc0e55177cedc57945b780dc35c9938f.tar.gz
dabmux-2edd4076bc0e55177cedc57945b780dc35c9938f.tar.bz2
dabmux-2edd4076bc0e55177cedc57945b780dc35c9938f.zip
Fix several FIG0/19 bugs, subchan id in config
Diffstat (limited to 'src/ConfigParser.cpp')
-rw-r--r--src/ConfigParser.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp
index 38a4efb..7803ad5 100644
--- a/src/ConfigParser.cpp
+++ b/src/ConfigParser.cpp
@@ -134,8 +134,6 @@ uint16_t get_announcement_flag_from_ptree(
std::string announcement_name(annoucement_flags_names[flag]);
bool flag_set = pt.get<bool>(announcement_name, false);
- cerr << " CHECK FOR " << announcement_name << " " << flag_set << endl;
-
if (flag_set) {
flags |= (1 << flag);
}
@@ -244,7 +242,7 @@ void parse_ptree(boost::property_tree::ptree& pt,
ptree pt_announcement = announcement.second;
auto cl = make_shared<AnnouncementCluster>(name);
- cl->cluster_id = pt_announcement.get<uint8_t>("cluster");
+ cl->cluster_id = hexparse(pt_announcement.get<string>("cluster"));
cl->flags = get_announcement_flag_from_ptree(
pt_announcement.get_child("flags"));
cl->subchanneluid = pt_announcement.get<string>("subchannel");
@@ -255,6 +253,7 @@ void parse_ptree(boost::property_tree::ptree& pt,
}
catch (ptree_error& e) {
etiLog.level(info) << "No announcements defined in ensemble";
+ etiLog.level(debug) << "because " << e.what();
}
/******************** READ SERVICES PARAMETERS *************/
@@ -304,7 +303,7 @@ void parse_ptree(boost::property_tree::ptree& pt,
continue;
}
try {
- service->clusters.push_back(std::stoi(cluster_s));
+ service->clusters.push_back(hexparse(cluster_s));
}
catch (std::logic_error& e) {
etiLog.level(warn) << "Cannot parse '" << clusterlist <<
@@ -905,7 +904,7 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
/* Get id */
try {
- subchan->id = hexparse(pt.get<std::string>("subchid"));
+ subchan->id = hexparse(pt.get<std::string>("id"));
}
catch (ptree_error &e) {
for (int i = 0; i < 64; ++i) { // Find first free subchannel