summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuntzeM <github@kuntze.email>2020-03-15 13:54:00 +0100
committerKuntzeM <github@kuntze.email>2020-03-15 13:54:00 +0100
commitaba6f8678180a88c397f2f41b1b750be264882d4 (patch)
treea312a1261af0679953c3622805f648c870e5966c
parentfc1f1640278e7eb228ec1a6290d30b95f1b6a476 (diff)
downloaddabmux-aba6f8678180a88c397f2f41b1b750be264882d4.tar.gz
dabmux-aba6f8678180a88c397f2f41b1b750be264882d4.tar.bz2
dabmux-aba6f8678180a88c397f2f41b1b750be264882d4.zip
add Alarm Announcement Workaround to set Cluster ID 0xFF in FIG 0/18
-rw-r--r--src/ConfigParser.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp
index 7a69202..dd0041e 100644
--- a/src/ConfigParser.cpp
+++ b/src/ConfigParser.cpp
@@ -505,7 +505,7 @@ static void parse_general(ptree& pt,
auto cl = make_shared<AnnouncementCluster>(name);
cl->cluster_id = hexparse(pt_announcement.get<string>("cluster"));
- if (cl->cluster_id == 0 or cl->cluster_id == 0xFF) {
+ if (cl->cluster_id == 0) {
throw runtime_error("Announcement cluster id " +
to_string(cl->cluster_id) + " is not allowed");
}
@@ -575,13 +575,19 @@ void parse_ptree(
continue;
}
try {
- service->clusters.push_back(hexparse(cluster_s));
+ auto cluster_id = hexparse(cluster_s);
+ if (cluster_id == 255) {
+ etiLog.level(warn) << "Announcement cluster id " +
+ to_string(cluster_id) + " is not allowed and is ignored in FIG 0/18.";
+ continue;
+ }
+ service->clusters.push_back(cluster_id);
}
catch (const std::exception& e) {
etiLog.level(warn) << "Cannot parse '" << clusterlist <<
"' announcement clusters for service " << serviceuid <<
": " << e.what();
- }
+ }
}
if (service->ASu != 0 and service->clusters.empty()) {