diff options
| author | Samuel Hunt <sam@maxxwave.co.uk> | 2026-01-12 18:34:52 +0000 |
|---|---|---|
| committer | Samuel Hunt <sam@maxxwave.co.uk> | 2026-01-12 18:34:52 +0000 |
| commit | 39b1f3e0bee9db081b130c8e11bf65b91c4ed81b (patch) | |
| tree | 9dbcb16fa60ae6cf58e8c910c49c75fd1aaae4d6 /src/fig/FIGCarouselPriority.h | |
| parent | 0f5c94de4d88ed79b0e3047c600d733c5715b1f8 (diff) | |
| download | dabmux-next.tar.gz dabmux-next.tar.bz2 dabmux-next.zip | |
Re-added rate_increment_msnext
Diffstat (limited to 'src/fig/FIGCarouselPriority.h')
| -rw-r--r-- | src/fig/FIGCarouselPriority.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/fig/FIGCarouselPriority.h b/src/fig/FIGCarouselPriority.h index fc41616..76be671 100644 --- a/src/fig/FIGCarouselPriority.h +++ b/src/fig/FIGCarouselPriority.h @@ -58,6 +58,23 @@ constexpr int PRIORITY_CRITICAL = 0; // Debug flag for repetition rate statistics - logs actual vs required rates #define PRIORITY_RATE_STATS_DEBUG 0 +/* Helper function to calculate the deadline for the next transmission, in milliseconds. + * All values are multiples of 24ms (ETI frame duration) for easier reasoning. + */ +inline int rate_increment_ms(FIG_rate rate) +{ + switch (rate) { + case FIG_rate::FIG0_0: return 96; // Special case for FIG 0/0 + case FIG_rate::A: return 240; // At least 10 times per second + case FIG_rate::A_B: return 480; // Between 10 times and once per second + case FIG_rate::B: return 960; // Once per second + case FIG_rate::C: return 24000; // Once every 10 seconds + case FIG_rate::D: return 30000; // Less than once every 10 seconds + case FIG_rate::E: return 120000; // All in two minutes + } + return 960; // Default to rate B if unknown +} + /* * FIGEntryPriority - Holds a FIG and its scheduling state * |
