summaryrefslogtreecommitdiffstats
path: root/src/utils.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-11-28 20:17:58 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-11-28 20:17:58 +0100
commitac6fff2d6d514c4b4d72088114c1f2e42c5968cd (patch)
treec6e7607b5090ceff1e69a1f0fff206b1a7a9c07b /src/utils.cpp
parentfedab89cd4625617b3e481f1f59ba0fc97b7305b (diff)
parent6800fb66282525542366bc58df3095b93e3bf8ca (diff)
downloaddabmux-ac6fff2d6d514c4b4d72088114c1f2e42c5968cd.tar.gz
dabmux-ac6fff2d6d514c4b4d72088114c1f2e42c5968cd.tar.bz2
dabmux-ac6fff2d6d514c4b4d72088114c1f2e42c5968cd.zip
Merge branch 'servicelinking' into next
Diffstat (limited to 'src/utils.cpp')
-rw-r--r--src/utils.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/utils.cpp b/src/utils.cpp
index cf57170..4c08e8b 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -366,6 +366,42 @@ void printSubchannels(vector<DabSubchannel*>& subchannels)
}
}
+static void printLinking(const shared_ptr<dabEnsemble> ensemble)
+{
+ etiLog.log(info, " Linkage Sets");
+ for (const auto& ls : ensemble->linkagesets) {
+
+ etiLog.level(info) << " set " << ls->get_name();
+ etiLog.log(info, " LSN 0x%04x", ls->lsn);
+ etiLog.level(info) << " active " << (ls->active ? "true" : "false");
+ etiLog.level(info) << " " << (ls->hard ? "hard" : "soft");
+ etiLog.level(info) << " international " << (ls->international ? "true" : "false");
+ etiLog.level(info) << " key service " << ls->keyservice;
+
+ etiLog.level(info) << " ID list";
+ for (const auto& link : ls->id_list) {
+ switch (link.type) {
+ case ServiceLinkType::DAB:
+ etiLog.level(info) << " type DAB";
+ break;
+ case ServiceLinkType::FM:
+ etiLog.level(info) << " type FM";
+ break;
+ case ServiceLinkType::DRM:
+ etiLog.level(info) << " type DRM";
+ break;
+ case ServiceLinkType::AMSS:
+ etiLog.level(info) << " type AMSS";
+ break;
+ }
+ etiLog.log(info, " id 0x%04x", link.id);
+ if (ls->international) {
+ etiLog.log(info, " ecc 0x%04x", link.ecc);
+ }
+ }
+ }
+}
+
void printEnsemble(const shared_ptr<dabEnsemble> ensemble)
{
etiLog.log(info, "Ensemble");
@@ -398,6 +434,8 @@ void printEnsemble(const shared_ptr<dabEnsemble> ensemble)
etiLog.level(info) << cluster->tostring();
}
}
+
+ printLinking(ensemble);
}
long hexparse(const std::string& input)