pub struct WaveformSchedule<const N: usize> { /* private fields */ }Expand description
Fixed-capacity waveform transition schedule.
N is the maximum number of transition windows that can be registered.
For typical TDMA/FHSS protocols with ≤ 64 hops per evaluation window,
N = 64 is sufficient. For burst-rich environments, use N = 128.
Implementations§
Source§impl<const N: usize> WaveformSchedule<N>
impl<const N: usize> WaveformSchedule<N>
Sourcepub fn add(&mut self, window: TransitionWindow) -> bool
pub fn add(&mut self, window: TransitionWindow) -> bool
Register a new transition window.
Returns true on success; false if the schedule is full
(capacity N). Caller must handle the full-schedule case
(e.g., emit a grammar Boundary event noting schedule overflow).
Sourcepub fn is_suppressed(&self, k: u32) -> bool
pub fn is_suppressed(&self, k: u32) -> bool
Returns true if observation k falls within any suppression window.
O(N) linear scan. For typical N ≤ 128 this is always sub-microsecond.
Sourcepub fn active_window(&self, k: u32) -> Option<&TransitionWindow>
pub fn active_window(&self, k: u32) -> Option<&TransitionWindow>
Returns the first active TransitionWindow containing k, if any.
Sourcepub fn overlap_count(&self, k: u32) -> usize
pub fn overlap_count(&self, k: u32) -> usize
Count of windows whose suppression interval overlaps observation k.
Values > 1 indicate overlapping transitions (e.g., simultaneous frequency hop and power ramp), which warrants extended suppression.
Sourcepub fn capacity_fraction(&self) -> f32
pub fn capacity_fraction(&self) -> f32
Fraction of capacity used (0.0–1.0).