Skip to main content

Module config

Module config 

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

SchedTaskSizing
One executor sched task’s own sizing, as build.rs derived 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 through SCHED_TASK_SIZINGS; crate::executor::sched_task_sizing turns a row into the ExecutorSizing its 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::KnobSource of the baked domain (which Kconfig fragment stated CONFIG_NROS_DOMAIN_ID), 0 when no configure recorded one.
BOOT_RMW_LOCAL_QUERYABLE
Z_FEATURE_LOCAL_QUERYABLE for the boot record: bits 0..7 the value, bits 8..15 the boot_report::KnobSource.
CALLBACK_SLOT_CAPACITY
The most callbacks one executor can hold: one bit per slot in each of its slot masks (SLOT_WORDS words 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). None when 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_publisher at every publisher registration.
DECLARED_QOS_ROWS
The QoS this image’s system DECLARED, per subscription: its history DEPTH and its RELIABILITY and DURABILITY, each None where nobody stated it. Read by declared_qos::check / declared_qos::honour at 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 of SCHED_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 SchedContext slots 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 None when 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 -r and 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
u64 words in one callback slot mask: enough for MAX_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 cbs callback slots. Scales the build-time ARENA_SIZE (which is sized for the default MAX_CBS) linearly by cbs, so a per-entry ExecutorSizing with a caller-chosen cbs gets 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-global NROS_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).