pub struct TimeTriggeredSchedule<const N: usize> {
pub major_frame_us: u32,
pub windows: [TimeTriggeredWindow; N],
pub window_count: usize,
}Expand description
Fixed-size, no_std-friendly cyclic schedule. N is the
declared maximum window count; window_count is the active
length (callers can build the array up to N and set
window_count to the actual size used).
Fields§
§major_frame_us: u32§windows: [TimeTriggeredWindow; N]§window_count: usizeImplementations§
Source§impl<const N: usize> TimeTriggeredSchedule<N>
impl<const N: usize> TimeTriggeredSchedule<N>
Sourcepub const fn new_full(
major_frame_us: u32,
windows: [TimeTriggeredWindow; N],
) -> Self
pub const fn new_full( major_frame_us: u32, windows: [TimeTriggeredWindow; N], ) -> Self
Construct a schedule from an exhaustive [TimeTriggeredWindow; N]
array; window_count is set to N.
Sourcepub fn validate(&self) -> Result<(), TimeTriggeredScheduleError>
pub fn validate(&self) -> Result<(), TimeTriggeredScheduleError>
Validate the schedule: every window must fit inside
[0, major_frame_us) and windows must be non-overlapping
in offset-sorted order. Sliding-window check; O(N²) is fine
because TT schedules are small (rarely > 16 slots).
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize> Freeze for TimeTriggeredSchedule<N>
impl<const N: usize> RefUnwindSafe for TimeTriggeredSchedule<N>
impl<const N: usize> Send for TimeTriggeredSchedule<N>
impl<const N: usize> Sync for TimeTriggeredSchedule<N>
impl<const N: usize> Unpin for TimeTriggeredSchedule<N>
impl<const N: usize> UnsafeUnpin for TimeTriggeredSchedule<N>
impl<const N: usize> UnwindSafe for TimeTriggeredSchedule<N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more