Skip to main content

Module launch

Module launch 

Source

Structs§

PackageRuntimeRecord
Runtime-owned process and lifecycle metadata for one package wrapper.
RegistrationOutcome
Outcome of wait_for_registration_core:

Constants§

BOOT_CONSUMER_ID
Consumer id used by both rbnx-cli (deploy) and Soma when opening channels to call Driver(...) during boot. Atlas just records the edge for bookkeeping — the id is only ever read in inspect_atlas output, so we keep one stable string instead of inventing per-caller ones (would only add noise).
CMD_ACTIVATE
CMD_DEACTIVATE
CMD_INIT
CMD_SHUTDOWN
DRIVER_INIT_TIMEOUT
Max time we’ll wait for one Driver(CMD_*) RPC to return. 90s gives generous slack for slow-warming sensors (Webots’s camera can take 30–50s on cold boot). Primitive driver-side waits should stay strictly below this so they own their own timeout semantics rather than racing the CLI deadline.
DRIVER_REGISTER_TIMEOUT
Max time we’ll wait for a freshly spawned package to register its driver capability with atlas before giving up.

Functions§

call_driver_cmd
Issue one Driver(cmd) RPC against a freshly-connected channel, then release the channel. Returns the response’s state string on success; bails when ok=false or the RPC itself fails. Mirrors rbnx-cli’s boot behaviour for both CMD_INIT and CMD_ACTIVATE so Soma drives the same lifecycle transitions.
contract_id_to_service_name
Mirrors robonix_codegen::contract_gen::contract_id_to_service_name. Uniform PascalCase: robonix/primitive/chassis/driverRobonixPrimitiveChassisDriver. No prefix stripping. Full gRPC service path: /robonix.contracts.<this>/Driver.
is_expected_provider_registration
True when this is a fresh registration for the exact deployment instance.
is_new_provider_registration
True when provider did not exist in the snapshot or has since taken over its stable id with a new Atlas registration generation.
proc_start_time_ticks
Linux /proc/<pid>/stat field 22. The value is stable for the lifetime of a process and lets the watchdog distinguish its boot parent from a reused PID. Returns None when procfs is unavailable or the process exited.
process_has_boot_id
Prove that one process carries the exact boot ownership marker inherited from its rbnx boot parent. This is also the portable identity fallback for the detached watchdog on targets (notably macOS) without Linux procfs start ticks. Inspection failure is a mismatch so stale PIDs are never trusted.
resolve_runtime_driver_contract
Resolve the single runtime Driver selected by a package manifest.
shutdown_package_runtime
Stop one package runtime using the canonical shutdown order: Driver(CMD_SHUTDOWN) -> manifest stop -> TERM PGID -> KILL PGID.
shutdown_package_runtime_checked
Checked variant used by persisted boot-state teardown. A boot id is inherited by every wrapper and provider through RBNX_BOOT_ID; requiring a matching process in the recorded PGID prevents a stale state file from killing an unrelated process group after PID/PGID reuse.
snapshot_provider_ids
terminate_process_group
TERM one wrapper process group, wait until it exits, then KILL stragglers.
validate_runtime_driver_contracts
Enforce that Atlas exposes exactly the lifecycle Driver selected by the package manifest. This check runs before INIT, so config can never be sent to a missing, mismatched, or ambiguous runtime service.
wait_for_registration_core
Poll atlas until the exact deployment instance has a new registration, then briefly settle to see if it also declares a */driver gRPC capability.

Type Aliases§

ProviderRegistrationSnapshot
Snapshot provider ids and their opaque registration generations. Stable package ids may be taken over on restart, so ids alone cannot correlate a spawn; registration_id changes on every successful Atlas Register but not on heartbeat/state/capability updates.