From 47c0abb544590f7a3472c36dc1d405265235e3bb Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 24 Jul 2018 16:30:28 +0200 Subject: Check if a FIG has changed its rate before sorting the FIGs --- src/fig/FIGCarousel.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/fig/FIGCarousel.h') diff --git a/src/fig/FIGCarousel.h b/src/fig/FIGCarousel.h index 5e102ad..ac0574d 100644 --- a/src/fig/FIGCarousel.h +++ b/src/fig/FIGCarousel.h @@ -39,13 +39,20 @@ namespace FIC { -struct FIGCarouselElement { - IFIG* fig; - int deadline; // unit: ms +class FIGCarouselElement { + public: + IFIG* fig; + int deadline; // unit: ms + + void reduce_deadline(); + void increase_deadline(); - void reduce_deadline(void); + /* Returns true if the repetition rate changed and the + * deadline was recalculated */ + bool check_deadline(); - void increase_deadline(void); + private: + FIG_rate m_last_rate = FIG_rate::A; }; enum class FIBAllocation { -- cgit v1.2.3