Skip to main content

TierSpec

Struct TierSpec 

Source
pub struct TierSpec<'a> {
    pub name: &'a str,
    pub groups: &'a [&'a str],
    pub priority: i64,
    pub stack_bytes: usize,
    pub spin_period_us: u64,
}
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.

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 · Source§

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

Performs copy-assignment from source. Read more
Source§

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

Source§

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

Formats the value using the given formatter. Read more
Source§

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

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, 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.