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,
pub core: Option<u32>,
pub preempt_threshold: Option<i64>,
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 strTier 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: i64Raw 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: usizeTask stack size in bytes. 0 = let the board pick its default.
spin_period_us: u64Spin 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).
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".