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.

Constants§

ARENA_ACTION_CLIENTS
How many callback slots the arena derivation budgeted at ActionClient size (set via NROS_EXECUTOR_ACTION_CLIENTS, default MAX_CBS). Issue 0900.
ARENA_SIZE
Executor arena size in bytes (derived from MAX_CBS, RX_BUF_SIZE and ACTION_CLIENTS).
DEFAULT_RX_BUF_SIZE
Default subscription receive buffer size in bytes (set via NROS_SUBSCRIPTION_BUFFER_SIZE, default 1024).
MAX_CBS
Maximum number of executor callback slots (set via NROS_EXECUTOR_MAX_CBS, default 4).
MAX_NODES
Maximum number of Nodes attached to a single Executor (set via NROS_EXECUTOR_MAX_NODES, default 4). Phase 104.C.2.
MAX_SC
Maximum number of SchedContext slots per executor (set via NROS_EXECUTOR_MAX_SC, default 8). Phase 110.B.
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). Issue 0790.
PARAM_SERVICE_BUFFER_SIZE
Parameter service request/reply buffer size in bytes (set via NROS_PARAM_SERVICE_BUFFER_SIZE, default 4096).

Functions§

arena_size_for
phase-271 — 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_SIZE. 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).