From 44b906ff455f26fc8ca5ff789ba2844c5e9f6061 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 22 Jun 2021 12:19:09 +0200 Subject: Declutter repetition rate warnings in logs --- src/fig/FIGCarousel.cpp | 20 ++++++++++++++------ src/fig/FIGCarousel.h | 3 +++ 2 files changed, 17 insertions(+), 6 deletions(-) (limited to 'src/fig') 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 #include +#include #include #include "MuxElements.h" @@ -86,6 +87,8 @@ class FIGCarousel { void load_and_allocate(IFIG& fig, FIBAllocation fib); + std::unordered_set m_missed_deadlines; + FIGRuntimeInformation m_rti; // Some FIGs can be mapped to a specific FIB or to FIB_ANY -- cgit v1.2.3