diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-08-15 00:03:04 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-08-15 00:03:04 +0200 |
commit | 3dab3da3f669e1f2c70fd81c13f67c9c5c77278a (patch) | |
tree | 17ad5b8949654a03cc741d7e910fecf3eb35a71a /src/ConfigParser.cpp | |
parent | ebe8447f4cee32e2a096438ca0b458036f646b28 (diff) | |
download | dabmux-3dab3da3f669e1f2c70fd81c13f67c9c5c77278a.tar.gz dabmux-3dab3da3f669e1f2c70fd81c13f67c9c5c77278a.tar.bz2 dabmux-3dab3da3f669e1f2c70fd81c13f67c9c5c77278a.zip |
Implement FIG0/18 for announcements
Diffstat (limited to 'src/ConfigParser.cpp')
-rw-r--r-- | src/ConfigParser.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp index 1ad9249..5290b0f 100644 --- a/src/ConfigParser.cpp +++ b/src/ConfigParser.cpp @@ -235,8 +235,7 @@ void parse_ptree(boost::property_tree::ptree& pt, bool service_already_existing = false; - for (auto srv : ensemble->services) - { + for (auto srv : ensemble->services) { if (srv->uid == serviceuid) { service = srv; service_already_existing = true; @@ -250,6 +249,18 @@ void parse_ptree(boost::property_tree::ptree& pt, service = new_srv; } + /* Parse ASu */ + service->ASu = 0; + for (size_t flag = 0; flag < 16; flag++) { + std::string announcement_name(annoucement_flags_names[flag]); + bool flag_set = + pt_service.get<bool>("announcements." + announcement_name, false); + + if (flag_set) { + service->ASu |= (1 << flag); + } + } + int success = -5; string servicelabel = pt_service.get<string>("label"); |