From aba6f8678180a88c397f2f41b1b750be264882d4 Mon Sep 17 00:00:00 2001 From: KuntzeM Date: Sun, 15 Mar 2020 13:54:00 +0100 Subject: add Alarm Announcement Workaround to set Cluster ID 0xFF in FIG 0/18 --- src/ConfigParser.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/ConfigParser.cpp') 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(name); cl->cluster_id = hexparse(pt_announcement.get("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()) { -- cgit v1.2.3