summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-03-01 17:38:32 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-03-01 17:38:32 +0100
commit1b9902c5f9e059c8cef0be1a6d83cf665557e2a6 (patch)
tree3300cfd723d57a1e682587f3ea1cdd01e2c51e14 /src
parent11fc926de4f80d73effc779e2645d6cc778e6568 (diff)
downloaddabmux-1b9902c5f9e059c8cef0be1a6d83cf665557e2a6.tar.gz
dabmux-1b9902c5f9e059c8cef0be1a6d83cf665557e2a6.tar.bz2
dabmux-1b9902c5f9e059c8cef0be1a6d83cf665557e2a6.zip
Add active linkage set flag to configuration
Diffstat (limited to 'src')
-rw-r--r--src/ConfigParser.cpp3
-rw-r--r--src/MuxElements.cpp5
-rw-r--r--src/MuxElements.h1
3 files changed, 6 insertions, 3 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp
index e9fe91d..544f89c 100644
--- a/src/ConfigParser.cpp
+++ b/src/ConfigParser.cpp
@@ -99,6 +99,7 @@ static void parse_linkage(ptree& pt,
throw runtime_error("Invalid service linking definition");
}
+ bool active = pt_set.get("active", true);
bool hard = pt_set.get("hard", true);
bool international = pt_set.get("international", false);
@@ -109,7 +110,7 @@ static void parse_linkage(ptree& pt,
throw runtime_error("Invalid service linking definition");
}
- auto linkageset = make_shared<LinkageSet>(setuid, lsn, hard, international);
+ auto linkageset = make_shared<LinkageSet>(setuid, lsn, active, hard, international);
linkageset->keyservice = service_uid; // TODO check if it exists
auto pt_list = pt_set.get_child_optional("list");
diff --git a/src/MuxElements.cpp b/src/MuxElements.cpp
index fe7043a..c4682e4 100644
--- a/src/MuxElements.cpp
+++ b/src/MuxElements.cpp
@@ -750,10 +750,11 @@ unsigned short DabSubchannel::getSizeDWord() const
LinkageSet::LinkageSet(const std::string& name,
uint16_t lsn,
+ bool active,
bool hard,
bool international) :
lsn(lsn),
- active(true),
+ active(active),
hard(hard),
international(international),
m_name(name)
@@ -762,7 +763,7 @@ LinkageSet::LinkageSet(const std::string& name,
LinkageSet LinkageSet::filter_type(const ServiceLinkType type)
{
- LinkageSet lsd(m_name, lsn, hard, international);
+ LinkageSet lsd(m_name, lsn, active, hard, international);
lsd.active = active;
lsd.keyservice = keyservice;
diff --git a/src/MuxElements.h b/src/MuxElements.h
index f28a687..73637ac 100644
--- a/src/MuxElements.h
+++ b/src/MuxElements.h
@@ -463,6 +463,7 @@ class LinkageSet {
public:
LinkageSet(const std::string& name,
uint16_t lsn,
+ bool active,
bool hard,
bool international);