aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-07-24 16:28:05 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-07-24 16:28:05 +0200
commitc336362fab1711126d1b548486105e09de9d69a0 (patch)
tree31e944f4ecb35f83dfa5ab634f26c2b779fa8d34 /src
parent3715980e5cb1e628a8fef1ee7d6f76c4f12157f7 (diff)
downloaddabmux-c336362fab1711126d1b548486105e09de9d69a0.tar.gz
dabmux-c336362fab1711126d1b548486105e09de9d69a0.tar.bz2
dabmux-c336362fab1711126d1b548486105e09de9d69a0.zip
Add some debugging to FIG0/19
Diffstat (limited to 'src')
-rw-r--r--src/fig/FIG0_19.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/fig/FIG0_19.cpp b/src/fig/FIG0_19.cpp
index 6da72a9..0558464 100644
--- a/src/fig/FIG0_19.cpp
+++ b/src/fig/FIG0_19.cpp
@@ -43,6 +43,8 @@ FIG0_19::FIG0_19(FIGRuntimeInformation *rti) :
m_rti(rti)
{ }
+#define FIG0_19_TRACE discard
+
FillStatus FIG0_19::fill(uint8_t *buf, size_t max_size)
{
using namespace std;
@@ -73,11 +75,15 @@ FillStatus FIG0_19::fill(uint8_t *buf, size_t max_size)
const int length_0_19 = 4;
fs.complete_fig_transmitted = true;
+ etiLog.level(FIG0_19_TRACE) << "FIG0_19::loop with " << allclusters.size() <<
+ " clusters";
for (auto& cluster : allclusters) {
+ etiLog.level(FIG0_19_TRACE) << "FIG0_19::cluster " << cluster->cluster_id;
if (fig0 == NULL) {
if (remaining < 2 + length_0_19) {
fs.complete_fig_transmitted = false;
+ etiLog.level(FIG0_19_TRACE) << "FIG0_19::no space FIG0";
break;
}
@@ -92,6 +98,7 @@ FillStatus FIG0_19::fill(uint8_t *buf, size_t max_size)
remaining -= 2;
}
else if (remaining < length_0_19) {
+ etiLog.level(FIG0_19_TRACE) << "FIG0_19::no space FIG0/19";
fs.complete_fig_transmitted = false;
break;
}
@@ -124,12 +131,15 @@ FillStatus FIG0_19::fill(uint8_t *buf, size_t max_size)
continue;
}
+ etiLog.level(FIG0_19_TRACE) << "FIG0_19::advance " << length_0_19;
+
fig0->Length += length_0_19;
buf += length_0_19;
remaining -= length_0_19;
}
fs.num_bytes_written = max_size - remaining;
+ etiLog.level(FIG0_19_TRACE) << "FIG0_19::out " << fs.num_bytes_written;
return fs;
}