Expand description
Build-time configurable constants.
Values are set via environment variables at build time. See build.rs for env var names and defaults.
Modules§
- arena_
model - The arena derivation’s MODEL, as the consts it summed.
Structs§
- Sched
Task Sizing - One executor sched task’s own sizing, as
build.rsderived it from the sizing descriptor’s[[sched_task]]row: the callback slots, node slots and arena its members need, and the parameters they declare (None: the sched task stated no count, so it carves the image’s store). Read throughSCHED_TASK_SIZINGS;crate::executor::sched_task_sizingturns a row into theExecutorSizingits executor is carved at.
Constants§
- ARENA_
ACTION_ CLIENTS - How many callback slots the arena derivation budgeted at ActionClient size (set via NROS_EXECUTOR_ACTION_CLIENTS, default MAX_CBS).
- ARENA_
SIZE - Executor arena size in bytes (derived from MAX_CBS, RX_BUF_SIZE and ACTION_CLIENTS).
- BOOT_
DOMAIN_ SOURCE - The
boot_report::KnobSourceof the baked domain (which Kconfig fragment statedCONFIG_NROS_DOMAIN_ID), 0 when no configure recorded one. - BOOT_
RMW_ LOCAL_ QUERYABLE Z_FEATURE_LOCAL_QUERYABLEfor the boot record: bits 0..7 the value, bits 8..15 theboot_report::KnobSource.- CALLBACK_
SLOT_ CAPACITY - The most callbacks one executor can hold: one bit per slot in each of its
slot masks (
SLOT_WORDSwords of 64). - DECLARED_
PARAM_ SERVICE_ SHAPES - Per node, the contract’s declared parameters as the parameter services see them: [params, name_bytes, prefixes, prefix_bytes, strings, byte_arrays, bool_arrays, word_arrays, string_arrays] (NROS_DECLARED_PARAM_SERVICE_SHAPE).
Nonewhen the contract does not declare every node’s parameters. - DECLARED_
PUBLISHER_ QOS_ ROWS - The same for every PUBLISHER the system declared something about, from the sizing descriptor’s publisher rows. Read by
declared_qos::honour_publisherat every publisher registration. - DECLARED_
QOS_ ROWS - The QoS this image’s system DECLARED, per subscription: its history DEPTH and its RELIABILITY and DURABILITY, each
Nonewhere nobody stated it. Read bydeclared_qos::check/declared_qos::honourat every subscription registration (NROS_ENTITY_DECLARED_DEPTHS + the sizing descriptor). - DEFAULT_
RX_ BUF_ SIZE - Default subscription receive buffer size in bytes (set via NROS_EXECUTOR_SUBSCRIPTION_BUFFER_BYTES, default 1024).
- MAX_
AGE_ MONITORS - Contract-monitor AGE rows one executor can watch (set via NROS_EXECUTOR_MAX_AGE_MONITORS, derived from the contract’s
age_rows, default 8). - MAX_CBS
- Maximum number of executor callback slots (set via NROS_EXECUTOR_MAX_CBS, default 4).
- MAX_
EXECUTOR_ CBS - The most callbacks one executor of this image holds: the larger of the
default table (
MAX_CBS) and the one executor a level runner opens over every sched task’s callbacks (the sum ofSCHED_TASK_SIZINGS[..].cbs). - MAX_
EXTRA_ SESSIONS - Extra-session slots per executor, at most its node slots: the image’s backend count minus one (0 for a one-RMW image, 0 without rmw-cffi),
usize::MAX(one per node) when no backend count is stated. Set via NROS_EXECUTOR_EXTRA_SESSIONS. - MAX_
MONITORS - Contract-monitor RATE/LATENCY rows one executor can watch (set via NROS_EXECUTOR_MAX_MONITORS, derived from the contract’s
monitor_rows, default 8). - MAX_
NODES - Maximum number of Nodes attached to a single Executor (set via NROS_EXECUTOR_MAX_NODES, default 4).
- MAX_SC
- Maximum number of
SchedContextslots per executor (set via NROS_EXECUTOR_MAX_SC, default 8). - MAX_
SHUTDOWN_ CBS - Shutdown-hook slots PER PHASE – one table this size for pre-shutdown hooks and a second for on-shutdown hooks (set via NROS_EXECUTOR_MAX_SHUTDOWN_CBS, default 2).
- MAX_
VIOLATIONS - Contract-violation ring depth per executor, and the SWD record’s slot count (set via NROS_EXECUTOR_MAX_VIOLATIONS, default 8). The ring keeps the LATEST entries.
- MONITOR_
ARM_ GRACE_ MS - Arm the contract monitors anyway this many ms after the first spin, 0 = no deadline (set via NROS_MONITOR_ARM_GRACE_MS, default 0).
- MONITOR_
ARM_ ON_ CALL - Whether contract monitors wait for the application’s arm call (set via NROS_MONITOR_ARM_ON_CALL, default off = armed at the first spin).
- PARAM_
SERVICE_ BUFFER_ SIZE - Parameter service request/reply buffer size in bytes (set via NROS_EXECUTOR_PARAM_SERVICE_BUFFER_BYTES, default 4096). This is the FALLBACK – the buffer is
param_service_buffer_bytes(), which derives it from the contract when nothing states it. - PARAM_
SERVICE_ BUFFER_ STATED - Whether a rung STATED NROS_EXECUTOR_PARAM_SERVICE_BUFFER_BYTES (env, Kconfig, the board). A stated size wins over a derived one.
- PARAM_
SERVICE_ INBOX_ BYTES - The parameter-service INBOX slot size a rung STATED (NROS_PARAMS_SERVICE_INBOX_BYTES), or
Nonewhen nobody stated one. A stated size wins over the size derived from the contract’s declared parameters (never 0, which is refused). - PARAM_
SERVICE_ INBOX_ DEPTH - Requests one parameter-service queryable holds before the newest is dropped (NROS_PARAMS_SERVICE_INBOX_DEPTH, default 1). The parameter clients are sequential; 4 is the action path’s depth and this family used to pay it.
- RUNTIME_
REMAPS - Runtime remap-table slots per executor (
--ros-args -rand hand-declared rules; the launch’s rules are the flash table). Set via NROS_EXECUTOR_RUNTIME_REMAPS; default 16 on a target with process arguments, 0 on bare metal. - SCHED_
TASK_ SIZINGS - Each executor sched task’s own sizing, from the sizing descriptor’s
[[sched_task]]rows. Empty when the image is not sched-task, or a sched task did not compose, or a rung states an executor size: every executor is then the image’s, carved inline. - SLOT_
WORDS u64words in one callback slot mask: enough forMAX_EXECUTOR_CBS.- TRACE_
TAKES - Whether the callback trace emits a TAKE event per sample of every subscription by default (set via NROS_TRACE_TAKES, default off).
- TRACE_
TIMER_ EVERY - One timer tick in this many gets its trace start/end pair by default, 0 = none (set via NROS_TRACE_TIMER_EVERY, default 1).
- VIOLATION_
DRAIN_ REPORT - Whether a new executor starts with the drain-and-report hook on (set via NROS_VIOLATION_DRAIN_REPORT, default off).
Functions§
- arena_
size_ for - Default arena bytes for a per-entry executor holding
cbscallback slots. Scales the build-timeARENA_SIZE(which is sized for the defaultMAX_CBS) linearly bycbs, so a per-entryExecutorSizingwith a caller-chosencbsgets the same per-slot arena budget the global default used — a fat entry (more callbacks) gets a larger arena, a lean one a smaller one — without a workspace-globalNROS_EXECUTOR_ARENA_BYTES. Floored at the full default so no per-entry executor is ever smaller than a single-slot build would have been (the arena is a worst-case upper bound; over-provision is safe, under-provision fails entity creation).