aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-03 21:29:04 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-03 21:29:04 +0200
commitdaa2a0a54bd4dc6ea8cef43a5c1d0271cbcc71e7 (patch)
tree0c79b20fe392b760de144cf0c4926af8742cd584 /src
parentfbf452591da8f39da1478e636082ef425c994f05 (diff)
downloaddabmux-daa2a0a54bd4dc6ea8cef43a5c1d0271cbcc71e7.tar.gz
dabmux-daa2a0a54bd4dc6ea8cef43a5c1d0271cbcc71e7.tar.bz2
dabmux-daa2a0a54bd4dc6ea8cef43a5c1d0271cbcc71e7.zip
Fix iterator usage in FIG0/6
Diffstat (limited to 'src')
-rw-r--r--src/fig/FIG0_6.cpp42
1 files changed, 38 insertions, 4 deletions
diff --git a/src/fig/FIG0_6.cpp b/src/fig/FIG0_6.cpp
index 479d004..20fe78b 100644
--- a/src/fig/FIG0_6.cpp
+++ b/src/fig/FIG0_6.cpp
@@ -40,10 +40,8 @@ FillStatus FIG0_6::fill(uint8_t *buf, size_t max_size)
ssize_t remaining = max_size;
auto ensemble = m_rti->ensemble;
- update();
-
if (not m_initialised) {
- linkageSetFIG0_6 = linkageSubsets.begin();
+ update();
m_initialised = true;
}
@@ -198,7 +196,7 @@ FillStatus FIG0_6::fill(uint8_t *buf, size_t max_size)
}
if (linkageSetFIG0_6 == linkageSubsets.end()) {
- linkageSetFIG0_6 = linkageSubsets.begin();
+ update();
fs.complete_fig_transmitted = true;
}
@@ -229,6 +227,42 @@ void FIG0_6::update()
}
}
}
+
+ linkageSetFIG0_6 = linkageSubsets.begin();
+
+#if 0
+ etiLog.log(info, " Linkage Sets");
+ for (const auto& lsd : linkageSubsets) {
+
+ etiLog.log(info, " LSN 0x%04x", lsd.lsn);
+ etiLog.level(info) << " active " << (lsd.active ? "true" : "false");
+ etiLog.level(info) << " " << (lsd.hard ? "hard" : "soft");
+ etiLog.level(info) << " international " << (lsd.international ? "true" : "false");
+ etiLog.level(info) << " key service " << lsd.keyservice;
+
+ etiLog.level(info) << " ID list";
+ for (const auto& link : lsd.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 (lsd.international) {
+ etiLog.log(info, " ecc 0x%04x", link.ecc);
+ }
+ }
+ }
+#endif
}
}