aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2021-06-22 12:19:09 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2021-06-22 12:19:09 +0200
commit44b906ff455f26fc8ca5ff789ba2844c5e9f6061 (patch)
tree75ca3195a366ce809df870607c06cd218262fba9 /src
parentef28f42a0db7dffc7f790ca8be3642c59d723d53 (diff)
downloaddabmux-44b906ff455f26fc8ca5ff789ba2844c5e9f6061.tar.gz
dabmux-44b906ff455f26fc8ca5ff789ba2844c5e9f6061.tar.bz2
dabmux-44b906ff455f26fc8ca5ff789ba2844c5e9f6061.zip
Declutter repetition rate warnings in logs
Diffstat (limited to 'src')
-rw-r--r--src/fig/FIGCarousel.cpp20
-rw-r--r--src/fig/FIGCarousel.h3
2 files changed, 17 insertions, 6 deletions
diff --git a/src/fig/FIGCarousel.cpp b/src/fig/FIGCarousel.cpp
index f48b62c..0d05ef7 100644
--- a/src/fig/FIGCarousel.cpp
+++ b/src/fig/FIGCarousel.cpp
@@ -42,12 +42,6 @@ namespace FIC {
void FIGCarouselElement::reduce_deadline()
{
deadline -= 24; //ms
-
- if (deadline < 0) {
- etiLog.level(debug) <<
- "Could not respect repetition rate for FIG " <<
- fig->name() << " (" << deadline << "ms late)";
- }
}
void FIGCarouselElement::increase_deadline()
@@ -155,6 +149,16 @@ void FIGCarousel::load_and_allocate(IFIG& fig, FIBAllocation fib)
void FIGCarousel::update(unsigned long currentFrame)
{
m_rti.currentFrame = currentFrame;
+
+ if ((currentFrame % 250) == 0 and m_missed_deadlines.size() > 0) {
+ std::stringstream ss;
+ for (const auto& fig_missed_count : m_missed_deadlines) {
+ ss << " " << fig_missed_count;
+ }
+ m_missed_deadlines.clear();
+
+ etiLog.level(info) << "Could not respect repetition rates for FIGs:" << ss.str();
+ }
}
void dumpfib(const uint8_t *buf, size_t bufsize) {
@@ -175,6 +179,10 @@ size_t FIGCarousel::write_fibs(
auto& fig = fib_fig.second;
for (auto& fig_el : fig) {
fig_el.reduce_deadline();
+
+ if (fig_el.deadline < 0) {
+ m_missed_deadlines.insert(fig_el.fig->name());
+ }
}
}
diff --git a/src/fig/FIGCarousel.h b/src/fig/FIGCarousel.h
index 29ede3b..0d482ae 100644
--- a/src/fig/FIGCarousel.h
+++ b/src/fig/FIGCarousel.h
@@ -35,6 +35,7 @@
#include "fig/FIG2.h"
#include <list>
#include <map>
+#include <unordered_set>
#include <memory>
#include "MuxElements.h"
@@ -86,6 +87,8 @@ class FIGCarousel {
void load_and_allocate(IFIG& fig, FIBAllocation fib);
+ std::unordered_set<std::string> m_missed_deadlines;
+
FIGRuntimeInformation m_rti;
// Some FIGs can be mapped to a specific FIB or to FIB_ANY