#[repr(u32)]pub enum KnobSource {
NotRecorded = 0,
Default = 1,
Derived = 2,
Kconfig = 3,
Environment = 4,
Snippet = 5,
CommandLine = 6,
}Expand description
Which rung of the knob ladder decided a knob the record carries.
Issue 1549. A knob’s VALUE says what the image was built with; this says
who decided it, which is the half a reader needs before changing it: a
derived value is fixed by editing the declaration it came from, a stated
one by editing the statement. Spelled once, here, and packed into the
upper bits of each knob word that carries one (see the field docs).
zephyr/cmake/nros_cargo_build.cmake records the rung as
NROS_KNOB_SOURCE_<knob>; build.rs maps its spelling onto this.
Variants§
NotRecorded = 0
No resolver road reached this build (a cargo-only lane), so the record cannot say. The value next to it is NOT evidence of anything.
Default = 1
Nobody stated it and nothing derived it: the consumer’s own default.
Derived = 2
Derived from the image’s entity inventory.
Kconfig = 3
Stated in Kconfig (a .conf fragment, a snippet, or its default).
Environment = 4
Stated in the environment, which outranks everything: the build’s for a
compile-time knob, ROS_DOMAIN_ID at run time for a hosted image’s
domain.
Snippet = 5
Stated by a Zephyr snippet’s Kconfig fragment (-S <snippet>), issue
1550: a transport snippet is where an image that varies its link tends
to state its domain, and where one that forgets to is invisible.
CommandLine = 6
Stated on the cmake / west command line (-DCONFIG_<symbol>=<n>).
Implementations§
Source§impl KnobSource
impl KnobSource
Sourcepub const fn from_code(code: u32) -> Self
pub const fn from_code(code: u32) -> Self
The variant build.rs encoded as code, or KnobSource::NotRecorded
for a number this crate does not know.
Trait Implementations§
Source§impl Clone for KnobSource
impl Clone for KnobSource
Source§fn clone(&self) -> KnobSource
fn clone(&self) -> KnobSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more