Skip to main content

TierSpec

Struct TierSpec 

Source
pub struct TierSpec<'a> {
Show 13 fields pub name: &'a str, pub groups: &'a [&'a str], pub priority: i64, pub stack_bytes: usize, pub spin_period_us: u64, pub core: Option<u32>, pub preempt_threshold: Option<i64>, pub time_slice_us: Option<u64>, pub class: Option<&'a str>, pub period_us: Option<u64>, pub budget_us: Option<u64>, pub deadline_us: Option<u64>, pub deadline_policy: Option<&'a str>,
}
Expand description

One scheduling tier: an RTOS task running an Executor over the shared session, admitting only the listed callback groups.

All fields are literal-constructible so the codegen emitter can bake a const/static array of these straight from the resolved tier table in nros-plan.json.

Fields§

§name: &'a str

Tier name (matches the system.toml [tiers.<name>] key); used for the spawned task’s debug name.

§groups: &'a [&'a str]

Callback groups admitted on this tier. Passed verbatim to Executor::set_active_groups; an empty slice = wildcard (admit every group — the single-tier degenerate case).

§priority: i64

Raw per-RTOS task priority — the value passed straight to the native spawn call. The system author writes it in [tiers.<name>.<rtos>].priority, so it is already in the target kernel’s scale (FreeRTOS 0–7, ThreadX 0–31 lower=higher, …); i64 admits Zephyr’s negative coop priorities. (The *_priority_for mappers in this module are a separate utility for authors who prefer a normalized 0–31 scale; the codegen path uses the raw value verbatim.)

§stack_bytes: usize

Task stack size in bytes. 0 = let the board pick its default.

§spin_period_us: u64

Spin period for this tier’s spin_once loop, in microseconds.

§core: Option<u32>

CPU core to pin the tier task to (SMP boards); None = unpinned.

§preempt_threshold: Option<i64>

ThreadX preemption threshold (ThreadX targets only; bake-validated).

§time_slice_us: Option<u64>

Round-robin time slice in µs (#0266): Some requests time-slicing among same-priority tiers. ThreadX-only today (bake-validated); None = FIFO.

§class: Option<&'a str>

Scheduling class: "best_effort" | "real_time" | "time_triggered" (bake rejects "interrupt"); None = plain priority tier.

§period_us: Option<u64>

Callback period (µs) — time_triggered window period / sporadic replenishment period.

§budget_us: Option<u64>

Execution-time budget (µs) — sporadic-server budget (W3 wires it into the executor’s SchedContext).

§deadline_us: Option<u64>

Relative deadline (µs) for the deadline monitor (W3).

§deadline_policy: Option<&'a str>

On deadline miss: "ignore" | "warn" | "skip" | "fault".

Implementations§

Source§

impl<'a> TierSpec<'a>

Source

pub const fn single() -> TierSpec<'static>

A degenerate single tier: wildcard groups, normal priority, the board’s default stack. Equivalent to today’s single-task entry.

Trait Implementations§

Source§

impl<'a> Clone for TierSpec<'a>

Source§

fn clone(&self) -> TierSpec<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for TierSpec<'a>

Source§

impl<'a> Debug for TierSpec<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for TierSpec<'a>

§

impl<'a> RefUnwindSafe for TierSpec<'a>

§

impl<'a> Send for TierSpec<'a>

§

impl<'a> Sync for TierSpec<'a>

§

impl<'a> Unpin for TierSpec<'a>

§

impl<'a> UnsafeUnpin for TierSpec<'a>

§

impl<'a> UnwindSafe for TierSpec<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.